
Datafordeler Dar Mcp
io.github.aneal99v0.1.1更新於 Oct 2, 2026
Danish addresses from Datafordeleren's DAR register, the replacement for DAWA.
概覽
查詢 Datafordeleren 官方 DAR 登記中的丹麥地址、街道、郵遞區號與入口地址,並回傳 WGS84 座標。
- 功能
- 透過十個工具存取 Datafordeleren 上的丹麥地址登記(DAR),也就是已停用的 DAWA 服務的替代方案。七個查詢工具不需要金鑰:連線狀態、以 UUID 查詢單元地址或入口地址、某個入口地址下的單元、依市鎮與道路代碼或郵遞區號或地籍地块列舉、以 UUID 或代碼查詢道路、以四位數代碼查詢郵遞區號。另外三個工具需要 API 金鑰:街道名與地址的前綴搜尋、對 DAR/v2 的原始 GraphQL 透傳,以及取得 GraphQL schema。結果包含署名資訊、附英文標籤的 DAR 狀態碼,以及 EPSG:25832 與 WGS84 兩種座標。
- 適用情境
- 當助理需要最新的丹麥地址資料時使用,例如把郵遞區號解析成 UUID、列出某條街上的入口,或查出某個地址下的單元。它也是依賴已關閉 DAWA 介面的工具的替代路徑。本專案為 v0.1 探測版,沒有快取且只有單一資料來源,宜視為輕量封裝而非正式環境的資料平台。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 20 或更新版本。環境變數 DATAFORDELER_API_KEY 在 2027 年 1 月 15 日之前對七個查詢工具是選用的,但文字搜尋與 GraphQL 工具必須提供;金鑰來自 datafordeler.dk 的免費帳號,新金鑰最長需 15 分鐘才會生效。選用的 DATAFORDELER_USERNAME 與 DATAFORDELER_PASSWORD 若設定會傳給舊版 REST 服務。需要能連線至 Datafordeleren 服務的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Datafordeler Dar Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
datafordeler-dar-mcp
MCP server for Danish addresses from Danmarks Adresseregister (DAR) on Datafordeleren, the official national data distributor.
DAWA (dawa.aws.dk, api.dataforsyningen.dk) closed on 1 October 2026
and now returns HTTP 410. Every address tool that was built on it is dead.
Klimadatastyrelsen's replacement is Datafordeleren, which is keyed, bitemporal
and GraphQL-first. This server gives AI agents (Claude, Cursor, VS Code, any
MCP client) the DAR data through ten small, documented tools, with the
coordinates converted to WGS84 and the DAR UUIDs that DAWA also used.
Status: v0.1, a probe. It exists to find out whether anyone wants a maintained MCP layer over Danish public data. Stars, npm downloads and issues are the signal. It is deliberately thin: no caching, no metering, one source.
What it does
Every result carries attribution (CC BY 4.0, Klimadatastyrelsen), DAR
status codes with English labels, and points in both EPSG:25832 and WGS84.
Errors are typed (config, bad_request, auth, not_found,
rate_limited, upstream, timeout, network) and say what to do next.
Install
Requires Node.js 20 or newer.
Claude Code:
Claude Desktop, Cursor, VS Code and other clients (mcp.json /
claude_desktop_config.json):
Getting an API key, and why you will need one
Anonymous access to the legacy REST service works today, which is why the seven lookup tools need no key. Klimadatastyrelsen has announced that after 15 January 2027 Datafordeleren only serves authenticated requests (API key or OAuth). Text search already needs a key because it runs on the GraphQL service.
- Create a free account at https://datafordeler.dk (Datafordeler Administration). An e-mail user is enough; MitID Erhverv is optional.
- Create an IT-system and add an API key to it.
- Set
DATAFORDELER_API_KEY.
No approval step is needed for DAR. A new key takes up to 15 minutes to
activate; until then the service answers 401 "Unrecognized Authentication
key". Rate limits are not published; the server surfaces HTTP 429 as
rate_limited.
Optional legacy credentials (DATAFORDELER_USERNAME, DATAFORDELER_PASSWORD)
are passed through to the REST service if set.
Examples an agent can chain
With a key:
What the GraphQL service actually does
Verified against the live service on 2026-10-01. Several points differ from Datafordeleren's published transition guide (v2.3, January 2025):
- DAR is served at
/DAR/v2./DAR/v1, which the guide documents, returns 404. - Every entity query must carry
virkningstidand/orregistreringstid, or filter onid_lokalId. Pass both set to now for the current state; withvirkningstidalone you also get superseded registrations. startsWithexists only onadgangsadressebetegnelse,adressebetegnelse,vejnavn,postnrandnavn, and is case-sensitive. Everything else takeseqandin. There is no fuzzy, substring or ranked search, and no autocomplete.- References are ids. A
DAR_Husnummerholds the UUIDs of its street, postcode and access point; coordinates live onDAR_Adressepunkt. - Field names transliterate æ/ø/å as ae/oe/aa (
doerbetegnelse). - Paging is forward-only:
first(max 1000) andafter. - Responses are fast: 30 to 150 ms per query in testing.
dar_search_addresses handles the time arguments, the status filter and
the first letter's case for you. dar_graphql passes queries through
untouched and returns the service's errors verbatim.
Data, licence and attribution
Source: Danmarks Adresseregister via Datafordeleren, Klimadatastyrelsen.
Licence: CC BY 4.0 per
Datafordeleren's terms of use. You must credit Klimadatastyrelsen "på et
passende sted"; the attribution field in every response is there to be
passed on. Addresses are not personal data. The server stores nothing and
logs nothing.
Known limits of the legacy REST service this version leans on: no text search, no reverse geocoding, no autocomplete, pagination by page number only, and a scheduled shutdown on 15 January 2027. The replacement for all of those is the GraphQL service behind the three keyed tools.
Development
With DATAFORDELER_API_KEY set, test:live also exercises the three
GraphQL tools; without it those tests are skipped.
Layout: src/client.ts (REST and GraphQL fetch, typed errors),
src/normalise.ts (flattening, status labels, UTM32 to WGS84),
src/server.ts (tool registrations), src/index.ts (stdio entry point).
Tests use fixtures captured from the live service on 2026-10-01.
Feedback
If this is useful to you, or missing something you need (other registers, reverse geocoding, a hosted endpoint), please open an issue. Issues and stars are how this project decides what to build next.
Licence
MIT. See LICENSE.
來源:README.md,提交 d606bbd
工具
0版本歷史
1- v0.1.1最新Oct 2, 2026


