{
  "markdown": "# German Law MCP Server\n\n<!-- ANSVAR-CTA-BEGIN -->\n> **The German law corpus is now served through the Ansvar Gateway.** Connect your AI assistant (Claude, Copilot, Cursor, custom MCP client) to `https://gateway.ansvar.eu/mcp` — one OAuth connection, free tier available, covering this corpus plus EU regulations, national law across 28 audited jurisdictions, and CVE/security intelligence, every result with a verbatim source citation. Start at https://ansvar.eu/docs/quickstart\n\n### Connect\n\n**Claude Code** (one line):\n\n```bash\nclaude mcp add ansvar --transport http https://gateway.ansvar.eu/mcp\n```\n\n**Claude Desktop / Cursor** — add to `claude_desktop_config.json` (or `mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"ansvar\": {\n      \"type\": \"url\",\n      \"url\": \"https://gateway.ansvar.eu/mcp\"\n    }\n  }\n}\n```\n\n**Claude.ai** — Settings → Connectors → Add custom connector → paste `https://gateway.ansvar.eu/mcp`\n\nFirst request opens an OAuth signup flow (setup details: [ansvar.eu/docs/quickstart](https://ansvar.eu/docs/quickstart)). After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.\n\n---\n\n## Self-host this MCP\n\nYou can also clone this repo and build the corpus yourself. The schema,\nfetcher, and tool implementations all live here. What is not in the repo is\nthe pre-built database — TDM and standards-licensing constraints on the\nupstream sources mean we host the corpus on Ansvar infrastructure rather\nthan redistribute it as a public artifact.\n\nBuild your own: run this repo's ingestion script (entry-point varies per\nrepo — typically `scripts/ingest.sh`, `npm run ingest`, or `make ingest`;\ncheck the repo root).\n<!-- ANSVAR-CTA-END -->\n\n\n**The gesetze-im-internet.de alternative for the AI age.**\n\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/German-law-mcp?style=social)](https://github.com/Ansvar-Systems/German-law-mcp)\n[![CI](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/ci.yml)\n[![Daily Data Check](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/check-updates.yml/badge.svg)](https://github.com/Ansvar-Systems/German-law-mcp/actions/workflows/check-updates.yml)\n\nQuery **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.\n\nIf you're building legal tech, compliance tools, or doing German legal research, this is your verified reference database.\n\nBuilt by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden\n\n---\n\n## Why This Exists\n\nGerman legal research is scattered across gesetze-im-internet.de, dejure.org, rechtsprechung-im-internet.de, and DIP Bundestag. Whether you're:\n- A **Rechtsanwalt** validating citations in a Schriftsatz or contract\n- A **compliance officer** checking if a statute is still in force\n- A **legal tech developer** building tools on German law\n- A **researcher** tracing legislative history from Drucksache to statute\n\n...you shouldn't need 47 browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.\n\nThis MCP server makes German law **searchable, cross-referenceable, and AI-readable**.\n\n---\n\n## Example Queries\n\nOnce connected, just ask naturally:\n\n- *\"Was sagt § 823 Abs. 1 BGB über Schadensersatz?\"*\n- *\"Ist das BDSG 2018 noch in Kraft?\"*\n- *\"Find provisions about Datenschutz in German law\"*\n- *\"What EU directives does the BDSG implement?\"*\n- *\"Which German laws implement the GDPR?\"*\n- *\"Get the preparatory works for the IT-Sicherheitsgesetz\"*\n- *\"Validate the citation § 433 BGB\"*\n- *\"Search for Kündigungsschutz in case law\"*\n- *\"Compare DSGVO implementation across German statutes\"*\n\n---\n\n## What's Included\n\n| Category | Count | Details |\n|----------|-------|---------|\n| **Statutes** | 6,870 laws | Complete German federal legislation |\n| **Provisions** | 91,843 sections | Full-text searchable with FTS5 |\n| **Case Law** | 5,000 decisions | BVerfG, BGH, BVerwG, BAG, BSG, BFH, BPatG |\n| **Preparatory Works** | 89,423 records | Drucksachen + Plenarprotokolle (WP 19 + 20) |\n| **Database Size** | ~300 MB | Runtime download on cold start (Strategy B) |\n| **Daily Updates** | Automated | Freshness checks against gesetze-im-internet.de |\n\n**Verified data only** -- every provision is ingested from official government sources. Zero LLM-generated content.\n\n---\n\n## See It In Action\n\n### Why This Works\n\n**Verbatim Source Text (No LLM Processing):**\n- All statute text is ingested from gesetze-im-internet.de official XML exports\n- Provisions are returned **unchanged** from SQLite FTS5 database rows\n- Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations\n\n**Smart Context Management:**\n- Search returns ranked provisions with BM25 scoring (safe for context)\n- Three-tier search strategy: exact citation match → FTS5 full-text → LIKE fallback\n- Cross-references help navigate without loading everything at once\n\n**Technical Architecture:**\n```\ngesetze-im-internet.de → Parse XML → SQLite → FTS5 snippet() → MCP response\n                  ↑                          ↑\n           Provision parser           Verbatim database query\n```\n\n### Traditional Research vs. This MCP\n\n| Traditional Approach | This MCP Server |\n|---------------------|-----------------|\n| Search gesetze-im-internet.de by law name | Search by plain German: *\"Datenschutz Arbeitnehmer\"* |\n| Navigate multi-section statutes manually | Get the exact provision with context |\n| Manual cross-referencing between laws | `build_legal_stance` aggregates across sources |\n| \"Is this statute still in force?\" → check manually | `check_currency` → answer in seconds |\n| Find EU basis → dig through EUR-Lex | `get_eu_basis` → linked EU directives instantly |\n| Check DIP Bundestag for legislative history | `get_preparatory_works` → structured results |\n| No API, no integration | MCP protocol → AI-native |\n\n**Traditional:** Search gesetze-im-internet.de → Download XML → Ctrl+F → Cross-reference with Drucksache → Check EUR-Lex for EU basis → Repeat\n\n**This MCP:** *\"What EU law is the basis for § 1 BDSG?\"* → Done.\n\n---\n\n## Available Tools (19)\n\n### Core Legal Research Tools (8)\n\n| Tool | Description |\n|------|-------------|\n| `search_legislation` | FTS5 search on 91,843 provisions with BM25 ranking |\n| `get_provision` | Retrieve specific provision by document ID |\n| `search_case_law` | Search 5,000 federal court decisions with court/date filters |\n| `get_preparatory_works` | Get Drucksachen and Plenarprotokolle for a statute |\n| `validate_citation` | Validate citation against database (zero-hallucination check) |\n| `build_legal_stance` | Aggregate citations from statutes, case law, prep works |\n| `format_citation` | Format citations per German conventions (default/short/pinpoint) |\n| `check_currency` | Check if statute is in force in the ingested corpus |\n\n### Citation Tools (2)\n\n| Tool | Description |\n|------|-------------|\n| `parse_citation` | Parse `§ 823 Abs. 1 BGB` or `Art. 1 Abs. 1 GG` into structured components |\n| `validate_citation` | Check if a citation exists in the database |\n\n### EU Law Integration Tools (5)\n\n| Tool | Description |\n|------|-------------|\n| `get_eu_basis` | Get EU directives/regulations for a German statute |\n| `get_german_implementations` | Find German laws implementing an EU act |\n| `search_eu_implementations` | Search EU documents with German implementation counts |\n| `get_provision_eu_basis` | Get EU law references for specific provision |\n| `validate_eu_compliance` | Check implementation status |\n\n### Discovery & Metadata Tools (2)\n\n| Tool | Description |\n|------|-------------|\n| `list_sources` | Data provenance and source metadata |\n| `about` | Server version, tier, statistics, and freshness |\n\n---\n\n## Data Sources & Freshness\n\nAll content is sourced from authoritative German legal databases:\n\n- **[gesetze-im-internet.de](https://www.gesetze-im-internet.de/)** -- Federal Ministry of Justice, all consolidated federal statutes\n- **[rechtsprechung-im-internet.de](https://www.rechtsprechung-im-internet.de/)** -- Federal court decisions (BVerfG, BGH, BVerwG, BAG, BSG, BFH, BPatG)\n- **[DIP Bundestag](https://dip.bundestag.de/)** -- Legislative preparatory works (Drucksachen, Plenarprotokolle)\n- **[EUR-Lex](https://eur-lex.europa.eu/)** -- EU cross-reference metadata\n\n### Automated Freshness Checks (Daily)\n\nA [daily GitHub Actions workflow](.github/workflows/check-updates.yml) monitors all data sources:\n\n| Source | Check | Method |\n|--------|-------|--------|\n| **Statute amendments** | gesetze-im-internet.de XML index | All 6,870 statutes checked |\n| **New statutes** | New entries in federal gazette | Diffed against database |\n| **Case law** | rechtsprechung-im-internet.de feed | Compared to database |\n| **Preparatory works** | DIP API query (30-day window) | New records detected |\n\n---\n\n## Security\n\nThis project uses multiple layers of automated security scanning:\n\n| Scanner | What It Does | Schedule |\n|---------|-------------|----------|\n| **CodeQL** | Static analysis for security vulnerabilities | Weekly + PRs |\n| **Semgrep** | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |\n| **Gitleaks** | Secret detection across git history | Every push |\n| **Trivy** | CVE scanning on filesystem and npm dependencies | Daily |\n| **Docker Security** | Container image scanning + SBOM generation | Daily |\n| **Socket.dev** | Supply chain attack detection | PRs |\n| **OSSF Scorecard** | OpenSSF best practices scoring | Weekly |\n\nSee [SECURITY.md](SECURITY.md) for the full policy and vulnerability reporting.\n\n---\n\n## Important Disclaimers\n\n### Legal Advice\n\n> **THIS TOOL IS NOT LEGAL ADVICE**\n>\n> Statute text is sourced from official gesetze-im-internet.de publications. However:\n> - This is a **research tool**, not a substitute for professional legal counsel\n> - **Court case coverage is limited** (5,000 decisions) -- do not rely solely on this for case law research\n> - **Verify critical citations** against primary sources for court filings\n> - **EU cross-references** are extracted from German statute text, not EUR-Lex full text\n\n**Before using professionally, read:** [DISCLAIMER.md](DISCLAIMER.md) | [PRIVACY.md](PRIVACY.md)\n\n### Client Confidentiality\n\nQueries 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.\n\n---\n\n## Documentation\n\n- **[Architecture](docs/ARCHITECTURE.md)** -- Multi-country adapter architecture\n- **[Accuracy Plan](docs/ACCURACY_PLAN.md)** -- Roadmap to production accuracy\n- **[Auto Update](docs/AUTO_UPDATE.md)** -- Automated data freshness system\n- **[Security Policy](SECURITY.md)** -- Vulnerability reporting and scanning details\n- **[Disclaimer](DISCLAIMER.md)** -- Legal disclaimers and professional use notices\n- **[Privacy](PRIVACY.md)** -- Client confidentiality and data handling\n\n---\n\n## Development\n\n### Branching Strategy\n\nThis repository uses a `dev` integration branch. **Do not push directly to `main`.**\n\n```\nfeature-branch → PR to dev → verify on dev → PR to main → deploy\n```\n\n- `main` is production-ready. Only receives merges from `dev` via PR.\n- `dev` is the integration branch. All changes land here first.\n- Feature branches are created from `dev`.\n\n### Setup\n\n```bash\ngit clone https://github.com/Ansvar-Systems/German-law-mcp\ncd German-law-mcp\nnpm install\nnpm run build\nnpm test\n```\n\n### Running Locally\n\n```bash\nnpm run dev                                       # Start MCP server\nnpx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector\n```\n\n### Data Management\n\n```bash\nnpm run ingest                    # Ingest statutes from gesetze-im-internet.de\nnpm run ingest:cases              # Ingest case law from rechtsprechung-im-internet.de\nnpm run ingest:prep               # Ingest preparatory works from DIP Bundestag\nnpm run auto-update               # Run full update cycle\nnpm run auto-update:dry-run       # Preview what would be updated\nnpm run drift:detect              # Detect schema/data drift\n```\n\n### Performance\n\n- **Search Speed:** <100ms for most FTS5 queries\n- **Database Size:** ~300 MB (runtime download, Strategy B)\n- **Ingestion Coverage:** 6,870/6,870 statutes (100% TOC coverage)\n\n---\n\n## More Ansvar MCPs\n\nFull fleet coverage at [ansvar.eu/coverage](https://ansvar.eu/coverage).\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\nPriority areas:\n- Lower court decisions (Landesgerichte, Oberlandesgerichte)\n- Historical statute versions and amendment tracking (Fassungsvergleich)\n- Expanded case law coverage (currently 5,000 of ~50,000+ published decisions)\n- State law (Landesrecht) for major Bundesländer\n\n---\n\n## Roadmap\n\n- [x] **Full statute coverage** -- 6,870 federal statutes, 91,843 provisions\n- [x] **Case law** -- 5,000 federal court decisions\n- [x] **Preparatory works** -- 89,423 DIP records (WP 19 + 20)\n- [x] **EU cross-references** -- Extracted from statute text\n- [x] **Citation parsing** -- `§ 823 Abs. 1 BGB` and `Art. 1 Abs. 1 GG` formats\n- [x] **Free/Professional tier gating** -- Honest messaging for tier limitations\n- [ ] Expanded case law (full archive, ~50,000+ decisions)\n- [ ] Lower court coverage (Landesgerichte)\n- [ ] Historical statute versions (Fassungsvergleich)\n- [ ] State law (Landesrecht)\n- [ ] English translations for key statutes\n\n---\n\n## Citation\n\nIf you use this MCP server in academic research:\n\n```bibtex\n@software{german_law_mcp_2025,\n  author = {Ansvar Systems AB},\n  title = {German Law MCP Server: Production-Grade Legal Research Tool},\n  year = {2025},\n  url = {https://github.com/Ansvar-Systems/German-law-mcp},\n  note = {Comprehensive German legal database with 6,870 statutes, 91,843 provisions, and EU cross-references}\n}\n```\n\n---\n\n## License\n\nApache License 2.0. See [LICENSE](./LICENSE) for details.\n\n### Data Licenses\n\n- **Statutes & Regulations:** `German-UrhG-Section-5` -- German statutory public domain. UrhG §5(1) \"Amtliche Werke\" excludes statutes, ordinances, official decrees and notices, decisions and officially drafted headnotes from copyright protection; §5(2) extends to other official works published in the official interest. Verified verbatim 2026-05-17 -- see [`docs/audits/2026-05-17-eu-copyright-statutory-works-batch-1b-DE-IE-IT-NL-ES.md`](https://github.com/Ansvar-Systems/Ansvar-Architecture-Documentation/blob/main/docs/audits/2026-05-17-eu-copyright-statutory-works-batch-1b-DE-IE-IT-NL-ES.md). Catalog entry: `German-UrhG-Section-5` in `infrastructure/attribution-licenses.json`.\n- **Case Law:** rechtsprechung-im-internet.de -- same statutory basis (UrhG §5(1) decisions clause)\n- **Preparatory Works:** DIP Bundestag -- UrhG §5(2) official-interest publications\n- **EU Metadata:** EUR-Lex (EU public domain, Decision 2011/833/EU)\n\n---\n\n## About Ansvar Systems\n\nWe build AI-accelerated compliance and legal research tools for the European market. This MCP server started as our internal reference tool for German law -- turns out everyone building for the DACH market has the same research frustrations.\n\nSo we're open-sourcing it. Navigating 6,870 statutes shouldn't require a law degree.\n\n**[ansvar.eu](https://ansvar.eu)** -- Stockholm, Sweden\n\n---\n\n<p align=\"center\">\n  <sub>Built with care in Stockholm, Sweden</sub>\n</p>\n",
  "bytes": 15865,
  "sha": "0aad3089944a6290b8a0fe50a1d6b333af8038ea5ba5984a581549ca44402b2d",
  "repo_slug": "ansvar-systems/german-law-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_eu_ansvar_german_law_mcp_0ea07ac3/readme"
}