dato402
# dato402-mcp — Datos oficiales de España y la UE para agentes de IA
[](https://modelcontextprotocol.io) [](LICENSE)
*[English version below](#english)*
Servidor MCP que da a Claude, Cursor, ChatGPT y cualquier cliente MCP acceso a **datos abiertos oficiales de España y de la Unión Europea**:
el **BOE**, el Registro Mercantil (**BORME**), las **licitaciones públicas** de España (PLACSP) y de toda la UE (TED),
las **subvenciones** españolas (BDNS) y las **ayudas europeas** (Funding & Tenders), el **Catastro**, el **IPC y la actualización de alquileres**,
el **precio de la luz y de los carburantes**, la validación de **NIF, IBAN e IVA europeo**, los **tipos de cambio del BCE**, festivos y días laborables,
comprobaciones de seguridad de dominios, el **Euríbor y una calculadora de hipotecas**, el **calendario fiscal de la AEAT**, el **SMI, el IPREM y el interés legal**, un **geocodificador** oficial, la **población de cada municipio**, el **tiempo de AEMET** y los **terremotos** del IGN.
- **34 herramientas de solo lectura**, con respuesta en JSON y enlace a la fuente oficial.
- **Sin clave ni cuenta.**
- 🆓 **Gratis (24)**: validación, calendario, divisas, dominios, viajes, luz, IPC, Euríbor e hipoteca, calendario fiscal, indicadores oficiales, geocodificador, municipios, el tiempo y terremotos (hasta 500 consultas al día).
- ⭐ **Datos premium (10)** (BORME, BOE, licitaciones, ayudas, Catastro, auditoría web): gratis hasta 100 consultas al día; sin límite pagando cada consulta con [x402](https://x402.org) (USDC en Base). Más información en [dato402.com](https://dato402.com) y en la [especificación OpenAPI](https://dato402.com/openapi.json).
## Cómo conectarlo
### En remoto (recomendado, no hay que instalar nada)
URL del servidor: `https://dato402.com/mcp` (Streamable HTTP)
- **Claude (web o escritorio):** Ajustes → Conectores → Añadir conector personalizado → `https://dato402.com/mcp`
- **Claude Code:** `claude mcp add --transport http dato402 https://dato402.com/mcp`
- **Cursor / VS Code / Windsurf** (`mcp.json`):
```json
{ "mcpServers": { "dato402": { "url": "https://dato402.com/mcp" } } }
```
### En local (stdio)
Este repositorio es un puente stdio sin dependencias hacia el servidor remoto, para clientes que solo admiten stdio. Necesita Node.js 18 o superior.
```json
{
"mcpServers": {
"dato402": { "command": "npx", "args": ["-y", "github:chachiwachi/dato402-mcp"] }
}
}
```
También puedes clonarlo y ejecutar `node index.js`, o con Docker: `docker build -t dato402-mcp . && docker run -i --rm dato402-mcp`.
Variable de entorno opcional: `DATO402_MCP_URL` (por defecto `https://dato402.com/mcp`).
## Herramientas
| Herramienta | Acceso | Descripción |
|---|---|---|
| `spain_validate_tax_id` | 🆓 Gratis | Valida un DNI, NIE, NIF especial o CIF español con el algoritmo oficial de dígito de control. Devuelve el tipo de documento, la forma jurídica (CIF) y si es válido. |
| `spain_postal_code` | 🆓 Gratis | Provincia, comunidad autónoma (con su código ISO) y si es la capital de provincia, a partir de un código postal español de 5 cifras. |
| `eu_vat_check` | 🆓 Gratis | Comprueba en VIES (Comisión Europea) si un NIF-IVA intracomunitario está activo para operaciones entre países de la UE. Devuelve nombre y dirección cuando el país los publica. |
| `iban_validate` | 🆓 Gratis | Valida un IBAN de cualquier país (ISO 13616, dígitos de control mod-97) y devuelve país, BBAN y, para España, código de entidad y oficina. |
| `ecb_currency_convert` | 🆓 Gratis | Convierte importes entre el euro y unas 30 monedas con los tipos de referencia oficiales del Banco Central Europeo del último día hábil. |
| `ssl_certificate_check` | 🆓 Gratis | Comprueba el certificado TLS de un dominio en el puerto 443: si es válido, emisor, nombres cubiertos, fechas, días hasta caducar, versión de TLS y cifrado. |
| `email_security_check` | 🆓 Gratis | Revisa la protección contra suplantación del correo de un dominio: SPF, DMARC, DKIM (selectores habituales), MTA-STS y TLS-RPT. Nota de A a F con problemas y recomendaciones. |
| `http_security_headers` | 🆓 Gratis | Analiza las cabeceras de seguridad HTTP de la portada de un dominio (HSTS, CSP, X-Frame-Options, nosniff, Referrer-Policy, Permissions-Policy) con nota y consejos. |
| `dns_lookup` | 🆓 Gratis | Registros DNS públicos de un dominio en una sola llamada: A, AAAA, CNAME, MX, NS, TXT, CAA y SOA, consultados en resolvers públicos. |
| `domain_whois_rdap` | 🆓 Gratis | Datos de registro de un dominio por RDAP (sustituto de WHOIS): registrador, fechas de alta y caducidad, estado, servidores DNS y DNSSEC. Solo extensiones con RDAP público (.com, .net, .org, .fr...); no .es ni .eu. |
| `public_holidays` | 🆓 Gratis | Festivos oficiales de un país para un año, con ámbito nacional o regional; filtrable por comunidad autónoma o región (código ISO 3166-2, p. ej. ES-MD). |
| `business_days_between` | 🆓 Gratis | Cuenta los días laborables entre dos fechas (ambas incluidas) descontando fines de semana y festivos nacionales y, si se indica, autonómicos. Útil para plazos y entregas. |
| `spain_fuel_prices_nearby` | 🆓 Gratis | Gasolineras más baratas de España cerca de unas coordenadas, en un municipio o código postal, por tipo de combustible (gasolina 95/98, diésel, GLP, GNC, AdBlue...). Precios oficiales del Ministerio, actualizados cada media hora. |
| `airport_search` | 🆓 Gratis | Busca aeropuertos de todo el mundo por código IATA/ICAO, ciudad o nombre, o los más cercanos a unas coordenadas. Devuelve códigos, tipo, país, coordenadas, altitud y si tiene vuelos regulares. |
| `spain_cpi_rent_update` | 🆓 Gratis | IPC e IRAV oficiales del INE y actualización de alquileres: variación anual del mes, renta actualizada con IPC o IRAV (contratos de vivienda desde mayo de 2023) y variación del IPC entre dos meses cualesquiera desde 1961. |
| `spain_electricity_price` | 🆓 Gratis | Precio de la luz PVPC hora a hora de hoy o mañana (desde las 20:15) en España: media, mínimo, máximo, horas más baratas y caras y el mejor bloque de N horas seguidas para poner electrodomésticos o cargar el coche. Península, Canarias, Baleares, Ceuta y Melilla. |
| `spain_euribor` | 🆓 Gratis | Euríbor oficial (medias mensuales del BCE) a 1, 3, 6 y 12 meses: último valor, variación en 12 meses e histórico. El Euríbor a 12 meses es la referencia de las hipotecas variables. |
| `spain_mortgage_calculator` | 🆓 Gratis | Calculadora de hipoteca: cuota mensual, total pagado, intereses y cuadro de amortización anual, a tipo fijo o variable (Euríbor actual + diferencial). |
| `spain_tax_calendar_aeat` | 🆓 Gratis | Calendario fiscal de la Agencia Tributaria: plazos de presentación de impuestos (IVA, IRPF, Sociedades, retenciones, declaraciones informativas, impuestos especiales) entre dos fechas, filtrable por modelo (303, 130, 111...) e impuesto. |
| `spain_official_indicators` | 🆓 Gratis | Indicadores oficiales de España para nóminas, contratos y reclamaciones: salario mínimo (SMI), IPREM, interés legal del dinero, interés de demora tributario y de operaciones comerciales, con la norma del BOE que los fija. |
| `spain_geocode_address` | 🆓 Gratis | Geocodificador oficial de España (CartoCiudad, IGN): convierte una dirección en coordenadas, código postal, municipio y referencia catastral, o unas coordenadas en la dirección más cercana. |
| `spain_municipality_population` | 🆓 Gratis | Datos de un municipio español: población oficial del padrón del INE (total, hombres y mujeres), provincia, código INE y puesto por población dentro de su provincia. Búsqueda por nombre, código INE o coordenadas. |
| `spain_weather_forecast` | 🆓 Gratis | Previsión del tiempo oficial de AEMET para cualquier municipio de España (hasta 7 días): estado del cielo, temperaturas máxima y mínima, probabilidad de lluvia, viento, rachas e índice UV. |
| `spain_earthquakes` | 🆓 Gratis | Terremotos de los últimos 10 días en España y alrededores según la Red Sísmica del IGN: fecha y hora, magnitud, lugar y coordenadas, filtrables por magnitud y por distancia a un punto. |
| `spain_company_history` | ⭐ Premium | Historial de actos inscritos de una empresa española en el BORME (constitución, cargos, capital, domicilio, disolución...), del más reciente al más antiguo, con enlace al PDF oficial. |
| `spain_new_companies` | ⭐ Premium | Empresas españolas recién constituidas según el BORME, filtrables por provincia, fechas y palabras del objeto social (p. ej. software, restaurante). Incluye capital, domicilio y objeto social. Hasta 200 resultados. |
| `spain_company_filings_by_date` | ⭐ Premium | Actos inscritos publicados en el BORME en una fecha, filtrables por provincia y tipo de acto (p. ej. Disolución, Nombramientos, Situación concursal). Hasta 500 resultados. |
| `website_security_audit` | ⭐ Premium | Auditoría exprés de un dominio: HTTPS, cabeceras de seguridad, protección del correo (SPF, DMARC, DKIM) y DNS. Nota de A a F, puntos por apartado y recomendaciones en español. |
| `spain_cadastre_property` | ⭐ Premium | Datos catastrales de un inmueble o parcela en España por referencia catastral, coordenadas o dirección: uso, superficie construida, año de construcción, coeficiente de participación, superficie de la parcela, construcciones y enlace al mapa. Sin datos de titulares. |
| `spain_public_grants` | ⭐ Premium | Subvenciones y ayudas públicas de España (BDNS) por palabras, nivel (estatal, autonómico, local) y comunidad, con plazo de solicitud (abierta, próxima o cerrada), presupuesto, beneficiarios, sectores, regiones, bases reguladoras y enlace a la ficha oficial. |
| `spain_public_tenders` | ⭐ Premium | Licitaciones públicas de España (Plataforma de Contratación del Sector Público) por palabras, provincia o código NUTS, CPV, tipo de contrato e importe. Por defecto solo las que están en plazo, ordenadas por fecha límite, con órgano, importe, CPV, lugar y enlace oficial. |
| `spain_official_gazette_boe` | ⭐ Premium | Busca en el BOE (Boletín Oficial del Estado) de los últimos 4 meses por palabras, sección (disposiciones generales, nombramientos, oposiciones y concursos, otras disposiciones, contratación, anuncios oficiales, Tribunal Constitucional), departamento y fechas. Título, sección, órgano y enlaces HTML y PDF oficiales. |
| `eu_funding_calls` | ⭐ Premium | Convocatorias de ayudas de la Unión Europea abiertas o próximas (Horizonte Europa, Europa Digital, Erasmus+, EU4Health, Europa Creativa, Fondo Europeo de Defensa...) por palabras, programa y estado, ordenadas por fecha límite. Presupuesto, número de ayudas, importe por proyecto y enlace al portal Funding & Tenders. |
| `eu_public_tenders_ted` | ⭐ Premium | Licitaciones públicas de toda la UE (TED, Diario Oficial de la UE) en plazo, por palabras, país del comprador, código CPV y fecha de publicación, ordenadas por fecha límite. Título original y en inglés, comprador, ciudad, importe estimado, CPV y enlace oficial. |
## Ejemplos de preguntas
- «Busca licitaciones de servicios de software en Madrid que terminen este mes.»
- «¿Qué convocatorias de Horizonte Europa sobre hidrógeno están abiertas y cuánto dan por proyecto?»
- «Enséñame el historial en el BORME de la empresa X: constitución, administradores, cambios de capital.»
- «¿Cuáles son hoy las horas más baratas de la luz para cargar el coche eléctrico?»
- «Actualiza un alquiler de 800 € con el índice IRAV.»
- «¿Es válido el NIF-IVA europeo ESA28015865?»
## Fuentes de datos
Todos los datos proceden de fuentes oficiales de datos abiertos y se devuelven con enlace al original:
Agencia Estatal BOE (BOE y BORME), Ministerio de Hacienda (Plataforma de Contratación del Sector Público), IGAE (BDNS),
Dirección General del Catastro, INE, Red Eléctrica (REE), Ministerio para la Transición Ecológica (carburantes),
Comisión Europea (VIES, Funding & Tenders), Oficina de Publicaciones de la UE (TED), Banco Central Europeo, Agencia Tributaria, CartoCiudad e Instituto Geográfico Nacional, AEMET, Nager.Date y OurAirports.
La reutilización sigue las condiciones de cada fuente (Ley 37/2007 y Decisión 2011/833/UE de la Comisión).
No se hacen búsquedas de personas: el BORME solo se consulta por empresa y se excluyen las secciones del BOE con particulares (edictos judiciales y anuncios particulares).
## Licencia
MIT
---
<a id="english"></a>
# English
MCP server that gives Claude, Cursor, ChatGPT and any MCP client access to **official Spanish and European open data**:
the **BOE** official gazette, the **BORME** company registry, **public tenders** in Spain (PLACSP) and across the EU (TED),
**grants** in Spain (BDNS) and from the EU (Funding & Tenders), **Catastro**, **CPI / rent updates**, **electricity and fuel prices**,
**Spanish tax ID / IBAN / EU VAT** validation, **ECB exchange rates**, holidays, domain security checks, **Euribor and a mortgage calculator**, the **AEAT tax calendar**, **minimum wage, IPREM and legal interest**, an official **geocoder**, **municipality population**, **AEMET weather** and **IGN earthquakes**.
- **34 read-only tools**, JSON output with links to the official source.
- **No API key, no account.**
- 🆓 **Free (24):** validation, calendar, currency, domain, travel, electricity, CPI, Euribor/mortgage, tax calendar, official indicators, geocoding, municipality, weather and earthquake tools (up to 500 calls per day).
- ⭐ **Premium data (10)** (company registry, BOE, tenders, grants, Catastro, website audit): 100 free calls per day; unlimited with pay-per-call [x402](https://x402.org) (USDC on Base). See [dato402.com](https://dato402.com) and the [OpenAPI spec](https://dato402.com/openapi.json).
## Connect
- **Remote (recommended):** `https://dato402.com/mcp` (Streamable HTTP)
- **Claude:** Settings → Connectors → Add custom connector
- **Claude Code:** `claude mcp add --transport http dato402 https://dato402.com/mcp`
- **Cursor / VS Code / Windsurf:** `{ "mcpServers": { "dato402": { "url": "https://dato402.com/mcp" } } }`
- **Local (stdio):** zero-dependency bridge in this repo (Node.js 18+): `npx -y github:chachiwachi/dato402-mcp`, `node index.js` or Docker. Optional env var `DATO402_MCP_URL`.
## Tools
| Tool | Access | Description |
|---|---|---|
| `spain_validate_tax_id` | 🆓 Free | Validate a Spanish tax ID (DNI, NIE, NIF or CIF) with the official check-digit algorithm. Returns document type, company legal form and validity. |
| `spain_postal_code` | 🆓 Free | Spanish postal code lookup: province, autonomous community (with ISO 3166-2 code) and whether it is the provincial capital. |
| `eu_vat_check` | 🆓 Free | EU VAT number validation against VIES (European Commission): checks if an intra-community VAT ID is active, with company name and address when the country publishes them. |
| `iban_validate` | 🆓 Free | IBAN validation for any country (ISO 13616 mod-97 check digits). Returns country, BBAN and, for Spain, bank and branch codes. |
| `ecb_currency_convert` | 🆓 Free | Currency conversion with official European Central Bank (ECB) euro reference exchange rates for about 30 currencies. |
| `ssl_certificate_check` | 🆓 Free | SSL/TLS certificate check for a domain: validity, issuer, covered names, expiry date and days left, TLS version and cipher. |
| `email_security_check` | 🆓 Free | Email security check for a domain: SPF, DMARC, DKIM, MTA-STS and TLS-RPT records with an A-F grade, problems found and fixes. |
| `http_security_headers` | 🆓 Free | HTTP security headers check for a website: HSTS, CSP, X-Frame-Options, nosniff, Referrer-Policy and Permissions-Policy, with grade and advice. |
| `dns_lookup` | 🆓 Free | DNS lookup for a domain in one call: A, AAAA, CNAME, MX, NS, TXT, CAA and SOA records from public resolvers. |
| `domain_whois_rdap` | 🆓 Free | Domain registration lookup via RDAP (modern WHOIS): registrar, creation and expiry dates, status, nameservers and DNSSEC. gTLDs such as .com, .net, .org. |
| `public_holidays` | 🆓 Free | Public holidays for any country and year, national and regional, filterable by region ISO code (e.g. ES-MD for Madrid). |
| `business_days_between` | 🆓 Free | Business days calculator between two dates, excluding weekends and national and regional public holidays. For deadlines and delivery dates. |
| `spain_fuel_prices_nearby` | 🆓 Free | Cheapest fuel stations in Spain near coordinates, in a town or postal code, by fuel type (petrol 95/98, diesel, LPG, CNG, AdBlue). Official government prices updated every 30 minutes. Road trip planning. |
| `airport_search` | 🆓 Free | Airport search worldwide by IATA/ICAO code, city or name, or nearest airports to coordinates. Returns codes, type, country, coordinates, elevation and scheduled service. |
| `spain_cpi_rent_update` | 🆓 Free | Spain official inflation (CPI, INE) and rent update calculator: annual CPI or IRAV rental index for a month, updated rent amount, and CPI change between any two months since 1961. |
| `spain_electricity_price` | 🆓 Free | Spain hourly electricity price (PVPC regulated tariff) for today or tomorrow: average, min, max, cheapest and most expensive hours and best block of N consecutive hours for appliances or EV charging. |
| `spain_euribor` | 🆓 Free | Official Euribor rates (ECB monthly averages) for 1, 3, 6 and 12 months: latest value, 12-month change and history. 12-month Euribor is the benchmark for Spanish variable-rate mortgages. |
| `spain_mortgage_calculator` | 🆓 Free | Mortgage calculator for Spain: monthly payment, total paid, total interest and yearly amortization schedule, fixed rate or variable (current Euribor plus spread). |
| `spain_tax_calendar_aeat` | 🆓 Free | Spanish Tax Agency (AEAT) tax calendar: filing deadlines for VAT, income tax, corporate tax, withholdings and informative returns between two dates, filterable by form number (303, 130, 111...) and tax. |
| `spain_official_indicators` | 🆓 Free | Official Spanish reference figures for payroll, contracts and claims: minimum wage (SMI), IPREM, legal interest rate, tax late-payment interest and commercial late-payment interest, with the legal source. |
| `spain_geocode_address` | 🆓 Free | Official Spanish geocoder (CartoCiudad, IGN): address to coordinates, postal code, municipality and cadastral reference, or reverse geocoding from coordinates to the nearest address. |
| `spain_municipality_population` | 🆓 Free | Spanish municipality data: official INE population register (total, men, women), province, INE code and population rank within its province. Search by name, INE code or coordinates. |
| `spain_weather_forecast` | 🆓 Free | Official AEMET weather forecast for any Spanish municipality (up to 7 days): sky, max and min temperature, chance of rain, wind, gusts and UV index. |
| `spain_earthquakes` | 🆓 Free | Earthquakes in Spain and nearby from the last 10 days (IGN national seismic network): time, magnitude, place and coordinates, filterable by magnitude and distance to a point. |
| `spain_company_history` | ⭐ Premium | Spanish company registry (BORME) history for a company: incorporation, directors and officers, capital changes, address, dissolution. Official Spain business register data with PDF links. |
| `spain_new_companies` | ⭐ Premium | Newly incorporated Spanish companies from the official business register (BORME), filterable by province, dates and business activity keywords. Capital, address and corporate purpose. Sales leads. |
| `spain_company_filings_by_date` | ⭐ Premium | All Spanish company registry (BORME) filings published on a date, filterable by province and filing type: dissolutions, insolvency, appointments, capital changes. |
| `website_security_audit` | ⭐ Premium | Website security audit for a domain: HTTPS/TLS certificate, security headers, email spoofing protection (SPF, DMARC, DKIM) and DNS. A-F grade with actionable recommendations. |
| `spain_cadastre_property` | ⭐ Premium | Spanish land registry (Catastro) lookup by cadastral reference, coordinates or street address: property use, built area, year built, parcel area, building units and map link. Real estate data for Spain, no owner data. |
| `spain_public_grants` | ⭐ Premium | Spain public grants and subsidies search (BDNS national database) by keywords, government level and region: application window status (open, upcoming, closed), budget, eligible beneficiaries, sectors and official links. |
| `spain_public_tenders` | ⭐ Premium | Spain public procurement tenders (official Public Sector Contracting Platform) by keywords, province or NUTS code, CPV code, contract type and amount. Open tenders sorted by deadline, with buyer, budget and official link. B2B leads. |
| `spain_official_gazette_boe` | ⭐ Premium | Search Spain's Official State Gazette (BOE) from the last 4 months by keywords, section (laws and regulations, appointments, public job exams, other provisions, procurement notices, official announcements, Constitutional Court), ministry and dates. Title, section, issuing body and official HTML/PDF links. |
| `eu_funding_calls` | ⭐ Premium | Open and upcoming European Union funding calls (Horizon Europe, Digital Europe, Erasmus+, EU4Health, Creative Europe, European Defence Fund...) by keywords, programme and status, sorted by deadline. Budget, number of grants, amount per project and EU Funding & Tenders portal link. |
| `eu_public_tenders_ted` | ⭐ Premium | Open public procurement tenders across the EU (TED, Official Journal of the EU) by keywords, buyer country, CPV code and publication date, sorted by deadline. Original and English title, buyer, city, estimated value, CPV codes and official link. |
## Data sources
Official open-data sources only, returned with a link to the original: Agencia Estatal BOE, Spanish Ministry of Finance (PLACSP), IGAE (BDNS),
Catastro, INE, Red Eléctrica, Spanish Ministry for the Ecological Transition, European Commission (VIES, Funding & Tenders),
Publications Office of the EU (TED), European Central Bank, Spanish Tax Agency (AEAT), CartoCiudad and IGN, AEMET, Nager.Date and OurAirports.
No personal-data search: the BORME is searchable by company only, and BOE sections about private individuals are excluded.
## License
MIT
TDQS
Scored across 34 tools
Most tools target tightly scoped, clearly distinct data domains (company registry, fuel prices, Euribor, geocoding, weather, etc.) and are easy to tell apart. The one real overlap is the security cluster: website_security_audit aggregates HTTPS, headers, SPF/DMARC/DKIM and DNS, which substantially overlaps ssl_certificate_check, http_security_headers, email_security_check and dns_lookup, so an agent may hesitate between the bundled audit and the granular checks.
There is a rough region-prefix scheme (spain_*, eu_*, unprefixed generic tools), but it is applied loosely and mixes noun phrases (spain_postal_code, spain_weather_forecast, public_holidays) with verb phrases (spain_validate_tax_id, spain_geocode_address, dns_lookup). Names are readable but there is no single predictable verb_noun pattern across the set.
34 tools is heavy and pushes past the comfortable range, though the server genuinely spans many independent open-data domains where each endpoint is narrow and single-purpose. It is defensible for a multi-domain utility suite, but the surface is large enough that discoverability and selection cost are real concerns.
Coverage across the many domains is broad and mostly self-contained: validations, registry lookups, procurement, finance, geography and environment are all present with sensible read-only endpoints. Gaps exist (e.g. company lookup is via history/new-incorporations/filings but no direct 'get company by tax ID' profile join), but these are minor and workable.