MCP Hub
Back to servers

mcp-weather

An MCP server that aggregates data from six weather sources to provide current conditions, forecasts, air quality, and aviation METAR information, specifically optimized for European and Nordic locations. It supports multi-source data merging and functions without API keys for several integrated providers.

Updated
Feb 21, 2026

🇪🇺🇫🇮 mcp-weather

A Model Context Protocol (MCP) server that aggregates weather data from 6 sources, optimized for European and Nordic/Baltic locations. Works out of the box with zero API keys -- add optional keys to unlock more sources.

Features

  • 6 weather sources -- Open-Meteo, wttr.in, METAR, OpenWeatherMap, WeatherAPI, Tomorrow.io
  • 6 MCP tools -- current weather, forecast, air quality, aviation METAR, astronomy, source status
  • Nordic/Finnish focus -- 30+ Finnish cities with instant alias resolution (e.g. hki, tre, stadi), Nordic/Baltic capitals included
  • Multi-source aggregation -- merges data from all available sources for more complete and accurate results
  • Zero-config start -- 3 sources work without any API keys (Open-Meteo, wttr.in, METAR)
  • Smart caching -- LRU cache with stampede prevention, configurable TTL

MCP Tools

ToolDescription
get_current_weatherCurrent conditions from up to 5 sources, merged into one result
get_weather_forecast1-7 day daily forecast (temperature, precipitation, wind, UV)
get_air_qualityEuropean AQI with PM2.5, PM10, NO2, O3, SO2, CO levels
get_metarAviation weather (raw + decoded) from aviationweather.gov
get_astronomySunrise, sunset, day length, moon phase and illumination
get_weather_source_statusHealth check for all sources + cache statistics

Location Input

The server accepts multiple location formats:

FormatExampleNotes
Finnish aliashki, tre, stadi, turku30+ cities with ICAO codes
Nordic capitalstockholm, oslo, tallinnFinnish names work too (tukholma)
City nameLondon, Berlin, TokyoGeocoded via Open-Meteo
Coordinates60.17,24.94Latitude, longitude
ICAO codeEFHK, ESSAFor METAR tool

Quick Start

Docker (recommended)

git clone https://github.com/Koneisto/mcp-weather.git
cd mcp-weather
cp .env.example .env          # optionally add API keys
npm install && npm run build  # build TypeScript
docker compose up -d

The server will be available at http://localhost:3015 via supergateway (Streamable HTTP transport).

Local Development

git clone https://github.com/Koneisto/mcp-weather.git
cd mcp-weather
npm install
npm run build
node build/index.js           # runs on stdio transport

Claude Desktop / Claude Code

Add to your MCP client configuration:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/path/to/mcp-weather/build/index.js"],
      "env": {
        "OPENWEATHERMAP_API_KEY": "",
        "WEATHERAPI_KEY": "",
        "TOMORROW_IO_API_KEY": ""
      }
    }
  }
}

Configuration

All settings are via environment variables. Copy .env.example to .env to get started.

VariableDefaultDescription
OPENWEATHERMAP_API_KEY(empty)OpenWeatherMap free tier key
WEATHERAPI_KEY(empty)WeatherAPI free tier key
TOMORROW_IO_API_KEY(empty)Tomorrow.io free tier key
CACHE_TTL_MINUTES60Cache time-to-live in minutes
CACHE_MAX_ENTRIES200Maximum cached responses
HTTP_TIMEOUT_MS10000HTTP request timeout in milliseconds

Sources by API Key Requirement

SourceRequires KeyData Provided
Open-MeteoNoCurrent, forecast, air quality
wttr.inNoCurrent conditions
METARNoAviation weather
OpenWeatherMapYesCurrent conditions
WeatherAPIYesCurrent conditions, astronomy (moon)
Tomorrow.ioYesCurrent conditions, air quality

Architecture

src/
  index.ts              # MCP server entry point (stdio transport)
  config.ts             # Environment variable loading
  cache.ts              # LRU cache with stampede prevention
  types.ts              # Shared TypeScript interfaces
  tools/
    current-weather.ts  # get_current_weather
    forecast.ts         # get_weather_forecast
    air-quality.ts      # get_air_quality
    metar.ts            # get_metar
    astronomy.ts        # get_astronomy
    source-status.ts    # get_weather_source_status
  sources/
    open-meteo.ts       # Open-Meteo (current, forecast, AQI)
    wttr-in.ts          # wttr.in (current)
    openweathermap.ts   # OpenWeatherMap (current)
    weatherapi.ts       # WeatherAPI (current, astronomy)
    tomorrow-io.ts      # Tomorrow.io (current, AQI)
    metar.ts            # aviationweather.gov (METAR)
  utils/
    aggregator.ts       # Multi-source data merging
    finnish-locations.ts # Finnish/Nordic city alias map
    location.ts         # Location resolution (alias -> geocode -> coords)
    units.ts            # Unit conversions and WMO weather codes

Transport

The server uses stdio transport natively. The Docker setup wraps it with supergateway to expose it as a Streamable HTTP endpoint on port 3000 (mapped to 3015 in docker-compose).

License

MIT

Reviews

No reviews yet

Sign in to write a review