es-legal-mcp
Click on "Deploy 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., "@es-legal-mcp Search Spanish Supreme Court rulings on rental contracts from 2024"
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.
Spain Legal Research MCP Server (es-legal-mcp)
Español | English Documentation
Servidor MCP de Legislación y Jurisprudencia (es-legal-mcp) — Español
Acerca de este repositorio
Este repositorio proporciona un servidor Model Context Protocol (MCP) que conecta su asistente de IA (Claude Desktop, Cursor, Windsurf, VS Code / Copilot, Cline, Continue.dev o Antigravity) directamente con los portales legislativos oficiales y las bases de datos judiciales para Spain (primera instancia, tribunales superiores / apelación y tribunales supremos o constitucionales).
Instalación rápida (Selección de aplicación de IA)
Descarga: Haga clic en
<> Code->Download ZIPy descomprima la carpeta en su equipo.Ejecución: Haga doble clic en
Click_Here_To_Install_Windows.bat(Windows) oClick_Here_To_Install_Mac.command(macOS).Selección de cliente IA: Marque las aplicaciones de IA que utilice (Claude, Cursor, Windsurf, VS Code, Antigravity), pulse instalar y reinicie su aplicación de IA.
Nota de seguridad: El instalador opera en modo de solo lectura y no accede ni modifica sus archivos personales.
Jerarquía judicial y fuentes oficiales
Instancia judicial | Órganos jurisdiccionales cubiertos |
Primera instancia | Juzgados de Primera Instancia e Instrucción, Juzgados de lo Mercantil, de lo Penal, de lo Social & de lo Contencioso-Administrativo |
Segunda instancia (Apelación y Tribunales Superiores) | 50 Audiencias Provinciales, 17 Tribunales Superiores de Justicia (TSJ of Autonomous Communities) & Audiencia Nacional (AN) |
Tribunales Supremos y Constitucionales | Tribunal Supremo (TS) & Tribunal Constitucional de España (TC) |
BOE Datos Abiertos REST API (boe.es/datosabiertos): https://www.boe.es (
boe.es,congreso.es)CENDOJ (Centro de Documentación Judicial — TS, AN, 17 TSJ, 50 Audiencias Provinciales & Juzgados): https://www.poderjudicial.es/search/indexAN.jsp (
poderjudicial.es,tribunalconstitucional.es,boe.es)
Related MCP server: Consulta Boletines Oficiales - Legislación consolidada
English Documentation
Model Context Protocol (MCP) server providing live, read-only access to Spain (ES) legislation, official gazettes, multi-tier judicial decisions (First Instance, Regional/Cantonal/Appellate, and Supreme/Constitutional courts, including HTML and PDF full-text extraction), and statutory citation verification across all major AI clients (ChatGPT Desktop, OpenAI Codex CLI, Claude Desktop, Claude Code CLI, Cursor, Windsurf, VS Code / GitHub Copilot / Cline / Roo Code, Google Antigravity / Gemini CLI, Perplexity, and Continue.dev).
Interactive Desktop Setup (Select Your AI Assistant)
This package includes a graphical installer for legal practitioners and non-technical users that lets you select which AI application(s) you use:
Download: Click
<> Codeat the top right of this repository, selectDownload ZIP, and extract the folder to your computer.Run the Setup Utility:
Windows: Double-click
Click_Here_To_Install_Windows.batmacOS: Double-click
Click_Here_To_Install_Mac.command
Select Your AI Client(s) & Connect: Check the box(es) for the AI assistant(s) installed on your computer (ChatGPT Desktop & OpenAI Codex CLI, Claude Desktop & Claude Code CLI, Cursor, Windsurf, VS Code / GitHub Copilot / Cline / Roo Code, Google Antigravity / Gemini CLI, or Perplexity / Continue.dev), click Install to Selected AI Clients, and restart your selected AI application.
System Integrity Note: The setup utility operates strictly in read-only mode with respect to your personal files and documents. It installs an isolated Python runtime inside the extracted folder and registers the server entry only in the AI client configuration files you select.
Multi-Tier Judicial Hierarchy & Live Indexed National Archives
This server performs live queries across the full judicial hierarchy and official legal archives of Spain, extracting full text from both HTML pages and official court/gazette PDF judgments:
Judicial Tier | Covered Courts & Tribunals |
Tier 1 — First Instance | Juzgados de Primera Instancia e Instrucción, Juzgados de lo Mercantil, de lo Penal, de lo Social & de lo Contencioso-Administrativo |
Tier 2 — Regional / Cantonal / Appellate | 50 Audiencias Provinciales, 17 Tribunales Superiores de Justicia (TSJ of Autonomous Communities) & Audiencia Nacional (AN) |
Tier 3 — Supreme & Constitutional | Tribunal Supremo (TS) & Tribunal Constitucional de España (TC) |
Official Portals & Live Indexed Domains
National Legislation & Official Gazette: BOE Datos Abiertos REST API (boe.es/datosabiertos) — https://www.boe.es
Indexed Legislation Domains:
boe.es,congreso.es
Court Decisions & Jurisprudence Archives: CENDOJ (Centro de Documentación Judicial — TS, AN, 17 TSJ, 50 Audiencias Provinciales & Juzgados) — https://www.poderjudicial.es/search/indexAN.jsp
Indexed Judicial & Open Case Law Domains:
poderjudicial.es,tribunalconstitucional.es,boe.es
Available MCP Tools
Tool | Description |
| Searches enacted statutes, codes, decrees, and official gazette publications in Spain. |
| Searches national jurisprudence and open judicial archives for Spain. |
| Filters case law specifically by judicial instance ( |
| Returns the complete 3-tier court structure and supported regional court filters for Spain. |
| Retrieves full statutory or judicial texts (both HTML and official |
| Validates statutory and case law citations against official registries. |
{
"mcpServers": {
"es-legal-mcp": {
"command": "uvx",
"args": [
"--from",
"https://github.com/jurisatlas/es-legal-mcp/archive/refs/heads/main.zip",
"es-legal-mcp"
]
}
}
}Available Tools
6 toolsget_legal_document_markdownGet Legal Document MarkdownB
Retrieve full Markdown text of a legislation document or court judgment (HTML or PDF) from Spain (ES) by its URL or official identifier.
Inputs: document_id_or_url (required), page. Returns: object
list_court_hierarchyList Court HierarchyA
Return the complete step-by-step multi-tier judicial hierarchy for Spain (ES): Tier 1 (First Instance / Trial / Municipal / District Courts), Tier 2 (Regional / Cantonal / County / Appellate Courts), Tier 3 (Supreme / Cassation / Constitutional Courts), and all official court sub-portals.
Inputs: no named parameters. Returns: object
search_case_lawSearch Case LawA
Search Spain (ES) court decisions and binding precedents via CENDOJ (Poder Judicial) & Tribunal Constitucional / ECLI Spain and open national judicial archives (Supported courts: Tribunal Supremo, Tribunal Constitucional, Audiencia Nacional, TSJ).
Inputs: query (required), court, limit. Returns: object
search_legislationSearch LegislationA
Search Spain (ES) national legislation (statutes, acts, codes, regulations, official gazette) via BOE Datos Abiertos REST API (boe.es/datosabiertos) and live national legal archives.
Inputs: query (required), year, limit. Returns: object
search_tiered_court_decisionsSearch Tiered Court DecisionsA
Search court decisions in Spain (ES) filtered by specific judicial tier or regional/cantonal/appellate court. Supports Tier 1 (first_instance), Tier 2 (appellate_regional — including Cantonal/Regional/County/Circuit courts), and Tier 3 (supreme_constitutional), or a specific sub-portal key from list_court_hierarchy.
Inputs: query (required), tier, limit, sub_court. Returns: object
verify_citationVerify CitationA
No-Hallucination Citation Verifier for Spain (ES). Validates format and live existence of legal citations (e.g., 'ECLI:ES:TS:2024:150 or BOE-A-2024-1234') against official Spain and ECLI/ELI registries to prevent AI-hallucinated citations.
Inputs: citation (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action+resource: verify a citation, search legislation, search case law, retrieve full text, list the hierarchy, and search by judicial tier. The main risk is overlap between search_case_law and search_tiered_court_decisions, but the tier-filter distinction in the descriptions makes the boundary workable.
All six tools use a consistent snake_case verb_noun pattern (verify_citation, search_legislation, search_case_law, get_legal_document_markdown, list_court_hierarchy, search_tiered_court_decisions). No mixed conventions or camelCase deviations.
Six tools is well within the ideal 3-15 range for a legal research server. Each tool covers a distinct capability (verify, search, retrieve, navigate hierarchy) with no filler.
The surface covers citation verification, legislation search, case law search, full-text retrieval, and court hierarchy navigation, forming a coherent research lifecycle. Minor gaps exist—no reverse citation graph or citator to see what cites a given document—but the core workflows are achievable.
Maintenance
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Search and cite official European legislation and court decisions, by article. Read-only.
Search laws, gazettes and case law from Argentina, Brazil, Chile and Mexico. Read-only; API key.
Busca jurisprudencia española desde Claude, ChatGPT y otros clientes MCP. Localiza resoluciones, consulta sus fundamentos y el fallo cuando estén disponibles y comprueba los pasajes con enlaces a las fuentes oficiales para preparar tu investigación jurídica. Conecta tu cuenta mediante OAuth o utiliza una clave API. Los resúmenes se distinguen del texto íntegro; la cobertura es progresiva y no exhaustiva.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables querying Spanish legislation (BOE) and EU law integration through MCP, providing full-text search, citation validation, and cross-referencing capabilities.56 npm2Apache 2.0
- AlicenseAqualityBmaintenanceEnables Claude Desktop users to search and read consolidated Spanish legislation, Constitutional Court rulings, BORME company announcements, and Basque BOPV regulations, and to verify legal citations against official open-data sources.221AGPL 3.0
- AlicenseAqualityBmaintenanceEnables read-only search and retrieval of Belgian legislation and multi-tier court decisions, filtering case law by judicial instance, converting legal texts to Markdown, and verifying statutory and case-law citations against official registries.6MIT
- AlicenseAqualityBmaintenanceEnables read-only access to national legislation, multi-tier court decisions, and citation verification against official registries, including full-text retrieval in Markdown.6MIT