weather-mcp
weather-mcp
MCP (Model Context Protocol) サーバーで、AI アシスタント(Claude、Gemini CLI、または MCP 互換クライアント)が、生の数値を取得するだけでなく、ライブデータを使って実際の天気に関する質問に答えられるようにします。
Powered by Open-Meteo — 無料、API キー不要。
単なる生の天気 API ラッパーではない理由
多くの天気統合は単に temperature: 22°C を返すだけです。このサーバーはその上に推論レイヤーを追加するため、通常の API では直接答えられないことを質問できます。
get_weather("Bangalore")— 現在の状況と今日の予報should_i_carry_umbrella("Mumbai")— 雨の確率だけでなく、理由付きで yes/no を回答is_good_for_outdoors("Delhi")— 雨・風・気温をまとめて確認し、外に良い日かどうかを判断compare_weather("Bangalore", "Delhi")— 2 つの都市を一度に比較
Related MCP server: Weather MCP Server
セットアップ
git clone https://github.com/darshan0548/weather-mcp.git
cd weather-mcp
python3 -m venv venv
source venv/bin/activate # on Windows: venv\Scripts\activate
pip install -r requirements.txtテストの実行
実際の API に対する簡単な動作確認(モックなし、API キー不要):
python test_weather.pyClaude Desktop への接続
Claude Desktop の設定ファイル(claude_desktop_config.json)に次を追加してください:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/absolute/path/to/weather-mcp/server.py"]
}
}
}Gemini CLI への接続
~/.gemini/settings.json に次を追加してください:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/absolute/path/to/weather-mcp/server.py"]
}
}
}クライアントを再起動し、「今日、チェンナイで念のための傘を持っていくべきですか?」 のように質問するだけです。
プロジェクト構造
weather_core.py # talks to the Open-Meteo API, no MCP-specific code
weather_advice.py # reasoning layer built on top of raw weather data
server.py # MCP server — wires the above into tools
test_weather.py # sanity tests against the real APIweather_core.py と weather_advice.py は意図的に分離されています。どちらも MCP 依存がまったくないため、単体でテストしたり再利用したりするのが簡単です。
コントリビューション
PR を歓迎しています。ツールを追加したい場合のアイデア:
今日の概要だけでなく、1 時間ごとの予報の内訳
大気質データ(Open-Meteo にも無料のエンドポイントがあります)
複数日にわたる旅行プラン(今週、屋外イベントに最適な日)
激しい天気警報
新しいツールが生データの上に推論を加える場合は weather_advice.py に、純粋なデータ取得の場合は weather_core.py に入れて、server.py に新しい @mcp.tool() として配線してください。
ライセンス
MIT — LICENSE を参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.21Creative Commons Zero v1.0 Universal
- FlicenseNot gradedqualityBmaintenanceProvides real-time weather data via 12 tools (current weather, forecasts, air quality, umbrella advice, etc.) using Open-Meteo and FastMCP, enabling LLMs to answer weather-related queries.1
- AlicenseNot gradedqualityCmaintenanceProvides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.MIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
Real-time weather conditions and multi-day forecasts via Open-Meteo — free, no API key required
US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/darshan0548/weather-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server