@pipeworx/fr-legifrance
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/fr-legifrance’s. Install: one-click buttons
Connect to just the @pipeworx/fr-legifrance pack
https://gateway.pipeworx.io/fr-legifrance/mcp — only @pipeworx/fr-legifrance’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 4
France’s Légifrance API via the state’s PISTE gateway — everything on that
API that @pipeworx/france-legi (consolidated codes) and
@pipeworx/fr-judilibre (Cour de cassation judicial case law) do not already
serve: the Journal officiel (JORF), collective-bargaining agreements (KALI),
Conseil d’État / administrative case law (the JADE dataset, fond CETAT),
Constitutional Council decisions (CONSTIT), and a search spanning those plus
circulaires (CIRC), company-level collective agreements (ACCO) and CNIL
decisions (CNIL).
Promoted from mcps/_incubator/ (fleet #3943) once the PISTE “pipeworx”
application’s Client ID/Secret for the “Légifrance Beta” product existed and
was wired as PLATFORM_LEGIFRANCE_KEY. The credential itself was confirmed
live before promotion (OAuth2 token exchange, /consult/ping, and a real
/list/code call all returned real data). The four tools below landed
KEY-PENDING (the bounded compromise Bruce ruled for ip-australia, fleet
#3605): PACK_SMOKE_KEY_SECRET that lets a pack be smoke-tested with its
real credential is CI-only by design (fleet #3333), so no fleet machine can
call these tools themselves pre-deploy. Their examples/output shapes are
honest, UNMEASURED documentation authored from smoke.json, not a live
smoke pass — the mandatory post-deploy reprobe (node scripts/add-pack.mjs fr-legifrance --from 8) is what actually proves them.
Tools
fr_legifrance_search(fond, query, date_start?, date_end?, page?, page_size?)— full-text search in one of JORF / KALI / CETAT / CONSTIT / CIRC / ACCO / CNIL. RefusesCODE_DATE/CODE_ETAT/LODA_DATE/LODA_ETAT(use france-legi) andJURI(use fr-judilibre) by name.fr_legifrance_text(id, fond?)— reads one full text by id, routing to the right consult endpoint from the id’s prefix (JORFTEXT…,KALITEXT…/KALIARTI…/KALICONT…,CETATEXT…,CONSTEXT…,CNILTEXT…,ACCOTEXT…). A bare numeric circulaire id needsfond:"CIRC"since it has no recognisable prefix. Refuses aJURITEXT…id (points at fr-judilibre) or aLEGITEXT…/LEGIARTI…id (points at france-legi).fr_legifrance_journal_officiel_recent(n?)— thenmost recently published Journal officiel issues (default 5, max 30), each with its id, date, JO number and contained texts.fr_legifrance_convention_collective(idcc)— resolves a collective agreement’s IDCC number to its title, scope and the KALITEXT ids of its base texts, for when you have an IDCC rather than a raw text id.
Auth
Platform key (PLATFORM_LEGIFRANCE_KEY, injected as _apiKey).
This is OAuth2 client_credentials — "client_id:client_secret" —
not the same credential shape as fr-judilibre’s single KeyId header,
and NOT the same value as PLATFORM_JUDILIBRE_KEY. The same PISTE
application can hold both (a KeyId for Judilibre and a client_id/secret for
Légifrance), but they are different credential values issued for different
API products on the PISTE developer portal, and subscribing to “Légifrance
Beta” needs its own CGU acceptance separate from Judilibre’s. Each call
exchanges the client_id/secret for a short-lived Bearer token via PISTE’s
OAuth2 client_credentials grant (scope=openid; the token endpoint lives
only in src/index.ts, CLAUDE.md 9b) and is not cached across calls,
mirroring @pipeworx/euipo’s OAuth pattern (project security policy: no
provider-pack token caching).
Data sources
- DILA, Journal officiel de la République française (JORF).
- DILA, Légifrance — conventions et accords collectifs (KALI).
- Conseil d’État, jurisprudence administrative (the JADE dataset), served through Légifrance.
- Conseil constitutionnel, décisions, served through Légifrance.
- DILA, Légifrance — circulaires et instructions; accords d’entreprise.
- CNIL, délibérations, served through Légifrance.
Routes live only in src/index.ts (CLAUDE.md 9b). Reuse: Licence Ouverte /
Open Licence 2.0, the same licence already governing @pipeworx/france-legi
and @pipeworx/fr-judilibre, plus the PISTE portal’s own terms of use and the
Légifrance-specific terms of reuse published alongside the API
(cgu-legifrance-api-vf-15-12-2022.pdf, referenced from the API’s own portal
page). Live proxy per request — no bulk mirroring.
Implementation notes
- Verified from the DILA’s own OpenAPI 3.0.1 spec (“DILA - Légifrance
Beta”, served from the PISTE API-tester page and mirrored publicly at
github.com/v3rmine/legifrance-api-swagger), not reconstructed from a
third-party wrapper. Two things the spec confirms that most third-party
wrappers get wrong:
- The
fondenum isJORF, CNIL, CETAT, JURI, CONSTIT, KALI, CODE_DATE, CODE_ETAT, LODA_DATE, LODA_ETAT, ALL, CIRC, ACCO. CETAT (Conseil d’État) is its own fond, not a filtered view of JURI. - JURI, CETAT and CONSTIT share one Elasticsearch index server-side (the
spec’s own
ElasticData.usagefield: “Consultation et recherche des fonds JURI, CETA et CONSTIT”), so/consult/jurireads aCETATEXTorCONSTEXTid exactly as it does aJURITEXTone, despite the endpoint’s summary only naming “Jurisprudence judiciaire”.
- The
fr_legifrance_search’s date filter (facette: "DATE_DECISION") is only applied for fond CETAT/CONSTIT, where it is confirmed by a published working client (sancelot/legifrance-mcpserver). For the other fonds the facette name needed for date filtering is not confirmed, so the tool returns adate_filter_notesaying the dates were ignored rather than guessing a facette that could silently filter to zero rows (docs/silent-zero-policy.md).completeness_noteon every search result:totalResultNumbercounts what that fond’s corpus has indexed, not every text/decision ever issued.- This pack landed KEY-PENDING (fleet #3943):
workers/gateway/src/tool-examples.jsonentries and output schemas were authored fromsmoke.json’s argument shapes, not measured from a live call — no fleet machine can fetchPLATFORM_LEGIFRANCE_KEYto smoke-test with it (fleet #3333). The mandatory post-deploy reprobe is what actually proves each tool. - The User-Agent sent to PISTE deliberately omits the usual
(+https://pipeworx.io)suffix other packs use — PISTE’s OAuth token endpoint rejected that exact shape; see the comment besideUAinsrc/index.ts.
Tools
- fr_legifrance_search — Full-text search across French legal sources the Légifrance API serves beyond codes and Cour de cassation case law: the Journal officiel (fond JORF), collective-bargaining agreements (KALI), Conseil d
- fr_legifrance_text — Read one full text by id from fr_legifrance_search’s results: a JORFTEXT (Journal officiel), KALITEXT/KALIARTI/KALICONT (collective agreement text/article/container), CETATEXT (Conseil d’État decision
- fr_legifrance_journal_officiel_recent — List the most recently published issues of the Journal officiel de la République française, each with its id, publication date, JO number and the texts it contains. A text id inside an issue can be re
- fr_legifrance_convention_collective — Resolve a collective-bargaining agreement by its IDCC number (e.g. “1261”) to its title, scope and the KALITEXT ids of its base texts — the entry point for KALI when you have an IDCC rather than a r
Tools
fr_legifrance_convention_collective— Resolve a collective-bargaining agreement by its IDCC number (e.g. 1261 ) to its title, scope and the KALITEXT ids of its base texts — the entry point for KALI when you have an IDCC rather than a rawfr_legifrance_journal_officiel_recent— List the most recently published issues of the Journal officiel de la République française, each with its id, publication date, JO number and the texts it contains. A text id inside an issue can be refr_legifrance_search— Full-text search across French legal sources the Légifrance API serves beyond codes and Cour de cassation case law: the Journal officiel (fond JORF), collective-bargaining agreements (KALI), Conseil dfr_legifrance_text— Read one full text by id from fr_legifrance_search's results: a JORFTEXT (Journal officiel), KALITEXT/KALIARTI/KALICONT (collective agreement text/article/container), CETATEXT (Conseil d'État decision