Skip to main content
Glama

met-mcp

Ein MCP-Server für Wettervorhersagen von MET Norwegen (Yr). Als Lernprojekt gebaut.

Verfügbar auf drei Arten:

  • npm: met-mcp — lokal über stdio ausführen

  • Remote: https://met-mcp.met-mcp-worker.workers.dev/mcp — Streamable HTTP auf Cloudflare Workers, als claude.ai-Connector hinzufügen

  • MCP-Registry: io.github.trondbjoroy/met-mcp

Werkzeuge

  • geocode_location(name, count) — Koordinaten für einen Ortsnamen finden. Verwendet den kostenlosen Open-Meteo-Geocoder, da MET keine Geocoding-API hat.

  • get_forecast(latitude, longitude, hours) — stündliche Vorhersage von MET Locationforecast 2.0. Funktioniert weltweit, am besten in den nordischen Ländern.

  • get_nowcast(latitude, longitude) — radarbasierter Niederschlag für die nächsten 2 Stunden. Nur in den nordischen Ländern.

  • get_weather_alerts(latitude?, longitude?) — offizielle norwegische Gefahrenwarnungen (MetAlerts). Koordinaten weglassen für ganz Norwegen.

  • get_sun_events(latitude, longitude, date, utc_offset) — Sonnenaufgang, Sonnenuntergang und Sonnenhöchststand. Weltweit.

  • get_ocean_forecast(latitude, longitude, hours) — Wellenhöhe und Meerestemperatur entlang der norwegischen Küste.

  • find_weather_stations(latitude, longitude, count) — nächstgelegene offizielle Wetterstationen (Frost).

  • get_historical_weather(station_id, from, to, elements) — tägliche historische Beobachtungen aus dem Frost-Archiv; einige Stationen reichen über 100 Jahre zurück.

Die beiden Frost-Werkzeuge benötigen eine kostenlose Client-ID von https://frost.met.no/auth/requestCredentials.html, die als Umgebungsvariable FROST_CLIENT_ID gesetzt wird (oder als Cloudflare-Secret für den Worker). Die anderen Werkzeuge benötigen nichts.

Die Werkzeugdefinitionen befinden sich in src/tools.ts, gemeinsam genutzt zwischen dem stdio-Server und dem Worker.

Related MCP server: OpenWeatherMap MCP Server

Build und Test

npm install
npm run build
npm test

Der Test startet den Server über stdio und ruft beide Werkzeuge gegen die Live-APIs auf.

Verwendung mit Claude Code

claude mcp add met-weather -- node C:\Users\trond\met-mcp\dist\index.js

Frage dann Claude: „Wie ist das Wetter morgen in Bergen?"

MET-Nutzungsbedingungen

  • Sende einen identifizierenden User-Agent mit Kontaktinformationen. Setze die Umgebungsvariable MET_USER_AGENT, z. B. met-mcp/0.1.0 you@example.com.

  • Sende höchstens 4 Dezimalstellen in Koordinaten. Der Server rundet für dich.

  • Datenlizenz: NLOD / CC BY 4.0. Nenne MET Norwegen, wenn du die Daten zeigst.

Remote-Version

worker/ enthält die Cloudflare-Workers-Bereitstellung: dieselben zwei Werkzeuge, bereitgestellt über MCP Streamable HTTP mit createMcpHandler (MCP SDK v2). Entwickle mit npm run dev, veröffentliche mit npm run deploy (beide aus worker/).

So funktioniert es

  • src/index.ts ist der gesamte Server. Er spricht MCP über stdio: JSON-RPC auf stdin/stdout.

  • Jedes Werkzeug deklariert ein Eingabeschema mit Zod. Der MCP-Client (Claude) liest das Schema und validiert Argumente.

  • Werkzeugergebnisse sind content-Blöcke. Dieser Server gibt JSON als Text zurück, zugeschnitten auf das, was ein LLM benötigt — die rohe MET-Antwort hat ~90 Zeitschritte mit weit mehr Feldern.

  • Schreibe niemals mit console.log auf stdout. Das beschädigt den Protokollstrom. Logge auf stderr.

Available Tools

8 tools
find_weather_stationsFind weather stationsAInspect

Find the nearest official weather stations (Frost). Use the station id (e.g. SN50540) with get_historical_weather.

Inputs: latitude (required), longitude (required), count.

geocode_locationGeocode a place nameCInspect

Find latitude and longitude for a place name. Use the coordinates with the other tools.

Inputs: name (required), count.

get_forecastGet weather forecastAInspect

Get an hourly weather forecast from MET Norway (Yr) for a coordinate. Works worldwide, best coverage in the Nordics.

Inputs: latitude (required), longitude (required), hours.

get_historical_weatherGet historical weatherAInspect

Daily historical observations from a weather station (Frost archive, some stations go back over 100 years). Find station ids with find_weather_stations.

Inputs: to (required), from (required), station_id (required), elements.

get_nowcastGet precipitation nowcastAInspect

Minute-by-minute precipitation for the next 2 hours, radar-based. Nordic region only. Answers 'do I need an umbrella right now?'

Inputs: latitude (required), longitude (required).

get_ocean_forecastGet ocean forecastCInspect

Wave height, wave direction, and sea temperature. Covers the Norwegian coast and nearby seas.

Inputs: latitude (required), longitude (required), hours.

get_sun_eventsGet sunrise and sunsetBInspect

Sunrise, sunset, and solar noon for a coordinate and date. Works worldwide.

Inputs: date (required), latitude (required), longitude (required), utc_offset.

get_weather_alertsGet weather alertsAInspect

Official danger warnings (wind, flood, ice, forest fire...) from MET Norway. Covers Norway and its waters. Omit coordinates to get all current alerts. Alert text is in Norwegian.

Inputs: latitude, longitude.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct weather data need: geocoding, hourly forecasts, nowcasting, alerts, solar events, ocean conditions, station lookup, and historical observations. The only potentially overlapping pair (get_forecast vs get_nowcast) is clearly separated by forecast horizon and description.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern, with get_ as the dominant prefix and find_/geocode_ as clear exceptions that still follow the same grammatical structure. This makes the tool surface highly predictable.

    Tool Count5/5

    Eight tools is well-scoped for a weather data server: each tool handles a specific data type or lookup step without redundancy. The count is large enough to cover the domain but small enough to avoid overwhelming an agent.

    Completeness5/5

    The tool set covers the full observation-to-forecast lifecycle: geocoding to obtain coordinates, station discovery for historical data, current conditions, short-term nowcast, forecast, alerts, ocean conditions, and solar events. No critical gaps are apparent for the stated weather domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides LLM-friendly weather tools and Norwegian place name resolution via MCP, enabling weather forecasts, air quality, marine conditions, and activity planning.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides weather data including current conditions, forecasts, and summaries via Open-Meteo with no API key required, enabling natural language queries through an MCP interface.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables access to MET Norway weather data including global forecasts, Nordic nowcast, sunrise/sunset times, air quality, and ocean forecasts via natural language queries.
      59 npm
      MIT