Home / MCP / Weather MCP Server

Weather MCP Server

Provides weather, air quality, and time data through MCP using Open-Meteo APIs across stdio, SSE, and streamable HTTP modes.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "weather": {
            "command": "python",
            "args": [
                "-m",
                "mcp_weather_server"
            ]
        }
    }
}

The Weather MCP Server provides weather, air quality, and time information through Model Context Protocol (MCP) in multiple transport modes, enabling desktop clients, web apps, and modern web integrations to query current conditions, forecasts, and timezone data without building separate APIs.

How to use

To query weather, air quality, or time data, run the Weather MCP Server in one of the supported transport modes and connect your MCP client to the appropriate endpoint. You can use the standard stdio mode for desktop MCP clients, SSE for web-based applications, or the streamable HTTP protocol for modern web integrations. After starting, choose a tool and provide the required arguments (such as city names or time ranges) to receive structured results.

How to install

Prerequisites: Python must be installed on your system.

1. Install the Weather MCP Server package via Python’s package manager.

2. If you prefer manual configuration, add the MCP server entry to your cline_mcp_settings.json file as shown in the example.

3. For HTTP transport modes, install extra dependencies to enable Starlette and Uvicorn servers.

Additional sections

Configuration and transport options are unified in a single server that supports stdio, SSE, and streamable-http. The stdio mode is suitable for desktop MCP clients, SSE serves web applications with Server-Sent Events, and streamable-http implements the modern MCP Streamable HTTP protocol with a single /mcp endpoint. You can run the server in different modes by specifying the mode flag on startup.

Usage notes for startup commands in each mode are shown below. Remember to adjust host and port for HTTP-based modes if you run behind a firewall or want to expose the server publicly.

Troubleshooting tips include ensuring city names are in English, confirming the server is running in the expected mode, and verifying required dependencies such as starlette and uvicorn when using HTTP modes. If you encounter date format or city lookup issues, ensure inputs follow ISO formats and English city names.

Configuration overview

This server does not require an API key. It leverages free Open-Meteo data sources for weather and air quality information.

Available tools

get_current_weather

Retrieves current weather for a city with comprehensive metrics including temperature, humidity, wind, precipitation, pressure, cloud cover, UV index, and visibility.

get_weather_by_datetime_range

Fetches hourly weather data for a city over a specified date range, including temperature trends, precipitation patterns, wind, UV index, and warnings.

get_weather_details

Returns detailed weather data for a city as structured JSON for programmatic use.

get_air_quality

Provides current air quality information for a city, including pollutant levels and health advisories.

get_air_quality_details

Returns detailed air quality data as structured JSON for programmatic analysis.

get_current_datetime

Gets the current date/time in a specified timezone.

get_timezone_info

Returns information about a specified timezone.

convert_time

Converts time between timezones.