JurisCassation MCP Server
API de JurisCassation
Wrapper de GraphQL + REST para juriscassation.cspj.ma — el portal de decisiones del Tribunal de Casación de Marruecos.
Características
Búsqueda en vivo — paso directo en tiempo real al endpoint de búsqueda en árabe
Búsqueda local — búsqueda de texto completo FTS5 en SQLite sobre las decisiones extraídas
API GraphQL — consultas y mutaciones con seguridad de tipos
Proxy de PDF — almacena en caché y sirve los PDF de las decisiones mediante un ID cifrado
Scraper en segundo plano — indexa todas las decisiones en una base de datos SQLite local
Related MCP server: Entscheidsuche MCP Server
Inicio rápido
# 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.pyEndpoints de la API
Endpoint | Descripción |
| Entorno de pruebas de GraphQL (interactivo) |
| API GraphQL |
| Descargar PDF de la decisión (proxy + caché) |
| Estadísticas del índice local |
Esquema GraphQL
Consultas
# 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 }
}
}Mutaciones
# 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)
}Salas
ID | Árabe | Francés | Inglés |
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 |
Scraper 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 100Notas de arquitectura
El endpoint en árabe (
/Decisions/RechercheDecisionsRes) devuelve atributosdata-idcifrados necesarios para la descarga de PDFEl endpoint en francés (
/Decisions/RechercheDecisionsResFr) devuelve IDs numéricosidArretCassationpero no IDs cifradosLos PDF se descargan a través de
/Decisions/GetArret?encryptedId=...— no se requiere autenticaciónUn
Sujetvacío en la búsqueda en árabe devuelve 0 resultados; usamos ا (alef) como comodín generalEl certificado SSL en el sitio upstream está roto; se requiere
verify=False
Variables de entorno
Variable | Predeterminado | Descripción |
|
| Ruta de la base de datos SQLite |
|
| Directorio de caché de PDF |
|
| Máximo de solicitudes de scraping concurrentes |
|
| Retraso entre páginas de scraping (segundos) |
Servidor MCP
Un servidor MCP (Model Context Protocol) expone todas las funciones de la API como herramientas para agentes de IA a través de SSE en el puerto 5098.
Endpoint MCP: http://localhost:5098/sse
Herramientas
Herramienta | Descripción |
| Búsqueda en vivo en juriscassation.cspj.ma |
| Búsqueda FTS5 sobre el índice SQLite local |
| Comprobar/descargar un PDF de decisión por ID cifrado |
| Listar las 7 salas con recuentos de índice |
| Indexar decisiones de una sala |
| Estadísticas del índice local |
Recursos
URI | Descripción |
| Lista de referencia de salas (AR/FR/EN) |
| Estadísticas actuales del índice |
Variables de entorno MCP
Variable | Predeterminado | Descripción |
|
| URL base de la API GraphQL |
|
| Ruta de SQLite (para búsqueda directa) |
|
| Puerto del servidor MCP |
|
| Host de enlace del servidor MCP |
|
| Tipo de transporte ( |
Probar con 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/sseDespliegue
La aplicación está contenerizada y se ejecuta en el puerto 8000 internamente, mapeado al puerto 5091 del host.
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.
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.28MIT
- 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.4MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.16
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/slapash/juriscassation-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server