Dk Eli Mcp

io.github.matematicsolutions由 GitHub 账号 matematicsolutions 发布v0.3.3更新于 Oct 24, 2026

MCP server for Danish legislation (Retsinformation) with native ELI and verifiable citations.

概览

AI 生成的概览

本地 MCP 服务器,让助手按 ELI 标识从 Retsinformation 获取丹麦法规,并附带可核验的引用。

可以做什么
按年份加编号或按登录号查询文档元数据,并通过采集 API 列出某日变更的文档。获取文档完整的官方 LexDania XML 原文。说明该连接器覆盖与不覆盖的范围,并为每个缺口给出替代方案。每条响应都包含 ELI URI、可读引用和来源链接。
适用场景
适合需要以官方原文为依据回答丹麦法律、合并法、行政命令、通函或指南问题的场景,也适合查询某一天有哪些丹麦文档发生变更。
运行要求
以 Python 包在本地运行,可用 uvx 启动,或通过 Python 解释器以模块方式启动。需要访问 retsinformation.dk 及其采集 API 的网络连接。无需 API 密钥。可选环境变量用于设置基础地址、缓存目录和审计目录。在启用 Smart App Control 的 Windows 11 上,应通过已签名的 Python 解释器运行,而非被阻止的启动器。
安装前请注意
对公开数据只读,但每次工具调用都会向本地审计日志追加一行 JSON。近期变更工具所用的采集 API 仅在丹麦时间 03:00 至 23:45 可用,窗口外会返回上游错误。内容仅限丹麦语。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dk Eli Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

dk-eli-mcp

An MCP server for the Danish Retsinformation legal database (retsinformation.dk). It fetches Danish legislation as LexDania 2.1 XML behind native ELI URIs, with verifiable citations.

Part of the MateMatic eu-legal-mcp production line - after PL, DE, AT, ES, FI, IE, NL, SE, FR and LU. Same citation contract, Retsinformation source. Denmark is ELI-native: every document has a stable data.europa.eu/eli-typed identifier exposed as a retsinformation.dk/eli/... URL.

Scope. This MVP grounds Danish documents by ELI coordinate (year + number in the lta collection = Lovtidende A) or by accession number, and lists documents changed on a date. The API is path-based, not keyword search. It covers laws (LOV), consolidated laws (LBK), executive orders (BEK), circulars (CIR) and guidelines (VEJ). Language: Danish. Every response carries a dataset_note.

Licence of the data. Danish legislation in Retsinformation is official public information published as Open Data (keyless). This connector relays it with attribution and a source_url.

The tools

ToolWhat it does
dk_get_actMetadata for a document by year + number, or by accession.
dk_get_textFull LexDania XML of a document (verbatim official text).
dk_recent_changesDocuments changed on a given date (harvest API).
dk_coverageDeclare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback.

Every response carries the contract: eli_uri (a full ELI URL, e.g. https://www.retsinformation.dk/eli/lta/2018/502), human_readable_citation (e.g. Databeskyttelsesloven (LOV nr. 502 af 23/05/2018)), and source_url.

Install

Run it with no install step (once published to PyPI):

bash
uvx dk-eli-mcp

Or from source:

bash
cd dk-eli-mcppip install -e .

Configure (Claude Code / any MCP client)

json
{  "mcpServers": {    "dk-eli-mcp": { "command": "dk-eli-mcp" }  }}

Windows 11 with Smart App Control

Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe and the dk-eli-mcp.exe launcher that pip writes at install time. The python.exe and py.exe from the python.org installer are signed by the Python Software Foundation, so running the module through the interpreter works:

bash
python -m pip install dk-eli-mcppython -m dk_eli_mcp

pip.exe is blocked for the same reason, so install with python -m pip, not pip install. If python is not on PATH, use the Windows launcher: py -3 -m dk_eli_mcp.

json
{ "mcpServers": { "dk-eli-mcp": { "command": "python", "args": ["-m", "dk_eli_mcp"] } } }

Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.

Environment:

  • DK_ELI_BASE_URL - default https://www.retsinformation.dk
  • DK_ELI_API_URL - default https://api.retsinformation.dk (harvest API)
  • DK_ELI_CACHE_DIR - default ~/.matematic/cache/dk-eli
  • DK_ELI_AUDIT_DIR - default ~/.matematic/audit

No API key. Retsinformation open data is keyless.

The harvest API behind dk_recent_changes is only available 03:00-23:45 Danish time. Outside that window the tool returns an upstream_error; an empty list during the window means nothing changed on that date.

Governance

  • Public data only - read-only against Retsinformation; no client data leaves the machine.
  • Audit log - every tool call appends one JSON line to ~/.matematic/audit/dk-eli-mcp.jsonl.
  • Vendor-neutral - talks only to retsinformation.dk; no LLM provider, no telemetry.
  • Verifiable citations - every response is independently checkable via source_url.

See CONSTITUTION.md and DISCOVERY.md.

Tests

bash
pip install -e ".[dev]"pytest tests/test_instructions_drift.py tests/test_parse.py -v   # offlinepytest tests/test_smoke.py -v                                    # hits live Retsinformation

Licence

Apache-2.0. © Matematic Solutions / Wieslaw Mazur.

来源:README.md,提交 dce5db0

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分