weather-mcp-server-py
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@weather-mcp-server-pywhat's the weather in Beijing?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Weather Query MCP Service (Python Edition) 🌤
A weather query MCP service implemented with the official mcp Python SDK (FastMCP). Communicates with any MCP client (such as Claude Desktop, WorkBuddy, etc.) via stdio, allowing AI assistants to query the current weather of a specified city in real time.
💡 Weather data comes from Open-Meteo, no registration or API Key required.
✨ Features
⚡ Pure stdio communication: plug-and-play, no open ports or HTTP service needed.
🌍 Multilingual city names: supports Chinese and English city names, such as
北京,Beijing,Tokyo.🔒 Zero keys: data comes from Open-Meteo, no personal data collected, no request body sent.
🛡 Robust error handling: returns friendly Chinese prompts for non-existent cities or network errors without crashing.
🎨 Friendly return format: structured text + emoji, easy for clients to display directly.
🛠 Provided Tools
Tool Name | Parameters | Description |
|
| Returns the city's current weather: conditions / temperature / feels-like temperature / humidity / wind speed / observation time |
Return Example
📍 北京(中国)当前天气
🌤 天气:晴
🌡 温度:27.3°C(体感 28.1°C)
💧 湿度:52%
🍃 风速:12.4 km/h
🕒 观测时间:2026-08-19T13:00📋 Requirements
Python >= 3.10 (3.13 recommended, verified on this machine)
Internet access required (calls the Open-Meteo API)
🚀 Installation and Running
git clone https://github.com/<your-name>/weather-mcp-server-py.git
cd weather-mcp-server-py
# 创建虚拟环境(可选但推荐)
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 安装依赖
pip install -r requirements.txt
# 运行(stdio 模式,通常由 MCP 客户端拉起)
python weather_server.pyThis service communicates with clients via standard input/output (stdio);
python weather_server.pystarts in stdio mode by default.
🔌 Connecting to MCP Clients
Using claude_desktop_config.json / mcp.json in Claude Desktop / WorkBuddy as an example, add the following configuration
(replace python3 with the absolute path to the interpreter on your machine; use python.exe on Windows):
{
"mcpServers": {
"weather": {
"command": "python3",
"args": ["/absolute/path/to/weather_server.py"]
}
}
}After saving and restarting the client, you can request "query the weather in Beijing" in a conversation, and the model will automatically call the get_weather tool.
📁 Project Structure
weather-mcp-server-py/
├── weather_server.py # MCP 服务主实现(FastMCP)
├── requirements.txt # 依赖清单
└── README.md # 本说明🧰 Technical Highlights
City → coordinates: uses the Open-Meteo Geocoding API;
Current weather: uses the Open-Meteo Forecast API, with the
currentfield fetching temperature / feels-like / humidity / wind speed / weather code in one call;Weather code → Chinese description: built-in WMO weather code mapping table;
If the network is unavailable or the city cannot be found at runtime, a friendly Chinese error prompt is returned, ensuring the tool always returns a string.
🤝 Contributing
Issues and Pull Requests are welcome, such as adding more weather metrics, supporting more client examples, or adding tests.
📄 License
MIT © 2026 weather-mcp-server-py contributors
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 Connectors
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Visual Crossing Weather MCP — wraps the Visual Crossing Weather Timeline API
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/yuxiaosenstar/weather-mcp-server-py'
If you have feedback or need assistance with the MCP directory API, please join our Discord server