Skip to main content
Glama
ariz-ahmad

weather-mcp-server

by ariz-ahmad

openmeteo-mcp

CI

An MCP server wrapping the Open-Meteo geocoding and forecast APIs. No API key required.

Install

pip install git+https://github.com/ariz-ahmad/weather-mcp-server

Related MCP server: Weather MCP

Run

Stdio (default, for local agent clients):

openmeteo-mcp

SSE (for remote/hosted clients):

openmeteo-mcp sse
# serves on http://localhost:8000/sse

Tool reference

Tool

Args

Returns

geocode_city

city: str

{name, country, latitude, longitude}

get_forecast

latitude: float, longitude: float, days: int = 3

{forecast: [{date, condition, temp_max_c, temp_min_c, precipitation_mm}, ...]}

get_weather_by_city

city: str, days: int = 3

{location, forecast} — geocode + forecast in one call

Resource

weather://{city} — read-only current-conditions summary for a city, e.g. weather://Tokyo.

Prompt

weather_report(city: str) — template that asks an agent to produce a short, friendly 3-day weather report for a city using get_weather_by_city.

Connect from an Agents SDK client

from agents import Agent, Runner
from agents.mcp import MCPServerStdio, MCPServerStdioParams

async with MCPServerStdio(
    name="Weather Tools",
    params=MCPServerStdioParams(command="openmeteo-mcp", args=[]),
) as weather_server:
    agent = Agent(
        name="Weather Assistant",
        instructions="Use the weather tools to answer the user's question.",
        mcp_servers=[weather_server],
    )
    result = await Runner.run(agent, "What's the weather in Tokyo this week?")
    print(result.final_output)

See client_stdio_test.py and client_sse_test.py for full runnable examples of each transport.

Development

git clone https://github.com/ariz-ahmad/weather-mcp-server
cd weather-mcp-server
pip install -e ".[dev]"
pytest -v

tests/test_tools.py calls the tool functions directly against the real Open-Meteo API. tests/test_server.py launches the installed console script as a real MCP stdio server and checks it advertises the right tools/resources/prompts over the wire — both run in CI on every push with no API key required.

Package layout

src/openmeteo_mcp/server.py   # FastMCP server: tools, resource, prompt
tests/                        # protocol- and tool-level tests, no LLM needed
client_stdio_test.py          # Agents SDK client demo (needs OPENAI_API_KEY)
client_sse_test.py            # same, over SSE

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides real-time weather data, hourly forecasts, and daily summaries using the free Open-Meteo API with no API key required. It enables users to search for weather conditions by specific coordinates or city names across multiple measurement units.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A MCP server for querying real-time weather information for any city worldwide using the free Open-Meteo API, supporting CLI and integration with AI clients like Claude and Cursor.
    15 npm
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A production-ready MCP server that provides real-time weather information, forecasts, and alerts to LLM clients using the Open-Meteo API, with support for 26+ global cities, dual transport (STDIO/HTTP), and Docker deployment.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Open-Meteo free weather APIs, offering 16 tools for forecast, historical, air quality, marine, flood, ensemble, climate, seasonal, and scheduled data collection with no API key required.
    68 npm
    MIT