denmark-legislation-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Overview
Danish legislation, administrative decisions, Folketing documents, and Ombudsman opinions from Retsinformation. Search in Danish, resolve citations to European Legislation Identifiers (ELIs), read the source text, and follow published changes. Runs over stdio or Streamable HTTP and uses public Retsinformation endpoints without an API key.
Tools
Tool | Description |
| Find documents by Danish terms, exact popular title, ministry, type, CELEX, or date |
| Read provisions, chapters, annexes, or document text |
| Get document metadata, links, and an outline with text selectors |
| Trace a law's consolidations or an executive order's amendments |
| Follow amendment, implementation, decision, and other source links |
| Resolve citations, ELIs, accession numbers, and exact popular titles |
| List publications or source-reported changes over a date window |
| Look up filters, accepted syntax, and source coverage |
Related MCP server: dk-eli-mcp
Capability reference
dklaw_search_documents tool
Combine optional
query,popular_title,ministry,document_types,classification,celex,year_from,year_to, andpublished_fromfilters.status: "current"is the default. Use"all"to include historical records. Sort by"relevance"(default) or"newest".Pages start at
page: 0and returntotal,applied_filters, andnext_page. The defaultlimitis 25, capped at 100. Narrow broad queries by filters or dates to stay within the upstream 10,000-row search window.When a search misses, try Danish terms, relax filters, or pass a known citation to
dklaw_lookup_citation.
dklaw_get_provisions tool
Requires
document. Defaults toversion: "current"to follow verified consolidation links. Use"as_given"for the cited revision.Send
provisionssuch as["§ 4, stk. 2, nr. 1", "Bilag 1"]to read the first 10 addresses. Resubmitremaining_provisionswith the same document and version. Large or ambiguous matches returnkind: "outline"with selectors. Legacy HTML can returnkind: "legacy_text"for the body when exact addressing is unavailable.Omit
provisionsto read aselectoror start at"body". The defaultlimitis 12,000 Unicode code points and callers can request a larger positive limit. Continue with the returned selector, canonical ELI,version: "as_given", andpage.next_offsetasoffset. Onselector_changed, refresh the outline or restart at the first body page.
dklaw_get_document tool
Requires
documentand defaults toversion: "as_given". Use"current"to follow verified consolidation links. Setinclude: ["bill_history"]for available parliamentary history and the publisher's historical cause.Returns metadata, source format links, pending amendments, and an outline with selectors for provisions, sections, annexes, commencement blocks, and the body. If source metadata is available but the outline is unavailable, follow its guidance or open a source link.
dklaw_list_versions tool
Requires
document. Lists a law's source timeline newest first or an executive order's direct amendments. An amending act can returnunsupported_document_typewith targets whose timelines can be requested.Continue with
next_offset(defaultlimit25, capped at 100). Readcoveragefor timeline gaps or partial ELI coverage. If fallback discovery is in progress, repeat the call with the same document.
dklaw_get_relations tool
Requires
documentand follows links from that revision. Omitrelationfor all groups, or select a group such aschanged_by,consolidates,subordinate, orcommenced_by.status: "all"includes historical subordinate rules and available unclassifiedbasis_forlinks.Returns source-backed relations with
coverageandnext_offset(defaultlimit25, capped at 100). Userelation: "basis_for"withstatus: "all"when the source lacks a more specific group.
dklaw_lookup_citation tool
Send a nonempty
citationsarray of Retsinformation ELI paths or URLs, accessions, exact popular titles, or dated citations such aslov nr. 502 af 23. maj 2018 § 1. Resolves the first 25 in order. Resubmitremaining_citationsto continue.Each row resolves the cited revision, with a separately identified
current_consolidationand a normalizedprovisionwhen available. Per-item misses reportreasonandguidance. An ambiguous title also returns candidates.
dklaw_track_changes tool
Requires inclusive Copenhagen dates
fromandtoinYYYY-MM-DD. Both modes acceptmediumand usenext_offset(defaultlimit25, capped at 100). Defaultkind: "published"uses publication dates and acceptsdocument_types. If counts drift and the tool returnswindow_changed, restart at offset zero.kind: "changed"reports the latest event per document in the rolling Atom feed and acceptsreasons. By default it includes content changes, combined metadata and content changes, and removals. Daily harvest fallback can provide partial coverage and reportscoverage.date_basis: "harvest_window_end".Read
coveragebefore interpretingtotal. Use"published"for older publication windows beyond the change feed. Publication paging narrows the upstream 10,000-row window by date and surfaces the source limit if a single day's rows still exceed it.
dklaw_list_reference tool
Requires one
topicfromdocument_types,ministries,media,identifiers,provisions,status,change_reasons, orcoverage. Runs offline.Returns
entriesand asourcelink. Use it for accepted filter values, citation or address syntax, historical status codes, and corpus and feed coverage. Danish court case law is covered separately by Domsdatabasen.
Features
Built on @cyanheads/mcp-ts-core with stdio and Streamable HTTP, configurable HTTP auth, structured logging, and optional OpenTelemetry.
current_textreflects the publisher's current or historical flag. Read the separatein_forcemetadata where available, and check commencement clauses andpending_amendmentsto assess applicability.LexDania XML provides structured text and selectors. Earlier records can be available as legacy HTML, with source links preserved.
Source URLs, coverage notes, per-item guidance, and explicit continuation fields support citation, recovery, and paging.
Kilde: Retsinformation (Civilstyrelsen). This is an independent integration. Civilstyrelsen permits commercial and noncommercial reuse of open data, including copying and adaptation. Keep protected contributions such as photographs with the relevant regulation when reproducing them, and keep requests proportionate to the service. Civilstyrelsen open data terms
Getting started
Add it to Claude Code with Node.js 24 or later installed.
claude mcp add denmark-legislation-mcp-server -- npx -y @cyanheads/denmark-legislation-mcp-serverFor other clients, add this to your MCP configuration file.
{
"mcpServers": {
"denmark-legislation-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/denmark-legislation-mcp-server"]
}
}
}Configuration
Variable | Default | Description |
|
| Set to |
|
| HTTP bind address |
|
| HTTP port |
|
| HTTP MCP endpoint |
|
| HTTP session mode |
|
| HTTP authentication mode ( |
|
| Minimum log level |
|
| Opt in to daily and shutdown tool-call summaries |
See .env.example for additional framework settings.
Running the server
Start a local Streamable HTTP endpoint at http://127.0.0.1:3010/mcp.
MCP_TRANSPORT_TYPE=http npx -y @cyanheads/denmark-legislation-mcp-serverRun the container with the MCP port published to loopback.
docker run --rm -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/denmark-legislation-mcp-server:0.1.1Peer containers on the same Docker network can reach the server's HTTP port.
Build from source with Bun 1.4.4 or later and Node.js 24 or later.
git clone https://github.com/cyanheads/denmark-legislation-mcp-server.git
cd denmark-legislation-mcp-server
bun install
bun run build
bun run start:stdioProject structure
Path | Purpose |
| Server entry point and tool registration |
| Tool schemas and handlers |
| Retsinformation clients, document parsing, version graphs, and reference tables |
| Tool and source-adapter tests |
Development guide
See CLAUDE.md for server conventions and docs/tree.md for the complete layout. Run bun run devcheck and bun run test to verify changes.
Contributing
Report bugs and request features through GitHub Issues.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Official MCP connector for Legalize: read and search its whole open corpus, at any point in time.
MCP for CanLII: Canadian case law and legislation metadata (federal, provincial, territorial).
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Japan Law MCP — Japanese national laws & ordinances via the e-Gov Law API.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables querying Swedish statutes, provisions, case law, preparatory works, and EU law cross-references from any MCP-compatible client.1969 npm1Apache 2.0
- AlicenseAqualityCmaintenanceProvides access to Danish legislation from Retsinformation.dk, enabling retrieval of act metadata, full text, and recent changes with verifiable citations.460 PyPIApache 2.0
- FlicenseNot gradedqualityBmaintenanceA Model Context Protocol (MCP) server running on Cloudflare Workers. It enables AI models to query, structurally inspect, and perform RAG-based Q&A over Danish legislation published on Retsinformation.dk using their underlying LexDania XML.-
- FlicenseNot gradedqualityDmaintenanceProvides MCP tools for searching and retrieving Swedish legislation, case law, and preparatory works from a cached legal dataset.-