fr-eli-mcp
MCP server for querying French legislation and case law via the Legifrance API, enabling search and retrieval of laws, codes, and court decisions with verifiable citations.
README
fr-eli-mcp
An MCP server for the French Legifrance API via PISTE. It searches French legislation (LODA laws & decrees, codes) and case law (JURI), and returns verbatim text with verifiable citations. Part of the eu-legal-mcp line of national legal connectors by MateMatic.
Every response carries the citation contract: a stable eli_uri, a human_readable_citation
(French convention) and a resolvable source_url.
Read-only. The server only queries Legifrance and writes a local audit log. It never modifies official text and never sends anything beyond your query / document id.
Tools
| Tool | What it does |
|---|---|
fr_search(query, fond, page_size) |
Keyword search a fond: LODA (laws & decrees), CODE (codes), JURI (case law). Returns hits with the citation contract; CODE hits expose matched article_ids. |
fr_get_act(text_id, date) |
Consult a LODA law/decree by LEGITEXT... id. Returns metadata + a table of contents (articles). |
fr_get_text(article_id) |
Verbatim text of a single article by LEGIARTI... id. |
fr_get_decision(decision_id) |
A JURI court decision by JURITEXT... id, with its native ecli, court, formation, solution and text. |
A note on ELI vs ECLI
France has an official ELI scheme, but the PISTE lf-engine-app consult API returns the native
ELI field null for the legislation we tested. Following this line's rule - say what you do not
have, never fabricate an ELI - eli_uri carries the stable, resolvable Legifrance resource URL
(CID-keyed), not a /eli/... string parsed from prose. Each response repeats this in eli_note.
Case law is different: the API returns a native, authoritative ECLI
(e.g. ECLI:FR:CCASS:2025:C100399), surfaced verbatim in fr_get_decision.
Configuration
Legifrance requires OAuth2 application credentials from a free PISTE account
(piste.gouv.fr → Applications → subscribe to the Legifrance API → OAuth Credentials).
Credentials are read from the environment only:
| Variable | Meaning |
|---|---|
FR_ELI_OAUTH_URL |
OAuth token endpoint (sandbox default shown in .mcp.json.example). |
FR_ELI_BASE_URL |
Legifrance lf-engine-app base. |
FR_ELI_CLIENT_ID |
Your PISTE application client id (required). |
FR_ELI_CLIENT_SECRET |
Your PISTE application client secret (required). |
FR_ELI_CACHE_DIR |
Disk cache dir (default ~/.matematic/cache/fr-eli). |
FR_ELI_AUDIT_DIR |
Audit log dir (default ~/.matematic/audit). |
Copy .mcp.json.example to .mcp.json (gitignored) and fill in your credentials, or set the
variables in your host environment. The OAuth token is cached in memory and refreshed automatically.
Install
py -3.13 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]" # Windows
# or: python -m pip install -e ".[dev]" # POSIX
Tests
pytest tests/test_instructions_drift.py tests/test_parse.py # offline, no creds
pytest tests/test_smoke.py -v # live, needs PISTE creds in .env
Distribution
Because Legifrance requires a PISTE key, this connector is distributed through the PATRON / appliance channel (governed), not casual drop-in download. See the eu-legal-mcp line notes.
Licence
Apache-2.0. Legifrance content is © the French Republic / DILA and subject to the Legifrance / PISTE terms of use; this software only retrieves and cites it.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。