MCP Catastro España
Provides access to official cartographic services from Spain's Instituto Geográfico Nacional (IGN), including PNOA and WMS/INSPIRE service endpoints for use in GIS and web mapping projects.
MCP Catastro España — Servidor Oficial de RefCatastral.es
Servidor oficial MCP (Model Context Protocol) desarrollado por RefCatastral.es para conectar asistentes de inteligencia artificial (Claude Desktop, Cursor, ChatGPT, VS Code) con los datos abiertos y servicios cartográficos oficiales de la Dirección General del Catastro (DGC) y del Instituto Geográfico Nacional (IGN) de España.
⚡ Arquitectura 100% Descentralizada: Este servidor se ejecuta en local en tu equipo y consulta directamente las APIs públicas y abiertas del Ministerio de Hacienda. No pasa por ningún servidor intermedio ni requiere claves privadas.
🚀 Instalación Rápida
1. En Claude Desktop
Añade la siguiente configuración a tu archivo claude_desktop_config.json:
En macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonEn Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"catastro-espana": {
"command": "npx",
"args": ["-y", "mcp-catastro-espana"]
}
}
}2. En Cursor / Windsurf
En la configuración de MCP de Cursor (Settings > Features > MCP > Add New MCP Server):
Name:
catastro-espanaType:
commandCommand:
npx -y mcp-catastro-espana
Related MCP server: io.github.stucchi/italy-opendata
🛠️ Herramientas Incluidas
El servidor dota a tu IA de 3 herramientas nativas especializadas:
1. consultar_referencia_catastral
Consulta los datos físicos y la localización oficial de cualquier inmueble en España a partir de su Referencia Catastral (de 14 o 20 caracteres).
Parámetros:
referencia(ej:"8914504TF4781S0007SG"o"32059A00500344").Devuelve:
Dirección postal normalizada completa.
Coordenadas geográficas WGS84 (Latitud / Longitud).
Tipo de bien (Urbano o Rústico).
Uso principal registrado (Residencial, Comercial, Almacén...).
Superficie construida en m² y año de construcción.
Enlace directo al Comparador de Ortofotos Históricas de RefCatastral.
Enlace para descargar el croquis y la ficha técnica oficial en PDF.
2. coordenadas_a_referencia_catastral
Geocodificación inversa catastral: localiza la Referencia Catastral oficial y la dirección que corresponde a unas coordenadas GPS.
Parámetros:
latitud(ej:36.753905),longitud(ej:-5.813374).Devuelve: Referencia de parcela y dirección registrada en Catastro.
3. obtener_servicios_wms_cartografia
Proporciona las URLs oficiales de los servicios WMS e INSPIRE de la DGC y PNOA listas para configurar en proyectos de QGIS, Leaflet, OpenLayers o MapLibre.
💡 Ejemplos de Prompts para la IA
Una vez instalado, puedes pedirle a tu asistente:
"¿A qué dirección y superficie corresponde la referencia catastral 8914504TF4781S0007SG?"
"Tengo las coordenadas 40.416775, -3.703790 en Madrid. ¿Cuál es su referencia catastral según el Catastro?"
"Dame la URL de la capa WMS del Catastro de España para añadirla a mi mapa Leaflet."
🌐 Enlaces y Recursos
🏠 Portal Principal: RefCatastral.es
🛰️ Comparador de Ortofotos Aéreas (1973 - Actualidad): RefCatastral Ortofotos
📐 Visor de Parcelas y Linderos: Visor Catastro RefCatastral
🏛️ Catastro Virtual: Oficina Virtual y Guía del Catastro
📄 Licencia
Licencia MIT © RefCatastral.es. Libre para uso personal, profesional y comercial.
Available Tools
3 toolsconsultar_referencia_catastralA
Consulta la información oficial física y geográfica de un inmueble o parcela en España a partir de su Referencia Catastral (14 o 20 caracteres). Devuelve dirección exacta, coordenadas WGS84, superficie en m², año de construcción, uso principal y enlaces directos al visor cartográfico de RefCatastral.es.
| Name | Required | Description | Default |
|---|---|---|---|
| referencia | Yes | Referencia Catastral de 14 caracteres (finca/parcela) o 20 caracteres (inmueble exacto con cargo y control). Ejemplo: '8914504TF4781S0007SG' o '32059A00500344'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full burden. It does disclose the return payload (dirección exacta, coordenadas WGS84, superficie m², año de construcción, uso principal, enlaces al visor), which is genuine behavioral context, but it says nothing about error behaviour for malformed or non-existent referencias, latency, rate limits, or whether the data is a live official query.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero waste: the first front-loads what the tool does and the input identifier, the second lists exactly what comes back. Nothing is repeated or padded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read-only lookup with no output schema, the description is nearly self-sufficient because it enumerates the returned fields and the coordinate system. The remaining gap is failure behaviour for invalid or unknown referencias, which matters for an agent deciding how to recover.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the single parameter, its 14 vs 20 character formats, and gives two examples. The description repeats the same 14/20 character distinction and adds no new meaning such as validation rules or how the 20-character cargo/control suffix changes results. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb and resource: consulta la información física y geográfica de un inmueble o parcela a partir de su Referencia Catastral, in Spain, and enumerates the returned fields. The direction of the lookup (referencia → datos) is clearly the inverse of the sibling coordenadas_a_referencia_catastral, but that sibling is never named, so differentiation is implied rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer it should call this when it already holds a Referencia Catastral and wants physical/geographic data. There is no explicit statement of when not to use it, nor a pointer to coordenadas_a_referencia_catastral for the reverse case (coordinates → referencia) or to the WMS tool for layers.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
coordenadas_a_referencia_catastralA
Geocodificación inversa catastral: localiza la Referencia Catastral y la dirección oficial correspondiente a unas coordenadas GPS (latitud y longitud WGS84) en cualquier punto de España.
| Name | Required | Description | Default |
|---|---|---|---|
| latitud | Yes | Latitud en formato decimal WGS84 (ej: 36.753905 o 40.416775). | |
| longitud | Yes | Longitud en formato decimal WGS84 (ej: -5.813374 o -3.703790). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description must carry the behavioral load. It usefully discloses the geographic constraint (Spain only) and the nature of the result (cadastral reference plus official address), but says nothing about latency, rate limits, failure modes for out-of-coverage coordinates, or what an empty/no-match result looks like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence that first names the operation and then the outputs, with no filler. It is dense rather than padded, though the phrase 'en cualquier punto de España' and the parenthetical coordinate reminder slightly duplicate information already in the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter lookup with no output schema, the description covers the essential picture: what goes in, what comes back, and where it is valid. The only real gap is that return semantics for no-match cases are unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters already document decimal WGS84 with examples, so the description adds no new parameter meaning beyond restating 'latitud y longitud WGS84'. Baseline 3 applies because the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific operation and resource — 'Geocodificación inversa catastral' returning 'la Referencia Catastral y la dirección oficial' — plus the exact input (GPS coordinates) and geographic scope (Spain). An agent can distinguish it from consultar_referencia_catastral by the inverse formulation, though no sibling is explicitly named.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The scenario is implied (you have lat/lon and need a cadastral reference or official address), and 'en cualquier punto de España' implicitly bounds where it applies. However, there is no explicit when-to-use/when-not statement and no mention of the forward-lookup sibling consultar_referencia_catastral as an alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
obtener_servicios_wms_cartografiaA
Devuelve las especificaciones, URLs de endpoints WMS y capas oficiales de la Dirección General del Catastro (DGC) y del PNOA (IGN) para integrar mapas catastrales, parcelas, linderos y ortofotos aéreas en proyectos GIS, Leaflet, QGIS o aplicaciones web.
| Name | Required | Description | Default |
|---|---|---|---|
| servicio | No | Tipo de servicio cartográfico a consultar. Por defecto 'todos'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden; it does convey that the tool is a read-only reference lookup returning static endpoint specs and layer names rather than live map data. It omits whether the WMS URLs require authentication or API keys, whether the endpoints are stable/canonical, and in what format the response arrives — all material for an integration tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence front-loaded with the verb and the core return payload, with the integration targets appended as context. It is slightly dense with enumerations but no sentence is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only lookup with no output schema and no annotations, the description adequately explains what is returned and for what purpose. The main residual gap is response format and any authentication caveats around the WMS URLs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single 'servicio' parameter has a fully documented enum with a stated default, so the schema already does the heavy lifting. The description alludes to the service families (catastro, PNOA ortofotos) but adds no behavior for the enum value 'edificios_inspire' or what changes per selection.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb ('Devuelve') and a concrete resource set: specifications, WMS endpoint URLs and official layers from DGC and PNOA. It is clearly distinguished from the siblings, which deal with cadastral references (consultar_referencia_catastral, coordenadas_a_referencia_catastral), not map service endpoints.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through the target consumers (GIS projects, Leaflet, QGIS, web apps), which tells the agent the scenario the tool serves. However, it never states when NOT to use it or names the sibling tools that handle address/parcel reference lookups instead, so the routing decision is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
consultar_referencia_catastral - First observed
coordenadas_a_referencia_catastral - First observed
obtener_servicios_wms_cartografia
TDQS
Scored across 3 tools
Each tool targets a clearly different input/output: WMS endpoint metadata, lookup by Referencia Catastral, and reverse geocoding from coordinates. There is no realistic way to confuse these operations, and the descriptions reinforce the distinct inputs required.
Two tools follow a clear verb_noun Spanish pattern (obtener_servicios_wms_cartografia, consultar_referencia_catastral), while the third uses a noun/preposition construction (coordenadas_a_referencia_catastral) without a leading verb. The deviation is minor and the name is still self-explanatory.
Three tools is a tight, well-scoped surface for a focused cadastral lookup server, and each earns its place. It is slightly thin in that a core GIS workflow (address-to-parcel) has no entry point, but nothing is redundant.
The surface covers the main lifecycle: discover map layers, resolve a parcel from its cadastral reference, and resolve a reference from coordinates. The notable gap is forward geocoding (address/postcode → Referencia Catastral) and any parcel geometry output, which agents may need to work around.
Maintenance
Related MCP Connectors
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
Unofficial MCP server for the public PortlandMaps property/permit/zoning API. Not city-affiliated.
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
Official Openapi® MCP server: Italian company data, PEC, SMS, vehicles, geocoding and more APIs.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Python MCP server that queries Spanish Cadastre services for non-protected cadastral data and exports parcel geometry in GML, GeoJSON, and IFC formats.195-

io.github.stucchi/italyofficial
AlicenseNot gradedqualityDmaintenanceMCP server exposing Italian open data (municipalities, provinces, regions, postal codes, coordinates, geographic data) through simple, developer-friendly tools.1MIT- AlicenseAqualityCmaintenanceMCP server for Russian Rosreestr open cadastral data — lookup by cadastral number, address or coordinates; cadastral value with history.446 PyPI1MIT
- AlicenseAqualityDmaintenanceMCP server for the Spanish Cadastre, enabling local queries of official INSPIRE parcel data (area, geometry, neighboring parcels, searches) and online queries to the OVC and electronic headquarters for additional details, with rate limiting and caching.1025 npm1MIT