home / mcp / legifrance mcp server
Provides access to French legal texts, codes, and jurisprudence via the Legifrance API for MCP-compatible models.
Configuration
View docs{
"mcpServers": {
"pylegifrance-mcp-server-legifrance": {
"command": "<CHEMIN_VERS_VOTRE_REP>/mcp-server-legifrance/venv/bin/python",
"args": [
"<CHEMIN_VERS_VOTRE_REP>/mcp-server-legifrance/src/server.py"
],
"env": {
"DASSIGNIES_API_KEY": "YOUR_API_KEY",
"DASSIGNIES_API_URL": "https://lab.dassignies.law/api/"
}
}
}
}You can run an MCP server that lets compatible language models access French legal resources via Legifrance. This server exposes search and retrieval capabilities for legal texts, codes, and jurisprudence, structured for safe use with MCP-enabled models to enhance legal research workflows.
Use a compatible MCP client to connect to the legifrance MCP server. You will run the local server and configure your MCP client to invoke its tools for legal-text search, code articles, and jurisprudence queries. The server responds with structured results that you can incorporate into your modelâs reasoning and presentation.
Prerequisites: Python 3.9+, an API key for Legifrance, and a compatible MCP model.
1. Create a virtual environment and activate it.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate2. Install the MCP server package from the source repository.
pip install git+https://github.com/rdassignies/mcp-server-legifrance.git3. Create an environment file at the project root with your Legifrance API credentials.
DASSIGNIES_API_KEY=your_api_key_here
DASSIGNIES_API_URL=https://lab.dassignies.law/api/4. Start the MCP server using the confirmed runtime command. The server runs as a local stdio process that your MCP client can invoke.
The following is a concrete runtime configuration that you can provide to a compatible MCP client (for example, Claude Desktop) to connect to the Legifrance MCP server.
{
"mcpServers": {
"legifrance": {
"command": "<CHEMIN_VERS_VOTRE_REP>/mcp-server-legifrance/venv/bin/python",
"args": [
"<CHEMIN_VERS_VOTRE_REP>/mcp-server-legifrance/src/server.py"
]
}
}
}Only use the MCP server with trusted language models and ensure your API key is kept secure. Do not expose the server to untrusted clients. Each request is routed to Legifrance APIs through the server, so follow best practices for API key management and access control.
Searches within legal texts such as laws, ordinances, decrees, and orders by text identifier and keywords, with configurable search fields and result size.
Searches articles within French legal codes by terms, code name, search field, sort order, and result size, enabling code-wide insights.
Searches judicial jurisprudence, supports multi-step workflows to extract decisions, identify cited articles, and find similar rulings, with options for publication status and jurisdiction.
Predefined prompt that creates an expert legal agent which cites sources, uses relevant tools for research, provides step-by-step analyses, and includes official links to texts.