Skip to main content
Glama
damerakd

MCP Weather Server

by damerakd

MCP Weather Server

This repository provides a simple Model Context Protocol (MCP) server written in Python that exposes weather data as tools. It is packaged so it can be published to GitHub and (optionally) to PyPI.

The server is built on the official mcp Python SDK and uses the free Open‑Meteo APIs (no API key required).

Features

  • MCP-compliant server using FastMCP

  • Two tools:

    • get_current_weather – current conditions for a city

    • get_daily_forecast – daily forecast for a city for the next N days

  • Runs locally in Python (stdio transport by default)

Installation

From the project root:

pip install -e .

Or, using uv:

uv sync

Running the MCP server locally

You can run the server directly via the console script:

python -m mcp_weather_server.server

Or, if installed as a package:

mcp-weather-server

By default it uses the stdio transport, which works with MCP-compatible clients (e.g. IDE integrations or LLM apps that support MCP).

Connecting with MCP Inspector (optional)

To experiment via HTTP instead of stdio, you can set the transport to streamable-http inside server.py and then run:

uv run --with mcp python -m mcp_weather_server.server

Then start the MCP Inspector:

npx -y @modelcontextprotocol/inspector

and connect to http://localhost:8000/mcp.

Git conventions

  • Commit messages must follow Conventional Commits (e.g. feat: add daily forecast tool, fix(server): handle API errors).

  • A Cursor rule at .cursor/rules/git-conventional-commits.mdc documents the allowed types and format.

Available Tools

2 tools
get_current_weatherA

Get current weather conditions for a city.

Args: city: City name, e.g. "Berlin". country: Optional country filter, e.g. "DE" or "Germany".

Returns: A JSON object with location info and current weather (temperature, wind speed, etc.).

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes
countryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/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. While it mentions the tool 'gets' data (implying a read operation), it doesn't address important behavioral aspects like error handling, rate limits, authentication requirements, data freshness, or whether it's a real-time or cached service. The description is minimal and lacks behavioral context.

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 perfectly structured and concise. It begins with a clear purpose statement, then has well-organized sections for Args and Returns with bullet-point style explanations. Every sentence adds value, and there's no redundant or unnecessary information.

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 that there's an output schema (which handles return values), the description provides good context for a simple read operation. It covers the purpose and parameters well. However, for a tool with no annotations, it could benefit from more behavioral information (like error cases or performance characteristics) to be fully complete.

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

Parameters5/5

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

The description provides excellent parameter semantics beyond the input schema. The schema has 0% description coverage and only shows parameter names and types. The description adds meaningful context: 'city: City name, e.g. "Berlin"' and 'country: Optional country filter, e.g. "DE" or "Germany".' This includes examples, clarifies that country is optional, and explains what the parameters represent.

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 the tool's purpose: 'Get current weather conditions for a city.' It specifies the verb ('Get') and resource ('current weather conditions for a city'), but doesn't explicitly differentiate it from its sibling 'get_daily_forecast' beyond the 'current' vs 'daily' distinction. This makes it clear but not fully sibling-differentiated.

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?

The description provides no guidance on when to use this tool versus its sibling 'get_daily_forecast' or any other alternatives. It simply states what the tool does without context about when it's appropriate or when other tools might be better suited.

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

get_daily_forecastB

Get a simple daily weather forecast for the next N days for a city.

Args: city: City name, e.g. "Berlin". country: Optional country filter, e.g. "DE" or "Germany". days: Number of days to include (1–7).

Returns: A JSON object with location info and an array of daily forecasts.

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes
countryNo
daysNo

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 provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation (implying read-only) and describes the return format, but doesn't mention authentication needs, rate limits, error conditions, or whether the forecast data is cached/live. For a weather API tool with zero annotation coverage, this leaves significant 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?

The description is efficiently structured with a clear purpose statement followed by Args and Returns sections. Each sentence adds value, though the 'Returns' section could be slightly more detailed given the output schema exists. Overall, it's appropriately sized and front-loaded.

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 moderate complexity (3 parameters, no annotations, but with output schema), the description covers the basic purpose and parameters adequately. However, it lacks important context about when to use versus the sibling tool, behavioral constraints, and error handling. The existence of an output schema reduces the need to explain return values, but other gaps remain.

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 description provides meaningful semantic context for all three parameters beyond the schema's 0% coverage. It explains that 'city' is a city name with an example, 'country' is an optional filter with format examples, and 'days' specifies the forecast range with constraints (1-7). This compensates well for the schema's lack of descriptions.

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 the tool's purpose: 'Get a simple daily weather forecast for the next N days for a city.' It specifies the verb ('Get'), resource ('daily weather forecast'), and scope ('for a city'), though it doesn't explicitly differentiate from its sibling tool 'get_current_weather' beyond implying this is for forecasts rather than current conditions.

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?

The description provides no guidance on when to use this tool versus its sibling 'get_current_weather' or any alternatives. It mentions the tool's basic function but lacks explicit when/when-not instructions or prerequisite context, leaving usage decisions to inference.

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. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedget_current_weather
    • First observedget_daily_forecast

TDQS

B3.3/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: get_current_weather retrieves current conditions, while get_daily_forecast provides future predictions. There is no overlap in functionality, and an agent can easily differentiate between immediate weather data and multi-day forecasts.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'get_' prefix and descriptive names (current_weather, daily_forecast). The naming is uniform and predictable across the toolset, making it easy for agents to understand and use them.

Tool Count2/5

With only 2 tools, the server feels under-scoped for a weather domain. A typical weather API would include more operations such as historical data, alerts, or hourly forecasts. This minimal set limits agent capabilities and may require workarounds for common weather-related tasks.

Completeness2/5

The toolset is severely incomplete for a weather server. It lacks essential operations like historical weather data, severe weather alerts, air quality information, and hourly forecasts. Agents will face significant gaps when trying to perform comprehensive weather analysis or respond to diverse user queries.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    MCP 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.
    1
    16
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server providing weather data via the Open-Meteo API, including geocoding, current conditions, daily and hourly forecasts, and city lookup. No API key required, with support for multiple units and transport types.
    1
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A Python MCP server that provides current weather conditions and multi-day forecasts for cities worldwide using the Open-Meteo API. It exposes tools to get current weather and forecasts without requiring an API key.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/damerakd/mcp-weather-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server