Skip to main content
Glama
Yr MCP
by Sam-Akla

Yr MCP

Yr MCP is a local Model Context Protocol server for weather data from the Norwegian Meteorological Institute (MET Norway). It gives MCP clients access to worldwide forecasts, short-term Nordic precipitation forecasts, weather alerts, and sun and moon events.

Install

You’ll need uv, Python 3.13 or later, and an MCP client that supports stdio. Weather requests require internet access to api.met.no. The server does not require an API key.

From the project directory, install the dependencies from the lockfile:

uv sync --locked

Related MCP server: mcp-met-no

Connect an MCP client

The server runs over stdio, so your MCP client starts it as a subprocess. For clients that use an mcpServers JSON configuration, add this entry:

{
  "mcpServers": {
    "yr-mcp": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/yr_mcp", "run", "yr-mcp"]
    }
  }
}

Replace /absolute/path/to/yr_mcp with the directory containing pyproject.toml. If your client cannot find uv, use the absolute path returned by command -v uv as the command. Reload the client after saving its configuration.

Tools

All four tools take latitude and longitude in decimal degrees. Supply the coordinates when making a request. Place-name lookup is not exposed as an MCP tool.

Tool

What it returns

Main options

get_location_forecast

Up to nine days of weather forecasts for coordinates worldwide

usage_method accepts compact or complete and defaults to complete. Optional altitude is in meters.

get_now_cast

A two-hour forecast for locations in Norway, Sweden, Finland, and Denmark, useful for near-term precipitation

usage_method defaults to complete. Optional altitude is in meters.

get_sun_moon_events

Rise, set, and other sun or moon events for a given date

date is required in YYYY-MM-DD format. usage_method defaults to sun and also accepts moon. offset is optional.

get_met_alerts

MET Norway weather alerts

sort is required, for example t_onset. The defaults are current alerts, English (en), and the land domain. With usage_method: "archive", provide date for a day or period for a month. Both inputs take YYYY-MM-DD, and the server uses only the year and month from period.

The server also exposes a travel_planner prompt that takes a destination and asks the client to use the forecast to discuss travel conditions such as temperature, wind, and precipitation.

Example

Ask your MCP client:

Use Yr MCP to get the compact forecast for Oslo at latitude 59.9139 and longitude 10.7522. Summarize tomorrow’s temperature, wind, and precipitation.

To call get_location_forecast directly, use these arguments:

{
  "latitude": 59.9139,
  "longitude": 10.7522,
  "usage_method": "compact"
}

Smoke test

From the project directory, run:

uv run python test/simple_smoke_test.py

The script checks that the forecast tool is registered and calls it with coordinates for Oslo. It requires internet access.

Roadmap

  • Expose place-name and address lookup as an MCP tool so users can find coordinates for weather requests.

  • Return actionable errors when MET Norway requests fail or return an unreadable response.

  • Expand automated coverage for all four weather tools using mocked API responses, alongside the existing stdio startup check.

Available Tools

4 tools
get_location_forecastWeather forecasts for any location on earthC

This service delivers weather forecasts for any given coordinate for the next nine days

Inputs: latitude (required), longitude (required), altitude, usage_method. Returns: result

get_met_alertsWeather alerts from the Norwegian Meteorological InstituteC

This service provides meteorological warnings for land, coastal and sea regions for the next days. Each alert message (identified by its CAP id) is only issued once, and is valid until the expires time or updated by another alert message.

Inputs: sort (required), latitude (required), longitude (required), date, +7 more. Returns: result

get_now_castImmediate weather forecast for specified locations in the Nordic areaB

This service delivers two-hour weather forecasts in GeoJSON or XML for locations in Norway, Sweden, Finland and Denmark. Forecasts are updated every 5 minutes. It is our best estimate of the current weather conditions, and is especially useful for predicting immediate precipitation.

Inputs: latitude (required), longitude (required), altitude, usage_method. Returns: result

get_sun_moon_eventsCalculate sun or moon events, as seen from a specific location on EarthA

Returns a GeoJSON document indicating time and direction to when the sun (or moon) is on its highest point on a given date (defaults to today) as seen from a specified point on Earth, as well as the preceding sun/moonrise and following sun/moonset (which may not be on the same date). The lowest point in the cycle is also returned. Note that any or all of these may be null.

Inputs: date (required), latitude (required), longitude (required), offset, +1 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool covers a distinct product: nine-day forecast, two-hour nowcast, sun/moon events, and weather alerts. The only potential confusion is between get_location_forecast and get_now_cast, but the descriptions make the time-horizon and geographic scope differences clear.

    Naming Consistency5/5

    All four tools follow an identical get_<noun_phrase> snake_case pattern with descriptive, resource-oriented names. The only minor quirk is 'now_cast', but it is still consistent with the convention.

    Tool Count5/5

    Four tools map cleanly onto the four distinct data products the API offers, with no filler or redundant endpoints. This is well-scoped for a weather data server.

    Completeness4/5

    The surface covers point forecasts, immediate-precipitation nowcasts, alerts, and astronomical events, which are the core offerings. Minor gaps exist, such as no historical/observed data or region-lookup helper, but agents can work around these.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • 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.
      70 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables natural-language access to MET Norway weather forecasts, including hourly forecasts worldwide and place-name geocoding, via MCP tools.
      8
      40 npm
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables users to retrieve weather information through natural language prompts in MCP-compatible clients like Claude for Desktop.
      -