Skip to main content
Glama
Weather MCP Server

Weather MCP Server

by Tannu-225

Weather MCP Server

A Model Context Protocol (MCP) server that gives Claude live weather forecasts and air quality data for any location in the world, powered by the free Open-Meteo API (no API key required).

Built by following Anthropic's MCP quickstart guide, then extended to work globally instead of US-only.

Tools

get_forecast(location: str)

Returns current conditions and a 5-day forecast for the given place name.

get_forecast("Delhi")

get_air_quality(location: str)

Returns current AQI and pollutant levels (PM2.5, PM10, CO, NO2, ozone) for the given place name.

get_air_quality("Delhi")

Related MCP server: OpenWeather MCP Server

Setup

Requires Python 3.10+ and uv.

uv venv
uv add "mcp[cli]"

Running the server

uv run weather.py

This starts the server over stdio and waits for an MCP client to connect — it won't print anything, that's expected.

Testing without a client

Use the official MCP Inspector:

npx @modelcontextprotocol/inspector uv run weather.py

This opens a local web UI where you can call get_forecast and get_air_quality directly and see the results.

Using it with Claude Code

claude mcp add --transport stdio weather -- uv --directory /path/to/this/project run weather.py

Then just ask Claude Code about the weather anywhere in the world.

How it works

  • Place names are geocoded to latitude/longitude via Open-Meteo's geocoding API.

  • Forecast and air quality data are fetched from Open-Meteo's forecast and air-quality endpoints.

  • Results are formatted into plain text for the model to read.

License

MIT

Available Tools

2 tools
get_air_qualityB

Get current air quality (AQI and pollutants) for a place, anywhere in the world.

Args: location: City or place name, e.g. "Delhi", "Beijing", "Los Angeles"

Inputs: location (required). Returns: result

get_forecastB

Get the weather forecast for a place, anywhere in the world.

Args: location: City or place name, e.g. "Delhi", "New Delhi, India", "Tokyo"

Inputs: location (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    get_forecast and get_air_quality target clearly distinct data domains (weather forecast vs air quality/pollutants), so an agent can unambiguously select between them. Both share a consistent location argument, removing any selection confusion.

    Naming Consistency5/5

    Both tools follow the identical verb_noun pattern (get_forecast, get_air_quality) with snake_case throughout. There is no deviation or mixed convention.

    Tool Count3/5

    Two tools is thin for a weather server's apparent scope; a single data-lookup pattern covers only forecast and air quality. It is functional but borderline sparse for the domain.

    Completeness3/5

    Core lookups are covered, but obvious operations are missing: current conditions, historical weather, hourly/daily breakdowns, and severe weather alerts. Agents would hit dead ends for common weather queries.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time weather data, forecasts, and historical weather information from OpenWeatherMap API for Claude Desktop, enabling natural language queries about current conditions, forecasts, air quality, and weather alerts worldwide.
      11
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Integrates the OpenWeather API with Claude to provide real-time weather updates, 5-day forecasts, and air quality data. It enables users to query current conditions, pollution levels, and coordinate-based weather information directly within their conversations.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.
      Creative Commons Zero v1.0 Universal
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables users to get weather forecasts for any city using the Open-Meteo API through natural language in Claude Desktop or VS Code.
      ISC