Skip to main content
Glama
Open-Meteo MCP Server

Open-Meteo MCP Server

by szabioe1

open-meteo-mcp

An MCP server that gives Claude, ChatGPT, Cursor or any MCP-capable AI agent live weather data from Open-Meteo. Free, no API key, works out of the box.

It's a small, complete example of how I build MCP servers for clients: a typed API client, tools designed so the model knows when to use them, input validation, clear error messages, and tests that run without network access.

Tools

Tool

What the AI can do with it

search_location

Turn "Debrecen" or "Lisbon" into coordinates, country and timezone

get_current_weather

Current temperature, feels-like, humidity, precipitation, wind

get_forecast

Daily forecast for 1–16 days: conditions, min/max, rain amount and chance

Example: ask "Do I need an umbrella in Debrecen tomorrow?" and Claude calls search_location → get_forecast and answers from real data.

Related MCP server: open-meteo-mcp-server

Install

Requires uv.

git clone https://github.com/szabioe1/open-meteo-mcp
cd open-meteo-mcp
uv sync

Claude Code

claude mcp add open-meteo -- uv --directory /path/to/open-meteo-mcp run open-meteo-mcp

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "open-meteo": {
      "command": "uv",
      "args": ["--directory", "/path/to/open-meteo-mcp", "run", "open-meteo-mcp"]
    }
  }
}

Over HTTP (remote agents)

uv run open-meteo-mcp --http   # Streamable HTTP on http://localhost:8000/mcp

Design notes

  • API client separate from the MCP layer (client.py vs server.py): the client can be tested and reused on its own, and the MCP layer stays thin.

  • Validation in the schema: latitude, longitude, day count and result count have bounds, so bad input is rejected before any HTTP call and the model sees exactly what's allowed.

  • Errors the model can act on: API and network failures become MCP tool errors with a readable reason ("No place found matching 'X'. Try a different spelling…") instead of stack traces.

  • Human-readable output: WMO weather codes are translated to text, and units are attached to values.

Tests

uv run pytest

The tests start the real server in-process and call it through an MCP client. Open-Meteo is mocked with httpx.MockTransport, so they're fast and need no network access.

Need one for your own tools?

I build custom MCP servers that connect AI agents to your API, database, CRM or internal docs, and I set up Claude Code for teams. Contact me on Fiverr.

License

MIT. Weather data © Open-Meteo, CC BY 4.0.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables users to geocode city names and retrieve current weather conditions plus a 1–7 day forecast through a public weather API, with no API key required, for MCP clients such as Claude Desktop or Cursor.
      4
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to fetch global current conditions, air quality (PM2.5, PM10, O₃, NO₂, SO₂, CO, US/EU AQI), UV index, wind, sunrise/sunset and 1–16 day forecasts with optional hourly rows via Open-Meteo, no API key needed. Returns a localized human-readable summary plus complete JSON, resolving locations by city name, coordinates, or public IP over stdio MCP.
      MIT