MCP Weather
MCP 天気サーバー
AccuWeather API を使用して時間ごとおよび毎日の天気予報を提供するモデル コンテキスト プロトコル (MCP) サーバー。
クイックスタート
AccuWeather API キーが必要です (無料レベルあり)。
ここでサインアップしてアプリを作成し、キーを取得してください。
API キーを環境変数としてエクスポートします。
export ACCUWEATHER_API_KEY=your_api_key_here次に、次のコマンドで MCP Weather サーバーを直接実行します。
npx -y @timlukahorstmann/mcp-weatherまたは、スーパーゲートウェイ経由の HTTP/REST アクセスの場合:
npx -y supergateway --stdio "npx -y @timlukahorstmann/mcp-weather" \
--port 4004 \
--baseUrl http://127.0.0.1:4004 \
--ssePath /messages \
--messagePath /message \
--cors "*" \
--env ACCUWEATHER_API_KEY="$ACCUWEATHER_API_KEY"Related MCP server: Weather MCP Server
MCP サーバー設定例
Claude Desktop またはその他の MCP 互換クライアントと統合するには、これを構成に追加します (例: claude_desktop_config.json )。
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@timlukahorstmann/mcp-weather"],
"env": {
"ACCUWEATHER_API_KEY": "your_api_key_here"
}
}
}
}概要
このMCPサーバーは、Claudeのような大規模言語モデルがリアルタイムの気象データにアクセスすることを可能にします。LLMと統合することで、モデルは以下のことが可能になります。
正確で最新の天気予報を取得します
今後12時間の1時間ごとの天気データを提供する
最大15日間の毎日の天気予報にアクセス
データをメートル法(°C)とヤードポンド法(°F)の両方で表示します
気温、天候、降水量情報、その他の天気の詳細を表示します
前提条件
Node.js ≥18
AccuWeather API キー (
.envまたはシェル経由で設定)
設定
このリポジトリをクローンします:
git clone https://github.com/TimLukaHorstmann/mcp-weather.git cd mcp-weather依存関係をインストールします:
npm installAccuWeather API キーを取得します。
AccuWeather APIに登録する
新しいアプリを作成し、APIキーを取得する
API キーを使用して
.envファイルを作成します。ACCUWEATHER_API_KEY=your_api_key_hereプロジェクトをビルドします。
npm run build
Claude Desktopでの使用
この MCP サーバーを使用するように Claude Desktop を構成します。
クロードデスクトップを開く
設定 > 開発者 > 設定の編集に移動します
claude_desktop_config.jsonに以下を追加します。
{ "mcpServers": { "weather": { "command": "npx", "args": ["-y", "@timlukahorstmann/mcp-weather"], "env": { "ACCUWEATHER_API_KEY": "your_api_key_here" } } } }Claudeデスクトップを再起動します
新しい会話で、プラグアイコンをクリックして「天気」を選択し、MCPサーバーを有効にします。
次のような天気予報をクロードに尋ねることができるようになりました。
「ニューヨーク市の1時間ごとの天気予報はどうですか?」
「ロンドンの5日間の天気予報をください。」
「今週の東京の天気は華氏でどうなりますか?」
「明日サンフランシスコは雨が降りますか?」
利用可能なツール
1時間ごとの天気予報
ツール名:
weather-get_hourly今後12時間の1時間ごとの予報を提供します
パラメータ:
sessionId(必須): セッションの一意の識別子location(必須): 市または場所の名前units(オプション): 「メートル法」(摂氏、デフォルト)または「帝国法」(華氏)
毎日の天気予報
ツール名:
weather-get_daily最大15日間の毎日の予報を提供します
パラメータ:
sessionId(必須): セッションの一意の識別子location(必須): 市または場所の名前days(オプション):予測日数(1、5、10、または15。デフォルトは5)units(オプション): 「メートル法」(摂氏、デフォルト)または「帝国法」(華氏)
発達
開発依存関係をインストール:
npm installコードをLintする:
npm run lintビルド:
npm run buildテストを実行:
npm test開発モードで起動:
npm run dev
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
将来の機能強化
MCP Weather Server は常に改善に取り組んでいます。今後のリリースで検討している機能は以下のとおりです。
拡張時間別予報: 12 時間を超える、たとえば 24 時間または 48 時間。
気象警報: AccuWeather の悪天候警報 API との統合。
**場所のオートコンプリート:**オートコンプリートの提案による場所の検索が改善されました。
**過去の気象データ:**過去の気象状況にアクセスできます。
他の機能についてのアイデアがある場合は、お気軽に問題を報告してください。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
Available Tools
2 toolsweather-get_dailyA
Get daily weather forecast for up to 15 days
Inputs: location (required), days, units.
weather-get_hourlyA
Get hourly weather forecast for the next 12 hours
Inputs: location (required), units.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one provides daily forecasts for up to 15 days, while the other provides hourly forecasts for the next 12 hours. There is no overlap in functionality, and an agent can easily differentiate between them based on the time granularity and forecast duration.
Both tools follow a consistent naming pattern with a prefix 'weather-' followed by a verb_noun structure (get_daily, get_hourly). This pattern is predictable and enhances readability, making it easy for agents to understand the tool's purpose at a glance.
With only 2 tools, the server feels under-scoped for a weather domain. While the tools cover forecast retrieval, there are obvious gaps such as current weather conditions, historical data, or location-based searches, making the set too thin for comprehensive weather-related tasks.
The tool surface is severely incomplete for a weather server. It lacks essential operations like getting current weather, searching locations, or accessing historical data, which are core to weather applications. Agents will face dead ends when trying to perform basic weather queries beyond forecasts.
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Get daily weather forecasts for any place on Earth via a hosted read-only MCP server.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides current weather information and 3-day forecasts for specified cities using the Open-Meteo API.1-
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides weather information and forecasts based on user location or address input.613 npm8MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides real-time weather data and forecasts for any city.1ISC
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that interfaces with OpenWeatherMap API to provide real-time weather information and forecasts for cities worldwide.-