MCP Weather 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., "@MCP Weather Server get 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
A weather query MCP server based on FastMCP, providing current weather, future forecasts, Celsius/Fahrenheit conversion, popular city resources, and travel weather advice prompts.
The project includes two entry points:
server.py: Local stdio mode, suitable for local MCP clients like Claude Desktop, Cursor, and Cherry Studio.server_remote.py: Streamable HTTP mode, suitable for deployment to remote hosting platforms like ModelScope.
Features
get_weather(city: str): Query current weather for a specified city.get_forecast(city: str, days: int = 3): Query future weather forecast for a specified city, default is 3 days.temperature_convert(value: float, from_unit: str): Convert between Celsius and Fahrenheit.weather://cities: Returns a resource list of common cities.travel_advisor(destination: str, date: str): Generate a travel weather advice prompt.
Weather data is provided by wttr.in, no additional API tokens required.
Related MCP server: weather-mcp-server
Requirements
Python >= 3.12
It is recommended to use
uvfor dependency management
Install Dependencies
uv syncIf you are not using uv, you can also install dependencies in a virtual environment:
pip install "mcp[cli]>=1.27.0" "httpx>=0.28.1"Local Execution
stdio mode:
uv run python server.pyMCP client configuration example:
{
"mcpServers": {
"weather-server": {
"command": "uv",
"args": ["run", "python", "server.py"]
}
}
}Remote Execution
Streamable HTTP mode:
uv run python server_remote.pyDefault listening on:
http://0.0.0.0:8000/mcp/Remote MCP client configuration example:
{
"mcpServers": {
"weather-server": {
"url": "http://127.0.0.1:8000/mcp/"
}
}
}ModelScope Deployment Instructions
When creating or deploying an MCP Server on ModelScope, you can enter the GitHub repository address of this project and use the remote entry file:
python server_remote.pyThe service will start in Streamable HTTP mode, listening on 0.0.0.0:8000, with the MCP endpoint at:
/mcp/If the platform supports custom startup commands, it is recommended to use:
uv run python server_remote.pyOr use it after installing dependencies in the platform environment beforehand:
python server_remote.pyProject Structure
.
├── README.md
├── pyproject.toml
├── server.py
├── server_remote.py
└── uv.lockLicense
If you need to release it as open source, please add a License file according to your actual situation.
Available Tools
3 toolsget_forecastB
获取指定城市未来几天的天气预报。
参数:
city: 城市名称(英文)
days: 预报天数,默认 3 天,最多 3 天
Inputs: city (required), days.
get_weatherA
获取指定城市的当前天气信息。
参数:
city: 城市名称(英文),如 Beijing、Tokyo、London
Inputs: city (required).
temperature_convertA
摄氏度与华氏度互相转换。
参数:
value: 温度数值
from_unit: 原始单位,C 表示摄氏度,F 表示华氏度
Inputs: value (required), from_unit (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_forecast for future days, get_weather for current conditions, and temperature_convert for unit conversion. No overlap exists.
All tools use snake_case, but two follow verb_noun pattern (get_forecast, get_weather) while one uses noun_verb (temperature_convert), a minor inconsistency.
3 tools is slightly below average for a weather server, but still reasonable for core functionality (current, forecast, conversion). The count feels lean but not insufficient.
Covers basic current weather and forecast, plus a unit converter. Missing features like alerts or historical data, but the essential weather information needs are met.
Related MCP Connectors
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
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.2MIT
- AlicenseNot gradedqualityDmaintenanceA weather query MCP server based on FastMCP, supporting Chinese city names and fetching real-time weather data from wttr.in.MIT
- AlicenseNot gradedqualityDmaintenanceA real-time weather query MCP server supporting 12 major Chinese cities using the wttr.in API with no API key required.1MIT
- AlicenseNot gradedqualityDmaintenanceReal-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