Es Eli Mcp

io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v0.5.3更新於 Oct 24, 2026

Spanish law MCP: BOE legislation, Constitutional Court, DGT and TEAC tax, AEPD resolutions.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理以唯讀方式存取西班牙官方法律與稅務資料:BOE 立法、憲法法院判決、DGT 與 TEAC 稅務裁定以及 AEPD 決議。

可以做什麼
瀏覽與取得 BOE 立法:依日期列出公報文件,依 BOE 編號或 ELI 識別碼取得中繼資料、條文索引與合併文本,並附引用與來源連結。依內部決議編號或案號加年份查詢憲法法院判例,回傳含 ECLI 的完整判決。依全文、日期或 NUM-CONSULTA 檢索並閱讀 DGT 的拘束性及一般稅務裁定。依申訴編號片段或日期範圍檢索 TEAC 學說並讀取完整裁定文本。檢索 AEPD 資料保護決議,並取得附有已驗證 PDF 永久連結的決議。說明此連接器涵蓋與未涵蓋的範圍,並為每處缺口提供替代途徑。
適用情境
適合在回答西班牙法律、憲法判例、稅務學說或資料保護決議相關問題,且需要官方原文與可驗證引用時使用。最適用於需要引用一手資料而非依賴記憶的研究與起草工作。
執行需求
以 stdio 在本機執行,通常透過 PyPI 的 uvx 或作為 Claude 外掛安裝;需要 uv 或 Python。不需 API 金鑰或帳號,五個資料來源皆免金鑰。需要連線至 boe.es、tribunalconstitucional.es、hacienda.gob.es 與 aepd.es 官方主機的網路。可選環境變數可覆寫基礎位址、快取與稽核目錄。在啟用 Smart App Control 的 Windows 11 上,應透過已簽署的 Python 解譯器執行,而非被封鎖的啟動器。
安裝前請注意
對公開資料來源為唯讀,但每次工具呼叫都會附加寫入本機稽核日誌檔。首次使用時會從 GitHub Releases 取得一個小型設定檔,可將 ES_ELI_RUNTIME_URL 設為空值來關閉。全文檢索僅支援 DGT 與 AEPD,其他來源需使用結構化識別碼。重用這些公共部門內容即視為接受各來源的再利用條件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Es Eli Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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-mcp

Published on PyPI + MCP Registry (io.github.matematicsolutions/es-eli-mcp). Run without cloning:

bash
uvx es-eli-mcp

Configure your MCP client (stdio):

json
{ "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:

bash
python -m pip install es-eli-mcppython -m es_eli_mcp

pip.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.

json
{ "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:

  1. 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.
  2. 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.
  3. 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").
  4. 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.
  5. 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 via es_browse_gazette (by date) or a known BOE id / ELI; TC rulings via es_search_constitutional; TEAC criterios via RG segments or dates. Every response carries a dataset_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.

The tools

ToolWhat it does
es_browse_gazetteList documents published in the BOE on a date (YYYYMMDD) - discovery.
es_get_actMetadata for a BOE id (eli_uri, official titulo, source).
es_get_indexThe block index (articles, titles) of a consolidated law.
es_get_textConsolidated text (XML), whole or by block.
es_get_constitutional_rulingTribunal Constitucional ruling by internal resolution id.
es_search_constitutionalResolve a citation (numero+anno, e.g. 31/2010) to the full TC ruling.
es_search_tax_rulingsFull-text/date search over DGT consultas (vinculantes or generales).
es_get_tax_rulingFull DGT ruling (facts, question, normativa, answer) by NUM-CONSULTA.
es_search_teac_doctrineTEAC criterios by RG segments and/or resolution-date range.
es_get_teac_criterioFull TEAC criterio + resolution text by DYCTEA id.
es_search_aepd_resolutionsFull-text/date search over AEPD resolutions.
es_get_aepd_resolutionAEPD resolution + verified full-text PDF permalink by expediente.
es_coverageDeclare 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

bash
cd es-eli-mcppip install -e .

Configure (Claude Code / any MCP client)

json
{  "mcpServers": {    "es-eli-mcp": { "command": "es-eli-mcp" }  }}

Environment:

  • ES_ELI_BASE_URL - default https://www.boe.es/datosabiertos/api
  • ES_ELI_TC_BASE_URL - default https://hj.tribunalconstitucional.es
  • ES_ELI_DGT_BASE_URL - default https://petete.tributos.hacienda.gob.es
  • ES_ELI_TEAC_BASE_URL - default https://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEA
  • ES_ELI_AEPD_BASE_URL - default https://www.aepd.es
  • ES_ELI_CACHE_DIR - default ~/.matematic/cache/es-eli
  • ES_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.es hosts 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

bash
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 + AEPD

Licence

Apache-2.0. © Matematic Solutions / Wieslaw Mazur.

來源:README.md,提交 dc61db6

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.5.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分