weather-mcp
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北京现在天气怎么样?"
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-mcp
一个用于查询天气的 MCP(Model Context Protocol) 服务,基于免费的 Open-Meteo 接口实现。
✅ 无需 API Key ✅ 支持全球任意地点 ✅ 实时天气 + 未来 16 天预报 ✅ 中文输出
LLM 客户端(Claude Desktop、Cursor、Cline 等)接入后,就能直接用自然语言问"北京现在多少度""东京未来三天天气怎么样"。
✨ 功能
工具 | 说明 |
| 查询指定地点的实时天气(温度、体感、天气状况、湿度、风、观测时间) |
| 查询指定地点未来 1–16 天的逐日预报(天气、最高/最低温、降水) |
支持城市名(如
北京、Shanghai、Tokyo)或经纬度(如39.9,116.4)地点解析使用 Open-Meteo 地理编码接口,返回中文地名
WMO 天气代码已映射为中文描述,风向转换为中文方位
Related MCP server: MCP Weather Server
📦 安装
要求 Python ≥ 3.10。
方式一:用 uv(推荐)
uv tool install weather-mcp或直接从源码安装:
git clone https://github.com/your-username/weather-mcp.git
cd weather-mcp
uv pip install -e .方式二:用 pip
git clone https://github.com/your-username/weather-mcp.git
cd weather-mcp
pip install -e .也可以不安装、直接用 requirements.txt:
pip install -r requirements.txt🔌 接入 MCP 客户端
Claude Desktop
编辑配置文件(macOS:~/Library/Application Support/Claude/claude_desktop_config.json,Windows:%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"weather": {
"command": "weather-mcp"
}
}
}如果是用 pip install -r requirements.txt 而非可编辑安装,请改用模块方式启动:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["-m", "weather_mcp"]
}
}
}💡 在 VS Code / Cursor 中若使用
.venv,把command指向虚拟环境里的python或脚本路径即可。
Cursor / Cline / 其他支持 MCP 的客户端
配置方式类似,使用 stdio 传输,命令为 weather-mcp(或 python -m weather_mcp)。
🛠 本地开发
git clone https://github.com/your-username/weather-mcp.git
cd weather-mcp
# 创建虚拟环境并安装
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
# 以开发模式运行(带可视化调试界面)
mcp dev src/weather_mcp/server.py
# 直接启动 stdio 服务
python -m weather_mcp项目结构
weather-mcp/
├── pyproject.toml # 打包配置(hatchling)+ 入口脚本
├── requirements.txt # 运行依赖
├── README.md
├── LICENSE # MIT
├── .gitignore
└── src/
└── weather_mcp/
├── __init__.py
├── __main__.py # python -m weather_mcp 入口
├── server.py # MCP 服务与工具定义(FastMCP)
└── weather.py # Open-Meteo 接口封装与解析📝 示例
接入后,你可以直接在对话里问:
"北京现在天气怎么样?"
"帮我查一下上海未来 5 天的天气预报"
"39.9,116.4 当前温度是多少?"
📄 许可证
MIT © weather-mcp 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 Servers
- AlicenseBqualityDmaintenanceEnables real-time weather queries for cities worldwide using Open-Meteo API. Provides 7-day forecasts with detailed information including temperature, wind, humidity, precipitation, and comfort level assessments in both Chinese and English.119MIT
- Flicense-qualityDmaintenanceProvides real-time weather information and 5-day forecasts for cities worldwide using the OpenWeatherMap API. Supports bilingual queries (Chinese and English) with comprehensive weather data including temperature, humidity, and wind speed.
- Alicense-qualityCmaintenanceEnables real-time weather queries for global cities via natural language, with support for Chinese and English city names and optional integration with OpenWeather API.151MIT
- Alicense-qualityBmaintenanceProvides real-time weather data to Claude using the Open-Meteo API, with no API key required. Enables natural language queries like 'What's the weather in Tokyo?'.15MIT
Related MCP Connectors
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No 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/wzp0720/weather-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server