AgentStack
MCP verified Apache-2.0 Self-run

German Law Mcp

mcp-ansvar-systems-german-law-mcp · by Ansvar-Systems

Query German statutes, case law, and preparatory works from gesetze-im-internet.de

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add mcp-ansvar-systems-german-law-mcp

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.2.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures
Are you the author of German Law Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.

About

German Law MCP Server

> ### ▶ Try this MCP instantly via Ansvar Gateway > 50 free queries/day · no card required · OAuth signup at ansvar.eu/gateway > > One endpoint, one OAuth signup, access from any MCP-compatible client.

Connect

Claude Code (one line):

claude mcp add ansvar --transport http https://gateway.ansvar.eu/mcp

Claude Desktop / Cursor — add to claude_desktop_config.json (or mcp.json):

{
  "mcpServers": {
    "ansvar": {
      "type": "url",
      "url": "https://gateway.ansvar.eu/mcp"
    }
  }
}

Claude.ai — Settings → Connectors → Add custom connector → paste https://gateway.ansvar.eu/mcp

First request opens an OAuth flow at ansvar.eu/gateway. After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.


Self-host this MCP

You can also clone this repo and build the corpus yourself. The schema, fetcher, and tool implementations all live here. What is not in the repo is the pre-built database — TDM and standards-licensing constraints on the upstream sources mean we host the corpus on Ansvar infrastructure rather than redistribute it as a public artifact.

Build your own: run this repo's ingestion script (entry-point varies per repo — typically scripts/ingest.sh, npm run ingest, or make ingest; check the repo root).

The gesetze-im-internet.de alternative for the AI age.

