smhi-mcp-server
MCP server for SMHI weather data, providing current conditions, hourly and daily forecasts, and daily summaries for northern Europe.
README
SMHI MCP Server
MCP server for Swedish Meteorological and Hydrological Institute (SMHI) weather data, built on SMHI's current snow1g point-forecast API.
SMHI retired its older
pmp3gforecast API on 2026-03-31 in favor ofsnow1g. 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
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。