{"id":51576136,"url":"https://github.com/matematicsolutions/fr-eli-mcp","last_synced_at":"2026-07-11T00:31:50.091Z","repository":{"id":367092064,"uuid":"1279196824","full_name":"matematicsolutions/fr-eli-mcp","owner":"matematicsolutions","description":"MCP server for the French Legifrance API via PISTE — search legislation (LODA, codes) and case law (JURI) with verifiable citations and native ECLI. Part of the eu-legal-mcp line.","archived":false,"fork":false,"pushed_at":"2026-07-07T13:03:37.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-07T15:07:10.442Z","etag":null,"topics":["ai-agent","ecli","eli","france","legal","legaltech","legislation","mcp","mcp-server","model-context-protocol"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matematicsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T13:13:34.000Z","updated_at":"2026-07-07T13:04:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/matematicsolutions/fr-eli-mcp","commit_stats":null,"previous_names":["matematicsolutions/fr-eli-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matematicsolutions/fr-eli-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Ffr-eli-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Ffr-eli-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Ffr-eli-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Ffr-eli-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matematicsolutions","download_url":"https://codeload.github.com/matematicsolutions/fr-eli-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Ffr-eli-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35347554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","ecli","eli","france","legal","legaltech","legislation","mcp","mcp-server","model-context-protocol"],"created_at":"2026-07-11T00:31:49.185Z","updated_at":"2026-07-11T00:31:50.063Z","avatar_url":"https://github.com/matematicsolutions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fr-eli-mcp\n\n\u003c!-- mcp-name: io.github.matematicsolutions/fr-eli-mcp --\u003e\n\n\n## Instalacja (jedna komenda)\n\nOpublikowany na PyPI + MCP Registry (`io.github.matematicsolutions/fr-eli-mcp`). Uruchomienie bez klonowania:\n\n```bash\nuvx fr-eli-mcp\n```\n\nWymaga kluczy PISTE w env: `PISTE_CLIENT_ID`, `PISTE_CLIENT_SECRET` (Legifrance/PISTE).\n\nKonfiguracja klienta MCP (stdio):\n\n```json\n{ \"mcpServers\": { \"fr-eli-mcp\": { \"command\": \"uvx\", \"args\": [\"fr-eli-mcp\"] } } }\n```\n\n(Budowanie ze źródeł — niżej.)\n\nAn MCP server for the **French Legifrance API** via [PISTE](https://piste.gouv.fr). It searches\nFrench legislation (LODA laws \u0026 decrees, codes), case law from three jurisdictions - Cour de\ncassation / cours d'appel (JURI), the **Conseil constitutionnel** (CONSTIT - QPC/DC decisions) and\nthe **administrative courts** (CETAT - Conseil d'Etat, cours administratives d'appel, tribunaux\nadministratifs) - plus **CNIL deliberations** (CNIL), **collective labour agreements** (KALI) and\n**company-level agreements** (ACCO), and returns verbatim text with verifiable citations. Part of\nthe **eu-legal-mcp** line of national legal connectors by [MateMatic](https://matematic.co).\n\nEvery response carries the citation contract: a stable `eli_uri`, a `human_readable_citation`\n(French convention) and a resolvable `source_url`.\n\n\u003e **Read-only.** The server only queries Legifrance and writes a local audit log. It never modifies\n\u003e official text and never sends anything beyond your query / document id.\n\n## Tools\n\n| Tool | What it does |\n| --- | --- |\n| `fr_search(query, fond, page_size)` | Keyword search a `fond`: `LODA` (laws \u0026 decrees), `CODE` (codes), `JURI` (Cour de cassation case law), `CONSTIT` (Conseil constitutionnel decisions), `CETAT` (administrative case law: Conseil d'Etat, CAA, TA), `CNIL` (CNIL deliberations), `KALI` (collective labour agreements), `ACCO` (company-level agreements). Returns hits with the citation contract; `CODE` hits expose matched `article_id`s. |\n| `fr_get_act(text_id, date)` | Consult a LODA law/decree by `LEGITEXT...` id. Returns metadata + a table of contents (`articles`). |\n| `fr_get_text(article_id)` | Verbatim text of a single article by `LEGIARTI...` id (legislation/codes) or `KALIARTI...` id (collective agreements). |\n| `fr_get_decision(decision_id)` | A court decision by `JURITEXT...`, `CONSTEXT...` or `CETATEXT...` id, with its **native `ecli`** (when populated), court, formation, solution and text. |\n| `fr_get_deliberation(deliberation_id)` | A CNIL deliberation by `CNILTEXT...` id (sanctions, authorizations, opinions) with its verbatim text and the citation `CNIL, deliberation n° ... du ...`. |\n| `fr_get_convention(convention_id)` | A collective labour agreement text by `KALITEXT...` id. Returns metadata + a table of contents whose `KALIARTI...` ids resolve via `fr_get_text`. |\n| `fr_get_company_agreement(agreement_id)` | A company-level agreement by `ACCOTEXT...` id - **metadata only** (company, SIRET, IDCC, sector, themes, unions, dates). Legifrance ships the full ACCO text only as a `.docx` attachment, so the tool cites `source_url` instead of re-serving it. |\n\n### Fonds covered (live totals, sandbox, 2026-07-08)\n\n| Fond | Corpus | Verified total |\n| --- | --- | --- |\n| `CNIL` | CNIL deliberations | \u003e= 26 759 (`totalResultNumber` on a broad stopword query) |\n| `KALI` | Collective labour agreements (conventions collectives) | \u003e= 35 790 |\n| `ACCO` | Company-level agreements | \u003e= 387 656 |\n\n### Jurisdictions covered\n\n| Fond | Court(s) | Id prefix | Native ECLI |\n| --- | --- | --- | --- |\n| `JURI` | Cour de cassation, cours d'appel | `JURITEXT...` | Yes |\n| `CONSTIT` | Conseil constitutionnel (QPC + DC decisions, ~7 400+ live on PISTE) | `CONSTEXT...` | Yes (`ECLI:FR:CC:...`) |\n| `CETAT` | Conseil d'Etat, cours administratives d'appel (CAA), tribunaux administratifs (TA) | `CETATEXT...` | Yes for Conseil d'Etat; frequently `null` for CAA/TA (uneven ECLI coverage upstream - never fabricated) |\n\nConseil constitutionnel decisions get the French citation convention: `Cons. const., decision n°\n2025-1173 QPC du 7 novembre 2025 - [case name]`. JURI/CETAT decisions cite the Legifrance `titre`\n(court, formation, date, dossier number) verbatim.\n\n\u003e **Judilibre** (`api.piste.gouv.fr/cassation/judilibre`) was evaluated as an alternative Cour de\n\u003e cassation source but requires its own PISTE API subscription beyond the Legifrance one already\n\u003e held by this connector. Re-verified 2026-07-08: a valid Legifrance token (granted scope\n\u003e `openid resource.READ`) gets `403` on the sandbox host for every endpoint and auth shape tried\n\u003e (`Bearer`, `KeyId`, no-auth -\u003e `400`), and the sandbox application is rejected outright by the\n\u003e production OAuth endpoint (`invalid_client`). Subscribing the Judilibre API to the PISTE\n\u003e application is a dashboard action outside this connector. Not integrated - `JURI` already covers\n\u003e Cour de cassation case law through the existing Legifrance subscription.\n\n### A note on ELI vs ECLI\n\nFrance has an official ELI scheme, but the PISTE `lf-engine-app` **consult API returns the native\nELI field `null` for the legislation we tested**. Following this line's rule - *say what you do not\nhave, never fabricate an ELI* - `eli_uri` carries the **stable, resolvable Legifrance resource URL**\n(CID-keyed), not a `/eli/...` string parsed from prose. Each response repeats this in `eli_note`.\n\nCase law is different: the API returns a **native, authoritative ECLI** for Cour de cassation (e.g.\n`ECLI:FR:CCASS:2025:C100399`), Conseil constitutionnel (e.g. `ECLI:FR:CC:2025:2025.1173.QPC`) and\nConseil d'Etat (e.g. `ECLI:FR:CECHR:2026:506507.20260529`), surfaced verbatim in `fr_get_decision`.\nCAA/TA decisions under `CETAT` frequently have no ECLI - the field is `null`, never fabricated.\n\n## Configuration\n\nLegifrance requires OAuth2 application credentials from a free PISTE account\n(`piste.gouv.fr` → *Applications* → subscribe to the Legifrance API → *OAuth Credentials*).\nCredentials are read from the environment only:\n\n| Variable | Meaning |\n| --- | --- |\n| `FR_ELI_OAUTH_URL` | OAuth token endpoint (sandbox default shown in `.mcp.json.example`). |\n| `FR_ELI_BASE_URL` | Legifrance `lf-engine-app` base. |\n| `FR_ELI_CLIENT_ID` | Your PISTE application client id (**required**). |\n| `FR_ELI_CLIENT_SECRET` | Your PISTE application client secret (**required**). |\n| `FR_ELI_CACHE_DIR` | Disk cache dir (default `~/.matematic/cache/fr-eli`). |\n| `FR_ELI_AUDIT_DIR` | Audit log dir (default `~/.matematic/audit`). |\n\nCopy `.mcp.json.example` to `.mcp.json` (gitignored) and fill in your credentials, or set the\nvariables in your host environment. The OAuth token is cached in memory and refreshed automatically.\n\n## Install\n\n```bash\npy -3.13 -m venv .venv\n.\\.venv\\Scripts\\python.exe -m pip install -e \".[dev]\"   # Windows\n# or: python -m pip install -e \".[dev]\"                  # POSIX\n```\n\n## Tests\n\n```bash\npytest tests/test_instructions_drift.py tests/test_parse.py   # offline, no creds\npytest tests/test_smoke.py -v                                 # live, needs PISTE creds in .env\n```\n\n## Distribution\n\nBecause Legifrance requires a PISTE key, this connector is distributed through the **PATRON /\nappliance** channel (governed), not casual drop-in download. See the eu-legal-mcp line notes.\n\n## Licence\n\nApache-2.0. Legifrance content is © the French Republic / DILA and subject to the Legifrance /\nPISTE terms of use; this software only retrieves and cites it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Ffr-eli-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatematicsolutions%2Ffr-eli-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Ffr-eli-mcp/lists"}