Skip to main content
Glama

BOE-MCP. MCP Integration with the BOE API

es en

DESCRIPTION

BOE is the Official State Gazette of Spain.

Boe-mcp enables querying consolidated legislation, BOE/BORME summaries, and legal reference data directly through Claude AI and other MCP-compatible clients using the Model Context Protocol (MCP).

Boe-mcp is an MCP server that exposes tools for LLMs to access:

  • Consolidated legislation of the Spanish legal system

  • Daily BOE and BORME summaries

  • Auxiliary tables for legal domains, jurisdictions, and government departments

Related MCP server: BOE & EUR-Lex MCP Server

KEY FEATURES

  • Advanced search of consolidated legislation with date, jurisdiction, and validity filters

  • Full legal text retrieval in XML/JSON formats

  • Historical BOE and BORME summary queries

  • Access to legal reference tables (domains, departments, legal relationships)

  • Block-level navigation of legal texts

  • Automatic consolidation status validation

INSTALLATION

Install with uv

Prerequisites

  • Python 3.10 or higher.

  • uv package manager.

Installing uv

The first step is to install uv, a package manager for Python.
It can be installed from the command line.

On macOS and Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

You can also install it with pip:

pip install uv

For more information about installing uv, visit the uv documentation.

INTEGRATION WITH CLIENTS LIKE CLAUDE FOR DESKTOP

  1. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json.

  2. Add this configuration block under "mcpServers":

"boe_mcp": {
    "command": "uvx",
    "args": [
        "boe_mcp"
    ]
}
  1. If you have other MCP servers configured, separate them with commas ,.

USAGE EXAMPLES

Once configured, you can make queries like:

  • "List current state laws on data protection"

  • "Show the BOE summary for June 14, 2024"

  • "Display the BOE legal domains table"

Available Tools

5 tools
get_auxiliary_tableA

Consultar tablas auxiliares disponibles en la API del BOE. Dichas tabls incluyem los códigos de materias, ámbitos, estados de consolidación, departamentos, rangos y relaciones. Estos códigos se pueden usar para usar en las queries de la función search_consolidated_laws_list

Args: table_name: Una de las siguientes: 'materias', 'ambitos', 'estados-consolidacion', 'departamentos', 'rangos', 'relaciones-anteriores', 'relaciones-posteriores'

Inputs: table_name (required).

get_boe_summaryA

Obtener sumario del BOE para una fecha (AAAAMMDD).

Args: fecha: Fecha del BOE (ej: 20240501)

Inputs: params (required).

get_borme_summaryA

Obtener sumario del BORME para una fecha (AAAAMMDD).

Args: fecha: Fecha del BORME (ej: 20240501)

Inputs: fecha (required).

get_law_sectionA

Recupera una parte específica de una norma consolidada del BOE.

Args: identifier: ID de la norma (ej. "BOE-A-2023-893"). section: Parte de la norma a obtener: - "completa": Toda la norma - "metadatos": Solo metadatos - "analisis": Datos analíticos (materias, referencias) - "metadata-eli": Metadatos ELI - "texto": Texto completo consolidado - "indice": Índice de bloques - "bloque": Un bloque específico (requiere block_id) block_id: Solo requerido si section="bloque" format: Formato de respuesta (xml o json, si disponible)

Returns: Contenido de la norma o parte solicitada (como string XML o JSON).

Inputs: section (required), block_id (required), identifier (required), format.

search_laws_listA

Búsqueda avanzada de normas del BOE.

Args: -from_date: Fecha mínima (AAAAMMDD). -to_date: Fecha máxima (AAAAMMDD). -offset: Índice inicial. Es obligatorio incluírlo en la llamada a la función. -limit: Máximo de resultados (-1 para todos).

-query_value: Texto libre. Usar preferentemente palabras, no frases.

-search_in_title_only: True para buscar solo en el título (True por defecto).
-solo_vigente: True para buscar solamente normas vigentes (True por defecto).
-solo_consolidada: true para buscar solamente normas consolidadas (False por defecto).

-ambito: Filtra por ámbito ('Estatal', 'Autonómico', 'Europeo').
-must: Condiciones que deben cumplirse (and).
-should: Condiciones opcionales (or).
-must_not: Condiciones excluidas (not).
-range_filters: Filtros por fechas.
-sort_by: Ordenamiento personalizado.

Inputs: must, limit, ambito, offset, +10 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: searching norms, retrieving norm sections, getting daily summaries for BOE and BORME, and accessing auxiliary tables. No two tools overlap in functionality, and the summary tools are differentiated by the source bulletin.

    Naming Consistency4/5

    Four tools follow a consistent 'get_' prefix pattern (get_law_section, get_boe_summary, get_borme_summary, get_auxiliary_table), while search_laws_list deviates with 'search_'. Names are otherwise readable and predictable, but the single deviation and a cross-reference typo ('search_consolidated_laws_list' vs 'search_laws_list') prevent a perfect score.

    Tool Count5/5

    With 5 tools, the server is well-scoped for its purpose of accessing BOE legal data. Each tool covers a distinct aspect (search, retrieval, summaries, auxiliary tables) without redundancy or excessive granularity.

    Completeness5/5

    The tool surface covers the core workflow for legal research: searching norms, retrieving full texts or specific sections, browsing daily summaries, and using controlled vocabularies for precise queries. There are no obvious dead ends or missing operations for typical use cases.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables querying Spanish legislation (BOE) and EU law integration through MCP, providing full-text search, citation validation, and cross-referencing capabilities.
      50 npm
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search Spain's consolidated legislation by title, inspect any statute's metadata and article table of contents, and read every historical version of a chosen article. Also retrieves the daily table of contents of the Spanish state gazette, grouped by section and issuing department, via the Agencia Estatal Boletín Oficial del Estado open-data API.
      270 npm
      MIT