Metadata-Version: 2.4
Name: dutch-gov-mcp
Version: 0.3.0
Summary: Unofficial MCP server for Dutch government open data (data.overheid.nl, CBS, KVK)
Project-URL: Homepage, https://github.com/alireza/dutch-gov-mcp
Project-URL: Repository, https://github.com/alireza/dutch-gov-mcp
Project-URL: Issues, https://github.com/alireza/dutch-gov-mcp/issues
Author: Alireza
License-Expression: MIT
License-File: LICENSE
Keywords: cbs,ckan,government,kvk,mcp,netherlands,open-data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.11
Requires-Dist: fastmcp>=2.0.0
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# dutch-gov-mcp

Unofficial MCP server for Dutch government open data. Query thousands of public datasets, official statistics, and the business registry from **data.overheid.nl**, **CBS** (Statistics Netherlands), and **KVK** (Chamber of Commerce) directly through AI conversation.

Inspired by [France's official MCP server for data.gouv.fr](https://github.com/datagouv/datagouv-mcp) — the first government MCP server. This project brings the same playbook to the Netherlands.

No API key. No auth. 14 tools. Drop it into Claude Desktop and ask.

## What you can do

Ask an AI things like:

- *"What datasets are available about housing prices in the Netherlands?"*
- *"Show me CBS population statistics — what's the dataset identifier and what dimensions does it have?"*
- *"Which Dutch government organizations publish environmental data?"*
- *"Query CBS dataset 83765NED for the first 20 observations about Amsterdam neighborhoods."*
- *"Find unemployment data on both data.overheid.nl and CBS and compare what's available."*

The agent discovers datasets, inspects metadata, and queries rows — all through natural conversation.

## Data sources

### data.overheid.nl — National Open Data Portal (7 tools)

CKAN-based catalog of thousands of public datasets: tax, real estate, environment, transport, health. CC-0 licensed metadata.

| Tool | Purpose |
|------|---------|
| `search_datasets` | Full-text search with optional Solr filters |
| `get_dataset` | Full metadata for one dataset |
| `list_resources` | Files in a dataset |
| `get_resource` | Details for a specific file |
| `list_organizations` | Browse publishers |
| `get_organization` | Details for one publisher |
| `list_tags` | Browse available tags |

### CBS — Centraal Bureau voor de Statistiek (5 tools)

Official Dutch statistics via OData v4: population, economy, trade, housing, labor.

| Tool | Purpose |
|------|---------|
| `search_cbs_datasets` | Search the CBS catalog |
| `get_cbs_dataset` | Dataset metadata + dimension list |
| `get_cbs_dimensions` | Dimension definitions with sample values |
| `query_cbs_data` | Query observations with `$select`, `$filter`, pagination |
| `list_cbs_themes` | Browse statistical themes |

CBS datasets can contain millions of rows. `query_cbs_data` returns one page at a time with a `next_offset` hint — ask for more when you need it.

### KVK — Chamber of Commerce (2 tools)

Lookup basic company info and filed financial statements by KVK number. Uses KVK's free open-data endpoints.

| Tool | Purpose |
|------|---------|
| `lookup_company` | Basic company info by KVK number |
| `lookup_company_finances` | Filed financial statement metadata by KVK number |

**Limitations** (free dataset only):
- Lookup by 8-digit KVK number only — **no search by name, location, or SBI code** (that requires a paid KVK subscription)
- Only **BV** (private limited) and **NV** (public limited) companies included — no sole proprietorships, VOFs, etc.
- Postal codes truncated to the first 2 digits (privacy)
- Rate limit: 100 requests per 5 minutes

## Installation

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "dutch-gov-mcp": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/dutch-gov-mcp", "run", "dutch-gov-mcp"]
    }
  }
}
```

Restart Claude Desktop. The tools appear in the MCP picker.

### Local development

```bash
git clone https://github.com/<you>/dutch-gov-mcp
cd dutch-gov-mcp
uv sync
uv run dutch-gov-mcp         # stdio server
uv run pytest -m 'not integration'
```

Python 3.11+ required.

## Examples

**Search data.overheid.nl:**

```
search_datasets(query="woningen", max_results=3)
→ {"count": 482, "results": [{"name": "...", "title": "Verkoop woningen", "organization": "...", "tags": [...]}]}
```

**CBS — find, inspect, query:**

```
search_cbs_datasets(query="bevolking")
→ [{"Identifier": "83765NED", "Title": "Kerncijfers wijken en buurten 2017", ...}]

get_cbs_dimensions(dataset_id="83765NED")
→ [{"Identifier": "WijkenEnBuurten", "Title": "Wijken en buurten", "sample_values": [...]}]

query_cbs_data(dataset_id="83765NED", max_results=5)
→ {"rows": [...], "returned": 5, "total": 1617279, "more_available": true, "next_offset": 5}
```

## Future data sources

Planned for future sprints:

- **RDW** — Vehicle registration
- **Kadaster BAG** — Addresses and buildings
- **PDOK** — Geospatial / GIS

## Why this exists

France defined what "government AI readiness" looks like. Every government sits on massive public data behind unusable APIs. MCP makes that data accessible to agents. Unofficial, open-source, MIT-licensed.

## License

MIT
