法国法律API查询服务

Serveur MCP提供对法国公共法律API(Légifrance和JudiLibre)的查询服务,支持多条件搜索和全文检索功能。

  • by BenjoNX
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 BenjoNX/Legal

使用说明

法国法律MCP服务器

用于查询法国法律公共API的MCP(模型上下文协议)服务器: 法国 航空 和 自由司法.

基于项目 权限MCP 让-米歇尔·坦古伊。

功能

法国 航空

  • 搜索-legifrance() :所有法律基金的多标准搜索
  • 请参阅legifrance() :使用元数据恢复全文

自由司法

  • 搜索法理学JudiLibre() :使用高级过滤器搜索决策
  • 咨询师_决定_ judilibre() :检索决定的全文
  • get-taxonomie-judiLibre() :访问过滤器的有效值

先决条件

  1. Python 3.8+
  2. 跟踪帐户:注册 道路.gouv.fr
  3. 订阅Légifrance和JudiLibre API
  4. 验证使用条款

安装

# Cloner le repo
git clone <repo-url>
cd Legal

# Créer un environnement virtuel
python -m venv venv
source venv/bin/activate  # Linux/macOS

# Installer les dépendances
pip install -e ".[dev]"

# Configurer les identifiants
cp .env.example .env
# Éditer .env avec vos identifiants PISTE

配置

复印机 .env.example 朝向 .env 并输入您的跟踪ID:

PISTE_CLIENT_ID=votre_client_id
PISTE_CLIENT_SECRET=votre_client_secret

与Claude Desktop一起使用

添加到Claude桌面MCP配置:

{
  "mcpServers": {
    "droit-francais": {
      "command": "python",
      "args": ["<chemin>/droit_francais_MCP.py"]
    }
  }
}

测试

pytest test_api_legifrance.py -v -m integration
pytest test_api_judilibre.py -v -m integration

许可证

麻省理工学院许可证-版权所有(c)2025让-米歇尔·坦古伊