Skip to main content
Glama
Tannu-225

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"

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it discloses almost nothing: no auth requirements, no rate limits, no data-source or update-freshness note (important for an 'AQI' reading), and no error behavior for unresolvable place names. Only the return content is hinted at ('AQI and pollutants'), and an output schema already covers that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded and waste-free, and the short Args block is justified given the schema has no parameter descriptions. The 'Args:' formatting is slightly redundant for a single parameter but earns its place here.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the single parameter is documented. What's missing is the routing context an agent needs when get_forecast is also available, plus any note on data freshness or failure modes for an unlisted place.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% — the schema exposes only a bare 'Location' title — so the description is the sole documentation of the parameter, and it does compensate by naming the accepted form ('City or place name') and giving three concrete examples. It stops short of disambiguation guidance for ambiguous or non-city locations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get current air quality (AQI and pollutants)') plus the scope ('for a place, anywhere in the world'). The word 'current' implicitly contrasts with the sibling get_forecast, but the description never names that sibling, so differentiation is left to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'current' suggests this tool answers present-conditions questions while get_forecast presumably covers the future, but no when-to-use statement, alternative routing, or exclusion is given. An agent must infer the split from the adjective alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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"

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, yet it only adds the 'anywhere in the world' scope. It omits the forecast horizon, units, update frequency, and any auth or rate-limit notes, leaving meaningful behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the purpose in the first line, then documents the single argument compactly. No wasted sentences, though the 'Args:' block is mildly redundant for a one-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return structure need not be explained, and the sole parameter is illustrated. However, key call-affecting context such as forecast horizon (how many days) and units is absent for what is otherwise a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does so usefully by giving format examples ('Delhi', 'New Delhi, India', 'Tokyo') that reveal the accepted granularity from bare city to city-plus-country. That is genuine value the bare string schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (get the weather forecast) with a clear global scope ('anywhere in the world'). It implicitly contrasts with the sibling get_air_quality by naming weather specifically, but never explicitly differentiates itself from that sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus the sibling get_air_quality, nor any context such as whether it returns current conditions or a multi-day forecast. The agent must infer the trigger from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updatesv0.1.0
    • First observedget_air_quality
    • First observedget_forecast

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

ActivityMaintained
ResponsivenessNo 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
    F
    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.
    5 npm
    Creative Commons Zero v1.0 Universal
  • F
    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.
    -