Skip to main content

irm-kmi-mcp

License: MIT Python 3.10+

An MCP server exposing official Belgian weather data from the Royal Meteorological Institute of Belgium (IRM/KMI): observed conditions, daily and hourly forecasts, and weather warnings, for MCP clients such as Claude, Hermes or Openclaw.

"What's the weather in Namur?"            →  current_conditions("Namur")
"Forecast for Oostende, 5 days, in Dutch" →  daily_forecast("Oostende", days=5, language="nl")
"Any warnings in Belgium right now?"      →  warnings()

Features

  • Observed conditions: temperature, condition, UV index, sunrise/sunset from the nearest IRM weather station.
  • Daily forecast (1–8 days): min/max temperature, condition, wind, precipitation, plus the official IRM text bulletin in fr/nl/en/de.
  • Hourly forecast (1–49 h): temperature, precipitation, pressure, wind and gusts.
  • Official weather warnings: yellow/orange/red alerts, either for a single municipality (with level and validity period) or for the whole country.
  • Municipality resolution by name: "Namur", "Bruxelles", "Oostende", … resolved through the IRM's own city search.
  • Caching: weather data is cached for 10 minutes, city lookups for 24 hours.

Tools

Tool Parameters Returns
current_conditions commune temperature, condition (ww code + canonical English label), UV index, day/night, sunrise/sunset
daily_forecast commune, days (1–8, default 3), language (fr/nl/en/de) per day: temps, condition (ww code + label), wind, precipitation, official text
hourly_forecast commune, hours (1–49, default 24) per hour: temperature, condition (ww code + label), precipitation, pressure, wind
warnings commune (optional), language alert type, text; level + validity for a municipality, per-region level/validity otherwise

Data source & disclaimer

⚠️ Unofficial. This project is not affiliated with the IRM/KMI. It works by calling the same backend service that powers the official IRM mobile app. That service was never meant for public use: it is undocumented and it can break or disappear without notice. Please use it for personal, low-frequency purposes only.

The API surface was reverse-engineered and documented by Jules Dejaeghere in jdejaegh/irm-kmi-api and jdejaegh/irm-kmi-ha. Many thanks for the groundwork. This project is not affiliated with, sponsored or endorsed by the IRM/KMI.

Installation

git clone https://github.com/kthys/irm-kmi-mcp.git
cd irm-kmi-mcp
python3 -m venv .venv
.venv/bin/pip install -e .

Usage

Run the server (stdio transport):

.venv/bin/irm-kmi-mcp
# or
.venv/bin/python -m irm_kmi_mcp

Claude Desktop

{
  "mcpServers": {
    "irm-kmi-mcp": {
      "command": "/absolute/path/to/irm-kmi-mcp/.venv/bin/irm-kmi-mcp"
    }
  }
}

Hermes Agent

# config.yaml
mcp_servers:
  irm-kmi-mcp:
    command: "/absolute/path/to/irm-kmi-mcp/.venv/bin/irm-kmi-mcp"
    enabled: true

No API keys or configuration required. The daily request key is derived automatically.

Configuration

  • IRM_LANG: default language for official texts (bulletins, warning texts, day names, wind directions): fr, nl, en or de. Unset or invalid values fall back to English. Read once at server startup; set it before launching the server.

Development

.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest
.venv/bin/ruff check .

Tests run against recorded API responses (tests/fixtures/) with a mocked HTTP transport, so no network access is required. Re-record fixtures after upstream API changes.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irm_kmi_mcp-1.0.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irm_kmi_mcp-1.0.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file irm_kmi_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: irm_kmi_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for irm_kmi_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 37ee04a2d92d7c4ace9d00ad6866c43e377b234a7be469b27b76cf0173ae93cd
MD5 eb310a0750c63aaf566e6c6bd3476270
BLAKE2b-256 e11a6d6dd5d63802bb2edeff0e96b03304dad86987e44a78fff815f007aed1b6

See more details on using hashes here.

File details

Details for the file irm_kmi_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: irm_kmi_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for irm_kmi_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7dee141be89eb91175c993a0fe9d0c0dcf6353ee0f3a733eb5fd4517fcbc6d
MD5 f3140332c8ef9969c8cb4be300cc3243
BLAKE2b-256 f631934a17499223333a2f438c2b6e5814ceb4040fe6d7eee1f2d71e3f67be45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page