Legifrance
A server implementing the Model Context Protocol to allow direct access to French legal resources (laws, codes, case law) from compatible Large Language Models like Claude, enabling interactive legal research through the Legifrance API.
What is Legifrance?
Legifrance is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to server implementing the model context protocol to allow direct access to french legal resources (laws, codes, case law) from compatible large language models like claude, enabling interactive legal re...
A server implementing the Model Context Protocol to allow direct access to French legal resources (laws, codes, case law) from compatible Large Language Models like Claude, enabling interactive legal research through the Legifrance API.
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A server implementing the Model Context Protocol to allow di
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-server-legifranceConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Legifrance
The mcp-server-legifrance server bridges AI assistants to the French legal system by exposing the Legifrance database through the Model Context Protocol. It provides three specialized tools for searching legal texts (laws, ordinances, decrees), querying French legal codes such as the Code civil or Code du travail, and retrieving judicial case law — all from a single MCP interface. Legal researchers, lawyers, and developers building French-law applications can use this server to conduct interactive, sourced legal research directly from Claude without manually browsing Legifrance.
Prerequisites
- Python 3.10 or later and pip or uv installed
- Git installed to clone the repository
- A Dassignies Lab API key (DASSIGNIES_API_KEY) — obtained by registering at lab.dassignies.law
- Access to the Dassignies API endpoint (default: https://lab.dassignies.law/api/)
- An MCP client such as Claude Desktop
Register for the Dassignies Lab API key
The server proxies Legifrance through the Dassignies Lab API. Go to lab.dassignies.law, create an account, and copy your API key. The default API URL is https://lab.dassignies.law/api/ and does not need to be changed unless you host your own instance.
Install the package from GitHub
Install the MCP server directly from the GitHub repository using pip or uv. It is recommended to use a virtual environment to isolate dependencies.
python -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/pylegifrance/mcp-server-legifrance.gitSet environment variables
Export your API credentials before running the server. You can place these in a .env file or set them in your shell profile.
export DASSIGNIES_API_KEY=your_api_key_here
export DASSIGNIES_API_URL=https://lab.dassignies.law/api/Locate the installed server script path
Find the full path to the server.py entry point inside your virtual environment so you can reference it in your MCP client configuration.
find .venv -name 'server.py' | grep legifranceConfigure your MCP client
Add the server to your Claude Desktop configuration file at ~/Library/Application Support/Claude/claude_desktop_config.json, using the virtual environment's Python interpreter and the full path to server.py.
{
"mcpServers": {
"legifrance": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/mcp-server-legifrance/src/server.py"],
"env": {
"DASSIGNIES_API_KEY": "your_api_key_here",
"DASSIGNIES_API_URL": "https://lab.dassignies.law/api/"
}
}
}
}Restart Claude Desktop and test
Fully quit and reopen Claude Desktop. Try a French legal query to confirm the server responds with sourced legal content.
Legifrance Examples
Client configuration
Add this to your claude_desktop_config.json, replacing the paths and API key with your own values.
{
"mcpServers": {
"legifrance": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/mcp-server-legifrance/src/server.py"],
"env": {
"DASSIGNIES_API_KEY": "your_api_key_here",
"DASSIGNIES_API_URL": "https://lab.dassignies.law/api/"
}
}
}
}Prompts to try
Use these prompts in French or English to exercise the three legal search tools. The server supports searching legal texts, codes, and case law.
- "Recherche l'article 7 de la loi 78-17 sur l'informatique et les libertés"
- "Rédige une synthèse sur le régime juridique du PACS en citant les articles du Code civil"
- "Trouve les dernières jurisprudences de la Cour de cassation sur la rupture de relations commerciales établies"
- "What does the French Labor Code say about maximum weekly working hours?"Troubleshooting Legifrance
Authentication error: invalid API key
Verify that DASSIGNIES_API_KEY is set in the env block of your MCP config and that you copied the key correctly from lab.dassignies.law. The variable name must be exactly DASSIGNIES_API_KEY.
Module not found when Claude Desktop tries to start the server
Ensure you are pointing to the Python binary inside your virtual environment (.venv/bin/python), not the system Python. The installed package must be present in that same venv.
Search returns empty results for known French laws
Check that DASSIGNIES_API_URL is set to https://lab.dassignies.law/api/ (with trailing slash). Also confirm your account on lab.dassignies.law is active and the API quota has not been exceeded.
Frequently Asked Questions about Legifrance
What is Legifrance?
Legifrance is a Model Context Protocol (MCP) server that server implementing the model context protocol to allow direct access to french legal resources (laws, codes, case law) from compatible large language models like claude, enabling interactive legal research through the legifrance api. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Legifrance?
Follow the installation instructions on the Legifrance GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Legifrance?
Legifrance works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Legifrance free to use?
Yes, Legifrance is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Legifrance Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to Legifrance? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Legifrance in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Legifrance?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.