Norway Legislation MCP Server
Overview
Search Norwegian laws and regulations by title or body text, resolve citations to specific published records, read provisions, and follow the source evidence for regulations and amendments. The server builds a local SQLite mirror of Lovdata’s public bulk data. It needs no Lovdata account or API key.
Tools
Tool | Description |
| Resolve up to 25 citations to records and verify provision addresses where possible |
| Read document metadata and an outline, or select a provision, chapter, or sibling range |
| Read up to 10 provisions from one record, with source links, change notes, and available variants |
| Find documents by title and metadata filters |
| Search indexed body text and get ranked excerpts with source locators |
| Find regulations based on an Act, directly or through one delegation decision |
| Trace amending acts using provision notes and structured gazette evidence |
| Look up document kinds, vocabulary, addresses, status rules, coverage, freshness, and attribution |
Related MCP server: @pipeworx/norway-law
Capability reference
Resolve and read. Start with
norlaw_lookup_citationfor a Lovdata URL, identifier, journal number, short title, or Norwegian legal citation. It usually prefers the consolidated edition, while an announcement identifier selects its gazette record. Explicit edition or language requests keep that scope. Use the returnedrecordIdand the full locator to read the exact source node. A sentence address without explicit source markup can be returned as unverified.Browse an instrument.
norlaw_get_documentdefaults to the outline. A selected part or same-group sibling range returns complete Markdown up to 64 KiB. Larger selections return an outline with exact locators. Usenorlaw_get_provisionwith the returnedrecordIdand full locator for an oversized node. If a source build changes, retrieve a fresh outline or hit before reusing its locator.Search titles or text.
norlaw_search_documentsANDs normalized title terms across titles, short titles, and abbreviations. It excludes amending acts by default and sorts by document date, newest first.norlaw_search_textaccepts words, quoted phrases, suffix*, grouping, and uppercaseAND,OR, and binaryNOT. Hits are paged globally by rank and grouped by document in the response. Both searches default to consolidated records with statuscurrent(in force or partly pending). Searching onlylocal_regulationdefaults to promulgated records. Promulgated searches default to any status.Follow authority and amendments.
norlaw_find_regulationsdefaults to current consolidated results and can include local announcements withincludeLocal: true. Paths cite the records that supplied each link.norlaw_list_amendmentsincludes pending acts by default and excludes withdrawn acts by default. Section filters use source evidence. Gazette history starts in 2001, and the availability of structured amendment targets varies by act.Page and check coverage. The four list/search tools that take
limitandoffsetdefault to 25 results at offset 0. Full-text search applies up to 200 hits per page. Document search, regulations, and amendments apply up to 500 results per page. Each page reports its total, requested and applied limits, and anynextOffset. Usenorlaw_list_referencewithtopic: "coverage"or"freshness"to see which package builds the server can query.
Features
Two editions. Consolidated records are Lovdata’s editorial text at the indexed build. Promulgated records are Norsk Lovtidend announcements, including published corrections and withdrawals where available. Gazette commencement evidence describes the announcement. Use the consolidated edition for current applicability, and check the reported source date and status basis.
Local reads. After import, tool calls query SQLite without contacting Lovdata. Coverage includes consolidated laws and central regulations, plus Gazette department I and II announcements from 2001. Source languages are preserved.
Built on
@cyanheads/mcp-ts-corefor MCP transport, validation, and observability.
Getting started
Use Node.js 24 or later for npm and Claude Desktop. Source builds require Bun 1.4.4 or later.
MCP client configuration
Use this entry for clients that accept an mcpServers map, or use the Cursor or VS Code install link above.
{
"mcpServers": {
"norway-legislation-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/norway-legislation-mcp-server"]
}
}
}Claude Desktop
Download and open the Desktop extension. The extension’s Mirror directory setting is optional.
First sync
The server starts accepting MCP connections while a background worker downloads and indexes the packages. First import transfers about 125 MB compressed and parses about 1.3 GB of markup. A December 2026 build containing 67,919 source records used 10.7 GB for SQLite and its full-text index. Allow additional space for downloads, the write-ahead log, and overlapping generations during a refresh.
Use norlaw_list_reference with topic: "freshness" to check progress. Queries return retryable mirror_not_ready when required builds are unavailable. Some searches can return partial results with the missing coverage called out. The worker checks Lovdata on startup and every four hours after a successful sync. If a refresh fails, it keeps the last successful build and reports stale coverage and freshness information.
Configuration
Variable | Default | Purpose |
| OS cache directory | Writable local directory for the SQLite mirror. Use an absolute path in client configuration. |
|
| Set to |
|
| Listener address for HTTP. The Docker image listens on all container interfaces. |
|
| Listener port for HTTP. |
|
| Streamable HTTP endpoint path. |
|
| HTTP authentication mode. See .env.example for additional settings. |
|
| Minimum log level. |
|
| Opt in to anonymous framework usage reporting. |
The default cache path is ~/Library/Caches/norway-legislation-mcp-server on macOS, %LOCALAPPDATA%/norway-legislation-mcp-server on Windows (under ~/AppData/Local if unset), and under XDG_CACHE_HOME or ~/.cache on Linux. Keep the database and its accompanying files on a local filesystem. Set NORLAW_MIRROR_DIR in a manual client’s env or use the plugin setting where available. The Codex plugin inherits the variable from the environment that launches Codex.
Running the server
npm
npx -y @cyanheads/norway-legislation-mcp-server
MCP_TRANSPORT_TYPE=http npx -y @cyanheads/norway-legislation-mcp-serverStreamable HTTP accepts MCP connections at http://127.0.0.1:3010/mcp. A successful /healthz response confirms the process is serving HTTP. For dataset readiness, use the freshness tool.
Source
git clone https://github.com/cyanheads/norway-legislation-mcp-server.git
cd norway-legislation-mcp-server
bun install
bun run build
bun run dist/index.jsUse node dist/index.js to run the compiled build with Node. Set MCP_TRANSPORT_TYPE=http before either invocation for Streamable HTTP.
Docker
docker run --rm -p 127.0.0.1:3010:3010 \
-v norlaw-mirror:/usr/src/app/.mirror \
ghcr.io/cyanheads/norway-legislation-mcp-server:latestThe image sets NORLAW_MIRROR_DIR=/usr/src/app/.mirror. Mount a volume there to retain the index when replacing the container. If mounting a host directory, give the container’s bun user write access.
Development guide
Run bun run devcheck and bun run test after changes. Tool definitions are in src/mcp-server/tools/definitions/, SQLite and synchronization are in src/mirror/, and source parsing and normalization are in src/domain/. See the project tree for the rest of the layout.
Contributing
File bugs and feature requests in GitHub Issues. See CONTRIBUTING.md for development and contribution guidelines.
License and data attribution
The server code is licensed under Apache-2.0.
Contains data under the Norwegian licence for Open Government data (NLOD) distributed by Lovdata. The data is licensed under NLOD 2.0. The server converts source markup to Markdown and derives status and amendment fields. Results carry source attribution and package coverage.
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
Search Danish legislation in Retsinformation, resolve citations, read provisions, trace amendments.
11Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Norske Høyesterettsavgjørelser og lovtekst som lov-bevisst data, søkbart på vanlig norsk.
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables fast local search and retrieval of Norwegian laws and central regulations, including full-text paragraph lookup, document metadata, and supplementary sources like ECHR case law, legislative preparatory works, and ombudsman statements.12MIT
- AlicenseNot gradedqualityCmaintenanceEnables finding Norway's consolidated current acts by title, short title, abbreviation or law number, then reading a whole act or a single section complete with its position in the act, amendment history with in-force dates, and a ready-made citation. Answers come from a keyless stored copy of Lovdata's open-data release, carry the NLOD licence and attribution, and return explicit miss reasons instead of empty results.MIT
- AlicenseAqualityBmaintenanceEnables verbatim lookup and full-text search across current Norwegian laws and central regulations from Lovdata’s open data, with paragraph retrieval, cross-references, change history, upcoming amendments, and separately flagged local regulations.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching Brazilian federal norms and STF constitutional-review decisions, resolving citations to Senado IDs, reading published or consolidated texts and specific articles, and tracing amendments by act or provision. Runs over STDIO or Streamable HTTP with an optional local index mirror for cross-year search.Apache 2.0