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 Paris?"
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
Local Model Context Protocol server in Python that
fetches real weather data from the Open-Meteo API
(no API key required). Exposes one tool, get_weather, over stdio.
Tool
get_weather(city: str) -> dict
Resolves the city via Open-Meteo Geocoding, fetches current conditions via
Open-Meteo Forecast, and returns structured output for agents plus a
human-readable summary.
Example return:
{
"city": "Amsterdam",
"country": "The Netherlands",
"latitude": 52.37,
"longitude": 4.89,
"temperature_c": 16.8,
"apparent_c": 15.6,
"humidity_pct": 59,
"wind_kph": 6.1,
"weather_code": 0,
"description": "Clear sky",
"summary": "Amsterdam (The Netherlands): Clear sky, 16.8°C (feels 15.6°C), wind 6.1 kph, humidity 59%"
}Related MCP server: Weather MCP Server
Requirements
Python 3.10+
Dependencies in
requirements.txt:mcp,httpx,pydantic(dev:pytest,pytest-asyncio,respx)
Setup
python -m venv venv
./venv/bin/pip install -r requirements.txtRun
Stdio transport (stdout is reserved for JSON-RPC — logs go to stderr):
./venv/bin/python server.pyClient config (mcp.json / claude_desktop_config.json):
{
"mcpServers": {
"weather": {
"command": "<absolute-path>/my-mcp-server/venv/bin/python",
"args": ["<absolute-path>/my-mcp-server/server.py"]
}
}
}Tests
Mocked suite (no live HTTP) plus a live check:
./venv/bin/python -m pytest tests/ -v
./venv/bin/python -c "import asyncio, json, server; print(json.dumps(asyncio.run(server.get_weather('Amsterdam')), indent=2))"Structure
server.py MCPServer("weather") + get_weather tool, stdio entrypoint
schemas.py WeatherOutput / GeocodedLocation pydantic models
services/geocode.py City -> (lat, lon) via Open-Meteo Geocoding
services/weather_api.py (lat, lon) -> current conditions via Open-Meteo Forecast
tests/ Mocked pytest suite (respx)
requirements.txt
weather_server.py Original hardcoded stub (kept for reference)Notes
No secrets or
.envneeded (Open-Meteo is keyless).Errors surface as
ValueErrorwith a friendly message (unknown city, timeout, HTTP error).
This server cannot be deployed
Maintenance
Related MCP Connectors
Current temperature for a city via Open-Meteo. Query discarded after the call.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Free, keyless real-time weather and 7-day forecasts for any city worldwide.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the Open-Meteo API. Features real-time weather data, hourly forecasts, sunrise/sunset times, and European Air Quality Index with human-readable descriptions.316 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables users to get real-time weather data for any city and generate broadcast-style weather news reports. Uses the OpenMeteo API to provide current weather conditions including temperature, humidity, and weather descriptions.10 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides current weather information for any city worldwide using the free Open-Meteo API, enabling users to query temperature, wind speed, humidity, and weather conditions through natural language.10 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides current weather data for a given city using Open-Meteo (free, no API key).-