使用说明
德国法律mcp
从下载和解析德国联邦法律XML文件的非官方MCP服务器 法律-在-internet.de.直接从Claude Code、Claude Desktop或任何MCP客户端浏览并提取任何法律中的段落。
免责声明:
快速开始
克劳德代码
claude mcp add german-law -- npx -y german-law-mcp
克劳德桌面/手动配置
添加到MCP配置中:
{
"mcpServers": {
"german-law": {
"command": "npx",
"args": ["-y", "german-law-mcp"]
}
}
}
就是这样——没有Docker,没有系统依赖。只有Node.js 18+。
工具
| 工具 | 说明 | 参数 |
|---|---|---|
download_law |
从gesetze-im-internet.de下载法律 | law_name, force_update? |
list_contents |
列出所有段落(目录) | law_name |
get_paragraph |
使用可选的小节过滤器提取特定段落 | paragraph, law_name, absatz? |
法律名称
法律名称与 gesetze-im-internet.de 上的 URL slug 匹配:
| 法律 | law_name |
|---|---|
| 基本法 | gg |
| 民法典 | bgb |
| 所得税法 | estg |
| 税收条例 | ao_1977 |
社会法 III sgb_3 |
|
| 商业法典 | hgb |
| 刑法典 | stgb |
更多信息,请访问 法律-在互联网上.de/分liste_A.html.
查询示例
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].
配置
存储位置
下载的XML文件存储在:
~/.local/share/german-law-mcp/laws/<law_name>/<law_name>.xml
用覆盖 LAWS_DIR 环境变量:
{
"mcpServers": {
"german-law": {
"command": "npx",
"args": ["-y", "german-law-mcp"],
"env": {
"LAWS_DIR": "/path/to/your/laws"
}
}
}
}
发展
git clone https://github.com/kai-bruell/german-law-mcp.git
cd german-law-mcp
npm install
npm run build
对于本地测试,请使用 .mcp.json 在回购中:
{
"mcpServers": {
"german-law": {
"command": "node",
"args": ["dist/index.js"]
}
}
}
许可证
此项目的源代码根据 MIT许可证.
德国联邦法律文本是官方作品(官方作品)并且根据以下规定免于版权保护 §5绝对值。1欧元.