[](https://registry.modelcontextprotocol.io) [](https://opensource.org/licenses/Apache-2.0) [](https://github.com/Ansvar-Systems/German-law-mcp) [](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/ci.yml) [](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/check-updates.yml)

Query 6,870 German federal statutes -- from the BGB and StGB to the GG, BDSG, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing German legal research, this is your verified reference database.

Built by Ansvar Systems -- Stockholm, Sweden


Why This Exists

German legal research is scattered across gesetze-im-internet.de, dejure.org, rechtsprechung-im-internet.de, and DIP Bundestag. Whether you're:

  • A Rechtsanwalt validating citations in a Schriftsatz or contract
  • A compliance officer checking if a statute is still in force
  • A legal tech developer building tools on German law
  • A researcher tracing legislative history from Drucksache to statute

...you shouldn't need 47 browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.

This MCP server makes German law searchable, cross-referenceable, and AI-readable.


Example Queries

Once connected, just ask naturally:

  • "Was sagt § 823 Abs. 1 BGB über Schadensersatz?"
  • "Ist das BDSG 2018 noch in Kraft?"
  • "Find provisions about Datenschutz in German law"
  • "What EU directives does the BDSG implement?"
  • "Which German laws implement the GDPR?"
  • "Get the preparatory works for the IT-Sicherheitsgesetz"
  • "Validate the citation § 433 BGB"
  • "Search for Kündigungsschutz in case law"
  • "Compare DSGVO implementation across German statutes"

What's Included

| Category | Count | Details | |----------|-------|---------| | Statutes | 6,870 laws | Complete German federal legislation | | Provisions | 91,843 sections | Full-text searchable with FTS5 | | Case Law | 5,000 decisions | BVerfG, BGH, BVerwG, BAG, BSG, BFH, BPatG | | Preparatory Works | 89,423 records | Drucksachen + Plenarprotokolle (WP 19 + 20) | | Database Size | ~300 MB | Runtime download on cold start (Strategy B) | | Daily Updates | Automated | Freshness checks against gesetze-im-internet.de |

Verified data only -- every provision is ingested from official government sources. Zero LLM-generated content.


See It In Action

Why This Works

Verbatim Source Text (No LLM Processing):

  • All statute text is ingested from gesetze-im-internet.de official XML exports
  • Provisions are returned unchanged from SQLite FTS5 database rows
  • Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations

Smart Context Management:

  • Search returns ranked provisions with BM25 scoring (safe for context)
  • Three-tier search strategy: exact citation match → FTS5 full-text → LIKE fallback
  • Cross-references help navigate without loading everything at once

Technical Architecture:

gesetze-im-internet.de → Parse XML → SQLite → FTS5 snippet() → MCP response
                  ↑                          ↑
           Provision parser           Verbatim database query

Traditional Research vs. This MCP

| Traditional Approach | This MCP Server | |---------------------|-----------------| | Search gesetze-im-internet.de by law name | Search by plain German: "Datenschutz Arbeitnehmer" | | Navigate multi-section statutes manually | Get the exact provision with context | | Manual cross-referencing between laws | build_legal_stance aggregates across sources | | "Is this statute still in force?" → check manually | check_currency → answer in seconds | | Find EU basis → dig through EUR-Lex | get_eu_basis → linked EU directives instantly | | Check DIP Bundestag for legislative history | get_preparatory_works → structured results | | No API, no integration | MCP protocol → AI-native |

Traditional: Search gesetze-im-internet.de → Download XML → Ctrl+F → Cross-reference with Drucksache → Check EUR-Lex for EU basis → Repeat

This MCP: "What EU law is the basis for § 1 BDSG?" → Done.


Available Tools (19)

Core Legal Research Tools (8)

| Tool | Description | |------|-------------| | search_legislation | FTS5 search on 91,843 provisions with BM25 ranking | | get_provision | Retrieve specific provision by document ID | | search_case_law | Search 5,000 federal court decisions with court/date filters | | get_preparatory_works | Get Drucksachen and Plenarprotokolle for a statute | | validate_citation | Validate citation against database (zero-hallucination check) | | build_legal_stance | Aggregate citations from statutes, case law, prep works | | format_citation | Format citations per German conventions (default/short/pinpoint) | | check_currency | Check if statute is in force in the ingested corpus |

Citation Tools (2)

| Tool | Description | |------|-------------| | parse_citation | Parse § 823 Abs. 1 BGB or Art. 1 Abs. 1 GG into structured components | | validate_citation | Check if a citation exists in the database |

EU Law Integration Tools (5)

| Tool | Description | |------|-------------| | get_eu_basis | Get EU directives/regulations for a German statute | | get_german_implementations | Find German laws implementing an EU act | | search_eu_implementations | Search EU documents with German implementation counts | | get_provision_eu_basis | Get EU law references for specific provision | | validate_eu_compliance | Check implementation status |

Discovery & Metadata Tools (2)

| Tool | Description | |------|-------------| | list_sources | Data provenance and source metadata | | about | Server version, tier, statistics, and freshness |


Data Sources & Freshness

All content is sourced from authoritative German legal databases:

Automated Freshness Checks (Daily)

A [daily GitHub Actions workflow](.github/workflows/check-updates.yml) monitors all data sources:

| Source | Check | Method | |--------|-------|--------| | Statute amendments | gesetze-im-internet.de XML index | All 6,870 statutes checked | | New statutes | New entries in federal gazette | Diffed against database | | Case law | rechtsprechung-im-internet.de feed | Compared to database | | Preparatory works | DIP API query (30-day window) | New records detected |


Security

This project uses multiple layers of automated security scanning:

| Scanner | What It Does | Schedule | |---------|-------------|----------| | CodeQL | Static analysis for security vulnerabilities | Weekly + PRs | | Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push | | Gitleaks | Secret detection across git history | Every push | | Trivy | CVE scanning on filesystem and npm dependencies | Daily | | Docker Security | Container image scanning + SBOM generation | Daily | | Socket.dev | Supply chain attack detection | PRs | | OSSF Scorecard | OpenSSF best practices scoring | Weekly |

See [SECURITY.md](SECURITY.md) for the full policy and vulnerability reporting.


Important Disclaimers

Legal Advice

> THIS TOOL IS NOT LEGAL ADVICE > > Statute text is sourced from official gesetze-im-internet.de publications. However: > - This is a research tool, not a substitute for professional legal counsel > - Court case coverage is limited (5,000 decisions) -- do not rely solely on this for case law research > - Verify critical citations against primary sources for court filings > - EU cross-references are extracted from German statute text, not EUR-Lex full text

Before using professionally, read: [DISCLAIMER.md](DISCLAIMER.md) | [PRIVACY.md](PRIVACY.md)

Client Confidentiality

Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. Lawyers should consider Bundesrechtsanwaltskammer (BRAK) confidentiality obligations when using cloud-based AI tools. See [PRIVACY.md](PRIVACY.md) for compliance guidance.


Documentation

  • [Architecture](docs/ARCHITECTURE.md) -- Multi-country adapter architecture
  • [Accuracy Plan](docs/ACCURACY_PLAN.md) -- Roadmap to production accuracy
  • [Auto Update](docs/AUTO_UPDATE.md) -- Automated data freshness system
  • [Security Policy](SECURITY.md) -- Vulnerability reporting and scanning details
  • [Disclaimer](DISCLAIMER.md) -- Legal disclaimers and professional use notices
  • [Privacy](PRIVACY.md) -- Client confidentiality and data handling

Development

Branching Strategy

This repository uses a dev integration branch. Do not push directly to main.

feature-branch → PR to dev → verify on dev → PR to main → deploy
  • main is production-ready. Only receives merges from dev via PR.
  • dev is the integration branch. All changes land here first.
  • Feature branches are created from dev.

Setup

git clone https://github.com/Ansvar-Systems/German-law-mcp
cd German-law-mcp
npm install
npm run build
npm test

Running Locally

npm run dev                                       # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector

Data Management

npm run ingest                    # Ingest statutes from gesetze-im-internet.de
npm run ingest:cases              # Ingest case law from rechtsprechung-im-internet.de
npm run ingest:prep               # Ingest preparatory works from DIP Bundestag
npm run auto-update               # Run full update cycle
npm run auto-update:dry-run       # Preview what would be updated
npm run drift:detect              # Detect schema/data drift

Performance

  • Search Speed:

Built with care in Stockholm, Sweden

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.2.0 Imported from the upstream source.