weather-mcp-server
Click on "Deploy 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-serverwhat's the weather in Shanghai?"
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 Server
一个基于官方 MCP Python SDK FastMCP 的天气查询 MCP 服务器。服务通过 wttr.in 获取实时天气数据,支持中文城市名映射,也支持直接传入英文城市名。
功能
get_weather(city: str): 查询指定城市当前天气。list_supported_cities(): 列出内置支持的中文城市。get_server_info(): 查看服务器名称、版本、工具列表和数据来源。
Related MCP server: MCP Weather Server
环境要求
Python 3.10+
可访问
https://wttr.in
本地运行
pip install -r requirements.txt
python server.py服务器默认使用 stdio transport,适合由支持 MCP 的客户端以子进程方式启动。容器环境默认使用 streamable-http transport,监听 0.0.0.0:8000。
MCP 客户端配置示例
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/absolute/path/to/weather_mcp_server/server.py"]
}
}
}Docker 运行
docker build -t weather-mcp-server .
docker run --rm -i weather-mcp-server如需在本地用 HTTP transport 运行:
MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 PORT=8000 python server.py发布到 Smithery
本目录已经包含 Smithery 所需的 smithery.yaml 和推荐的 Dockerfile。如果你的 GitHub 仓库根目录不是本目录,请在 Smithery 的 GitHub integration 设置里将 base directory 配置为:
weather_mcp_server然后在 Smithery 中触发部署即可。
数据来源
天气数据来自 wttr.in。请注意第三方服务的可用性、限流策略和数据准确性可能会变化。
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for current weather and multi-day forecasts worldwide, Chinese city names and output.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides real-time weather information, 4-day forecasts, and city search functionality for Chinese cities via the AMap API. It enables users to query weather data using city names or administrative codes through natural language interactions.1MIT
- FlicenseAqualityDmaintenanceA weather query MCP server providing current weather, forecasts, temperature conversion, and travel weather advice using wttr.in without API tokens.3-
- AlicenseNot gradedqualityDmaintenanceReal-time weather query MCP server supporting 12 Chinese cities (and global cities via English names) using wttr.in API, built on HelloAgents framework.MIT
- FlicenseNot gradedqualityCmaintenanceA FastMCP-based weather query tool using Open-Meteo API to get real-time weather by city name or coordinates, requiring no API key.-