Legifrance

v1.0.0Search & Data Extractionstable

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.

mcp-server-legifrancemcpai-integration
Share:
56
Stars
0
Downloads
0
Weekly
0/5

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

Search French legal resources including laws, codes, and case law. Conduct interactive legal research directly from Claude.
pylegifrance

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-server-legifrance

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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.git
3

Set 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/
4

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 legifrance
5

Configure 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/"
      }
    }
  }
}
6

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-server-legifrance": { "command": "npx", "args": ["-y", "mcp-server-legifrance"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides