es-eli-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-eli-mcp get the consolidated text of BOE-A-2018-16673"
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.
es-eli-mcp
Install (one command)
As a Claude plugin (Claude Code or the desktop app, needs uv); see plugin/README.md for what it sends and stores:
/plugin marketplace add matematicsolutions/es-eli-mcp
/plugin install es-eli-mcp@es-eli-mcpPublished on PyPI + MCP Registry (io.github.matematicsolutions/es-eli-mcp). Run without cloning:
uvx es-eli-mcpConfigure your MCP client (stdio):
{ "mcpServers": { "es-eli-mcp": { "command": "uvx", "args": ["es-eli-mcp"] } } }Windows 11 with Smart App Control
Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe
and the es-eli-mcp.exe launcher that pip writes at install time. The python.exe and
py.exe from the python.org installer are signed by the Python Software
Foundation, so running the module through the interpreter works:
python -m pip install es-eli-mcp
python -m es_eli_mcppip.exe is blocked for the same reason, so install with python -m pip, not
pip install. If python is not on PATH, use the Windows launcher: py -3 -m es_eli_mcp.
{ "mcpServers": { "es-eli-mcp": { "command": "python", "args": ["-m", "es_eli_mcp"] } } }Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.
Building from source: see Install.
An MCP server for five Spanish open-data sources:
BOE (Boletin Oficial del Estado) open-data API - consolidated legislation. Given a BOE id or a date in the official gazette, returns metadata, structure and full consolidated text, with verifiable ELI identifiers and Spanish citations.
Tribunal Constitucional (Sistema HJ /
hj.tribunalconstitucional.es) - Spain's Constitutional Court case law (Sentencias / Autos / Declaraciones). Given an internal resolution id, or a citation number+year (e.g. "STC 31/2010"), returns the full ruling with ECLI and a Spanish doctrinal citation.DGT (Direccion General de Tributos,
petete.tributos.hacienda.gob.es) - binding tax rulings: ~69,500 consultas vinculantes + ~19,700 consultas generales (live-counted 2026-07-08). Full-text/date search plus the full ruling text by NUM-CONSULTA (e.g. "V0001-25").TEAC (Tribunales Economico-Administrativos, DYCTEA) - ~6,500 doctrine criterios with the full resolution text inline, searched by RG claim-number segments and/or date range.
AEPD (Agencia Espanola de Proteccion de Datos) - ~46,800 data-protection resolutions with Solr full-text search and a verified PDF permalink per expediente (e.g. "PS-00615-2025").
Part of the MateMatic eu-legal-mcp production line - after PL, DE and AT. Same citation
contract pattern, five Spanish sources.
Free-text search exists on DGT and AEPD only. The BOE open-data keyword-search endpoint (
/legislacion-consolidada) currently returns a server-side error; the Tribunal Constitucional site only supports structured search (citation number+year, ECLI, magistrado, materia); DYCTEA accepts text-looking parameters but silently ignores them (verified live). Discover BOE documents viaes_browse_gazette(by date) or a known BOE id / ELI; TC rulings viaes_search_constitutional; TEAC criterios via RG segments or dates. Every response carries adataset_note.Licence. Both sources are official public information published as Spanish PSI (public-sector information) open data; reuse presumes acceptance of the respective reuse conditions. This connector relays that public content with attribution and a
source_url.
Related MCP server: Spanish Public Data MCP
The tools
Tool | What it does |
| List documents published in the BOE on a date ( |
| Metadata for a BOE id (eli_uri, official |
| The block index (articles, titles) of a consolidated law. |
| Consolidated text (XML), whole or by block. |
| Tribunal Constitucional ruling by internal resolution id. |
| Resolve a citation (numero+anno, e.g. 31/2010) to the full TC ruling. |
| Full-text/date search over DGT consultas (vinculantes or generales). |
| Full DGT ruling (facts, question, normativa, answer) by NUM-CONSULTA. |
| TEAC criterios by RG segments and/or resolution-date range. |
| Full TEAC criterio + resolution text by DYCTEA id. |
| Full-text/date search over AEPD resolutions. |
| AEPD resolution + verified full-text PDF permalink by expediente. |
| Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |
Every BOE 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.
Every Tribunal Constitucional response carries: ecli (e.g. ECLI:ES:TC:2010:31 - TC case law
has no ELI, ELI covers legislation only), human_readable_citation (Spanish doctrinal
convention, e.g. "STC 31/2010, de 28 de junio"), 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_TC_BASE_URL- defaulthttps://hj.tribunalconstitucional.esES_ELI_DGT_BASE_URL- defaulthttps://petete.tributos.hacienda.gob.esES_ELI_TEAC_BASE_URL- defaulthttps://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEAES_ELI_AEPD_BASE_URL- defaulthttps://www.aepd.esES_ELI_CACHE_DIR- default~/.matematic/cache/es-eliES_ELI_AUDIT_DIR- default~/.matematic/audit
No API key. All five sources are keyless.
Governance
Public data only - read-only against the five official sources; no client data leaves the machine.
Audit log - every tool call appends one JSON line to
~/.matematic/audit/es-eli-mcp.jsonl.Network - the server talks to the official
*.boe.es/*.tribunalconstitucional.es/*.hacienda.gob.es/*.aepd.eshosts and the local filesystem. Once, on first use, it also fetches a small configuration file (es-runtime.json.gz, updated source addresses) from this repository's GitHub Releases. That request carries no query content; GitHub's download counter for the file is the only usage signal we see.ES_ELI_RUNTIME_URL=""turns it off; the Claude plugin ships with it off. No LLM provider, no other telemetry.Verifiable citations - every response is independently checkable via
source_url.
See CONSTITUTION.md and DISCOVERY.md.
Tests
pip install -e ".[dev]"
pytest tests/ --ignore=tests/test_smoke.py -v # offline (fixtures)
pytest tests/test_smoke.py -v # hits live BOE + TC + DGT + TEAC + AEPDLicence
Apache-2.0. © Matematic Solutions / Wieslaw Mazur.
Available Tools
13 toolses_browse_gazetteARead-onlyIdempotent
List documents published in the official BOE gazette on a date.
Inputs: date (required). Returns: Result of ``es_browse_gazette``.
es_coverageARead-onlyIdempotent
Declare what this connector covers, how it is sourced, and what it does NOT cover.
Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead.
Returns:
Coverage with families, an as-of note, and a non-empty list of known gaps.
Inputs: no named parameters. Returns: What this connector covers, how it is sourced, and what it does not cover.
es_get_actARead-onlyIdempotent
Fetch consolidated-law metadata from BOE by id.
Inputs: boe_id (required). Returns: A consolidated BOE law (from /metadatos).
es_get_aepd_resolutionARead-onlyIdempotent
Resolve an AEPD expediente number to its resolution and full-text PDF permalink.
Inputs: expediente (required). Returns: One AEPD resolution teaser (search hit or es_get_aepd_resolution result).
es_get_constitutional_rulingARead-onlyIdempotent
Fetch a Tribunal Constitucional ruling (Sentencia/Auto/Declaracion) by internal id.
Inputs: resolution_id (required). Returns: A Tribunal Constitucional resolution (Sentencia / Auto / Declaracion).
es_get_indexARead-onlyIdempotent
List the block index (articles, titles) of a consolidated law.
Inputs: boe_id (required). Returns: Result of ``es_get_index``.
es_get_tax_rulingARead-onlyIdempotent
Fetch a full DGT tax ruling by its official number.
Inputs: numero_consulta (required). Returns: A full DGT consulta (result of ``es_get_tax_ruling``).
es_get_teac_criterioARead-onlyIdempotent
Fetch one TEAC criterio (with the full resolution text) by its DYCTEA id.
Inputs: criterio_id (required). Returns: A full DYCTEA criterio (result of ``es_get_teac_criterio``).
es_get_textARead-onlyIdempotent
Fetch the consolidated text (XML) of a law, whole or by block.
Inputs: boe_id (required), block_id. Returns: Result of ``es_get_text`` (consolidated text, XML).
es_search_aepd_resolutionsARead-onlyIdempotent
Search AEPD (Spanish DPA) resolutions by full text and/or signature date.
Inputs: page, texto, fecha_desde, fecha_hasta. Returns: Result of ``es_search_aepd_resolutions``.
es_search_constitutionalARead-onlyIdempotent
Resolve a Tribunal Constitucional citation (number + year) to the full ruling.
Inputs: anno (required), numero (required), tipo. Returns: A Tribunal Constitucional resolution (Sentencia / Auto / Declaracion).
es_search_tax_rulingsARead-onlyIdempotent
Search DGT tax rulings (consultas tributarias) by free text and/or date.
Inputs: page, texto, database, fecha_desde, +1 more. Returns: Result of ``es_search_tax_rulings``.
es_search_teac_doctrineARead-onlyIdempotent
Search TEAC doctrine (DYCTEA criterios) by RG segments and/or date range.
Inputs: anno, page, sede, numero, +2 more. Returns: Result of ``es_search_teac_doctrine``.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools follow a clear search/get pair per legal source, but es_get_act and es_get_text could be momentarily confused (metadata vs. full text). Overall each tool targets a distinct resource/action, so mis-selection risk is low.
All tools share the es_ prefix and use a consistent verb_resource structure (es_get_*, es_search_*, es_browse_gazette, es_coverage). The naming pattern is uniform across all 13 tools.
13 tools is well-scoped for a multi-source legal connector covering BOE, TC, DGT, TEAC, and AEPD. Each tool earns its place and the count is neither thin nor bloated.
Each legal domain has both a search/resolution and a fetch tool, and BOE laws have metadata/index/text retrieval. Minor gaps like no free-text law search or direct gazette document fetch exist but are workable via browse and coverage fallbacks.
Maintenance
Related MCP Connectors
BOE, Spanish public tenders and INE statistics behind one MCP server.
Spain consolidated legislation — Agencia Estatal Boletín Oficial del Estado (BOE), open-data API.
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
MCP server for French (BOAMP) + EU (TED) public procurement data via TenderAPI.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for accessing Uruguay's IMPO open data API with SQLite caching. Provides tools to retrieve legal norms, search regulations, and access schema documentation from Uruguay's official legal database.4MIT
- AlicenseAqualityDmaintenanceMCP server for querying Spanish government open data APIs including grants, legislation, company registry, statistics, and open data catalog. Enables LLMs to access Spanish public information on-the-fly.265MIT
- AlicenseNot gradedqualityDmaintenanceA community-maintained MCP server that simplifies access to EU legal and legislative data from the CELLAR service, supporting lookups, metadata retrieval, relation checks, and monitoring.2MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for Spain's official BOE auction portal: search judicial foreclosures, notarial and tax-agency auctions, get consolidated per-auction detail (assets, lots, bids, authority contacts) and computed legal thresholds (art. 671 LEC). Clean JSON, GDPR-safe, no headless browser.3AGPL 3.0