MCP Weather Server
MCP Weather Server
FastMCPベースの天気検索MCPサーバーで、現在の天気、今後の天気予報、摂氏/華氏の変換、人気都市のリソース、および旅行の天気アドバイス用プロンプトを提供します。
プロジェクトには2つの起動エントリーポイントが含まれています:
server.py:ローカルstdioモード。Claude Desktop、Cursor、Cherry StudioなどのローカルMCPクライアントに適しています。server_remote.py:Streamable HTTPモード。ModelScopeなどのリモートホスティングプラットフォームへのデプロイに適しています。
機能
get_weather(city: str):指定した都市の現在の天気を検索します。get_forecast(city: str, days: int = 3):指定した都市の今後の天気予報を検索します(デフォルトは3日間)。temperature_convert(value: float, from_unit: str):摂氏と華氏の相互変換を行います。weather://cities:よく使われる都市リストのリソースを返します。travel_advisor(destination: str, date: str):旅行の天気アドバイス用プロンプトを生成します。
天気データは wttr.in から取得しており、追加のAPIトークンは不要です。
Related MCP server: weather-mcp-server
環境要件
Python >= 3.12
依存関係の管理には
uvを推奨します
依存関係のインストール
uv syncuv を使用しない場合は、仮想環境で依存関係をインストールすることも可能です:
pip install "mcp[cli]>=1.27.0" "httpx>=0.28.1"ローカル実行
stdioモード:
uv run python server.pyMCPクライアントの設定例:
{
"mcpServers": {
"weather-server": {
"command": "uv",
"args": ["run", "python", "server.py"]
}
}
}リモート実行
Streamable HTTPモード:
uv run python server_remote.pyデフォルトのリスニング:
http://0.0.0.0:8000/mcp/リモートMCPクライアントの設定例:
{
"mcpServers": {
"weather-server": {
"url": "http://127.0.0.1:8000/mcp/"
}
}
}ModelScopeへのデプロイ手順
ModelScopeでMCP Serverを作成またはデプロイする際は、本プロジェクトのGitHubリポジトリURLを入力し、リモート用のエントリーファイルを使用してください:
python server_remote.pyサービスはStreamable HTTP方式で起動し、0.0.0.0:8000 をリッスンします。MCPエンドポイントは以下の通りです:
/mcp/プラットフォームがカスタム起動コマンドをサポートしている場合は、以下を推奨します:
uv run python server_remote.pyまたは、プラットフォーム環境で事前に依存関係をインストールした後に以下を使用します:
python server_remote.pyプロジェクト構造
.
├── README.md
├── pyproject.toml
├── server.py
├── server_remote.py
└── uv.lockライセンス
オープンソースとして公開する場合は、実際の状況に合わせてLicenseファイルを追加してください。
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
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides real-time weather data, hourly forecasts, and daily summaries using the free Open-Meteo API with no API key required. It enables users to search for weather conditions by specific coordinates or city names across multiple measurement units.1MIT
- AlicenseNot gradedqualityCmaintenanceA weather query MCP server based on FastMCP, supporting Chinese city names and fetching real-time weather data from wttr.in.MIT
- AlicenseNot gradedqualityCmaintenanceA real-time weather query MCP server supporting 12 major Chinese cities using the wttr.in API with no API key required.1MIT
- AlicenseNot gradedqualityCmaintenanceReal-time weather query MCP server providing current weather for cities via wttr.in, with support for listing built-in city mappings and server metadata.MIT
Related MCP Connectors
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
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/liusicheng/mcp-weather'
If you have feedback or need assistance with the MCP directory API, please join our Discord server