Légifrance (unofficial)
Search, read and cite French law through the Légifrance API, read-only
Légifrance (unofficial) is an open-source MCP server for legal and government. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- Linux, macOS, Windows
- Runs
- Locally
- Access
- Needs a secret key or token
- Version
- 1.5.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mcp-legifrance --env LF_PISTE_CLIENT_ID='<LF_PISTE_CLIENT_ID>' --env LF_PISTE_CLIENT_SECRET='<LF_PISTE_CLIENT_SECRET>' -- docker run -i --rm -e LF_PISTE_CLIENT_ID -e LF_PISTE_CLIENT_SECRET ghcr.io/muchiny/mcp-legifrance:1.5.0Add --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mcp-legifrance": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LF_PISTE_CLIENT_ID",
"-e",
"LF_PISTE_CLIENT_SECRET",
"ghcr.io/muchiny/mcp-legifrance:1.5.0"
],
"env": {
"LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>",
"LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mcp-legifrance": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LF_PISTE_CLIENT_ID",
"-e",
"LF_PISTE_CLIENT_SECRET",
"ghcr.io/muchiny/mcp-legifrance:1.5.0"
],
"env": {
"LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>",
"LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-legifrance": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LF_PISTE_CLIENT_ID",
"-e",
"LF_PISTE_CLIENT_SECRET",
"ghcr.io/muchiny/mcp-legifrance:1.5.0"
],
"env": {
"LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>",
"LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mcp-legifrance": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LF_PISTE_CLIENT_ID",
"-e",
"LF_PISTE_CLIENT_SECRET",
"ghcr.io/muchiny/mcp-legifrance:1.5.0"
],
"env": {
"LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>",
"LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mcp-legifrance --env LF_PISTE_CLIENT_ID='<LF_PISTE_CLIENT_ID>' --env LF_PISTE_CLIENT_SECRET='<LF_PISTE_CLIENT_SECRET>' -- docker run -i --rm -e LF_PISTE_CLIENT_ID -e LF_PISTE_CLIENT_SECRET ghcr.io/muchiny/mcp-legifrance:1.5.0Or add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mcp-legifrance]
command = "docker"
args = ["run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0"]
env = { LF_PISTE_CLIENT_ID = "<LF_PISTE_CLIENT_ID>", LF_PISTE_CLIENT_SECRET = "<LF_PISTE_CLIENT_SECRET>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-legifrance": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LF_PISTE_CLIENT_ID",
"-e",
"LF_PISTE_CLIENT_SECRET",
"ghcr.io/muchiny/mcp-legifrance:1.5.0"
],
"env": {
"LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>",
"LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Or run: gemini mcp add -s user -e LF_PISTE_CLIENT_ID='<LF_PISTE_CLIENT_ID>' -e LF_PISTE_CLIENT_SECRET='<LF_PISTE_CLIENT_SECRET>' mcp-legifrance docker -- run -i --rm -e LF_PISTE_CLIENT_ID -e LF_PISTE_CLIENT_SECRET ghcr.io/muchiny/mcp-legifrance:1.5.0
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mcp-legifrance": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "LF_PISTE_CLIENT_ID", "-e", "LF_PISTE_CLIENT_SECRET", "ghcr.io/muchiny/mcp-legifrance:1.5.0" ], "env": { "LF_PISTE_CLIENT_ID": "<LF_PISTE_CLIENT_ID>", "LF_PISTE_CLIENT_SECRET": "<LF_PISTE_CLIENT_SECRET>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
LF_PISTE_CLIENT_IDOAuth client ID of your own Légifrance application on piste.gouv.fr. Never share it.RequiredLF_PISTE_CLIENT_SECRETOAuth client secret of the same PISTE application.RequiredLF_PISTE_ENVPISTE environment; credentials are environment-specific.LF_PISTE_CLIENT_IDOAuth client ID of your own Légifrance application on piste.gouv.fr. Never share it.RequiredLF_PISTE_CLIENT_SECRETOAuth client secret of the same PISTE application.RequiredLF_PISTE_ENVPISTE environment; credentials are environment-specific.
About Légifrance (unofficial)
This Rust server queries official French law from Légifrance through the PISTE portal and returns text as Légifrance publishes it, with a citation and source address. It is explicitly unofficial and says it is not affiliated with or endorsed by DILA. Coverage includes laws and decrees, codes, case law from the Cour de cassation and appeal courts, constitutional, Conseil d'Etat and CNIL decisions, collective agreements and company agreements.
Its distinctive tools are about checking. fr_verify_citations checks every legal citation in a text of up to 20,000 characters, such as a draft answer, against Légifrance. fr_resolve turns a citation written out in words into official identifiers with a confidence level, and the README says nothing is guessed. Law can be read as it stood on a given date, and fr_diff_article compares two versions of an article.
Each user supplies their own free PISTE credentials, which the project does not provide, and the server talks to PISTE directly on your machine so no third party sees queries. An optional offline mode reads codes, laws and decrees from a local DILA index, which may lag Légifrance. Long texts return a summary first to save context, and the README notes that the binaries are unsigned. Prompts are in French.
Tools this server provides (13)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 9 of 13 tools read data; 4 names don't say.
From the server's own tool labels and tool names; not verified by us.
- fr_searchName suggests: reads
- Keyword search in one fund such as laws, codes or case law.
- fr_get_actName suggests: reads
- Returns the table of contents of a text at a given date.
- fr_get_textName suggests: reads
- Returns the text of an article with progressive reading.
- fr_get_decisionName suggests: reads
- Returns a court decision.
- fr_get_deliberationName suggests: reads
- Returns a CNIL deliberation.
- fr_get_conventionName suggests: reads
- Returns a collective agreement's metadata and contents.
- fr_get_company_agreementName suggests: reads
- Returns company agreement metadata.
- fr_coverage
- Reports what the server covers and its configuration state.
- fr_resolve
- Turns a written citation into official identifiers.
- fr_verify_citations
- Verifies all legal citations in a text.
- fr_get_relatedName suggests: reads
- Lists legal links of an article or decision.
- fr_diff_article
- Compares an article between two dates.
- fr_search_allName suggests: reads
- Searches several funds at once.
What it does
- Citation verification
- Checks all legal citations in a text against Légifrance.
- Citation resolution
- Converts a written citation or ECLI into official identifiers with a confidence level.
- Law at a date
- Reads a text or article as it stood on a given day.
- Article version diff
- Compares an article between two dates, showing removed and added passages.
- Multi-fund search
- Searches laws, codes, case law, collective agreements and more.
- Progressive reading
- Long texts return a summary first, with offset-based full reading.
- Offline index option
- Reads codes, laws and decrees from a local DILA copy without network.
Good for
- Check the citations in a draft legal answer
- Look up an article of a French code as it applied on a past date
- See how an article changed between two versions
- Find case law that cites a particular article
- Read a collective agreement's structure
Pricing
Open source
Légifrance (unofficial) FAQ
Do I need credentials?
Yes, your own PISTE application credentials, free after accepting the API terms. The project provides none, and sandbox credentials do not work in production.
Is Légifrance (unofficial) official?
No. It is an unofficial project, not affiliated with DILA.
Can Légifrance (unofficial) modify anything?
No. All thirteen tools are read-only.
Does Légifrance (unofficial) work offline?
Optionally, for codes, laws and decrees from a local DILA index. The snapshot can lag Légifrance and never proves a text does not exist.
Are the binaries signed?
No. SHA-256 sums and GitHub provenance attestations are provided to check downloads.
Is Légifrance (unofficial) free?
Yes. Légifrance (unofficial) is open source, so you can use and self-host it for free.
How do I add Légifrance (unofficial) to Claude Code?
Run this command in your terminal: claude mcp add mcp-legifrance --env LF_PISTE_CLIENT_ID='<LF_PISTE_CLIENT_ID>' --env LF_PISTE_CLIENT_SECRET='<LF_PISTE_CLIENT_SECRET>' -- docker run -i --rm -e LF_PISTE_CLIENT_ID -e LF_PISTE_CLIENT_SECRET ghcr.io/muchiny/mcp-legifrance:1.5.0
What are the best alternatives to Légifrance (unofficial)?
The closest alternatives to Légifrance (unofficial) are China Law MCP, x402 Micropayments MCP, Swiss Housing MCP, Lie Detector Test and Norman: Start a company.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.