weather-mcp-pro
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-pro What's the weather in Seattle and how does it compare to Portland?"
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-pro
An MCP (Model Context Protocol) server that exposes real-time weather, forecast, and air-quality data as tools for LLM agents like Claude. Built on the OpenWeather API.
What is MCP?
MCP is Anthropic's open protocol for connecting LLMs to external tools and data sources through a standard client-server interface. This server exposes 4 tools that Claude (or any MCP client) can call during a conversation.
Related MCP server: Weather MCP Server
Tools
Tool | Description |
| Current conditions for a location |
| 1-5 day forecast |
| AQI + pollutant breakdown |
| Side-by-side comparison across up to 5 cities |
Architecture
server.py MCP tool definitions — thin, delegates everything
weather_client.py Async API client — geocoding, caching, retries
models.py Pydantic schemas for validated, typed responses
exceptions.py Typed exceptions instead of ad-hoc error dicts
config.py Environment/settings managementThe design goal: weather_client.py is fully unit-testable without an MCP
server or a live API key (see tests/), because the tool layer never touches
HTTP directly.
Notably, all API calls use httpx.AsyncClient rather than the synchronous
requests library — a common mistake in async def functions is using a
blocking HTTP client, which stalls the event loop for every other concurrent
request the server is handling.
Setup
Uses uv for dependency management.
git clone https://github.com/AsifMarwat/weather-mcp-pro.git
cd weather-mcp-pro
uv venv
uv pip install -r requirements.txt
cp .env.example .env # add your OpenWeather API keyGet a free API key at openweathermap.org/api.
Run
uv run server.pyUse with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"weather-mcp-pro": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/weather-mcp-pro", "server.py"]
}
}
}Example
"What's the weather like in Peshawar right now, and how does it compare to Lahore?"
Claude calls compare_weather(["Peshawar", "Lahore"]) and returns a natural-language
summary built from the structured response.
Tests
uv run pytest tests/ -vLicense
MIT
Available Tools
4 toolscompare_weatherA
Compare current weather across multiple locations side by side.
Args: locations: List of city names, e.g. ["Peshawar", "Lahore", "Islamabad"] units: "metric", "imperial", or "standard"
Inputs: locations (required), units.
get_air_qualityA
Get current air quality index (AQI) and pollutant breakdown for a location.
Args: location: City name, optionally "City,CountryCode"
Inputs: location (required).
get_current_weatherA
Get current weather conditions for a location.
Args: location: City name, optionally "City,CountryCode" e.g. "Lahore,PK" units: "metric" (Celsius), "imperial" (Fahrenheit), or "standard" (Kelvin)
Inputs: location (required), units.
get_weather_forecastA
Get a multi-day weather forecast for a location.
Args: location: City name, optionally "City,CountryCode" days: Number of days to forecast (1-5) units: "metric", "imperial", or "standard"
Inputs: location (required), days, units.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct weather data aspect: current conditions, multi-day forecast, air quality, and multi-location comparison. There is no overlap in purpose, so an agent can easily select the right tool.
Three tools follow the `get_<noun>` pattern (get_current_weather, get_weather_forecast, get_air_quality), but `compare_weather` deviates by using a different verb. The pattern is mostly consistent and readable.
With 4 tools, the server is well-scoped for a weather domain. Each tool earns its place, covering the essential weather queries without unnecessary bloat.
The surface covers current weather, forecasts, air quality, and comparisons, which addresses typical use cases. Minor gaps exist such as no historical weather or weather alerts, but these are not critical for basic weather retrieval.
Maintenance
Related MCP Connectors
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to fetch real-time weather data for any location using the OpenWeatherMap API. Demonstrates how to build a simple MCP server that exposes weather information as a tool for LLMs.1GPL 3.0
- AlicenseNot gradedqualityDmaintenanceProvides weather data from OpenWeatherMap API through MCP tools and a REST API with OpenAPI support. Enables LLM agents to retrieve current weather, forecasts, and temperature ranges by city or coordinates.8 npmMIT
- AlicenseAqualityDmaintenanceMCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.113 npmMIT
- AlicenseNot gradedqualityCmaintenanceThis MCP server provides access to Open-Meteo weather APIs including forecast, historical reanalysis, geocoding, air quality, marine weather, and flood risk data, enabling AI agents to retrieve weather information using natural language.474 npmMIT