mcpField
M
met-mcp

met-mcp

Remote
github.com/trondbjoroyMaps & Travel0Updated 10w ago
Repository

About met-mcp

met-mcp is an MCP server that provides weather and related data from MET Norway (Yr), for clients that need forecasts or observations by location. It combines worldwide forecasts with Nordic-specific radar, alerts, and coastal data.

Key features

  1. 01Geocode place names to coordinates
  2. 02Get hourly forecasts worldwide
  3. 03Retrieve Nordic radar precipitation nowcasts
  4. 04Query Norwegian danger alerts
  5. 05Get sun events and coastal ocean forecasts
  6. 06Find stations and retrieve historical observations

Use cases

  1. 01Check an hourly forecast for a destination
  2. 02Look up Norwegian weather warnings
  3. 03Review past observations from nearby stations
  4. 04Check waves and sea temperature on the Norwegian coast

MCP support

It exposes weather tools to MCP clients through a local stdio server or a remote Streamable HTTP endpoint. Tool definitions are shared across both deployments.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://met-mcp.met-mcp-worker.workers.dev/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Packages
npmmet-mcp0.2.0

Tools

8
ParameterTypeRequiredDescription
namestringYesPlace name, e.g. 'Bergen' or 'Oslo, Norway'
countintegerNoMaximum number of matches to return

Details

From the project README

met-mcp

An MCP server for weather forecasts from MET Norway (Yr). Built as a learning project.

Available three ways:

  • npm: met-mcp — run locally over stdio
  • Remote: https://met-mcp.met-mcp-worker.workers.dev/mcp — Streamable HTTP on Cloudflare Workers, add it as a claude.ai connector
  • MCP registry: io.github.trondbjoroy/met-mcp

Tools

  • geocode_location(name, count) — find coordinates for a place name. Uses the free Open-Meteo geocoder, because MET has no geocoding API.
  • get_forecast(latitude, longitude, hours) — hourly forecast from MET Locationforecast 2.0. Works worldwide, best in the Nordics.
  • get_nowcast(latitude, longitude) — radar-based precipitation for the next 2 hours. Nordics only.
  • get_weather_alerts(latitude?, longitude?) — official Norwegian danger warnings (MetAlerts). Omit coordinates for all of Norway.
  • get_sun_events(latitude, longitude, date, utc_offset) — sunrise, sunset, and solar noon. Worldwide.
  • get_ocean_forecast(latitude, longitude, hours) — wave height and sea temperature along the Norwegian coast.
  • find_weather_stations(latitude, longitude, count) — nearest official weather stations (Frost).
  • get_historical_weather(station_id, from, to, elements) — daily historical observations from the Frost archive; some stations go back over 100 years.

The two Frost tools need a free client ID from https://frost.met.no/auth/requestCredentials.html, set as the FROST_CLIENT_ID env var (or a Cloudflare secret for the worker). The other tools need nothing.

Tool definitions live in src/tools.ts, shared between the stdio server and the worker.

Build and test

npm install
npm run build
npm test

The test spawns the server over stdio and calls both tools against the live APIs.

Use with Claude Code

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

Then ask Claude: "What is the weather in Bergen tomorrow?"

MET terms of service

  • Send an identifying User-Agent with contact info. Set the MET_USER_AGENT env var, e.g. met-mcp/0.1.0 [email protected].
  • Send at most 4 decimals in coordinates. The server rounds for you.
  • Data license: NLOD / CC BY 4.0. Credit MET Norway when you show the data.

Remote version

worker/ holds the Cloudflare Workers deployment: the same two tools served over MCP Streamable HTTP with createMcpHandler (MCP SDK v2). Develop with npm run dev, ship with npm run deploy (both from worker/).

How it works

  • src/index.ts is the whole server. It speaks MCP over stdio: JSON-RPC on stdin/stdout.
  • Each tool declares an input schema with Zod. The MCP client (Claude) reads the schema and validates arguments.
  • Tool results are content blocks. This server returns JSON as text, trimmed to what an LLM needs — the raw MET response has ~90 timesteps with far more fields.
  • Never write to stdout with console.log. It corrupts the protocol stream. Log to stderr.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.