@spain-ai-kit/catastro-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +220 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { BaseAPIClient, parseXML, wrapToolHandler, validateProvinceCode, validateMunicipalityCode, validateCadastralRef, validateCoordinate, } from '@spain-ai-kit/shared';
|
|
5
|
+
import { z } from 'zod/v3';
|
|
6
|
+
const CALLEJERO_BASE = 'https://ovc.catastro.meh.es/ovcservweb/OVCSWLocalizacionRC/OVCCallejeroCodigos.asmx/';
|
|
7
|
+
const COORDENADAS_BASE = 'https://ovc.catastro.meh.es/ovcservweb/OVCSWLocalizacionRC/OVCCoordenadas.asmx/';
|
|
8
|
+
const callejero = new BaseAPIClient({
|
|
9
|
+
baseURL: CALLEJERO_BASE,
|
|
10
|
+
cacheTTL: 10 * 60 * 1000,
|
|
11
|
+
maxRequestsPerSecond: 5,
|
|
12
|
+
});
|
|
13
|
+
const coordenadas = new BaseAPIClient({
|
|
14
|
+
baseURL: COORDENADAS_BASE,
|
|
15
|
+
cacheTTL: 10 * 60 * 1000,
|
|
16
|
+
maxRequestsPerSecond: 5,
|
|
17
|
+
});
|
|
18
|
+
const server = new McpServer({
|
|
19
|
+
name: '@spain-ai-kit/catastro-mcp-server',
|
|
20
|
+
version: '0.1.0',
|
|
21
|
+
});
|
|
22
|
+
function extractCatastroError(parsed) {
|
|
23
|
+
const root = Object.values(parsed)[0];
|
|
24
|
+
if (!root)
|
|
25
|
+
return null;
|
|
26
|
+
const lerr = root['lerr'];
|
|
27
|
+
if (!lerr)
|
|
28
|
+
return null;
|
|
29
|
+
const err = lerr['err'];
|
|
30
|
+
if (!err)
|
|
31
|
+
return null;
|
|
32
|
+
return err['des'] ?? null;
|
|
33
|
+
}
|
|
34
|
+
// ─── Directory tools ────────────────────────────────────────────────────────
|
|
35
|
+
server.tool('list_provinces', 'List all Spanish provinces with their codes. Use province codes for other Catastro lookups.', {}, wrapToolHandler(async () => {
|
|
36
|
+
const xml = await callejero.get('ConsultaProvincia', {
|
|
37
|
+
cacheTTL: 24 * 60 * 60 * 1000,
|
|
38
|
+
responseType: 'text',
|
|
39
|
+
});
|
|
40
|
+
const parsed = parseXML(xml);
|
|
41
|
+
const error = extractCatastroError(parsed);
|
|
42
|
+
if (error)
|
|
43
|
+
throw new Error(`Catastro error: ${error}`);
|
|
44
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
45
|
+
}));
|
|
46
|
+
// @ts-expect-error — MCP SDK deep type instantiation with zod generics
|
|
47
|
+
server.tool('list_municipalities', 'List municipalities in a Spanish province. Use the province code from list_provinces.', { provinceCode: z.string() }, wrapToolHandler(async ({ provinceCode }) => {
|
|
48
|
+
validateProvinceCode(provinceCode);
|
|
49
|
+
const xml = await callejero.get('ConsultaMunicipioCodigos', {
|
|
50
|
+
cacheTTL: 24 * 60 * 60 * 1000,
|
|
51
|
+
responseType: 'text',
|
|
52
|
+
params: {
|
|
53
|
+
CodigoProvincia: provinceCode,
|
|
54
|
+
CodigoMunicipio: '',
|
|
55
|
+
CodigoMunicipioINE: '',
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
const parsed = parseXML(xml);
|
|
59
|
+
const error = extractCatastroError(parsed);
|
|
60
|
+
if (error)
|
|
61
|
+
throw new Error(`Catastro error: ${error}`);
|
|
62
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
63
|
+
}));
|
|
64
|
+
server.tool('list_streets', 'List streets in a municipality. Use codes from list_provinces and list_municipalities.', { provinceCode: z.string(), municipalityCode: z.string() }, wrapToolHandler(async ({ provinceCode, municipalityCode }) => {
|
|
65
|
+
validateProvinceCode(provinceCode);
|
|
66
|
+
validateMunicipalityCode(municipalityCode);
|
|
67
|
+
const xml = await callejero.get('ConsultaViaCodigos', {
|
|
68
|
+
cacheTTL: 1 * 60 * 60 * 1000,
|
|
69
|
+
responseType: 'text',
|
|
70
|
+
params: {
|
|
71
|
+
CodigoProvincia: provinceCode,
|
|
72
|
+
CodigoMunicipio: municipalityCode,
|
|
73
|
+
CodigoMunicipioINE: '',
|
|
74
|
+
CodigoVia: '',
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
const parsed = parseXML(xml);
|
|
78
|
+
const error = extractCatastroError(parsed);
|
|
79
|
+
if (error)
|
|
80
|
+
throw new Error(`Catastro error: ${error}`);
|
|
81
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
82
|
+
}));
|
|
83
|
+
server.tool('lookup_address', 'Get the cadastral reference for a specific street address. Use street codes from list_streets.', {
|
|
84
|
+
provinceCode: z.string(),
|
|
85
|
+
municipalityCode: z.string(),
|
|
86
|
+
streetCode: z.string(),
|
|
87
|
+
number: z.string(),
|
|
88
|
+
}, wrapToolHandler(async ({ provinceCode, municipalityCode, streetCode, number }) => {
|
|
89
|
+
validateProvinceCode(provinceCode);
|
|
90
|
+
validateMunicipalityCode(municipalityCode);
|
|
91
|
+
const xml = await callejero.get('ConsultaNumeroCodigos', {
|
|
92
|
+
responseType: 'text',
|
|
93
|
+
params: {
|
|
94
|
+
CodigoProvincia: provinceCode,
|
|
95
|
+
CodigoMunicipio: municipalityCode,
|
|
96
|
+
CodigoMunicipioINE: '',
|
|
97
|
+
CodigoVia: streetCode,
|
|
98
|
+
Numero: number,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
const parsed = parseXML(xml);
|
|
102
|
+
const error = extractCatastroError(parsed);
|
|
103
|
+
if (error)
|
|
104
|
+
throw new Error(`Catastro error: ${error}`);
|
|
105
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
106
|
+
}));
|
|
107
|
+
// ─── Property tools ──────────────────────────────────────────────────────────
|
|
108
|
+
server.tool('get_property', 'Get property data (non-protected) by cadastral reference. Returns building info, area, use type.', {
|
|
109
|
+
provinceCode: z.string(),
|
|
110
|
+
municipalityCode: z.string(),
|
|
111
|
+
cadastralRef: z.string(),
|
|
112
|
+
}, wrapToolHandler(async ({ provinceCode, municipalityCode, cadastralRef }) => {
|
|
113
|
+
validateProvinceCode(provinceCode);
|
|
114
|
+
validateMunicipalityCode(municipalityCode);
|
|
115
|
+
validateCadastralRef(cadastralRef);
|
|
116
|
+
const xml = await callejero.get('Consulta_DNPRC_Codigos', {
|
|
117
|
+
responseType: 'text',
|
|
118
|
+
params: {
|
|
119
|
+
CodigoProvincia: provinceCode,
|
|
120
|
+
CodigoMunicipio: municipalityCode,
|
|
121
|
+
CodigoMunicipioINE: '',
|
|
122
|
+
RC: cadastralRef,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
const parsed = parseXML(xml);
|
|
126
|
+
const error = extractCatastroError(parsed);
|
|
127
|
+
if (error)
|
|
128
|
+
throw new Error(`Catastro error: ${error}`);
|
|
129
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
130
|
+
}));
|
|
131
|
+
server.tool('get_property_by_parcel', 'Get property data by polygon and parcel codes (rural properties).', {
|
|
132
|
+
provinceCode: z.string(),
|
|
133
|
+
municipalityCode: z.string(),
|
|
134
|
+
polygon: z.string(),
|
|
135
|
+
parcel: z.string(),
|
|
136
|
+
}, wrapToolHandler(async ({ provinceCode, municipalityCode, polygon, parcel }) => {
|
|
137
|
+
validateProvinceCode(provinceCode);
|
|
138
|
+
validateMunicipalityCode(municipalityCode);
|
|
139
|
+
const xml = await callejero.get('Consulta_DNPPP_Codigos', {
|
|
140
|
+
responseType: 'text',
|
|
141
|
+
params: {
|
|
142
|
+
CodigoProvincia: provinceCode,
|
|
143
|
+
CodigoMunicipio: municipalityCode,
|
|
144
|
+
CodigoMunicipioINE: '',
|
|
145
|
+
CodigoPoligono: polygon,
|
|
146
|
+
CodigoParcela: parcel,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
const parsed = parseXML(xml);
|
|
150
|
+
const error = extractCatastroError(parsed);
|
|
151
|
+
if (error)
|
|
152
|
+
throw new Error(`Catastro error: ${error}`);
|
|
153
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
154
|
+
}));
|
|
155
|
+
// ─── Geocoding tools ─────────────────────────────────────────────────────────
|
|
156
|
+
server.tool('get_coordinates', 'Get geographic coordinates (lat/lon) for a cadastral reference.', {
|
|
157
|
+
provinceCode: z.string(),
|
|
158
|
+
municipalityCode: z.string(),
|
|
159
|
+
cadastralRef: z.string(),
|
|
160
|
+
}, wrapToolHandler(async ({ provinceCode, municipalityCode, cadastralRef }) => {
|
|
161
|
+
validateProvinceCode(provinceCode);
|
|
162
|
+
validateMunicipalityCode(municipalityCode);
|
|
163
|
+
validateCadastralRef(cadastralRef);
|
|
164
|
+
const xml = await coordenadas.get('Consulta_CPMRC', {
|
|
165
|
+
responseType: 'text',
|
|
166
|
+
params: {
|
|
167
|
+
Provincia: provinceCode,
|
|
168
|
+
Municipio: municipalityCode,
|
|
169
|
+
SRS: 'EPSG:4326',
|
|
170
|
+
RC: cadastralRef,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
const parsed = parseXML(xml);
|
|
174
|
+
const error = extractCatastroError(parsed);
|
|
175
|
+
if (error)
|
|
176
|
+
throw new Error(`Catastro error: ${error}`);
|
|
177
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
178
|
+
}));
|
|
179
|
+
server.tool('get_reference_at_coordinates', 'Reverse geocode: get the cadastral reference at specific coordinates.', { lat: z.number(), lon: z.number() }, wrapToolHandler(async ({ lat, lon }) => {
|
|
180
|
+
validateCoordinate(lat, 'latitude');
|
|
181
|
+
validateCoordinate(lon, 'longitude');
|
|
182
|
+
const xml = await coordenadas.get('Consulta_RCCOOR', {
|
|
183
|
+
responseType: 'text',
|
|
184
|
+
params: { SRS: 'EPSG:4326', Coordenada_X: lon, Coordenada_Y: lat },
|
|
185
|
+
});
|
|
186
|
+
const parsed = parseXML(xml);
|
|
187
|
+
const error = extractCatastroError(parsed);
|
|
188
|
+
if (error)
|
|
189
|
+
throw new Error(`Catastro error: ${error}`);
|
|
190
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
191
|
+
}));
|
|
192
|
+
// @ts-expect-error — MCP SDK deep type instantiation with zod generics
|
|
193
|
+
server.tool('find_properties_nearby', 'Find cadastral references within a distance of given coordinates.', { lat: z.number(), lon: z.number(), distance: z.number().optional() }, wrapToolHandler(async ({ lat, lon, distance }) => {
|
|
194
|
+
validateCoordinate(lat, 'latitude');
|
|
195
|
+
validateCoordinate(lon, 'longitude');
|
|
196
|
+
const xml = await coordenadas.get('Consulta_RCCOOR_Distancia', {
|
|
197
|
+
responseType: 'text',
|
|
198
|
+
params: {
|
|
199
|
+
SRS: 'EPSG:4326',
|
|
200
|
+
Coordenada_X: lon,
|
|
201
|
+
Coordenada_Y: lat,
|
|
202
|
+
Distancia: distance ?? 50,
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
const parsed = parseXML(xml);
|
|
206
|
+
const error = extractCatastroError(parsed);
|
|
207
|
+
if (error)
|
|
208
|
+
throw new Error(`Catastro error: ${error}`);
|
|
209
|
+
return { content: [{ type: 'text', text: JSON.stringify(parsed, null, 2) }] };
|
|
210
|
+
}));
|
|
211
|
+
async function main() {
|
|
212
|
+
const transport = new StdioServerTransport();
|
|
213
|
+
await server.connect(transport);
|
|
214
|
+
console.error('Catastro MCP Server running on stdio');
|
|
215
|
+
}
|
|
216
|
+
main().catch((error) => {
|
|
217
|
+
console.error('Fatal error:', error);
|
|
218
|
+
process.exit(1);
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,cAAc,GAClB,sFAAsF,CAAC;AACzF,MAAM,gBAAgB,GACpB,iFAAiF,CAAC;AAEpF,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC;IAClC,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IACxB,oBAAoB,EAAE,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,IAAI,aAAa,CAAC;IACpC,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IACxB,oBAAoB,EAAE,CAAC;CACxB,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,SAAS,oBAAoB,CAAC,MAA+B;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAwC,CAAC;IAC7E,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAwC,CAAC;IACjE,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,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K,CAAC,mBAAmB,KAAK,EAAE,CAAC,CAAC;IACvD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AAChF,CAAC,CAAC,CACH,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spain-ai-kit/catastro-mcp-server",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "MCP server for Catastro (Dirección General del Catastro) - Spanish Land Registry",
|
|
5
|
+
"private": false,
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"catastro-mcp-server": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/aplaceforallmystuff/spain-ai-kit.git",
|
|
19
|
+
"directory": "mcp/catastro"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"spain",
|
|
24
|
+
"catastro",
|
|
25
|
+
"cadastre",
|
|
26
|
+
"property",
|
|
27
|
+
"land-registry",
|
|
28
|
+
"ai",
|
|
29
|
+
"claude"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"start": "node dist/index.js",
|
|
34
|
+
"dev": "tsx watch src/index.ts",
|
|
35
|
+
"test": "vitest run"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
39
|
+
"@spain-ai-kit/shared": "*",
|
|
40
|
+
"axios": "^1.11.0",
|
|
41
|
+
"zod": "^3.25.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^22.0.0",
|
|
45
|
+
"tsx": "^4.0.0",
|
|
46
|
+
"typescript": "^5.9.0",
|
|
47
|
+
"vitest": "^2.0.0"
|
|
48
|
+
}
|
|
49
|
+
}
|