Lexar MCP server
Commit Oct 11, 2026Provides AI assistants with access to consolidated Norwegian statutes and central regulations from Lovdata with source citations.
Also known as Publifye/mcp
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 1.0.0
- Last commit
- Oct 11, 2026
- License
- CC-BY-4.0
What is Lexar MCP?
Lexar provides AI assistants with access to consolidated Norwegian statutes and central regulations from Lovdata with source citations.
Summary generated from the project's README
About Lexar MCP server
Lexar provides AI assistants with direct access to a massive corpus of Norwegian law, including 5,871 consolidated statutes and 5,112 central regulations sourced from Lovdata. It functions as a research surface for developers using MCP clients like Claude or Cursor. The server uses streamable HTTP transport and requires OAuth 2.1 with PKCE for authentication, which runs in a browser during the initial connection process.
The system includes seven specialized tools designed to help users find, read, and understand legal context. These tools allow for navigating through 457,743 indexed blocks and accessing nearly 30,000 preparatory works from Stortinget and Nasjonalbiblioteket. Unlike simple text retrieval, Lexar attaches source URLs and citations to every passage and distinguishes between publication, consolidation, and legal commencement. It is built for precision, ensuring that ambiguous citations return candidates rather than making silent guesses.
What you can do with it
- 1Locating specific legal provisionsA developer can ask an AI to find the exact wording of a specific Norwegian statute or regulation.
- 2Analyzing legislative historyYou can use the server to find and read preparatory works that discuss a particular legal provision.
- 3Verifying legal citationsThe tool prevents errors by asking for clarification when a law name or citation is ambiguous.
- 4Exploring legal connectionsAn AI can identify how different legal documents and terms connect to one another within the corpus.
Written from the project's README. Every use case is checked against a quote from it.
How to install Lexar MCP
Formats verified 10 Nov 2026Install Lexar MCP in Claude Code
$ claude mcp add --transport http lexar https://lexar-api.publifye.com/mcpInstall Lexar MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"lexar": {
"url": "https://lexar-api.publifye.com/mcp"
}
}
}Install Lexar MCP in VS Code
.vscode/mcp.json
{
"servers": {
"lexar": {
"type": "http",
"url": "https://lexar-api.publifye.com/mcp"
}
}
}Install Lexar MCP in Codex
~/.codex/config.toml
[mcp_servers.lexar] url = "https://lexar-api.publifye.com/mcp"
Install Lexar MCP in Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"lexar": {
"httpUrl": "https://lexar-api.publifye.com/mcp"
}
}
}README
View on GitHubLexar — Norwegian law as an MCP server for Claude, Cursor and any MCP client
Lexar puts the current text of Norwegian law in front of an AI assistant: consolidated statutes and central regulations from Lovdata, with the citation and the source URL attached to every passage it returns. It is a research surface, not legal advice — it hands you the wording and tells you what it does not cover.
| Endpoint | https://lexar-api.publifye.com/mcp |
| Transport | Streamable HTTP |
| Auth | OAuth 2.1 + PKCE (S256), DCR open |
| Registry | pro.publifye/lexar (server.json) |
| Product site | https://lexar.publifye.com |
| What it solves | https://publifye.com/lexar |
| Research tools | 7 (full schemas) |
Connect
{ "mcpServers": { "lexar": { "type": "http", "url": "https://lexar-api.publifye.com/mcp" } } }
The OAuth flow runs in the browser on first use. See ../../docs/connect.md.
The corpus
Measured on the live service, 2026-09-16, via status:
| Documents | 6,859 |
| Current consolidated law | 5,871 — 759 statutes, 5,112 central regulations |
| Announcements (Norsk Lovtidend avd. I, 2026) | 988 |
| Indexed blocks | 457,743 |
| Distinct word forms | 301,140 |
| Cross-references extracted | 290,805 |
| Document aliases | 5,054 keys, 1,566 conventional forms |
Source acquired 2026-09-12 from the Lovdata publicData API. Source snapshot
82cff3294c90969e6fc78393d5d24c842e5555ac323593904b104afe1c5e4f11.
What the tools do
Seven tools, and the number is fixed by specification rather than by what happened to get built — richer capability goes into typed inputs and results, not into more tools.
| Area | The question it answers | Tools |
|---|---|---|
| Finding the law | Which law or regulation is this, and where is the wording that matters? | 2 |
| Reading it | What does the provision actually say, and how is the document put together? | 2 |
| Context and coverage | What does it connect to, what do its terms mean, and how much can you rely on? | 3 |
Machine-readable: tools.json carries all 7 with full JSON Schema, plus the
excluded buckets listed by name so the count is auditable. One more tool is callable:
operator_guide, a method guide to read once first — which tool for which question, and what
Lexar does not hold. It is help, not research, and is listed in tools.json under
help_and_health.
Preparatory works. Lexar holds 29,627 forarbeider documents under NLOD 2.0: 23,965 from
Stortinget (ST/) and 5,662 from Nasjonalbiblioteket (NB/) — innstillinger, Ot.prp., lovvedtak,
referater and more. Reading a provision shows pointers to the preparatory works that discuss it;
connections with kind=forarbeider lists them, and read and outline open a document by its
id. A pointer is offered by default only where its kind of link was hand-checked at 85% precision
or better; the rest are held and reachable with include_low_confidence=true. Prop. and Ot.prp.
after 2005 are mostly held as designations only, not as text.
resolve never picks silently. A law name or an ambiguous citation returns candidates, because
guessing which statute someone meant is the one failure a legal research tool must not have.
What it does not cover — read this before you rely on it
PROVENANCE.md records the source, the licence, the measured corpus and the gaps. The short version, because it decides whether Lexar can answer your question at all:
Not in the corpus: court decisions, local regulations, English translations, historical consolidated versions, and most Prop. and Ot.prp. after 2005 (held as designations, not text). So no hit does not mean no law — it may mean the answer lives somewhere Lexar does not hold.
And a document being present is not proof that every provision in it is in force. Publication, consolidation and legal commencement are three separate facts, and Lexar distinguishes them rather than flattening them into one.
Lexar provides source text and navigation. It does not generate legal advice.
Licence and attribution
Data from Lovdata under NLOD 2.0, which permits commercial reuse and redistribution under its own conditions.
Inneholder data fra Lovdata under Norsk lisens for offentlige data (NLOD) 2.0.
Lexar sells hosted access, indexing, availability and operational service — not the corpus. The underlying open legal data stays open, and nothing here restricts a right NLOD already grants you. Lexar's own formatting, indexes and derived classifications are identified separately from the source text.
Plans
Current plans and prices are on https://lexar.publifye.com/store, which is the only place they are authoritative. They are deliberately not duplicated here.
Lexar MCP questions
How do I add Lexar MCP to Claude Code?
Run claude mcp add --transport http lexar https://lexar-api.publifye.com/mcp in your terminal. Add --scope user to make it available in every project.
How do I add Lexar MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does Lexar provide legal advice?
No, Lexar is a research surface that provides wording and source text, but it does not generate legal advice.
What legal documents are included in the corpus?
The corpus includes consolidated statutes, central regulations from Lovdata, and preparatory works (forarbeider) from Stortinget and Nasjonalbiblioteket.