Skip to main content
Glama
smhi-mcp-server

smhi-mcp-server

SMHI MCP Server

smhi-mcp-server MCP server

CI

MCP server for Swedish Meteorological and Hydrological Institute (SMHI) weather data, built on SMHI's current snow1g point-forecast API.

SMHI retired its older pmp3g forecast API on 2026-03-31 in favor of snow1g. This project is a fresh implementation against the current API.

Features

  • get_forecast - Full ~10-day forecast with all parameters

  • get_current_weather - Current conditions (temperature, wind, precipitation)

  • get_hourly_forecast - Next 1-48 hours hourly

  • get_daily_summary - Daily high/low for up to 10 days

  • get_fire_risk - Wildfire/forest fire risk forecast (Canadian FWI system)

  • get_radar_image - Latest observed precipitation radar composite for Sweden

  • get_weather_warnings - Active official SMHI weather warnings/alerts (wind, rain, snow, thunder, flooding, fire risk, etc.)

  • get_weather_analysis - Past ~24h gridded meteorological analysis ("what's actually happening"), not a forecast

Related MCP server: mcp-norwegian-weather

Coverage

Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania. get_radar_image and get_weather_warnings are Sweden-only.

Installation

Claude Code

Add to your Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "smhi": {
      "command": "node",
      "args": ["/path/to/smhi-mcp-server/dist/index.js"]
    }
  }
}

Build from source

npm install
npm run build

Usage Examples

Get current weather in Stockholm

Tool: get_current_weather
Input: { "latitude": 59.3293, "longitude": 18.0686 }

Get weekly forecast for Gothenburg

Tool: get_daily_summary
Input: { "latitude": 57.7089, "longitude": 11.9746, "days": 7 }

Check if it will rain in Oslo

Tool: get_hourly_forecast
Input: { "latitude": 59.9139, "longitude": 10.7522, "hours": 12 }

Check wildfire risk near Norrköping

Tool: get_fire_risk
Input: { "latitude": 58.5877, "longitude": 16.1924, "period": "daily" }

See what's actually raining right now

Tool: get_radar_image
Input: {}

Check for active storm warnings in Stockholm county

Tool: get_weather_warnings
Input: { "county": "Stockholm", "minSeverity": "YELLOW" }

See what's actually happened in Malmö over the last few hours

Tool: get_weather_analysis
Input: { "latitude": 55.6050, "longitude": 13.0038, "hours": 6 }

API Reference

get_forecast

Get complete ~10-day forecast with all SMHI parameters.

Parameter

Type

Required

Description

latitude

number

Yes

-90 to 90

longitude

number

Yes

-180 to 180

get_current_weather

Get current weather conditions.

Parameter

Type

Required

Description

latitude

number

Yes

-90 to 90

longitude

number

Yes

-180 to 180

Returns: temperature (°C), humidity (%), wind (m/s), pressure (hPa), visibility (km), cloud cover (%), precipitation (mm), weather description.

get_hourly_forecast

Get hourly forecast.

Parameter

Type

Required

Default

Description

latitude

number

Yes

-

-90 to 90

longitude

number

Yes

-

-180 to 180

hours

number

No

24

1-48

get_daily_summary

Get daily weather summary.

Parameter

Type

Required

Default

Description

latitude

number

Yes

-

-90 to 90

longitude

number

Yes

-

-180 to 180

days

number

No

7

1-10

Returns: date, high/low temperature (°C), dominant weather, precipitation sum (mm), max wind speed (m/s).

get_fire_risk

Get wildfire/forest fire risk forecast, based on the Canadian Fire Weather Index (FWI) system as run by SMHI (fwif1g API). Calibrated for Swedish forest and grass fuels.

Parameter

Type

Required

Default

Description

latitude

number

Yes

-

-90 to 90

longitude

number

Yes

-

-180 to 180

period

string

No

daily

daily (~6 days ahead, afternoon fire risk) or hourly (next 48 hours)

Returns per time step: fire risk class (1-6) and description, the underlying FWI/ISI/BUI/FFMC/DMC/DC indices (unitless), grass fire risk class, forest dryness class (daily only), temperature (°C)/wind (m/s)/humidity (%), and multi-day precipitation sums (mm).

