npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

german-law-mcp

v0.1.0

Published

MCP server for accessing German federal law texts from gesetze-im-internet.de

Downloads

40

Readme

german-law-mcp

Unofficial MCP server that downloads and parses German federal law XML files from gesetze-im-internet.de. Browse and extract paragraphs from any law — directly from Claude Code, Claude Desktop, or any MCP client.

Hinweis / Disclaimer:

  • Dieses Projekt steht in keiner Verbindung zum Bundesministerium der Justiz (BMJ), zum Bundesamt für Justiz oder zu juris GmbH.
  • Die bereitgestellten Gesetzestexte sind amtliche Werke und nach § 5 Abs. 1 UrhG gemeinfrei. Die Texte werden unverändert aus den XML-Dateien von gesetze-im-internet.de bezogen.
  • Dieses Tool dient ausschließlich Informationszwecken und stellt keine Rechtsberatung dar. Die Texte können unvollständig, veraltet oder fehlerhaft geparst sein.
  • Rechtlich verbindlich ist ausschließlich die im Bundesgesetzblatt veröffentlichte Fassung. Bei rechtlichen Fragen wenden Sie sich an eine qualifizierte Rechtsberatung.

Quick Start

Claude Code

claude mcp add german-law -- npx -y german-law-mcp

Claude Desktop / Manual Config

Add to your MCP configuration:

{
  "mcpServers": {
    "german-law": {
      "command": "npx",
      "args": ["-y", "german-law-mcp"]
    }
  }
}

That's it — no Docker, no system dependencies. Just Node.js 18+.

Tools

| Tool | Description | Parameters | |------|-------------|------------| | download_law | Download a law from gesetze-im-internet.de | law_name, force_update? | | list_contents | List all paragraphs (table of contents) | law_name | | get_paragraph | Extract a specific paragraph with optional subsection filter | paragraph, law_name, absatz? |

Law Names

Law names match the URL slug on gesetze-im-internet.de:

| Law | law_name | |-----|-----------| | Grundgesetz | gg | | Bürgerliches Gesetzbuch | bgb | | Einkommensteuergesetz | estg | | Abgabenordnung | ao_1977 | | Sozialgesetzbuch III | sgb_3 | | Handelsgesetzbuch | hgb | | Strafgesetzbuch | stgb |

Find more at gesetze-im-internet.de/Teilliste_A.html.

Example Queries

Download the BGB and show me § 433.
What does § 1 of the Grundgesetz say?
Show me § 32 Absatz 6 EStG.
List the table of contents of the Abgabenordnung (ao_1977).
Compare § 823 Absatz 1 and Absatz 2 BGB.
Download sgb_3 and show me § 159 Absätze [1,3,5].

Configuration

Storage Location

Downloaded XML files are stored in:

~/.local/share/german-law-mcp/laws/<law_name>/<law_name>.xml

Override with the LAWS_DIR environment variable:

{
  "mcpServers": {
    "german-law": {
      "command": "npx",
      "args": ["-y", "german-law-mcp"],
      "env": {
        "LAWS_DIR": "/path/to/your/laws"
      }
    }
  }
}

Development

git clone https://github.com/kai-bruell/german-law-mcp.git
cd german-law-mcp
npm install
npm run build

For local testing, use the .mcp.json in the repo:

{
  "mcpServers": {
    "german-law": {
      "command": "node",
      "args": ["dist/index.js"]
    }
  }
}

License

The source code of this project is licensed under the MIT License.

German federal law texts are official works (amtliche Werke) and are exempt from copyright under § 5 Abs. 1 UrhG.