MCP Weather Server
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., "@MCP Weather Serverget the forecast for London for the next 3 days"
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.
MCP Weather Server
一个基于 FastMCP 的天气查询 MCP Server,提供当前天气、未来天气预报、摄氏度/华氏度转换、热门城市资源和旅行天气建议 Prompt。
项目包含两个启动入口:
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):生成旅行天气咨询 Prompt。
天气数据来自 wttr.in,无需额外 API Token。
Related MCP server: MCP Weather Free
环境要求
Python >= 3.12
推荐使用
uv管理依赖
安装依赖
uv sync如果不使用 uv,也可以在虚拟环境中安装依赖:
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 仓库地址,并使用远程入口文件:
python server_remote.py服务会以 Streamable HTTP 方式启动,监听 0.0.0.0:8000,MCP endpoint 为:
/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.
Latest Blog Posts
- 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