Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Rechtsinformationen Bund DE MCP ServerWie lange kann ich in Elternzeit gehen?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Rechtsinformationen Bund DE MCP Server
An MCP (Model Context Protocol) server that provides access to the official German Federal Legal Information Portal (rechtsinformationen.bund.de). Any AI agent can use this server for German legal questions to provide authoritative, fact-based answers with proper legal citations from official sources.
🚀 Quick Setup
The fastest way to get started:
Run the setup script:
Restart Claude Desktop completely (or your MCP client)
Test with: "Wie lange kann ich in Elternzeit gehen?"
🎯 What This Server Provides
AI agents will automatically use this MCP server for:
German legal questions ("What happens if I miss a Jobcenter appointment?")
Legal rights and obligations ("How long can I take parental leave?")
Court decisions and precedents ("Recent BGH decisions on trademark law")
Specific law lookups ("What does § 32 SGB II say?")
Administrative law questions ("When do I need a hearing in administrative proceedings?")
Purpose: Ensures all German legal answers are grounded in official sources with proper citations.
✨ Features
Core Capabilities
Full-text search across German federal laws and legislation
Case law search through German federal court decisions (BGH, BVerfG, BAG, BFH, BSG, BVerwG)
Intelligent search with English-to-German translation and misconception correction
German compound word decomposition (e.g., "Mieterhöhungsantrag" → "Mieterhöhung")
HTML URLs for users (clickable, readable documents)
Model-agnostic - works with Claude, Qwen, DeepSeek, LLaMA, and other models
Recent Improvements (2025-10-06)
✅ HTML URLs: Returns human-readable web links, not just JSON API URLs ✅ Compound word handling: Decomposes German compound words for better search ✅ Fallback search: Never returns zero results for valid queries ✅ English translation: Automatically translates English legal terms to German ✅ Type coercion: Works with models that pass strings instead of numbers
📚 Available Tools
The server provides 6 specialized tools with intelligent routing:
1. 🧠 semantische_rechtssuche (PRIMARY TOOL)
Intelligent Legal Search - Use this FIRST for any German legal question
What it does automatically:
✓ Translates English → German ("employee rights" → "Arbeitnehmerrechte")
✓ Corrects misconceptions ("Überprüfungsantrag" → "Widerspruch")
✓ Extracts legal references (§ patterns)
✓ Searches multiple related terms
✓ Returns both legislation AND case law
What it does NOT do:
✗ Does NOT generate semantically similar terms (agent must provide variations)
✗ Does NOT try multiple query phrasings automatically
✗ Does NOT use ML embeddings (uses keyword matching + Fuse.js fuzzy search)
Parameters:
query(required): Search query in German or Englishthreshold(optional): Fuzzy match threshold 0.0-1.0 (default: 0.3)limit(optional): Max results (default: 10, max: 100)
URLs returned:
2. 🇩🇪 deutsche_gesetze_suchen (SECONDARY TOOL)
Search German federal legislation (laws, ordinances)
When to use:
Follow-up after semantische_rechtssuche
Legislation-only results needed
Searching for specific law abbreviations (BEEG, BGB, SGB)
Limitations: ⚠️ Date filters may exclude relevant results
3. ⚖️ rechtsprechung_suchen (SECONDARY TOOL)
Search German court decisions
When to use:
Follow-up after semantische_rechtssuche
Court-specific filtering needed
Searching for specific judges or case types
Common courts:
BGH (Federal Court of Justice)
BVerfG (Constitutional Court)
BAG (Federal Labour Court)
BFH (Federal Fiscal Court)
BSG (Federal Social Court)
BVerwG (Federal Administrative Court)
4. 🔍 alle_rechtsdokumente_suchen (SECONDARY TOOL)
Comprehensive search across all document types
When to use:
After other specialized tools
Mixed results needed (legislation + case law)
Broad topic exploration
5. 📄 dokument_details_abrufen (RETRIEVAL TOOL)
Get full text of specific documents
When to use:
After finding document in search results
Need complete document text (searches only return snippets)
Want HTML or XML format
6. 🏛️ gesetz_per_eli_abrufen (RETRIEVAL TOOL)
Get legislation by ELI identifier
When to use:
Have specific ELI from search results
Need exact version/date of legislation
🤖 Model Compatibility
Tested & Working
✅ Claude 3.5 Sonnet - Excellent tool selection, proper citations
✅ Qwen 2.5-72B - Best open-source option, good German support
✅ DeepSeek-R1 - Strong reasoning, needs recursion limit
✅ LLaMA 3.3-70B - Reliable, good for straightforward queries
✅ GLM-4.6 - Works with type coercion fixes
Recommended Agent Configuration (LibreChat)
For best results with any model:
Key settings:
recursionLimit: 5- Prevents endless searchingtemperature: 0.3- More deterministic for legal queriesStop condition - Generate answer immediately after finding results
📦 Installation
Quick Setup
Manual Installation
Claude Desktop Configuration
macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: Edit %APPDATA%/Claude/claude_desktop_config.json
Important:
Use absolute paths (not relative like
./dist/index.js)Restart Claude Desktop completely after config changes
Run
npm run check-configto verify setup
LibreChat Agent Configuration
For optimal performance with LibreChat and Ollama models (Qwen, DeepSeek, LLaMA):
Key Settings:
recursionLimit: 5 - Prevents endless searching (typical issue with some models)
temperature: 0.3 - Accuracy over creativity for legal research
STOP instructions - Forces agent to synthesize answer after finding results
Citation requirements - Mandatory URL inclusion in responses
See LIBRECHAT_AGENT_CONFIG.md for complete configuration details.
🧪 Testing & Evaluation
Run Tests
Agentic Evaluation
To evaluate agent performance with different models:
Metrics tracked:
Tool call efficiency (target: ≤3 calls)
Document accuracy (found correct ECLI/ELI)
Citation completeness (URLs in sources)
Recursion safety (no limit hits)
Answer quality (comprehensive + cited)
See AGENTIC_EVAL_GUIDE.md for detailed evaluation framework.
🔧 Troubleshooting
Common Issues
1. No Search Results
2. Server Won't Start
3. Recursion Limit Hit
Symptom: Agent makes 10+ tool calls without stopping
Solution:
Set
recursionLimit: 5in agent configAdd explicit STOP instructions
Use semantische_rechtssuche as primary tool
4. Missing Citations in Output
Symptom: Agent doesn't include URLs despite MCP response containing them
Solution:
This is a model behavior issue, not server issue
Strengthen instructions: "MUST include ALL URLs"
Consider agentic architecture with dedicated citation agent
5. Schema Validation Errors
Symptom: "Received tool input did not match expected schema"
Solution: ✅ Fixed - server now handles string→number type coercion
📖 Usage Examples
Simple Query
Compound Word Query
English Query
🏗️ Architecture
How It Works
Communication: Local stdio (no HTTP ports) Data Flow: Real-time API calls for each query URLs: Returns both HTML (users) and JSON (developers)
Intelligent Search Features
1. English Translation
2. Misconception Correction
3. Compound Word Decomposition
4. Legal Reference Extraction
📊 API Source
Base URL: https://testphase.rechtsinformationen.bund.de/v1
Documentation: https://docs.rechtsinformationen.bund.de
Standards: ELI (European Legislation Identifier), ECLI (European Case Law Identifier)
Status: Trial service - may be subject to changes
Coverage:
✅ Current federal legislation
✅ Federal court decisions (2010-2024)
✅ Historical versions of laws
⚠️ Amendment laws (partial coverage)
❌ Legislative materials (not included)
⚠️ Known Limitations
1. Date Filtering Issues
Problem: Temporal filters may exclude relevant results when laws enacted in one year become effective in another.
Example: Searching for "§ 44 SGB X Änderung 2021" with date filter 2021 misses the 7. SGB-IV-Änderungsgesetz from June 2020 (effective January 1, 2021).
Workaround: Search without date filters, manually review effective dates.
2. Amendment Law Discovery
Problem: Amendment laws are poorly indexed and may not show which paragraphs they modify.
Workaround:
Search for "BGBl [year]" to find Federal Law Gazette entries
Look for "Artikelgesetz" or amendment law names
Search effective dates like "2021-01-01 Inkrafttreten"
3. Historical Versions
Problem: Only current versions easily accessible through ELI identifiers.
Workaround: Search Federal Law Gazette references for specific dates.
4. Model Behavior
Citations not appearing: Some models ignore citation instructions despite clear guidance in MCP response. This is a model limitation, not server issue.
Solution: Use agent configuration with explicit citation requirements or consider multi-agent architecture.
🚀 Recent Fixes (2025-10-06)
Major Improvements
✅ HTML URLs for Users
Returns clickable HTML links instead of JSON API URLs
Users can now read laws in browsers
Both HTML and JSON URLs provided
✅ German Compound Word Handling
Decomposes "Mieterhöhungsantrag" → "Mieterhöhung"
Removes suffixes: -antrag, -verfahren, -klage, -gesetz, -verordnung
Special handling for common legal terms
✅ Fallback Search
Never returns zero results for valid queries
Searches with original query if no legal references found
Provides helpful suggestions when nothing found
✅ Type Coercion
Handles models passing "10" (string) instead of 10 (number)
Schema validation now works with GLM-4.6 and similar models
✅ Model-Agnostic Instructions
Removed Claude-specific language
Works with any AI model
Clear imperative instructions
📝 Development
Build Commands
Helper Commands
Project Structure
🤝 Contributing
Contributions welcome! Areas for improvement:
More compound word patterns - Expand German word decomposition
Better concept mappings - Add common legal misconceptions
English translation coverage - More legal term translations
Historical version access - Better handling of law amendments
Literature search - Add
/v1/literatureendpoint support
📄 License
MIT
🔗 Related Documentation
CLAUDE.md - Detailed instructions for Claude Code
AGENTIC_EVAL_GUIDE.md - Agent evaluation framework
LIBRECHAT_AGENT_CONFIG.md - LibreChat configuration
RECOMMENDED_MODELS.md - Model comparison and recommendations
FIXES_APPLIED.md - Detailed change log
Last Updated: 2025-10-06 Version: 1.1.0 Status: Production-ready with test phase API