Project positioning and purpose The MCP server is used to provide Danish address data from Danmarks Adresseregister (DAR) to AI agents (such as Claude, Cursor, VS Code, and any other MCP client). The DAR data is hosted on the official national data distribution platform Datafordeleren. Because the DAWA (dawa.aws.dk, api.dataforsyningen.dk) on which the original address tool depended was shut down on October 1, 2026 and returns HTTP 410, this project appeared as an alternative.
Main capabilities The server provides ten small and documented tools, covering address lookup, street and address prefix search, and coordinate conversion. Coordinates are converted to WGS84 while preserving the DAR UUIDs that DAWA once used. Each result carries attribution information (CC BY 4.0, Klimadatastyrelsen), DAR status codes with English labels, and a point represented in both EPSG:25832 and WGS84. Errors are typed (config, bad_request, auth, not_found, rate_limited, upstream, timeout, network) and explain what to do next.
How to use Node.js 20 or newer is required. It can be configured in clients such as Claude Desktop, Cursor, and VS Code via mcp.json or claude_desktop_config.json. Anonymous access to the old REST service is still available for now, so the seven lookup tools do not require a key. However, Klimadatastyrelsen has announced that after January 15, 2027, Datafordeleren will provide only authenticated requests (API key or OAuth). Text search already requires a key because it runs on the GraphQL service.
Steps to obtain an API key:
- At https://datafordeler.dk(Datafordeler Administration), create a free account; an email user is sufficient, and MitID Erhverv is optional.
- Create an IT system and add an API key to it.
- Set DATAFORDELER_API_KEY. DAR has no approval step. A new key takes up to 15 minutes to activate; before that, the service returns 401 "Unrecognized Authentication key". Rate limits are not published; the server presents HTTP 429 as rate_limited. Optional legacy credentials (DATAFORDELER_USERNAME, DATAFORDELER_PASSWORD), if set, are passed to the REST service.
The dar_search_addresses tool handles the time parameters, status filtering, and initial capitalization on behalf of the caller. The dar_graphql tool passes the query through as-is and returns the service's errors verbatim.
Actual behavior of the GraphQL service (based on verification against the live service on 2026-10-01)
- DAR is served at /DAR/v2. /DAR/v1 (documented in the transition guide) returns 404.
- Every entity query must carry virkningstid and/or registreringstid, or filter by id_lokalId. Setting both to now retrieves the current state; using only virkningstid also returns superseded registrations.
- startsWith exists only on adgangsadressebetegnelse, adressebetegnelse, vejnavn, postnr, and navn, and is case-sensitive. The remaining fields use eq and in. There is no fuzzy, substring, or ranked search, and no autocomplete.
- References are ids. DAR_Husnummer holds the UUIDs of its street, postal code, and access point; coordinates are in DAR_Adressepunkt.
- Field names transliterate æ/ø/å as ae/oe/aa (doerbetegnelse).
- Pagination is forward-only: first (maximum 1000) and after.
- Responses are fast: 30 to 150 milliseconds per query in testing.
Data, licensing, and attribution Source: Danmarks Adresseregister via Datafordeleren, Klimadatastyrelsen. License: CC BY 4.0 under Datafordeleren's terms of use. Klimadatastyrelsen must be credited "where appropriate"; the attribution field in every response exists precisely to convey this information. Addresses are not personal data. The server stores nothing and logs nothing.
Known limitations The known limitations of the legacy REST service that the current version relies on: no text search, no reverse geocoding, no autocomplete, pagination only by page number, and a shutdown scheduled for 15 January 2027. The replacement for all of these is the GraphQL service behind three tools that require a key. When DATAFORDELER_API_KEY is set, test:live also tests the three GraphQL tools; when it is not set, these tests are skipped.
Code structure src/client.ts (REST and GraphQL requests, typed errors), src/normalise.ts (flattening, status labels, UTM32 to WGS84), src/server.ts (tool registration), src/index.ts (stdio entry point). The tests use fixture data captured from the live service on 2026-10-01. The project is MIT licensed, see LICENSE for details.