get_radar_image

Get the latest Swedish precipitation radar composite (mosaic of all Swedish radar stations, SMHI's radar comp product), updated roughly every 5 minutes. Unlike the forecast tools above, this reflects observed precipitation happening right now rather than a prediction.

No input parameters.

Returns the radar image (PNG) plus area, product, and validTime/updated timestamps. Coverage: Sweden only.

get_weather_warnings

Get currently active official SMHI weather warnings (impact-based warnings, ibwwarnings/IBWwarnings API). Not coordinate-based — returns all active warnings for Sweden, each tagged with the county/area it affects; filter client-side by severity and/or county.

Parameter

Type

Required

Default

Description

language

string

No

en

en or sv

minSeverity

string

No

-

RED, ORANGE, YELLOW, or MESSAGE — only return warnings at or above this severity

county

string

No

-

Case-insensitive substring match against the warning's area name and affected counties, e.g. "Stockholm"

Returns count plus a flat warnings array (one entry per warning area) with event, severity/severityCode, areaName, affectedCounties, descriptions (title/text pairs), approximateStart, and published. Coverage: Sweden only.

get_weather_analysis

Get the past ~24 hours of gridded meteorological analysis (SMHI's mesan2g/Mesan2gv3 API): a "best current estimate" of conditions, blending observations with a short-range model on a ~2.5 km grid, not a forecast. Useful for nowcasting at a point without a nearby observation station, checking how a past forecast turned out, or "what was the weather really like" lookups.

Parameter

Type

Required

Default

Description

latitude

number

Yes

-

-90 to 90

longitude

number

Yes

-

-180 to 180

hours

number

No

24

1-24, most recent hours to return

Returns hourly entries (most recent first): temperature (°C, plus min/max at some hours), dew point, wet-bulb temperature (°C), humidity (%), wind speed/direction/gust (m/s), pressure (hPa, sea-level and station), visibility (km), cloud cover (total/low/medium/high, %) and base/top altitude (m), precipitation over the last 1/3/12/24h (mm — the 3/12/24h windows are only populated at some hours), snow depth change over the last hour (cm), and a weather symbol/description.

Development

npm install
npm run typecheck
npm test
npm run build

Data Source

Data provided by SMHI Open Data under CC BY 4.0.

License

MIT

Available Tools

8 tools
get_current_weatherA
Read-onlyIdempotent

Get current weather conditions (the nearest forecast time step) for a location: temperature, wind, humidity, precipitation, and a human-readable weather description. Use this for a quick "what's the weather like right now" snapshot; use get_hourly_forecast for future hours, get_daily_summary or get_forecast for a multi-day outlook. Temperature in °C, wind speed in m/s, pressure in hPa, precipitation in mm, humidity/cloud cover/probabilities in %. Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_daily_summaryA
Read-onlyIdempotent

Get a daily weather summary for the next 1-10 days (default 7): high/low temperature, dominant weather condition, precipitation total, and max wind speed per day. Use this for a multi-day outlook at a glance; use get_hourly_forecast or get_forecast when you need hour-level detail instead. Temperature in °C, wind speed in m/s, precipitation in mm. Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_fire_riskA
Read-onlyIdempotent

Get a wildfire/forest fire risk forecast for a location, based on the Canadian Fire Weather Index (FWI) system as run by SMHI and calibrated for Swedish forest and grass fuels. Use this instead of the general forecast tools when the question is specifically about fire danger. Returns a fire risk class (1-6) plus the underlying FWI/ISI/BUI/FFMC/DMC/DC indices (unitless index values, not raw weather readings), grass fire risk class, and forest dryness class (daily period only). Also includes temperature (°C), wind speed (m/s), humidity (%), and multi-day precipitation sums (mm). Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_forecastA
Read-onlyIdempotent

Get the full ~10-day weather forecast for a location, with every raw SMHI parameter at native time resolution (hourly for the first days, then 3/6-hourly further out) — including fields not exposed by the other forecast tools, such as cloud layers and precipitation min/max/median. Prefer get_current_weather for a single now-reading, get_hourly_forecast for an hour-by-hour view, or get_daily_summary for a multi-day high/low overview; use this tool when you need the complete unprocessed dataset. Temperatures in °C, wind speed in m/s, pressure in hPa, precipitation in mm, humidity/cloud cover/probabilities in %. Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_hourly_forecastA
Read-onlyIdempotent

Get an hour-by-hour weather forecast for the next 1-48 hours (default 24): temperature, wind, precipitation, and conditions per hour. Use this to answer questions like "will it rain in the next few hours"; use get_current_weather for a single now-reading, get_daily_summary for a multi-day high/low overview, or get_forecast for the complete raw dataset. Temperature in °C, wind speed in m/s, precipitation in mm, probabilities in %. Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_radar_imageA
Read-onlyIdempotent

Get the latest Swedish precipitation radar composite (mosaic of all Swedish radar stations), updated roughly every 5 minutes. Unlike the forecast tools, this shows observed precipitation happening right now, not a prediction — use the forecast tools instead if the question is about future weather. Takes no parameters. Returns a PNG image plus its area, product name, and validTime/updated timestamps. Returns an error result (isError: true) if the SMHI radar API is unreachable. Coverage: Sweden only.

Inputs: no named parameters.

get_weather_analysisA
Read-onlyIdempotent

Get the past ~24 hours of gridded meteorological analysis for a location, from SMHI's Mesan2gv3 API — a "best current estimate" of conditions (observations blended with a short-range model on a ~2.5 km grid), not a forecast. Use this for nowcasting ("what's actually happening right now" at a point without a nearby observation station), verifying how a past forecast turned out, or "what was the weather really like" lookups; use the forecast tools instead for future conditions. Returns hourly entries (most recent first) with temperature (°C, plus min/max at some hours), dew point, wet-bulb temperature, wind (m/s), pressure (hPa, sea-level and station), visibility (km), cloud cover layers and base/top altitude (%, m), precipitation over the last 1/3/12/24h (mm, later windows only populated at some hours), snow depth change (cm), and a human-readable weather description. Returns an error result (isError: true) if coordinates are out of range or the SMHI API is unreachable. Coverage: Sweden, Norway, Finland, Denmark, Estonia, and parts of Latvia/Lithuania.

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

get_weather_warningsA
Read-onlyIdempotent

Get currently active official SMHI weather warnings/alerts for Sweden (impact-based warnings for wind, rain, snow, thunder, high temperatures, flooding, fire risk, and more). Not coordinate-based — returns all active warnings, each tagged with the county/area it affects, so filter by county name and/or minimum severity to narrow results. Severity levels from most to least severe: RED > ORANGE > YELLOW > MESSAGE. Use this for "is there a storm warning" type questions; use the forecast tools for general future conditions and get_fire_risk for the underlying fire danger index. Returns an error result (isError: true) if the SMHI warnings API is unreachable. Coverage: Sweden only.

Inputs: county, language, minSeverity.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.8/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinctly different weather data need: current conditions, hourly forecast, daily summary, full raw forecast, radar imagery, warnings, fire risk, and past analysis. Descriptions explicitly cross-reference when to use each, eliminating ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent get_verb_noun pattern (e.g., get_forecast, get_radar_image, get_weather_warnings). The naming is uniform and predictable, making it easy to infer tool functionality.

    Tool Count5/5

    Eight tools provide comprehensive coverage of weather data without being excessive. Each tool serves a clear purpose, and the count is well-scoped for a weather server offering forecasts, current conditions, radar, warnings, fire risk, and analysis.

    Completeness5/5

    The tool set covers the full weather data lifecycle: current conditions, hourly/daily/raw forecasts, radar observations, warnings, fire danger, and historical analysis. There are no obvious dead ends or missing core operations for the stated domain.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      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.
      12
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that provides current weather conditions and hourly forecasts for locations across Norway using the MET Norway Locationforecast 2.0 API. It features coordinate support, geocoding for any Norwegian location, and built-in configurations for major cities.
      2
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server that provides real-time weather data, forecasts, and historical weather information from SMHI (Swedish Meteorological and Hydrological Institute) for any location in Sweden.
      2
      -