MCP server for the Spanish BOE open-data API (boe.es) — ground consolidated legislation by id/ELI with verifiable citations.
Project description
es-eli-mcp
An MCP server for the Spanish BOE (Boletin Oficial del Estado) open-data API. It grounds Spanish consolidated legislation: given a BOE id or a date in the official gazette, it returns metadata, structure and full consolidated text, with verifiable ELI identifiers and Spanish citations.
Part of the MateMatic eu-legal-mcp production line - after PL, DE and AT. Same citation
contract, BOE source.
No free-text search. The BOE open-data keyword-search endpoint (
/legislacion-consolidada) currently returns a server-side error, so this connector is grounding + gazette-browse, not keyword search. Discover documents viaes_browse_gazette(by date) or use a known BOE id / ELI. Every response carries adataset_note.Licence. Spanish BOE content is official public information published as open data; reuse presumes acceptance of the BOE reuse conditions. This connector relays that public content with attribution and a
source_url.
The tools
| Tool | What it does |
|---|---|
es_browse_gazette |
List documents published in the BOE on a date (YYYYMMDD) - discovery. |
es_get_act |
Metadata for a BOE id (eli_uri, official titulo, source). |
es_get_index |
The block index (articles, titles) of a consolidated law. |
es_get_text |
Consolidated text (XML), whole or by block. |
Every response carries the contract: eli_uri (a full ELI URL, e.g.
https://www.boe.es/eli/es/lo/2018/12/05/3), human_readable_citation (the official
titulo), and source_url.
Install
cd es-eli-mcp
pip install -e .
Configure (Claude Code / any MCP client)
{
"mcpServers": {
"es-eli-mcp": { "command": "es-eli-mcp" }
}
}
Environment:
ES_ELI_BASE_URL- defaulthttps://www.boe.es/datosabiertos/apiES_ELI_CACHE_DIR- default~/.matematic/cache/es-eliES_ELI_AUDIT_DIR- default~/.matematic/audit
No API key. BOE open data is keyless.
Governance
- Public data only - read-only against BOE; no client data leaves the machine.
- Audit log - every tool call appends one JSON line to
~/.matematic/audit/es-eli-mcp.jsonl. - Vendor-neutral - talks only to
boe.es; no LLM provider, no telemetry. - Verifiable citations - every response is independently checkable via
source_url.
See CONSTITUTION.md and DISCOVERY.md.
Tests
pip install -e ".[dev]"
pytest tests/test_instructions_drift.py -v # offline
pytest tests/test_smoke.py -v # hits live BOE
Licence
Apache-2.0. © Matematic Solutions / Wieslaw Mazur.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file es_eli_mcp-0.1.0.tar.gz.
File metadata
- Download URL: es_eli_mcp-0.1.0.tar.gz
- Upload date:
- Size: 31.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5422ac51151cba601b89f6139da23bf2e0c3b534501302460e24eb7cb56ac92c
|
|
| MD5 |
67fb4280af17eff8c28abb44d285ed11
|
|
| BLAKE2b-256 |
2d253ad9e66528879be28386fbfe90799f0de9a3bfca394253757abdd7ba16f2
|
Provenance
The following attestation bundles were made for es_eli_mcp-0.1.0.tar.gz:
Publisher:
release.yml on matematicsolutions/es-eli-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
es_eli_mcp-0.1.0.tar.gz -
Subject digest:
5422ac51151cba601b89f6139da23bf2e0c3b534501302460e24eb7cb56ac92c - Sigstore transparency entry: 1949915743
- Sigstore integration time:
-
Permalink:
matematicsolutions/es-eli-mcp@178f8b5a9bc6e2ca525f13fda08f7bf3e5e944f5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/matematicsolutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@178f8b5a9bc6e2ca525f13fda08f7bf3e5e944f5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file es_eli_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: es_eli_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cef75bdde9967956c45ce116f9868309aafbdb3409aee54df4d081de0a12014
|
|
| MD5 |
ec1ddf9047f657687c6f7d4010a37c1a
|
|
| BLAKE2b-256 |
552edcd7add10c0bd101ec79e4a7759034efefa64aa9f48945b1cc8dab4b34c1
|
Provenance
The following attestation bundles were made for es_eli_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on matematicsolutions/es-eli-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
es_eli_mcp-0.1.0-py3-none-any.whl -
Subject digest:
0cef75bdde9967956c45ce116f9868309aafbdb3409aee54df4d081de0a12014 - Sigstore transparency entry: 1949915885
- Sigstore integration time:
-
Permalink:
matematicsolutions/es-eli-mcp@178f8b5a9bc6e2ca525f13fda08f7bf3e5e944f5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/matematicsolutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@178f8b5a9bc6e2ca525f13fda08f7bf3e5e944f5 -
Trigger Event:
push
-
Statement type: