Weather MCP
A weather server providing weather information for locations within the United States.
MCPサーバーを作ってみよう
参考資料
2025/6/13やったこと
- 記事通りに構築
- 一旦記事通り構築できたはす記述しているsrcのモジュールがうまく読み込めていないので、また確認
2025/6/28 エラー解消と解決方法
🔍 発生した問題
- 不要なコードとインポート:
src/index.tsに記事にない追加のコードが混入 - Node.jsバージョン: v14では動作せず、v20が必要
- CursorのMCP設定: Node.jsの正確なパスが必要
- 不要な依存関係: 記事で使用されていない
axiosがpackage.jsonに含まれている
✅ 解決方法
1. src/index.tsの修正
- 不要なインポート
import { getWeather } from './weather.js';を削除 - 記事にない
get-city-weatherツールを削除 - メイン関数を記事通りのMCPサーバー起動処理に修正
2. Node.jsバージョン変更
nvm use 20
nvm alias default 20
3. package.json修正
- 不要な依存関係
axiosを削除 - 記事通りの構成に統一
4. 不要ファイル削除
- 使用されていない
src/weather.tsを削除
5. CursorのMCP設定
{
"mcpServers": {
"weather": {
"command": "/Users/r273-2576/.nvm/versions/node/v20.18.0/bin/node",
"args": ["/Users/r273-2576/Documents/AI-mokumoku/weather-mcp/build/index.js"]
}
}
}
🎯 動作確認
- MCPサーバーのビルド成功 (
npm run build) - CursorでMCP設定が緑色のインジケーター表示
- 「サンフランシスコの天気を教えて」で正常に天気情報取得可能
📝 注意点
- NWS APIはアメリカ国内の天気情報のみ対応
- 東京などの海外都市は非対応
- Cursor設定変更後は必ず完全再起動が必要
Weather MCP Server構築
-
どんなものを作ったか
- アメリア国内の天気情報を取得できる
-
検証結果
-
記事通りにはいかなかった点
- Nodeのバージョン
- 案件の影響でv14を使用していた。実行するバージョンがv20系からになっており、nvmでv20系を設定していてもチャットで実行してもらうときには、グローバルのパスがv14系になっていたので実行できなかった。
- Nodeのバージョン
Server Terkait
Rakuten Travel
Search for hotels and check their availability using the Rakuten Travel API.
Untappd
Query the Untappd API for beer and brewery information.
Rememberizer Common Knowledge
Provides semantic search and retrieval for internal company knowledge bases, including documents and Slack discussions.
ChunkHound
A local-first semantic code search tool with vector and regex capabilities, designed for AI assistants.
Copus
Search human-curated content recommendations from real people who explain why resources are valuable - The Internet Treasure Map
mcpdoc
Access website documentation for AI search engines (llms.txt files) over MCP.
CUFinder
Access 1B+ verified contacts and 85M+ companies for B2B lead generation, person lookup, company enrichment, and local business search directly through AI assistants.
Image Sorcery
At Sunrise Apps, we believe AI agents should be limitless, especially when it comes to visual data. We created ImageSorcery to bridge the critical gap in AI's ability to interact with and manipulate images directly, all while upholding the highest standards of privacy and security.
Fish MCP Server
Search for fish species using the FishBase database. Supports natural language queries in both Japanese and English.
Source Library
Search and cite 500+ translated historical texts (alchemy, Hermeticism, Renaissance) with DOI-backed academic citations. Access rare Latin and German manuscripts from the 15th-18th centuries.