Skip to main content
Glama
slapash

JurisCassation MCP Server

by slapash

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.py

APIエンドポイント

エンドポイント

説明

GET /graphql

GraphQLプレイグラウンド(対話型)

POST /graphql

GraphQL API

GET /api/pdf/{encrypted_id}

判決PDFのダウンロード(プロキシ経由 + キャッシュ)

GET /api/stats

ローカルインデックス統計

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) は数値の idArretCassation IDを返しますが、暗号化されたIDは返しません。

  • PDFは /Decisions/GetArret?encryptedId=... 経由でダウンロードされます(認証不要)。

  • アラビア語検索で Sujet が空の場合、結果は0件になります。ワイルドカードとして ا (alef) を使用しています。

  • アップストリームサイトのSSL証明書に不備があるため、verify=False が必要です。

環境変数

変数

デフォルト

説明

JURIS_DB

/data/decisions.db

SQLiteデータベースパス

JURIS_PDF_CACHE

/data/pdfs

PDFキャッシュディレクトリ

JURIS_CONCURRENCY

3

最大同時スクレイピングリクエスト数

JURIS_DELAY

0.5

スクレイピングページ間の遅延(秒)

MCPサーバー

MCP(Model Context Protocol)サーバーは、すべてのAPI機能をポート5098のSSE経由でAIエージェントツールとして公開します。

MCPエンドポイント: http://localhost:5098/sse

ツール

ツール

説明

search_decisions

juriscassation.cspj.ma に対するライブ検索

search_local

ローカルSQLiteインデックスに対するFTS5検索

get_decision_pdf

暗号化されたIDによる判決PDFの確認/ダウンロード

list_chambers

インデックス数を含む7つの法廷(部)のリスト

scrape_chamber

法廷(部)の判決をインデックス化

get_stats

ローカルインデックス統計

リソース

URI

説明

juriscassation://chambers

法廷(部)参照リスト (AR/FR/EN)

juriscassation://stats

現在のインデックス統計

MCP環境変数

変数

デフォルト

説明

JURIS_API_BASE

http://localhost:5091

GraphQL APIベースURL

JURIS_DB

/mnt/data/juriscassation/decisions.db

SQLiteパス(直接検索用)

MCP_PORT

5098

MCPサーバーポート

MCP_HOST

0.0.0.0

MCPサーバーバインドホスト

MCP_TRANSPORT

sse

トランスポートタイプ (sse または streamable-http)

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にマッピングされています。

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Real-time Amazon, WIPO & PACER data for AI agents — 19 tools via the MCP protocol.

  • The best web search for your AI Agent

  • Web search, page extraction and structured commerce, social and business data for AI agents

View all MCP Connectors

Latest Blog Posts

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/slapash/juriscassation-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server