recht-mcp
A read-only MCP server for grounding German legal citations and researching statutes, regulations, and court decisions.
Resolve up to 100 citations at once, including norms, dockets, ECLIs, and Fundstellen, with court/date disambiguation and explicit miss types.
Search federal and Land statutes lexically and court decisions semantically, with cross-jurisdiction roll-ups.
Retrieve statute text by law and provision, optionally as of a date, with version and source caveats.
List all stored versions of a provision and recent text changes.
Follow the citation graph in both directions: decisions citing a provision/decision, and authorities cited by a decision.
Read court decisions as numbered passages, with paging or jumps to specific Randnummern.
Check corpus coverage and limits to distinguish missing content from unindexed or out-of-coverage material.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@recht-mcp Ground § 823 Abs. 1 BGB and show the current text"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
recht-mcp
An MCP server for German law: federal statutes and regulations, the Landesrecht of Bayern, Brandenburg, Nordrhein-Westfalen and Sachsen, and court decisions — for AI agents that need to ground a citation, read a provision, or follow the citation graph, and need to know when an answer is not complete.
On 23 October 2026 the corpus held 12,016 statutes and regulations (254,598
provisions, 312,122 stored versions) and 640,401 court decisions from 946
courts, with 7,797,118 citation links from decisions to provisions and to other
decisions. getCoverage returns the current figures.
This repository is the tool layer of the hosted server at
https://recht.nulegal.eu/v1/mcp. The hosted endpoint runs this code,
vendored at a pinned commit, over a private backend that reads the corpus
directly; recht-mcp runs the same code locally over the public REST API. The
corpus and the database stay on the service side — see
docs/DESIGN.md for exactly where the line runs.
The nine tools
Tool | What it does |
| Grounds up to 100 citations at once — |
| One query over statutes (lexical) and case law (semantic), with a per-jurisdiction roll-up for cross-Land comparison. |
| The text of one provision as Markdown (or JSON), optionally as of a date, with its gazette citation ( |
| Every stored version of a provision, with the archive floor marked. |
| Decisions citing a provision or a decision, by citation weight or newest first, with the citing court's own Randnummer. |
| What one decision cites: provisions (the weighted Normenkette) and decisions. |
| A decision as numbered passages; page through it or jump to a Randnummer. |
| Provisions whose text changed recently — the freshness feed as JSON. |
| What the corpus holds, and the limits every answer should be read against. |
Every tool is read-only. Each answer says what it is and what it is not:
version dates are first-observed dates, not Inkrafttreten; the norm-version
archive has a floor that every norm answer states; a zero from the citation
graph on a Land provision is labelled as "not indexed", not "never cited"; and
three kinds of miss — not_in_corpus, outside_coverage, known_missing —
are never collapsed into one. The full contract of each tool is in its
description (tools/list).
Related MCP server: German Law MCP Server
Use the hosted server (recommended)
No key, no signup. Point any MCP client that speaks Streamable HTTP at:
https://recht.nulegal.eu/v1/mcpClaude Code:
claude mcp add --transport http nulegal-recht https://recht.nulegal.eu/v1/mcpA client configured with JSON:
{
"mcpServers": {
"nulegal-recht": { "type": "http", "url": "https://recht.nulegal.eu/v1/mcp" }
}
}Developer documentation for the service and its REST API: https://recht.nulegal.eu/developers.
Run it locally
Requires Python 3.12+ and uv. The package has no third-party runtime dependencies.
git clone https://github.com/nulegal-startup/recht-mcp
cd recht-mcp
uv run recht-mcp # stdio
uv run recht-mcp --http # Streamable HTTP on http://127.0.0.1:8765/mcpOr without a checkout:
uvx --from git+https://github.com/nulegal-startup/recht-mcp recht-mcpA client that launches stdio servers:
{
"mcpServers": {
"nulegal-recht": {
"command": "uvx",
"args": ["--from", "git+https://github.com/nulegal-startup/recht-mcp", "recht-mcp"]
}
}
}Options: --http, --host (default 127.0.0.1), --port (default 8765),
--path (default /mcp), --base-url (or RECHT_MCP_BASE_URL; default
https://recht.nulegal.eu), --timeout, --log-level. The local HTTP server
binds to loopback and refuses browser requests from non-loopback origins.
The local server reads the same data the hosted one does, through the public
REST API, and gives the same answers with two documented exceptions (a
simplified citation grammar, and no other_laws hint on a provision miss) —
see docs/DESIGN.md.
Development
uv sync
uv run pytest -q # unit tests, offline
RECHT_MCP_LIVE=1 uv run pytest -q tests/test_live.py # against recht.nulegal.euThe live tests call every tool through the local server and compare several answers with the hosted endpoint's.
Data
The legal corpus served by the hosted endpoint — its structure and selection, the links between provisions and decisions, the version history — is licensed separately from this code, under CC BY 4.0. Attribution is required: „Quelle: nu:legal – recht.nulegal.eu“. The terms, including what is reserved, are at https://recht.nulegal.eu/lizenz and https://recht.nulegal.eu/nutzungsbedingungen.
The texts are non-official reading copies. The binding text of a statute is
the one in its official gazette; each norm answer names it (fundstelle,
authoritative_source).
Contributing and security
Issues are welcome; outside pull requests are not accepted yet — see CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md.
License
The code in this repository is licensed under the GNU Affero General Public
License, version 3 only (AGPL-3.0-only) — see LICENSE.
The legal corpus served by the hosted endpoint is licensed separately, under CC BY 4.0 with attribution required (see Data).
The nu:legal name and logo are not licensed.
Available Tools
9 toolsgetChangesRecent changesARead-onlyIdempotentInspect
Which provisions got a new text recently, newest first — the freshness feed, as JSON. Poll it with since set to the newest observed you have already processed.
observed is the day the new text was FIRST SEEN here, which is not necessarily the day it came into force. Say so if you report a date. The window is the last 120 days; the law's own Änderungsverlauf goes further back.
Inputs: limit, since.
getCoverageCorpus coverageARead-onlyIdempotentInspect
Corpus scope with its holes stated. Call this once when your answer depends on whether an absence is real.
Returns totals (laws, provisions, versions, decisions, courts, citation edges), the per-source windows, the count of Aktenzeichen we can prove exist and do not hold, and limits: the version-archive floor, the federal scope of the citation graph, what a version date actually means, and why source windows differ.
Use it to tell outside_coverage from not_in_corpus. They are different answers and this API never collapses them.
Inputs: no named parameters.
getNormGet statute textARead-onlyIdempotentInspect
The text of one provision, by default as clean Markdown — about a tenth the size of the reader page for the same provision, with no navigation, no scripts and no boilerplate.
law is the abbreviation as a citation writes it ('BGB', 'DSGVO', 'BDSG 2018', 'RVG'); ref is the bare number, with any letter suffix and no § or Art. ('622', '823', '3a', '83'). Aliases resolve, and CASE IS READ: 'LwG' is the federal Landwirtschaftsgesetz while 'LWG' is a Land statute (Bayern's Landeswahlgesetz, NRW's Landeswassergesetz), so write the abbreviation the way your citation writes it. A spelling that matches no law exactly still resolves case-insensitively, and a miss lists the other laws the abbreviation names under other_laws, each with a law_key you can call again with.
POINT IN TIME: as_of=YYYY-MM-DD returns the version stored for that date. Read version_coverage on every answer — the version archive begins 2019-06-10, and a date before that answers outside_coverage with the law's amendment register attached. That is a limit of our archive and says nothing about whether the provision existed.
Every answer carries first_observed, valid_to, date_precision and amendment_note. first_observed is the day we first saw the text, NOT the legal Inkrafttreten — do not compute a deadline from it without reading date_precision (day / week / launch; 'launch' means the date is a floor).
TRUST: fundstelle is the gazette citation of the authentic text — the citation a court accepts. authoritative_source names what our copy is (a consolidated, non-official reading version) and where the binding text lives. Quote the provision from markdown; the reader page at url carries per-Absatz anchors (#abs-N) if you want to deep-link a single Absatz.
Inputs: law (required), ref (required), as_of, format.
listCasePassagesList case passagesARead-onlyIdempotentInspect
The full text of one decision, split into its paragraphs, each with a permalink you can cite.
rn is the Randnummer the COURT printed, read out of the decision's own markup. It is never inferred from position: where a document prints no numbers, rn is null and stays null. anchor_basis is derived per decision — only 'native_numbering' means our anchor and the printed number provably coincide, so pin-cite a Randnummer only when you see that value.
amtliche_seite is null everywhere: our texts carry no page breaks, so a BVerfGE-style page pin cannot be produced honestly.
SIZE. Long decisions run to several hundred paragraphs, so the default page is 30. Three ways to move: offset pages, limit widens (max 400 — enough for a whole decision when you really want it), and around jumps. pagination appears whenever there is more than the page you were handed.
around: 51 returns a window of limit passages CENTRED on Randnummer 51 — the right call when listCitingDecisions gave you a citing_rn, when a search hit came back anchored at …#rd_51, or when you want the passage around a pin cite and not the whole judgment. It takes the number the court printed, not a position, and a decision that prints no such number answers not_in_corpus rather than silently handing you a different passage. around and offset address the same list two different ways; give one.
Inputs: case (required), limit, around, offset.
listCitedAuthoritiesList cited authoritiesARead-onlyIdempotentInspect
Outgoing citation edges of one decision: the statute provisions it cites (with how often it cites each — that is the Normenkette, weighted) and the decisions it relies on.
treatment is null on every edge and stays null. Classifying an edge as gefolgt / abgegrenzt / aufgegeben is unbuilt work, and a wrong 'aufgegeben' in a brief is worse than no label at all. Read the citing passage yourself with listCasePassages.
A decision we can prove exists but do not hold answers known_missing, with the decisions that attest it — not a 404.
Inputs: case (required).
listCitingDecisionsList citing decisionsARead-onlyIdempotentInspect
Incoming citation edges. Give EITHER law + ref (which decisions apply this statute provision) OR case (which decisions cite this decision) — exactly one of the two.
Results are ranked by citation weight, then court tier, then recency. Read the ranking honestly: for a provision with many EU decisions the first ten can be almost all CJEU, and the German courts appear only further down. If total exceeds what you read, page on with offset (pagination.next_offset) before concluding anything about national case law.
NEWEST FIRST: pass sort: "recent" when the question is about current case law ('fünf aktuelle Entscheidungen zu …'). Paging works the same way. This ordering is bounded — for a handful of procedural giants (§ 154 VwGO, § 708 ZPO) it cannot be computed inside the query budget, and then the answer comes back in WEIGHT order and says so in sort_applied and sort_note. Check sort_applied before you describe a list as the most recent decisions.
For a decision, each citer carries citing_rn: the Randnummer of the CITING decision's own text that holds the citation, as that court numbered it, and the URL is anchored to it.
COVERAGE: the graph is built over federal case law. A Land provision can answer total: 0 because it is not indexed, not because no court has cited it — coverage.complete_for_this_norm tells you which, and for a Land provision you should fall back to search on the provision's wording.
Inputs: law, ref, case, sort, +2 more.
listNormVersionsList statute versionsARead-onlyIdempotentInspect
Every stored version of one provision, newest first, so you can find out which dates getNorm(as_of=…) can actually answer before you ask.
Each entry carries first_observed (the day the text was first seen here — NOT the Inkrafttreten), valid_to, date_precision and the law-level amendment_note. at_archive_floor: true marks the version that was current when mirroring began: its date is a floor, not an amendment, and earlier amendments exist that are named in the law's Änderungsverlauf (linked as amendment_history_url) but whose text is not held.
There is no diff tool: fetch two versions with getNorm(as_of=…) and diff them yourself — a diff we computed would hide which side of it came from a floor date.
Inputs: law (required), ref (required).
resolveIdentifiersResolve legal citationsARead-onlyIdempotentInspect
Ground a batch of German legal citations against the corpus. Call this BEFORE stating any citation you did not read here.
Takes the citation in the form you already hold it — including the court name, the dispositive word and the date a model normally writes around a docket. KEEP THEM IN: the court and the date are used to disambiguate. An Aktenzeichen is unique per court, not nationwide, and 21,021 dockets in this corpus are held by more than one decision, so 'OLG Bamberg, 4 U 120/24' resolves to Bamberg's decision where the bare '4 U 120/24' is ambiguous or lands on another court's. Where the string has to be rewritten to be read, the rewrite is reported back under normalised_from / normalised_to, never silently, and disambiguated_by says when it was YOUR court or date that picked the decision out. Where the court you named writes a suffix your citation dropped ('4 U 120/24 e'), the answer carries docket_completed with the full Aktenzeichen — cite that one.
Accepted kinds: norm citations ('§ 823 Abs. 1 BGB', '§§ 305-310 BGB', 'Art. 83 DSGVO'), Aktenzeichen ('2 C 9.22', '8 AZR 26/18'), ECLI ('ECLI:DE:BGH:2019:180619UVIIIZR247.18.0') and Fundstellen ('BVerfGE 65, 1'). Full prose citations work: 'BVerwG, Urteil vom 24.10.2023 - 2 C 9.22'.
It never returns a near match. A miss comes back as not_in_corpus (we hold nothing and know of nothing), attested / known_missing (the decision provably EXISTS — decisions we do hold cite it by Aktenzeichen, and they are listed as the evidence — but we do not have its text), ambiguous (with candidates) or unparseable. attested is not a failure: you may state that the decision exists, cite it, and say the text was not available to you. What you must not do is treat it as not_in_corpus.
A resolved norm carries fundstelle: the gazette citation of the authentic text, which is the citation a court accepts. Our own URL is a reading copy, and for Land law the gazette citation is the only source reference there is. Prefer it in anything you publish.
text on a resolved norm is a 300-character stub unless you pass include: ["text"], and text_truncated says which it is. Never verify a quotation against the stub: it is the head of the provision, not the Absatz you cited.
When you supply a date or a court that does not match the decision the docket resolves to, the result carries date_mismatch / court_mismatch with the actual value. That is the hallucinated-citation case this tool exists for: cite what is actually there, not what you held — and a court_mismatch usually means this is not the decision you meant at all.
Inputs: citations (required), include.
searchSearch German lawARead-onlyIdempotentInspect
One query over BOTH corpora: federal and Land statutes (lexical, with concept pinning) and court decisions (semantic — natural-language questions work well here and are the better shape for case law).
Search both unless you have a reason not to. A term of art often does not appear in the statute that governs it: 'Verzugspauschale' matches no provision (§ 288 BGB says 'Pauschale in Höhe von 40 Euro') while 184 decisions use the word. scope='norms' alone will read as 'nothing here' in exactly those cases.
CROSS-LAND COMPARISON: a single query returns the parallel provisions of the Bund and of every covered Land side by side, each row jurisdiction-labelled, plus a by_jurisdiction roll-up. Ask 'Videoüberwachung öffentlich zugänglicher Räume' and you get BDSG § 4 next to the Land data-protection and police provisions. Full text is held for Bayern, Brandenburg, Nordrhein-Westfalen and Sachsen.
Decision hits come back already anchored at the best-matching Randnummer (…#rd_51), so you can quote a paragraph rather than a document, AND carry doknr — the key listCasePassages, listCitedAuthorities and listCitingDecisions take, so you can go straight from a search hit to that decision's passages or its authorities without resolving anything first. Query in German; write raw umlauts, they are handled.
Inputs: q (required), limit, scope, include_repealed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
The tools are largely distinct: resolveIdentifiers handles citation grounding, search handles discovery, getNorm/listNormVersions handle statute text, listCitingDecisions/listCitedAuthorities/listCasePassages handle citation graph and case text, getChanges/getCoverage handle freshness and scope. Minor overlap exists between search and getNorm (both can retrieve norm text) and between listCitingDecisions and listCitedAuthorities (both expose citation edges), but the descriptions clearly delineate their roles.
Most tools follow a consistent verb_noun pattern: resolveIdentifiers, getNorm, listNormVersions, listCitingDecisions, listCitedAuthorities, listCasePassages, getChanges, getCoverage. The outlier is 'search', which is a bare verb rather than verb_noun, but it is a common and recognizable convention. Overall the pattern is predictable and readable.
Nine tools is well within the ideal 3-15 range and each tool serves a distinct, necessary function for a legal research server: citation resolution, search, norm retrieval, version history, citation graph (in/out), case text, change feed, and coverage metadata. No tool feels redundant or superfluous.
The surface covers the full research workflow: discover (search), resolve (resolveIdentifiers), read (getNorm, listCasePassages), trace (listCitingDecisions, listCitedAuthorities), track versions (listNormVersions, getChanges), and verify scope (getCoverage). The only minor gap is the absence of a diff tool, but the descriptions explicitly acknowledge this and provide a workaround (fetch two versions and diff manually).
Maintenance
Related MCP Connectors
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
kvasir.legal provides a verification layer for legal AI: it resolves citations to the official wording and checks drafts against current and enacted future versions of German, EU, Austrian and Swiss law, via app, REST API and MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides access to the official German Federal Legal Information Portal (rechtsinformationen.bund.de) enabling AI agents to search German federal laws, court decisions, and legal documentation with authoritative citations from official sources.524MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying 6,870 German federal statutes, case law, and legislative preparatory works directly from AI assistants and MCP-compatible clients.119 npm4Apache 2.0
- AlicenseNot gradedqualityFmaintenanceEnables querying over 6,800 German federal statutes, case law, and legislative preparatory works with verbatim source text. Integrates EU law cross-references and provides citation validation and legal stance building.119 npm23Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to retrieve the verbatim text of German federal and state statutes, search official case law from BGH, BAG and BVerfG, and compute procedurally exact deadlines under §§ 187–193 BGB with weekend and public-holiday adjustment. It also supplies structured statutory-element blueprints with burden-of-proof allocation and assembles citation-secured research dossiers for pleadings.61MIT