mcp-belgium
README.md
# mcp-belgium
[](https://www.npmjs.com/package/mcp-belgium)
[](https://www.npmjs.com/package/mcp-belgium)
[](https://github.com/lacausecrypto/mcp-belgium/actions/workflows/ci.yml)
[](./LICENSE)
[](https://nodejs.org/)
[](https://pnpm.io/)
[](https://www.typescriptlang.org/)
[](https://modelcontextprotocol.io/)
One MCP server for Belgian public APIs.
`mcp-belgium` is the public entry point. It exposes a single aggregated MCP server that bundles Belgian transport, official statistics, open data, addresses, weather, air quality, and geospatial services behind one install and one client config entry.
The package is also prepared for publication to the official MCP Registry under `io.github.lacausecrypto/mcp-belgium`.
## Why use it
- one npm package
- one MCP server entry in your client config
- namespaced tools like `irail_*`, `statbel_*`, `best_*`, `kmi_*`, `urban_*`, and `urbis_*`
- built-in catalog tools, resources, and a prompt so the LLM can discover the right Belgian domain before calling tools
- explicit, actionable errors when an upstream requires a key or has changed contract (no silent empty results)
## Install
Run directly:
```bash
npx -y mcp-belgium
```
With pnpm:
```bash
pnpm dlx mcp-belgium
```
Global install:
```bash
pnpm add -g mcp-belgium
mcp-belgium
```
Default transport is `stdio`, which is what desktop MCP clients expect.
## Claude Desktop
```json
{
"mcpServers": {
"belgium": {
"command": "npx",
"args": [
"-y",
"mcp-belgium"
],
"env": {
"LOG_LEVEL": "silent"
}
}
}
}
```
Most domains need no key. Two are key-gated, and their keys go in the same `env` block:
```json
"env": {
"LOG_LEVEL": "silent",
"CBEAPI_KEY": "<your cbeapi key>",
"STIB_API_KEY": "<your stib key>"
}
```
| Variable | Enables | Where to get it |
| --- | --- | --- |
| `CBEAPI_KEY` | `kbo_*` company registry tools | free tier (2,500 calls/day) at https://cbeapi.be |
| `STIB_API_KEY` | `stib_*` Brussels transit tools | free key at https://data.stib-mivb.brussels |
| `MCP_TRANSPORT=http` | Streamable HTTP instead of stdio | — |
| `PORT_BELGIUM` | HTTP port of the aggregated server (default `3017`) | — |
Restart your MCP client after editing its config.
## What the LLM gets
Alongside the domain tools, `mcp-belgium` exposes a discovery layer:
- `belgium_catalog_overview`
- `belgium_list_domains`
- `belgium_describe_domain`
- `belgium://catalog`
- `belgium://catalog.json`
- `belgium://domain/{domain}`
- `belgium_capability_guide`
That means the LLM can:
- inspect the Belgian domains available from this single MCP
- see which domains are live, limited, or key-gated
- understand what kind of data each domain provides
- pick the right namespaced tool without guessing
## Main domains
| Prefix | Domain | Status | Auth | Main data |
| --- | --- | --- | --- | --- |
| `irail_*` | Belgian rail / iRail | Live | None | stations, connections, liveboards, vehicles, disruptions |
| `mobility_*` | Trip planning via Transitous | Live | None | door-to-door trips across SNCB, STIB, De Lijn and TEC; operators, GTFS references |
| `stib_*` | STIB/MIVB Brussels transit | Live | API key | waiting times, stops, routes, service messages |
| `infrabel_*` | Infrabel Open Data | Live | None | rail infrastructure datasets and records |
| `kbo_*` | Belgian company registry | Live | API key | enterprise search, company details, companies by NACE code |
| `best_*` | BeST Belgian addresses | Live | None | addresses, municipalities, streets, postal infos |
| `statbel_*` | Statbel | Live | None | population, CPI, employment by year and region; search and read any Be.STAT view |
| `airquality_*` | IRCELINE air quality | Live | None | nearest stations, live measurements, BelAQI at any point, timeseries |
| `datagov_*` | data.gov.be catalogue (via data.europa.eu) | Live | None | dataset search, metadata, publishers, download links |
| `brussels_*` | Brussels Region open data | Live | None | datasets and records |
| `wallonia_*` | Wallonia open data | Live | None | datasets and records |
| `kmi_*` | KMI / IRM GeoServer | Live | None | stations, hourly observations, WFS discovery |
| `wallonia_geo_*` | Wallonia GeoServices | Live | None | ArcGIS folders, services, layer queries |
| `urban_*` | urban.brussels WFS | Live | None | feature types, schemas, GeoJSON features, the 19 commune boundaries |
| `urbis_*` | URBIS public WMS | Live | None | WMS layer discovery and map URL generation |
| `flanders_*` | Datavindplaats compatibility layer | Deprecated | API key | explicit upstream limitation error |
For a sector or company question, `kbo_search_by_activity` lists companies by NACE code; for any other Belgian open dataset, start with `datagov_search_datasets`, which covers federal, regional and local publishers.
## Docs / Wiki
The repo now includes a `docs/` tree that works as a lightweight public wiki:
- [Docs home](./docs/Home.md)
- [Installation](./docs/installation.md)
- [Client configuration](./docs/client-config.md)
- [Domain catalog](./docs/domains.md)
- [Development](./docs/development.md)
- [Release and npm publishing](./docs/release.md)
## Local development
Requirements:
- Node.js >= 22
- pnpm >= 9
Setup:
```bash
pnpm install
pnpm run build
pnpm run test
pnpm run typecheck
```
Run the aggregated server over stdio:
```bash
pnpm --filter mcp-belgium start:stdio
```
Run it over Streamable HTTP:
```bash
MCP_TRANSPORT=http PORT_BELGIUM=3017 pnpm --filter mcp-belgium start
```
Run the whole workspace:
```bash
docker compose up --build
```
## Monorepo shape
- `packages/core`: shared HTTP, retry, cache, rate limiting, XML helpers, and MCP response helpers
- `packages/mcp-belgium`: public aggregated entry point
- `packages/mcp-*`: domain-specific packages kept modular for maintenance, testing, and isolated validation
The public consumer path is `mcp-belgium`. Internal workspace packages stay modular for development, but the published `mcp-belgium` package bundles them so end users install only one npm package.
## Upstream caveats
This project wraps public upstream APIs. Some Belgian portals change authentication or endpoint contracts over time. When an upstream is no longer publicly compatible, this project prefers explicit, machine-readable limitation errors over silent failure.
Current examples:
- `stib_*` requires `STIB_API_KEY`, `kbo_*` requires `CBEAPI_KEY`
- `datagov_*` reads the data.gov.be catalogue from its official data.europa.eu mirror, since data.gov.be retired its CKAN API
- `mobility_plan_trip` routes through [Transitous](https://transitous.org), a community-run open-source service: keep request volume reasonable
- `wallonia_*` record queries share the anonymous ODS quota of the Wallonia portal (10,000 calls/day) and can return HTTP 429 when it is exhausted
- `flanders_*` preserves the old tool contract but returns an explicit API-key limitation
See [CHANGELOG.md](./CHANGELOG.md) for upstream changes handled in each release.
## Validation
Current workspace checks (the same steps run in CI):
- `pnpm run lint`
- `pnpm run build`
- `pnpm run test`
- `pnpm run typecheck`
- `pnpm audit --prod`
## License
MIT. See [LICENSE](./LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessLimited data