eu.ansvar/german-law-mcp

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

3Apache-2.0other

Install

Config snippet generator goes here (5 client tabs)

README

# German Law MCP Server

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

[![npm version](https://badge.fury.io/js/@ansvar%2Fgerman-law-mcp.svg)](https://www.npmjs.com/package/@ansvar/german-law-mcp)
[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/German-law-mcp?style=social)](https://github.com/Ansvar-Systems/German-law-mcp)
[![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)
[![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)

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](https://ansvar.eu) -- 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**.

---

## Quick Start

### Use Remotely (No Install Needed)

> Connect directly to the hosted version -- zero dependencies, nothing to install.

**Endpoint:** `https://german-law-mcp.vercel.app/mcp`

| Client | How to Connect |
|--------|---------------|
| **Claude.ai** | Settings > Connectors > Add Integration > paste URL |
| **Claude Code** | `claude mcp add german-law --transport http https://german-law-mcp.vercel.app/mcp` |
| **Claude Desktop** | Add to config (see below) |
| **GitHub Copilot** | Add to VS Code settings (see below) |

**Claude Desktop** -- add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "german-law": {
      "type": "url",
      "url": "https://german-law-mcp.vercel.app/mcp"
    }
  }
}
```

**GitHub Copilot** -- add to VS Code `settings.json`:

```json
{
  "github.copilot.chat.mcp.servers": {
    "german-law": {
      "type": "http",
      "url": "https://german-law-mcp.vercel.app/mcp"
    }
  }
}
```

### Use Locally (npm)

```bash
npx @ansvar/german-law-mcp
```

**Claude Desktop** -- add to `claude_desktop_config.json`:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "german-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/german-law-mcp"]
    }
  }
}
```

**Cursor / VS Code:**

```json
{
  "mcp.servers": {
    "german-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/german-law-mcp"]
    }
  }
}
```

## 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 C