BOE & EUR-Lex 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., "@BOE & EUR-Lex MCP ServerBusca el artículo 15 de la Ley 28/2022 sobre nómadas digitales."
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.
🚨 La Crisis de Identidad (¿Por qué existe esto?)
Seamos brutalmente honestos: los LLMs son unos artistas a la hora de alucinar leyes. Se inventan artículos del Código Penal con la misma soltura con la que un político improvisa una promesa electoral. Suenan convincentes, tienen buena gramática y no existen.
El BOE & EUR-Lex MCP Server es el suero de la verdad que tu agente necesita. Conecta directamente a Gemini, Claude, Cursor y compañía con el Boletín Oficial del Estado y EUR-Lex (Unión Europea), las únicas fuentes que importan cuando la cosa se pone seria.
V1.2.0 "Bestia Legal" 🏛️�: Evolución proactiva. Incorpora Búsqueda Relajada (OR/Wildcard), Detector de Referencia Cruzadas automático y Análisis de Relaciones jurídicas. La IA ahora no solo lee, sino que investiga conexiones.
Related MCP server: eurlex-mcp-server
🎯 El Arte de la Query: Cómo preguntar para no fallar
No es solo qué buscas, sino cómo lo pides. Aquí tienes el manual de estilo para que tu IA sea un ninja legal:
1. 🏛️ Extracción Quirúrgica (Leyes y Artículos)
Para leyes consolidadas, sé específico con el número o el ID.
Template: "Usa el MCP para buscar la [Ley 28/2022] y dime qué dice el [Artículo 15] sobre [nómadas digitales]."
Análisis Avanzado: "Usa el artículo 1 de la [Ley Orgánica 1/2024] y dime si menciona algo sobre la '[normalización institucional]'."
2. 📋 El Modo Detective (Anuncios y Licitaciones)
Los anuncios suelen estar solo en PDF. Para que la IA "despierte" al servidor, dale contexto:
Template: "Busca el anuncio de la [AEAT] sobre [achatarramiento de barcos] que se publicó en el BOE el 19 de febrero de 2026 y léelo entero (
article: 'todo')."Resultado: Localiza el ID, descarga el PDF y extrae los datos (como los 654.000,00€ que encontramos en nuestras pruebas).
3. 📡 Vigilancia Diaria (Sumarios)
No le pidas "un resumen del BOE". Pídele que busque dentro del sumario:
Template: "Mira el sumario de hoy (
boe_get_daily_summary). Busca si hay algún [nombramiento de Director General] y, si lo hay, dame su nombre."
4. 🇪🇺 Búsqueda Internacional (EUR-Lex)
[WARNING] Acceso Restringido: Actualmente el portal EUR-Lex ha incrementado su protección anti-bots (AWS WAF), lo que puede causar fallos (
Status 202) en búsquedas automatizadas. Esta funcionalidad se mantiene como Experimental.
[IMPORTANT] La Regla de Oro: Cuando busques algo que no es una ley (anuncios, multas, nombramientos), añade siempre a tu instrucción: "Lee el texto íntegro usando article: 'todo'".
5. 🔬 Casos de Éxito: La Bestia en Acción
Caso SMI 2024: Buscamos "cuantia salario minimo profesional 2024".
Acción de la Bestia: El motor detectó 0 resultados exactos, activó el Relaxed Search, descompuso la frase y encontró el RD 142/2024.
Análisis: Automáticamente detectó que el Art. 1 mencionaba el
BOE-A-2015-11430(Estatuto Trabajadores) y ofreció el link para seguir investigando.
⚙️ Arquitectura de la "Bestia Legal"
Este servidor no es un simple script de scraping. Es un motor de inteligencia legal con fallbacks recursivos y análisis proactivo:
🏛️ Capa Legislada (API Consolidada): El carril rápido. Buscamos en la base de datos oficial de legislación consolidada. Velocidad máxima, datos estructurados. Perfecta para leyes vigentes (Código Civil, Ley de Startups, etc.).
📋 Capa Diaria (XML Nativo): Cuando el documento es reciente o no es una ley (un anuncio de ayer, un nombramiento de esta mañana), saltamos al
xml.phpoficial del boletín del día. Sin intermediarios.🦅 Capa de Rescate (Heurística de PDF): Aquí ocurre la magia real. Si el XML viene más vacío que las promesas electorales, el servidor:
📐 Calcula la ruta exacta del PDF oficial usando algoritmos de fecha e ID.
📥 Descarga el documento en memoria.
📖 Extrae el texto bruto usando
pdf-parse.🍽️ Se lo sirve a la IA en bandeja de plata.
🧠 Capa de Análisis (Novedad v1.2.0): Detecta automáticamente IDs del BOE y nombres de leyes citadas en el texto para que la IA pueda "navegar" la red legal.
🌐 Capa de Investigación Externa (Pro Plus v1.3.0): Detecta URLs externas y ofrece la herramienta
boe_follow_linkpara que el agente pueda salir del BOE y leer pliegos, bases en webs regionales o detalles técnicos en otros portales gubernamentales.
🗺️ El Diccionario de los IDs (El mapa de la jungla)
El BOE no es un libro, es una jungla organizada en secciones. Memoriza los prefijos y nunca te perderás:
BOE-A-YYYY-NNNN: Leyes, Reales Decretos y Nombramientos. (Ej: BOE-A-2024-11776).BOE-B-YYYY-NNNN: Anuncios, Licitaciones y Subastas. (Ej: BOE-B-2024-4144).BOE-S-YYYY-NNNN: Otras Notificaciones. (Multas, citaciones, etc.).
🎯 Estrategia de Búsqueda: Radar vs. Brújula
Esta sección te puede salvar de pensar que el sistema "no funciona". La clave está en elegir la herramienta correcta:
1. 🧭 La Brújula (boe_search) — Para LEYES
Úsala cuando sabes el nombre de la norma o quieres encontrar legislación consolidada.
✅ Busca la Ley de Propiedad Horizontal y dame el Artículo 9.
❌ NO la uses para buscar multas individuales o anuncios del día.
2. 📡 El Radar (boe_get_daily_summary) — Para ANUNCIOS DEL DÍA
Úsala para descubrir qué se ha publicado hoy o en una fecha concreta (multas, licitaciones, nombramientos).
✅ Mira el sumario del BOE del 19 de febrero y sácame los IDs de los anuncios de la AEAT.
Una vez tienes el ID, usa la siguiente herramienta. El Radar te descubre la presa; otra herramienta la abate.
3. 👁️ El Ojo de Sauron (boe_get_article) — Para LEER TODO
El núcleo del sistema. Una vez tienes el ID (de la Brújula, del Radar, o porque ya lo sabes), esta herramienta te devuelve el texto completo, lo que implique XML o PDF.
✅ Lee el anuncio BOE-B-2024-4144 con article: "todo".
💡 Guía de Supervivencia para Queries
Para que tu IA no se pierda, ayúdala a ser un mejor abogado:
❌ Malas Queries (Así no)
"Busca la ley de educación." — Hay 50. Gemini se agobiará y tú también.
"Dime qué dice el BOE hoy." — Como pedirle el Quijote resumido en 10 segundos.
"Busca una multa a mi nombre." — El
searchno busca multas individuales, busca leyes.
✅ Buenas Queries (Nivel Senior)
🏛️ Para Leyes: "Usa el MCP para buscar la Ley 28/2022 y dime qué dice el Artículo 15 sobre nómadas digitales."
📋 Para Anuncios con ID: "Usa el MCP para leer el anuncio BOE-B-2024-4144 (artículo 'todo'). ¿De qué ayuntamiento es y para qué proyecto están expropiando?"
📡 Para Notificaciones del Día: "Mira el sumario de hoy con
boe_get_daily_summary. Busca notificaciones de juzgados y léeme el texto de la primera que encuentres."
Cuando busques anuncios, nombramientos o cualquier cosa queno sea un artículo numerado, dile siempre a la IA: article: "todo". Eso activa el modo lectura completa y el "Modo Rescate PDF" si hace falta.
🛠️ Arsenal de Herramientas (El Maletín del Abogado)
Herramienta | Misión | Parámetros clave |
| 🧭 Brújula. Encontrar el ID de una ley (con fallback "Relajado"). |
|
| 👁️ Bisturí. Extraer texto y detectar Referencias Cruzadas. |
|
| 🔗 Linaje. Ver qué normas modifica o deroga esta ley. |
|
| 📡 Radar. Escanear sumarios de los últimos N días. |
|
| � Sumario. Ver todo lo publicado en una fecha concreta. |
|
| 🇪🇺 Pasaporte. Normativas de la Unión Europea. |
|
🚀 Instalación e Integración
1. Instalación Global (Una vez y para siempre)
npm install -g boe-eurlex-mcpO usa npx directamente en los comandos de configuración de abajo. No instala nada y siempre trae la última versión.
💎 Gemini CLI (Antigravity)
Dale superpoderes legales a tu terminal con un solo comando:
gemini mcp add boe_eurlex npx -y boe-eurlex-mcp --scope user🤖 Claude Desktop
Abre tu archivo de configuración (%APPDATA%\Claude\claude_desktop_config.json en Windows, ~/Library/Application Support/Claude/claude_desktop_config.json en Mac) y añade:
{
"mcpServers": {
"boe_eurlex": {
"command": "npx",
"args": ["-y", "boe-eurlex-mcp"]
}
}
}🌌 Antigravity / Cursor / Cline / IDEs con soporte MCP
Configura un nuevo servidor MCP en tu IDE con:
Comando:
npxArgumentos:
-y,boe-eurlex-mcp
Reglas de Oro para Agentes (Antigravity/Cursor/Cline):
Para anuncios (
BOE-B) o nombramientos (BOE-A), usa SIEMPREarticle: "todo".Si un documento no está en XML, el servidor activará el "Modo Rescate PDF" automáticamente. No interrumpas el proceso.
Usa
boe_searchpara leyes consolidadas yboe_get_daily_summarypara encontrar anuncios del día.
🔐 Garantía de Verdad (SHA-256 Anti-Alucinaciones)
Cada respuesta del servidor incluye una huella digital criptográfica SHA-256 del texto. Si alguien modifica el contenido aunque sea una coma, el hash cambia. Porque en la ley, una coma puede mandarte a prisión... o sacarte de ella.
{
"source": "BOE",
"id": "BOE-A-2024-11776",
"sha256": "a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e",
"nota": "Si el hash no coincide con el BOE oficial, alguien ha tocado el texto. (Spoiler: no hemos sido nosotros)."
}📜 Licencia
MIT. Úsalo, cámbialo, ámalo. (Pero no nos demandes si Gemini te dice que puedes aparcar en doble fila, ¡comprueba siempre la fuente oficial!).
Available Tools
4 toolsboe_get_articleB
Obtiene el texto íntegro y detecta referencias cruzadas a otros documentos del BOE.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Identificador (ej. BOE-A-1996-8930) | |
| article | Yes | Número de artículo o 'todo'/'preambulo'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It mentions getting full text and detecting cross-references but omits details on read-only nature, authentication, or response format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence that efficiently conveys the main action and additional detection feature. No fluff, but could be slightly more structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Lacks output schema and annotations. Does not explain the cross-reference detection output or provide sufficient context for an AI agent to understand the response format, making it incomplete for a specialized tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes both parameters. The description adds no parameter-specific meaning beyond what is in the schema, meeting baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the full text of a BOE article and detects cross-references, distinguishing it from siblings like boe_search (search) and boe_get_relationships (relationships).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The description implies usage for retrieving article text but does not specify scenarios or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
boe_get_relationshipsA
Analiza un documento para extraer sus relaciones jurídicas (qué leyes modifica, deroga o cuáles le afectan). Esencial para análisis profundo.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Identificador del documento (ej. BOE-A-2024-11776) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It describes the output (extracting relationships) but does not disclose any behavioral traits such as read-only nature, required permissions, or limitations. The tool's mutability is not addressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that succinctly states the tool's purpose and importance. Every word adds value, with no wasted space or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (1 parameter, no output schema) and no annotations, the description is adequate but lacks detail on the format of returned relationships and differentiation from sibling tools. It leaves some context gaps for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'id', and the schema already provides description and example. The tool description adds no extra parameter-specific information, so it meets the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool analyzes a document to extract legal relationships, specifying which laws it modifies, repeals, or affects. This verb+resource combination is specific and distinguishes it from sibling tools like boe_search or boe_get_article.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for in-depth analysis with 'Esencial para análisis profundo', but does not explicitly state when to use vs. alternatives like boe_search or boe_get_article. No exclusions or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
boe_searchB
Busca normativa en la legislación consolidada del BOE. Soporta 'búsqueda relajada' si los términos específicos no devuelven nada.
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Término de búsqueda | |
| limit | No | Número máximo de resultados |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility. It mentions relaxed search but does not disclose read-only status, authentication needs, rate limits, or error behavior. For a search tool, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences with no unnecessary words. It front-loads the primary purpose and adds key detail about relaxed search in the second sentence. Highly efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema or annotations, the description should provide more context about return format, error handling, and usage scenarios. It explains a key feature but leaves out essential completeness for practical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds the nuance of relaxed search behavior for the 'q' parameter but does not explain 'limit' usage beyond its schema description. No additional meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches consolidated legislation in the BOE (Spanish Official State Gazette). It distinguishes from siblings like boe_get_article and boe_search_recent_summaries by focusing on normative search and mentioning relaxed search capability.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use: for searching consolidated legislation, with a fallback to relaxed search if exact terms fail. However, it does not explicitly mention when not to use this tool versus siblings like boe_search_recent_summaries, providing only implicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
boe_search_recent_summariesA
Escanea exhaustivamente los sumarios de los últimos N días buscando palabras clave. Útil para encontrar anuncios ocultos.
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Número de días atrás a escanear | |
| keyword | Yes | Palabra clave a buscar en los títulos |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description mentions 'exhaustively' but provides no details on return format, pagination, rate limits, or side effects. Since annotations are absent, more behavioral context would be beneficial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise—only two sentences—with the main action in the first sentence and additional context in the second, containing no superfluous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and no output schema, the description covers the core purpose and scope adequately, though it omits details on result format or limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema coverage, the description adds no extra meaning to the parameters; the schema already documents 'days' and 'keyword' adequately, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the action (thoroughly scans), resource (summaries of the last N days), and scope (searching for keywords), distinguishing it from siblings like 'boe_search' which likely searches all documents.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It indicates usefulness for finding hidden announcements ('Útil para encontrar anuncios ocultos') but does not explicitly state when to use this tool versus alternatives like 'boe_search' or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct operation: general search, article retrieval, relationship analysis, and recent summary scanning. No functional overlap.
All tools follow a consistent 'boe_' prefix with a verb_noun pattern (e.g., boe_search, boe_get_article). No naming conflicts or style mixing.
4 tools is well-scoped for a legislative document server, covering core research needs without bloat or deficiency.
Covers searching, detailed retrieval, relationship extraction, and recent alerts. Missing EUR-Lex coverage despite server name, but for BOE alone it is reasonably complete.
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 Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
LawOracle — 20 legal AI tools: case law search, contracts, EU regulations, citation graph.
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables LLMs like Claude to query the official Spanish BOE API for consolidated legislation, daily summaries, and auxiliary government tables.3148MIT
- AlicenseAqualityAmaintenanceEnables searching and retrieving EU legal documents (regulations, directives, court decisions) via the EUR-Lex Cellar API, supporting full-text search, metadata, citations, and consolidated versions without requiring an API key.11596MIT
- AlicenseAqualityDmaintenanceEnables querying Spanish BOE consolidated legislation, daily summaries, and legal reference data through natural language using the Model Context Protocol.56MIT

LexAPI MCPofficial
AlicenseAqualityBmaintenanceEnables querying EU legal documents, case law, and citation graphs through natural language using the LexAPI.10863MIT
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/anamtb/boe-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server