mcp-fr-legal
The mcp-fr-legal server provides offline full-text access to a French legal corpus (codes and statutes from Legifrance/DILA), enabling verbatim search, article retrieval, and citation grounding with no network calls at runtime.
fr_search: Full-text (FTS5) search across French legal provisions using keywords or phrases (e.g., 'licenciement'), with optional filtering bydocument_idand up to 25 results returned as verbatim snippets with citations.fr_article: Retrieve the complete verbatim text of a specific provision bydocument_id(e.g., 'code-travail') andprovision_ref(e.g., 'L1233-15'), with tolerance for formatting variations.fr_validate_citation: Mechanically verify whether adocument_id+provision_refexists in the corpus — a fail-closed anti-hallucination primitive returningdocument_exists,provision_exists, andin_forcestatus.fr_list_documents: Discover available legal documents (codes and statutes) with optional filtering by type or title keyword.
Every tool returns structured citations including document_id, provision_ref, Legifrance URL, source_authority (DILA), license (Etalab v2.0), snapshot date, and a staleness_advisory if applicable. All operations run fully offline against a local SQLite database — suitable for air-gapped or privacy-sensitive environments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-fr-legalShow me article 1240 of the French Civil Code"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-fr-legal
An MCP server exposing an offline corpus of French law (Legifrance / DILA, full text)
in a local SQLite FTS5 database, with tools for search and citation grounding. Snippets are
returned verbatim from the database (zero-LLM), each with a document_id, a provision_ref and a
Legifrance URL. Anti-hallucination by mechanism, not by trust in the model.
Scope: consolidated LEGI codes and statutes (Code civil, Code du travail, Code penal, Code de commerce, Code de la defense, Code de la securite interieure, ...) - 3,953 documents / 193,681 provisions in the bundled snapshot. No case law (jurisprudence) and no full JORF.
Part of the MateMatic law-connector family: mcp-saos
(PL case law), mcp-eu-compliance
(EU law), mcp-eu-sparql (live EUR-Lex).
Installation
npm install # Node 22.5+ (node:sqlite built in, FTS5)
npm run fetch-corpus # downloads database.db (~303 MB) from the DILA/Ansvar artifact (Apache-2.0 + Etalab)
npm run build
npm startAir-gapped / fully offline: point FR_LEGAL_DB at a local copy of database.db.
MCP client configuration:
{ "name": "fr-legal", "command": "node", "args": ["/path/to/mcp-fr-legal/dist/index.js"] }Related MCP server: MCP Magistrat Civil
Tools
Tool | Description |
| Full-text (FTS5) over provisions, verbatim snippets + citations. |
| Full verbatim text of a provision (tolerant |
| Grounding: whether the citation exists (fail-closed) - anti-hallucination. |
| List documents (discovery of |
Every tool returns structuredContent.citations (document_id, provision_ref, Legifrance URL,
source_authority DILA, license Etalab v2.0, snapshot, age_days, and a staleness_advisory
when the snapshot is older than the FR_STALENESS_DAYS threshold (365 by default) - provenance and
staleness modelled on russellbrenner/jurisd, Apache-2.0).
Grounding (anti-hallucination)
fr_validate_citation is a grounding primitive: it mechanically checks whether document_id + provision_ref exists in the corpus. Fail-closed - a missing document or provision yields
provision_exists=false (not "probably ok"). It plugs into
citation-grounding-pl
as the anchor resolver for French law (EXISTENCE level).
Zero-cloud / GDPR
No network calls at runtime (the database is opened read-only). Corpus bootstrap (fetch-corpus) is
the only moment a network is used. Text is returned verbatim (grounding). For currency, check
Legifrance (a snapshot is not the authoritative source - the Journal officiel is).
License and attribution
Code: MIT (MateMatic Solutions).
Corpus: the
database.dbartifact from Ansvar-Systems/French-law-mcp (Apache-2.0); the legal text is under the Licence Ouverte v2.0 (Etalab), DILA/Legifrance, commercial reuse with attribution. Full attribution: THIRD_PARTY_INSPIRATIONS.md.
Citation: MateMatic Solutions (2026), mcp-fr-legal - an offline MCP corpus of French law (Legifrance/DILA), MIT. Data: DILA, Licence Ouverte v2.0.
Available Tools
4 toolsfr_articleARead-onlyIdempotent
Pelny verbatim tekst przepisu (document_id + provision_ref, np. 'code-travail' + 'L1233-15'). provision_ref tolerancyjny ('Article L. 1233-15' == 'L1233-15'). Kody bledow: missing_arg, not_found, corpus_error.
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | ID dokumentu (np. 'code-civil', 'code-travail') | |
| provision_ref | Yes | Odwolanie do przepisu (np. 'L1233-15', '1234', 'R123-4') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and idempotentHint=true. The description adds behavioral context beyond annotations, such as tolerance in provision_ref format (e.g., 'Article L. 1233-15' equals 'L1233-15') and error codes (missing_arg, not_found, corpus_error). No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loading the main purpose and including error codes efficiently. However, it is in Polish which may reduce clarity for non-Polish agents; still, it earns its space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description states it returns the full verbatim text. It mentions error codes, which is helpful. Annotations cover safety. Additional details about return format or encoding are missing, but overall it is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes parameters. The description adds value by providing an example and explaining the tolerance behavior of provision_ref, which is not present in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the full verbatim text of a legal provision using document_id and provision_ref, with an example. This distinguishes it from sibling tools like fr_search (search) and fr_list_documents (list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives (fr_search, fr_list_documents, fr_validate_citation). The description implies usage for retrieving a specific article but does not explicitly state when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fr_list_documentsARead-onlyIdempotent
Lista dostepnych dokumentow (kody/ustawy) - discovery document_id. Opcjonalnie filtr type (np. 'statute') i query (fraza w tytule). Kody bledow: corpus_error.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filtr typu dokumentu (np. 'statute') | |
| limit | No | Liczba wynikow (1-200, domyslnie 30) | |
| query | No | Fraza w tytule/nazwie |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, non-destructive behavior. The description adds error code 'corpus_error' and clarifies the tool's discovery purpose, providing useful context beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with an additional error code note, front-loading the purpose and avoiding any extraneous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool, the description covers the core functionality and optional filters. It omits mention of pagination or the limit parameter, but these are well-defined in the schema, so the description is nearly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Parameter descriptions in the schema already cover type, limit, and query with examples and ranges. The description adds no new semantic meaning beyond what the schema provides, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists available documents (codes/laws) for discovering document IDs, distinguishing it from sibling tools like fr_article (retrieve specific article) and fr_search (full-text search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing documents to find IDs, but does not explicitly state when not to use it or mention alternatives, leaving the agent to infer from sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fr_searchARead-onlyIdempotent
Pelnotekstowo (FTS5) po przepisach prawa francuskiego (kody + ustawy LEGI). Snippety verbatim z markerami [ ]. Opcjonalny filtr documents (lista document_id, np. ['code-travail']). Zwraca structuredContent.citations. Kody bledow: missing_arg, empty_query, corpus_error.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Liczba wynikow (1-25, domyslnie 5) | |
| query | Yes | Fraza/keyword po francusku (np. 'licenciement', 'responsabilite civile') | |
| documents | No | Opcjonalny filtr document_id |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return format (snippets with markers, structuredContent.citations) and error codes, adding value beyond annotations which already indicate safe, idempotent, non-destructive behavior. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, concise sentence with key information front-loaded: search type, domain, output specifics, optional filter, and error codes. No superfluous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description adequately explains return structure (snippets, citations), error codes, and parameter options. Sibling tools provide complementary context, making this complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage; description adds a concrete example for the documents parameter and explains error codes, slightly enhancing understanding beyond the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool performs full-text search (FTS5) over French legal codes and laws, with distinct outputs like snippets and citations. It differentiates from sibling tools like fr_article and fr_list_documents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for free-text search but lacks explicit guidance on when to use this tool versus alternatives like fr_article for specific articles or fr_list_documents for document listing. No when-not scenarios mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fr_validate_citationARead-onlyIdempotent
Grounding: czy cytat (document_id + provision_ref) ISTNIEJE w korpusie (anti-halucynacja). Fail-closed: brak dokumentu/przepisu => provision_exists=false. Zwraca document_exists, provision_exists, in_force + citation. Kody bledow: missing_arg, corpus_error.
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | ID dokumentu | |
| provision_ref | Yes | Odwolanie do przepisu do weryfikacji |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and idempotentHint=true. The description adds significant context: it explains the fail-closed mechanism, lists all return fields (document_exists, provision_exists, in_force, citation), and mentions error codes ('missing_arg', 'corpus_error'). This goes beyond annotations to inform the agent about expected outputs and failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact with three sentences: purpose, fail-closed behavior, and return fields/errors. Each sentence conveys distinct information with no redundancy. The use of Polish with some English terms is slightly informal but still efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 required params, no output schema), the description covers the essential aspects: what it does, its behavior on failure, and what it returns (including error codes). It does not explain the sibling tools but that is partially covered by their names. The absence of output schema is compensated by the explicit listing of return fields.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters (document_id, provision_ref) are fully described in the input schema (100% coverage). The description's mention of them adds no new semantic details; it only restates their role in the citation check. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: grounding citations by checking if a document_id and provision_ref exist in the corpus, explicitly calling it anti-hallucination. This distinguishes it from siblings like fr_search or fr_article, which have different primary functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides fail-closed behavior (if document or provision missing, provision_exists=false) but does not explicitly guide when to use this tool versus alternatives like fr_search or fr_article. The use case of citation validation is implied but not contrasted with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: retrieving a specific article, listing available documents, full-text search, and citation validation. No overlap or ambiguity.
All tool names follow a consistent pattern with 'fr_' prefix and snake_case verbs/nouns (article, list_documents, search, validate_citation).
Four tools is well-scoped for a legal research server, covering essential operations without unnecessary complexity.
The set covers retrieval, listing, search, and validation—core operations for legal reference. No obvious missing functionality given the domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search French and European case law and French legal texts (codes, statutes, treaties).
Resolve, search and verify legal citations against the official sources, with provenance.
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to official French legal databases (Légifrance and JudiLibre) to search and retrieve French legislation, legal codes, case law, and judicial decisions through authenticated APIs.29MIT
- AlicenseNot gradedqualityDmaintenanceProvides access to French legal databases (Judilibre and Légifrance) and a structured legal reasoning skill for analyzing civil cases like a French magistrate.10MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to search and retrieve French legislation, case law, and EU law integrations from official sources via MCP.1181Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables querying and retrieving legal texts and decisions from French public APIs Légifrance and JudiLibre for legal research.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/mcp-fr-legal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server