statline-mcp
Provides tools for interacting with the CBS StatLine OData API (Statistics Netherlands), enabling search and navigation of the Dutch statistics table catalog and retrieval of figures with filters, pagination, and labels.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@statline-mcp Find a CBS table about unemployment and give me the last four quarterly figures."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
statline-mcp
🇳🇱 Nederlandse versie
MCP server for the CBS StatLine OData API (Statistics Netherlands). The full table catalog (~6,000 tables) is cached locally in SQLite (FTS5) and is searchable; an MCP user can then navigate through a table and retrieve the figures.
Tools
Tool | Purpose |
| Search the catalog by title/description (prefix matching, nl/en, current tables by default) |
| Description, period, status and dimensions of a table |
| Measures (columns) with unit and topic group, searchable |
| Valid values of a dimension (regions, periods, categories), searchable |
| Retrieve figures with filters, pagination and labels |
| Show cache status / refresh the catalog (automatically after 24 hours) |
Typical flow: search_tables("werkloosheid") → get_table_info("85224NED") →
list_dimension_values(..., "Perioden") → query_data(..., filters={"Perioden": "laatste:4kw"}).
Note: most CBS tables are in Dutch. English versions exist for part of the catalog (table IDs ending in
ENG); uselanguage="en"insearch_tablesto restrict results to those.
Filters in query_data
For each dimension you can pass:
Input | Meaning |
| a key |
| a title (case-insensitive) |
| all values starting with |
| the most recent 1 or 5 values ("laatste" = latest) |
| same, but counting only quarters / years / months (useful for mixed periods) |
Multiple values in a list are combined with OR, different dimensions with AND.
Related MCP server: mcp-cbs-nl
Installation
You need uv. uv fetches a suitable Python (≥ 3.10) itself if needed.
Option 1: straight from GitHub (no clone needed)
uvx --from git+https://github.com/pascal-cbs/MCP-server-StatLine statline-mcpThis starts the server over stdio. You normally won't run this yourself; instead, let an MCP client launch the command (see below).
Option 2: clone locally
git clone https://github.com/pascal-cbs/MCP-server-StatLine.git
cd MCP-server-StatLine
uv sync
uv run statline-mcp # starts the server over stdioAdding to Claude Code
With option 1 (from GitHub):
claude mcp add statline -- uvx --from git+https://github.com/pascal-cbs/MCP-server-StatLine statline-mcpWith option 2 (local copy):
claude mcp add statline -- uv --directory /path/to/MCP-server-StatLine run statline-mcpBy default the server applies to the current project only. To make it available in all your projects:
claude mcp add --scope user statline -- uvx --from git+https://github.com/pascal-cbs/MCP-server-StatLine statline-mcpThen check with claude mcp list that the server is connected, or type /mcp in Claude Code.
Start a new session if needed, then try for example:
Find a CBS table about unemployment and give me the last four quarterly figures.
Remove it with claude mcp remove statline.
Adding to other MCP clients
For Claude Desktop and other clients with a JSON configuration (for Claude Desktop:
claude_desktop_config.json):
{
"mcpServers": {
"statline": {
"command": "uvx",
"args": ["--from", "git+https://github.com/pascal-cbs/MCP-server-StatLine", "statline-mcp"]
}
}
}For a local copy use "command": "uv" with
"args": ["--directory", "/path/to/MCP-server-StatLine", "run", "statline-mcp"].
If the client cannot find uv/uvx, give the full path (which uvx).
Configuration (environment variables)
STATLINE_CACHE_DIR– cache directory (default~/.cache/statline-mcp)STATLINE_CATALOG_MAX_AGE_HOURS– maximum age of the catalog cache (default 24)
The first search fetches the catalog from CBS (a few seconds); after that, searching runs locally.
Notes
Data comes from
TypedDataSet; pagination withoffsetautomatically uses theODataFeedendpoint becauseODataApidoes not support$skip.CBS keys are sometimes padded with spaces (
'GM0363 '); the server handles this and returns trimmed values.CBS does not return a total row count; use
next_offsetto keep paginating.
Available Tools
6 toolsget_table_infoA
Beschrijving van één tabel plus zijn dimensies (waar je op filtert) en aantal meetwaarden.
Dit is het startpunt om door een tabel te navigeren. Gebruik daarna get_table_measures voor de kolommen en list_dimension_values voor de waarden van een dimensie.
Args: table_id: Tabel-ID zoals '83765NED' of '85874ENG'. full_description: Voeg de lange officiële toelichting toe (kan veel tekst zijn).
Inputs: table_id (required), full_description. Returns: object
get_table_measuresA
Lijst de meetwaarden (kolommen met cijfers) van een tabel, met eenheid en onderwerpgroep.
Args: table_id: Tabel-ID. search: Filter op tekst in titel, sleutel, groep of omschrijving. limit: Maximaal aantal meetwaarden (1-200). offset: Aantal over te slaan (paginering).
Inputs: table_id (required), limit, offset, search. Returns: object
list_dimension_valuesA
Lijst de geldige waarden van een dimensie (bv. regio's, perioden, geslacht, bedrijfstakken).
De 'key' kun je gebruiken in query_data.filters. Perioden-sleutels hebben vorm als '2023JJ00' (jaar), '2023KW01' (kwartaal), '2023MM01' (maand).
Args: table_id: Tabel-ID. dimension: Dimensie-sleutel of -titel uit get_table_info (bv. 'Perioden', 'RegioS'). search: Filter op tekst in sleutel, titel of groep (bv. 'amsterdam'). limit: Maximaal aantal waarden (1-500). offset: Aantal over te slaan (paginering).
Inputs: table_id (required), dimension (required), limit, offset, +1 more. Returns: object
query_dataA
Haal cijfers op uit een CBS-tabel.
Filters per dimensie accepteren: een sleutel ('GM0363'), een titel ('Amsterdam'), een voorvoegsel met sterretje ('2023*' = alle perioden van 2023), of 'laatste' / 'laatste:5' voor de meest recente 1 resp. 5 waarden. Bij een tijddimensie met gemengde perioden (jaar + kwartaal) voeg je een type toe: 'laatste:4kw' (4 kwartalen), 'laatste:3jaar', 'laatste:12maand'. Meerdere waarden in een lijst worden met OF gecombineerd, verschillende dimensies met EN. Een dimensie zonder filter levert alle waarden op.
Voorbeeld: filters={"RegioS": ["Amsterdam", "Utrecht"], "Perioden": "laatste:3"}, measures=["Werkloosheid"].
Args: table_id: Tabel-ID. filters: {dimensie: waarde(n)}. Zie list_dimension_values voor geldige waarden. measures: Meetwaarden (sleutel of (deel van) titel). Standaard de eerste 10. limit: Maximaal aantal rijen per aanroep (1-1000). offset: Aantal rijen om over te slaan (paginering). labels: Toon dimensiewaarden als titel (standaard), sleutel of beide. odata_filter: Extra ruwe OData $filter-expressie (voor gevorderd gebruik), met AND toegevoegd.
Inputs: table_id (required), limit, labels, offset, +3 more. Returns: object
refresh_catalogA
Toon de status van de lokale cataloguscache en ververs hem desgewenst.
De catalogus wordt automatisch ververst als hij ouder is dan 24 uur.
Args: force: Haal de catalogus nu opnieuw op bij het CBS.
Inputs: force. Returns: object
search_tablesA
Doorzoek de CBS-catalogus (ca. 6000 tabellen) op titel en beschrijving.
Zoektermen worden als voorvoegsel gematcht (bv. 'werkloos' vindt 'werkloosheid'); alle termen moeten voorkomen, anders valt de zoekactie terug op 'minstens één term'. Een tabel-ID (bv. '83765NED') kan ook direct worden opgegeven.
Args: query: Zoektekst, bv. 'huizenprijzen gemeente' of 'unemployment'. language: Beperk tot Nederlandstalige ('nl') of Engelstalige ('en') tabellen. include_discontinued: Neem ook stopgezette tabellen mee (standaard alleen actuele). limit: Maximaal aantal resultaten (1-50). offset: Aantal resultaten om over te slaan (voor volgende pagina).
Inputs: query (required), limit, offset, language, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct stage of the CBS data workflow: cache refresh, catalog search, table metadata, measure listing, dimension values, and data querying. Although several tools take a table_id, their purposes are clearly separated by descriptions and expected outputs.
All tool names use snake_case and follow a predictable verb_noun pattern: refresh_catalog, search_tables, get_table_info, get_table_measures, list_dimension_values, query_data. There is no mixing of conventions.
Six tools cleanly cover the full read-only pipeline from dataset discovery to data retrieval. The count is well-scoped, with no redundant or missing steps for the server's apparent purpose.
The surface covers catalog refresh, search, table metadata, dimensions, measures, and data querying, which are the essential operations for CBS StatLine access. No obvious lifecycle gaps remain for a read-only statistical data server.
Related MCP Connectors
Statistics Netherlands (CBS / StatLine) OData MCP.
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Query official statistics of Catalonia (Idescat): tables, metadata and JSON-stat data via MCP.
UK Office for National Statistics dataset catalogue + Beta JSON API
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables accessing and querying Dutch government open datasets from CBS and data.overheid.nl, with tools for searching, filtering, downloading, and analyzing data using CSV, Parquet, DuckDB, or Pandas.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying Statistics Netherlands (CBS) data, including metadata for tables like '37296eng', through an MCP interface.90 npmMIT
- AlicenseNot gradedqualityCmaintenanceAccess Statbel Belgium open data via natural language queries. Provides tools to query bestat datasets through an MCP gateway.71 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables searching, exploring, and querying over 1,500 OECD statistical datasets via SDMX, covering national accounts, employment, trade, PISA, health, and more.384 npm5Apache 2.0