Légifrance MCP Server
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., "@Légifrance MCP ServerGet Article 1104 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.
Légifrance MCP Server
フランスの法典条文を、条番号を指定して都度検索・取得できるMCPサーバー(Streamable HTTP)です。 Claude Desktopのカスタムコネクタとして登録することで、Claudeに「Code civil の第1104条を教えて」のように聞くと、 Légifrance公式API(PISTE経由)から実際の条文本文を取得して回答できるようになります。
提供するツール
get_code_article(codeName, articleNumber)codeName: 法典名。例:Code civil,Code pénal,Code du travailarticleNumber: 条番号。例:1104,L1231-1
Related MCP server: Droit Français MCP
1. ローカルでの動作確認
npm install
cp .env.example .env
# .env を編集し、PISTE_CLIENT_ID / PISTE_CLIENT_SECRET を設定
npm start起動後、http://localhost:3000/health にアクセスして ok が返れば起動成功です。
/search のレスポンス構造を必ず事前確認してください
server.js 内の searchArticleId() 関数は、/search エンドポイントのレスポンスから
条文ID(LEGIARTI)を取り出す処理が推測に基づいています。本番投入前に、必ず単体で
curl -X POST 'https://sandbox-api.piste.gouv.fr/dila/legifrance/lf-engine-app/search' \
--header 'Authorization: Bearer <取得したトークン>' \
--header 'Content-Type: application/json' \
--data-raw '{
"recherche": {
"champs": [
{"typeChamp": "NUM_ARTICLE", "criteres": [{"typeRecherche": "EXACTE", "valeur": "1104", "operateur": "ET"}], "operateur": "ET"}
],
"filtres": [{"facette": "NOM_CODE", "valeurs": ["Code civil"]}],
"pageNumber": 1, "pageSize": 5, "operateur": "ET", "sort": "PERTINENCE", "typePagination": "DEFAUT"
},
"fond": "CODE_DATE"
}'を実行し、返ってきたJSONの中でLEGIARTI IDがどのキーに入っているかを確認したうえで、
server.jsのsearchArticleId()内のパース処理(first?.titles?.[0]?.id ?? first?.idの部分)を
実際の構造に合わせて修正してください。
2. 公開サーバーへのデプロイ
Claude DesktopはAnthropicのクラウドからこのサーバーに接続するため、 パブリックインターネットからHTTPSで到達可能な場所にデプロイする必要があります (自宅Mac上でローカルに起動しただけでは動きません)。
選択肢の例:
Render / Railway / Fly.io などのPaaS(無料枠あり、Node.jsアプリを
git pushだけでデプロイ可能)自前のVPS + リバースプロキシ(nginx等)でHTTPS終端
デプロイ時は、環境変数 PISTE_ENV / PISTE_CLIENT_ID / PISTE_CLIENT_SECRET を
各サービスの環境変数設定画面から設定してください(.envファイルをそのままアップロードしない)。
デプロイ後、https://あなたのドメイン/mcp がMCPエンドポイントのURLになります。
3. Claude Desktopへの登録
Claude Desktopを開く
Settings(または Customize) → Connectors → 「Add custom connector」
サーバーURL(例:
https://あなたのドメイン/mcp)を入力して追加
登録はローカル端末ではなくClaudeアカウントに対して行われるため、 同じアカウントでログインした他のMac・Web版・モバイル版でも自動的に使えるようになります。
セキュリティ上の注意
PISTE_CLIENT_SECRETは絶対に公開リポジトリにコミットしない、チャットやログに貼らないでください。本番運用する場合は、sandbox用とは別にproduction用アプリケーションをPISTEで作成し、 対応するCGU同意・API紐付けを行ってください。
万一client_secretが漏洩した場合は、PISTE管理画面から再生成(ローテーション)してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/System09192/legifrance-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server