Skip to main content
Glama
jakebailey15

MCP Weather Server

by jakebailey15

MCP Weather Server

A Model Context Protocol server exposing three weather tools over the free Open-Meteo API, for use with Claude Desktop or any MCP client.

Tools

Tool

Description

get_current_weather(city)

Current temperature, feels-like, precipitation, wind

get_forecast(city, days)

Daily highs, lows, and precipitation, 1–16 days ahead

get_historical(city, date)

Past conditions for a given date (archive lags ~5 days)

City names are resolved to coordinates via Open-Meteo's geocoding endpoint, so tools take plain names rather than lat/long. No API key required.

Related MCP server: mcp-weather-server

Setup

uv venv
source .venv/bin/activate
uv add "mcp[cli]" httpx

Use with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["/absolute/path/to/weather.py"]
    }
  }
}

Restart Claude Desktop. Both paths must be absolute.

Notes

Built against MCP Python SDK v2 (MCPServer, formerly FastMCP). Runs over stdio, so the client launches the server as a subprocess.

Known limitations

  • No retry or timeout handling on the upstream API; a network failure surfaces as a tool error rather than a graceful message.

  • Unknown city names return a message, but ambiguous ones silently take the first geocoding match.

Available Tools

3 tools
get_current_weatherB

Get current weather conditions for a city.

Args: city: Name of the city, e.g. "Toronto" or "London, Ontario"

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes

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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not mention what the tool returns (though an output schema exists), whether authentication is required, rate limits, error handling, or any side effects. It only states the basic operation. For a read-only tool, it doesn't even state that it is read-only. This is a significant gap given the lack of annotations.

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 description is concise: one sentence for purpose and a single parameter explanation. It is front-loaded with the main action. The structure is simple and efficient, though the 'Args' formatting is informal. It earns a 4 because it avoids fluff and focuses on the key information.

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?

Given the tool's simplicity (one required parameter, output schema present), the description covers the essential operation and parameter format. However, it misses explicit usage guidance versus siblings and does not disclose any behavioral caveats. The description is adequate but not thorough; an agent could use it correctly for a basic call but would lack context on when to choose it over alternatives or what to expect in response (though output schema helps). A 3 reflects this balance.

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?

The schema provides no description for the 'city' parameter (0% coverage), so the description must compensate. It does so by explaining 'Name of the city' and giving concrete examples ('Toronto' or 'London, Ontario'). This adds meaning beyond the schema's bare 'City' label, and the examples clarify format. The description effectively compensates for the schema's lack of documentation.

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?

The description clearly states it 'Get current weather conditions for a city', which is a specific verb and resource. It distinguishes itself from siblings (get_forecast, get_historical) by the word 'current', though it does not explicitly name the alternatives or the exact boundary (e.g., not forecast or historical). That is implied but not explicit, so a 4 is appropriate.

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 explicit guidance on when to use this tool versus get_forecast or get_historical. The description only implies 'current' conditions, but does not say 'use this for current weather, use get_forecast for future, use get_historical for past'. No alternatives are mentioned, no when-not conditions are given. The agent must infer from the name, which is insufficient.

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

get_forecastA

Get a multi-day weather forecast for a city.

Args: city: Name of the city, e.g. "Toronto" days: How many days ahead to forecast, 1 to 16. Defaults to 3.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes
daysNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/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 burden of behavioral disclosure. It does not mention that this is a read-only operation, any side effects, prerequisites, or what the response looks like. It only states the action without clarifying safety or limitations.

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

Conciseness5/5

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

The description is concise, with the purpose stated in the first sentence and parameter details following. Every sentence adds value without redundancy, and it is well-structured with clear argument explanations.

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

Completeness4/5

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

Given the simple two-parameter tool and the presence of an output schema, the description is mostly complete. It lacks explicit mention that it is a safe read operation, but the output schema covers return format. For a straightforward weather tool, it is sufficient.

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?

The schema has no descriptions for parameters (0% coverage), but the description compensates by explaining the city parameter with an example ('Toronto') and the days parameter with a valid range (1 to 16) and default value (3). This adds meaningful context beyond the raw schema.

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

Purpose5/5

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

The description clearly states it retrieves a multi-day weather forecast for a city, which distinguishes it from the siblings get_current_weather and get_historical. The verb 'get' and resource 'multi-day weather forecast' make the purpose explicit and unambiguous.

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?

The description implies usage for multi-day forecasts but does not explicitly contrast with siblings or state when not to use it. An agent could infer it is for forecasts rather than current or historical data, but no direct guidance is provided.

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

get_historicalA

Look up past weather for a city on a specific date.

Args: city: Name of the city, e.g. "Toronto" date: The date in YYYY-MM-DD format. Must be at least 5 days in the past.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes
dateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/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 burden of behavioral disclosure. It states the purpose and a date constraint but does not mention side effects, error handling, expected return behavior, or any operational details. The agent is left blind about what happens with invalid dates or what the response structure contains beyond the output schema.

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

Conciseness5/5

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

The description is extremely concise, using two sentences to state the purpose and parameter details. The purpose is front-loaded, and every sentence adds value without redundancy. It is well-structured for quick parsing by an agent.

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

Completeness4/5

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

For a simple two-parameter lookup tool with an output schema, the description covers the essential facts: what it does, the required parameters, and an important validation rule. The output schema handles return values, so the description is sufficiently complete for calling the tool correctly. Minor gaps like error messages or rate limits are not critical given the tool's simplicity.

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%, so the description must compensate. It does: 'city' is explained with an example, and 'date' is given a specific format (YYYY-MM-DD) and a critical constraint (at least 5 days past). This adds meaningful semantic information beyond the plain string type in the schema.

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

Purpose5/5

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

The description clearly states a specific verb ('look up') and resource ('past weather') for a city on a specific date. The word 'past' distinguishes it from sibling tools for current and forecast weather, so an agent can easily tell this is for historical data.

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

Usage Guidelines4/5

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

The description provides clear context that the tool is for past weather and includes a specific constraint (date must be at least 5 days in the past). However, it does not explicitly name alternative tools or state when not to use it, leaving implicit that current and forecast tools are for other timeframes.

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. 3 tool updatesv0.1.0
    • First observedget_current_weather
    • First observedget_forecast
    • First observedget_historical

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct temporal scope: current, forecast, and historical weather. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tools follow the same verb_noun pattern (get_ + descriptor) with consistent parameter naming for city, making them predictable.

Tool Count5/5

Three tools cover the core weather server domain—current conditions, forecasts, and historical data—without unnecessary bloat or missing essentials.

Completeness5/5

The tool surface provides full coverage for typical weather queries: current, future, and past. No obvious gaps exist for a server of this scope.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers