Skip to main content
Glama
Open-Meteo MCP Server

Open-Meteo MCP Server

by clarehancock

Open-Meteo MCP Server

A small MCP (Model Context Protocol) server that gives an AI assistant like Claude the ability to look up real weather data — current conditions and forecasts — by wrapping the free Open-Meteo API. No API key required.

Built as a learning project to understand how MCP servers work end to end: defining tools, running them locally, and connecting them to a real AI client.

What it does

Once connected to an MCP-compatible client (like Claude), it exposes three tools:

Tool

What it does

geocode_location

Turns a place name ("London") into coordinates

get_current_weather

Current temperature, wind, precipitation, etc. for a coordinate

get_weather_forecast

Up to a 16-day forecast (daily and/or hourly) for a coordinate

So a person can ask an assistant "what's the weather in Lisbon tomorrow?" and the assistant will call these tools itself to find out and answer — it isn't pre-programmed with weather data, it fetches it live.

Related MCP server: Weather MCP Server

How it's built

  • src/server.ts — defines the three tools and how each one calls the Open-Meteo API. This is the actual "brains" of the server.

  • src/index.ts — runs the server over stdio (standard input/output). This is the transport used by local dev tools like the MCP Inspector and by desktop apps that launch the server as a subprocess.

  • src/http.ts — runs the same server over Streamable HTTP, so it can be reached over the network — e.g. hosted somewhere, or reached from a browser-based client. This is what makes it possible to demo without installing anything locally.

Both entry points share the same tool definitions in server.ts, so there's only one place where the actual logic lives.

Running it

npm install
npm run build

Local/stdio mode (for tools that spawn the server as a subprocess):

npm start

HTTP mode (for connecting a remote client, e.g. over a forwarded Codespaces port or a hosting provider):

node build/http.js

This starts a plain HTTP server on port 3000 (configurable via PORT) with a single MCP endpoint at POST /mcp, plus a GET /health check.

Testing it without any client

The MCP Inspector's CLI mode is the fastest way to poke at it directly from a terminal, no browser needed:

# See what tools are available
npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/list

# Actually call one
npx @modelcontextprotocol/inspector --cli node build/index.js \
  --method tools/call --tool-name geocode_location --tool-arg name=London

Connecting it to an AI assistant

  • Claude Desktop / Claude Code: point at build/index.js as a stdio MCP server in the client's config.

  • Claude.ai custom connectors: point at the /mcp URL of a running HTTP instance (requires a plan that allows custom connectors).

  • Anthropic API directly: pass the /mcp URL in the mcp_servers parameter of a /v1/messages request — this lets any custom app or page use the tools without needing a pre-built MCP client.

Notes for extending it

Open-Meteo has many more variables and endpoints than this project uses (air quality, marine forecasts, historical/archive data, ensembles). To add more, follow the pattern of an existing tool in src/server.ts — register a new server.tool(...) block with its own input schema and Open-Meteo request.

Data © Open-Meteo.com, CC BY 4.0.

Available Tools

3 tools
geocode_locationA

Look up geographic coordinates (latitude/longitude) for a place name, e.g. 'London', 'Paris, TX', or 'Tokyo'. Use this before calling the weather tools if you only have a place name rather than coordinates.

Inputs: name (required), count, language.

get_current_weatherA

Get the current weather conditions (temperature, wind, precipitation, etc.) for a specific latitude/longitude. Use geocode_location first if you only have a place name.

Inputs: latitude (required), longitude (required), timezone, wind_speed_unit, +1 more.

get_weather_forecastA

Get a multi-day hourly and/or daily weather forecast (up to 16 days) for a specific latitude/longitude. Use geocode_location first if you only have a place name. Defaults to a useful set of daily summary variables; pass include_hourly=true for hour-by-hour detail as well.

Inputs: latitude (required), longitude (required), timezone, forecast_days, +3 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: geocoding converts place names to coordinates, while the other two retrieve weather data. The current weather and forecast tools are differentiated by time horizon and description.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: geocode_location, get_current_weather, get_weather_forecast. The naming style is uniform and predictable.

    Tool Count5/5

    With 3 tools, the server is tightly scoped for its purpose: location resolution, current conditions, and forecast. Each tool earns its place and the count feels complete without redundancy.

    Completeness4/5

    The core weather lookup flow is fully covered: geocode a place name, get current conditions, or get a forecast. Minor gaps exist such as historical weather data or alerts, but these are not essential for the apparent primary use case.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
      ISC
    • A
      license
      Not graded
      quality
      D
      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.
      12 npm
      Creative Commons Zero v1.0 Universal
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to retrieve real-time weather conditions and 7-10 day forecasts for any location via Open-Meteo, with no API key required.
      267 npm
      MIT