JurisCassation MCP Server
JurisCassation API
juriscassation.cspj.ma(モロッコ破棄院判決ポータル)用のGraphQL + RESTラッパーです。
機能
ライブ検索 — アラビア語検索エンドポイントへのリアルタイムパススルー
ローカル検索 — スクレイピングされた判決に対するSQLite FTS5全文検索
GraphQL API — 型安全なクエリとミューテーション
PDFプロキシ — 暗号化されたIDによる判決PDFのキャッシュと提供
バックグラウンドスクレイパー — すべての判決をローカルのSQLiteにインデックス化
Related MCP server: Entscheidsuche MCP Server
クイックスタート
# Docker (GraphQL API on port 5091)
docker compose up -d
# Or direct
pip install -r requirements.txt
python app.py serve --port 8000
# MCP Server (port 5098, SSE transport)
# Via systemd:
sudo systemctl start juriscassation-mcp
# Or direct:
JURIS_API_BASE=http://localhost:5091 python mcp_server.pyAPIエンドポイント
エンドポイント | 説明 |
| GraphQLプレイグラウンド(対話型) |
| GraphQL API |
| 判決PDFのダウンロード(プロキシ経由 + キャッシュ) |
| ローカルインデックス統計 |
GraphQLスキーマ
クエリ
# Live search against the Moroccan portal (real-time)
query {
searchLive(chamberId: 1, sujet: "طلاق", lang: "ar", page: 1) {
total
page
perPage
items {
encryptedId
dossierNumber
decisionNumber
decisionDate
keywordsAr
pdfUrl
}
}
}
# Search the local SQLite index
query {
searchLocal(query: "طلاق", chamberId: 1, page: 1, perPage: 20) {
total
page
perPage
items {
id
encryptedId
dossierNumber
decisionNumber
decisionDate
keywordsAr
pdfUrl
}
}
}
# List chambers with decision counts
query {
chambers {
id
nameAr
nameFr
nameEn
decisionCount
}
}
# Scraper/indexer status
query {
scraperStatus {
totalDecisions
lastScrape
chambers { id nameFr decisionCount }
}
}ミューテーション
# Scrape decisions from a chamber (Arabic endpoint with alef wildcard)
mutation {
scrapeChamber(chamberId: 1, maxPages: 5)
}
# Scrape all pages
mutation {
scrapeChamber(chamberId: 1, maxPages: 0)
}法廷(部)
ID | アラビア語 | フランス語 | 英語 |
1 | الغرفة المدنية | Chambre Civile | Civil |
2 | غرفة الأحوال الشخصية و الميراث | Statut Personnel & Successions | Personal Status & Inheritance |
3 | الغرفة التجارية | Chambre Commerciale | Commercial |
4 | الغرفة الإدارية | Chambre Administrative | Administrative |
5 | الغرفة الاجتماعية | Chambre Sociale | Social |
6 | الغرفة الجنائية | Chambre Pénale | Criminal |
7 | الغرفة العقارية | Chambre Immobilière | Real Estate |
CLIスクレイパー
# Scrape chamber 1 (all pages)
python app.py scrape --chamber 1
# Scrape all chambers, max 50 pages each
python app.py scrape --chamber 0 --max-pages 50
# Scrape from page 100 onwards
python app.py scrape --chamber 6 --since-page 100アーキテクチャに関する注意点
アラビア語エンドポイント (
/Decisions/RechercheDecisionsRes) は、PDFダウンロードに必要な暗号化されたdata-id属性を返します。フランス語エンドポイント (
/Decisions/RechercheDecisionsResFr) は数値のidArretCassationIDを返しますが、暗号化されたIDは返しません。PDFは
/Decisions/GetArret?encryptedId=...経由でダウンロードされます(認証不要)。アラビア語検索で
Sujetが空の場合、結果は0件になります。ワイルドカードとして ا (alef) を使用しています。アップストリームサイトのSSL証明書に不備があるため、
verify=Falseが必要です。
環境変数
変数 | デフォルト | 説明 |
|
| SQLiteデータベースパス |
|
| PDFキャッシュディレクトリ |
|
| 最大同時スクレイピングリクエスト数 |
|
| スクレイピングページ間の遅延(秒) |
MCPサーバー
MCP(Model Context Protocol)サーバーは、すべてのAPI機能をポート5098のSSE経由でAIエージェントツールとして公開します。
MCPエンドポイント: http://localhost:5098/sse
ツール
ツール | 説明 |
| juriscassation.cspj.ma に対するライブ検索 |
| ローカルSQLiteインデックスに対するFTS5検索 |
| 暗号化されたIDによる判決PDFの確認/ダウンロード |
| インデックス数を含む7つの法廷(部)のリスト |
| 法廷(部)の判決をインデックス化 |
| ローカルインデックス統計 |
リソース
URI | 説明 |
| 法廷(部)参照リスト (AR/FR/EN) |
| 現在のインデックス統計 |
MCP環境変数
変数 | デフォルト | 説明 |
|
| GraphQL APIベースURL |
|
| SQLiteパス(直接検索用) |
|
| MCPサーバーポート |
|
| MCPサーバーバインドホスト |
|
| トランスポートタイプ ( |
mcporterによるテスト
# List tools
npx mcporter list --http-url http://localhost:5098/sse --allow-http --schema
# Search
npx mcporter call search_decisions sujet=طلاق chamber_id=1 --allow-http --http-url http://localhost:5098/sseデプロイメント
アプリはコンテナ化されており、内部ではポート8000で実行され、ホストポート5091にマッピングされています。
This server cannot be deployed
Maintenance
Related MCP Connectors
- DikeOAuthio.github.fr3on
Grounded MENA legal search, reasoning, citation resolution, and citation-graph traversal.
Resolve, search and verify legal citations against the official sources, with provenance.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
LawOracle — 20 legal AI tools: case law search, contracts, EU regulations, citation graph.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to official French legal databases (Légifrance and JudiLibre) to search and retrieve French legislation, legal codes, case law, and judicial decisions through authenticated APIs.33MIT
- AlicenseNot gradedqualityNot gradedmaintenanceProvides access to Swiss court decisions through the entscheidsuche.ch API, enabling search, retrieval, and analysis of legal documents across different cantons and courts using natural language queries.-
- AlicenseNot gradedqualityBmaintenanceEnables searching and downloading Spanish court rulings from the CENDOJ database, with automatic captcha resolution via Claude's vision, returning PDFs, full text, ECLI, and metadata.5MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.18AGPL 3.0