legal-research-mcp
Provides tools to search, retrieve, and trace German tax law statutes (KStG, EStG, AO, GewSt) from gesetze-im-internet.de, including amendment tracking.
README
Legal Research MCP MVP 0.2-dev - Render Free
Render-ready read-only research MCP for the planned legal-tax-advisor-de v2.3.0 research layer.
What 0.2-dev adds
0.2-dev keeps the conservative 0.1 amendment-history contract and adds one targeted retrieval capability:
get_official_document_text: opens an already identified official German PDF/HTML document from a strict HTTPS host allowlist, searches a locator/query, and returns page-aware evidence with content hashes.
This closes the D1 gap observed in Copilot Studio: the agent could identify Bundesrat-Drucksache 5/26 but could not open Art. 30 Nr. 1 to verify the concrete amendment command.
Tools
search_primary_sources
Controlled discovery for a small validated legislation registry (KStG, EStG, AO, GewStG). Discovery only.
get_norm
Retrieves the current official consolidated provision from gesetze-im-internet.de and returns structure/evidence metadata.
trace_norm_amendments
Safe amendment-history connectivity implementation. It may expose a whole-statute amendment header as a discovery lead but deliberately remains partial/unknown until a provision-specific chain resolver is implemented.
get_official_document_text
Opens an identified official document and retrieves an exact passage.
Accepted inputs:
- one of
urlordocument_id; locatorand/orquery;- optional
max_passagesandcontext_chars.
Supported document-id shortcuts:
BR-Drs. 5/26-> Bundesrat document server PDF;BT-Drs. 21/3343-> Bundestag document server PDF;BGBl. 2026 I Nr. 33-> officialrecht.bund.depromulgation page.
Example amendment verification target:
get_official_document_text(
document_id="BR-Drs. 5/26",
locator="Artikel 30",
query="§ 8b Absatz 6 Satz 2"
)
A successful normalized query match returns coverage_status=complete and full_checked passage evidence. A locator-only result is navigation evidence and must not be treated as proof of the requested amendment phrase.
SSRF / download safety
get_official_document_text is deliberately constrained:
- HTTPS only;
- exact official-host allowlist;
- every redirect hop is revalidated;
- credentials and non-standard ports are rejected;
- download size capped at 20 MB;
- PDF text extraction only, no JavaScript/browser execution;
- read-only requests only.
Current allowlisted families include the official Bundestag/Bundesrat document server, recht.bund.de, gesetze-im-internet.de, Bundestag/Bundesrat web hosts, and the Federal Ministry of Finance website.
Render deployment
Use the included render.yaml Blueprint. The service remains configured as:
- Web Service;
- Docker runtime;
- Free plan;
- Frankfurt region;
/healthhealth check;- dynamic binding to Render's
PORT; - MCP endpoint at
/mcp; - explicit Host allowlisting from
RENDER_EXTERNAL_HOSTNAME.
Detailed steps: docs/render-free-deploy.md.
Local setup
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
python -m pytest -q
uvicorn app:app --reload --port 8080
Local endpoints:
- Health:
http://localhost:8080/health - MCP:
http://localhost:8080/mcp
Still not implemented
- historical statutory version resolver;
- complete provision-specific amendment-chain resolver;
- automatic discovery of every Bundesgesetzblatt/Bundestag/Bundesrat document;
- case-law retrieval;
- comprehensive BMF guidance retrieval;
- production authentication.
DEV security boundary
The Render Free deployment remains intentionally unauthenticated for DEV testing. Do not publish the Copilot agent and do not send confidential client/matter facts through the endpoint.
Free Render Web Services can spin down after inactivity and are not a production target.
0.1 -> 0.2 upgrade
- Replace the repository files with this package and commit/push to the branch Render deploys.
- Wait for the Render deployment to become Live.
- Verify
/healthreturns version0.2.0-dev. - In Copilot Studio, open the existing
Legal Research DEMCP server configuration and verify thatget_official_document_textis exposed/enabled. - Run the D1 amendment retrieval test and inspect Activity Trace.
See docs/render-free-deploy.md for the detailed upgrade/test sequence.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。