Spain AI Kit
Click on "Install 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., "@Spain AI KitWhat's the weather forecast for Barcelona tomorrow?"
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.
🏛️ Spain AI Kit 🇪🇸

Plaza de España, Sevilla — AI-generated hero image
This is a community-driven open source project and is not affiliated with, endorsed by, or connected to the Spanish government or any official Spanish institutions. All data is sourced from public APIs published by their respective agencies.
🌍 Spain's Open Data Landscape
Spain runs one of Europe's most extensive public data infrastructures. The BoletĂn Oficial del Estado traces its lineage to the Gaceta de Madrid — first published in 1661 — and today publishes every national law, royal decree, and official announcement as structured open data. The Instituto Nacional de EstadĂstica exposes thousands of statistical series through a public JSON API. The Catastro offers free cadastral lookups for every property in the country. AEMET serves forecasts for more than 8,000 municipalities across Spain's 17 autonomous communities and two autonomous cities.
The problem: most of this is locked behind XML envelopes, SOAP endpoints, Spanish-only documentation, and idiosyncratic JSON-stat formats. Spain AI Kit makes it usable from an AI assistant in one line of config.
12,000+ consolidated Spanish laws queryable as Markdown (national + all 17 autonomous communities)
70+ statistical operations from INE — demographics, economics, employment, housing, tourism
50 provinces, 8,000+ municipalities covered for address and cadastral lookups
Daily BOE gazette searchable by date, keyword, subject, or legal scope
Weather, UV, fire risk, and beach forecasts for the whole country
Related MCP server: mcp-brasil
đź“– What is Spain AI Kit?
Spain AI Kit is a collection of MCP (Model Context Protocol) servers that connect AI assistants — Claude Desktop, Claude Code, Cursor, and anything else that speaks MCP — directly to Spanish government open data APIs. No scraping, no API wrangling, no translating Spanish JSON-stat by hand.
🎯 What is MCP?
Model Context Protocol is an open standard that lets AI applications plug into external data sources and tools through a consistent interface. Each Spain AI Kit package is a standalone MCP server you can install and mount independently — use one, use them all, or compose them with other MCP servers.
Inspired by estonia-ai-kit by Stefano Amorelli.
📦 What's Included
Package | Description | Data source | Auth | Status |
National statistics (demographics, economy, employment) | None | âś… Shipped | ||
Official gazette + 12,000+ consolidated laws | None | âś… Shipped | ||
Land registry, addresses, geocoding | None | âś… Shipped | ||
Weather, forecasts, UV, alerts, fire risk | Free API key | âś… Shipped | ||
Shared utilities (HTTP client, XML parser, validators) | — | — | ✅ Ready |
🗺️ Roadmap
Service | Description | Auth |
datos.gob.es | National open data catalog (CKAN) — umbrella over thousands of datasets | None |
CNMV | Comisión Nacional del Mercado de Valores — securities market commission | None |
AEAT | Agencia Tributaria — tax declarations and obligations | Cl@ve |
SEPE | Servicio Público de Empleo Estatal — employment service | Cl@ve |
🚀 Quick Start
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"spain-ine": {
"command": "npx",
"args": ["@spain-ai-kit/ine-mcp-server"]
},
"spain-boe": {
"command": "npx",
"args": ["@spain-ai-kit/boe-mcp-server"]
},
"spain-catastro": {
"command": "npx",
"args": ["@spain-ai-kit/catastro-mcp-server"]
},
"spain-aemet": {
"command": "npx",
"args": ["@spain-ai-kit/aemet-mcp-server"],
"env": {
"AEMET_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
claude mcp add spain-ine -- npx @spain-ai-kit/ine-mcp-server
claude mcp add spain-boe -- npx @spain-ai-kit/boe-mcp-server
claude mcp add spain-catastro -- npx @spain-ai-kit/catastro-mcp-server
claude mcp add spain-aemet --env AEMET_API_KEY=your-key -- npx @spain-ai-kit/aemet-mcp-serverAEMET API key — The weather server requires a free API key. Get one in 30 seconds at opendata.aemet.es — just enter your email. The other three servers need zero setup.
Try it
Once configured, ask your AI assistant things like:
đź’¬ "What is the current CPI in Spain?"
đź’¬ "Search Spanish law about data protection and summarise the most recent changes"
đź’¬ "Show me employment statistics for Valencia province over the last 5 years"
đź’¬ "What does the foreigners law say about residence permits for UK nationals?"
đź’¬ "What property is at Calle Gran VĂa 1, Madrid? Get me the cadastral reference"
đź’¬ "Is there a weather alert for AndalucĂa today?"
💬 "What's the UV index in Málaga and should I put sunscreen on the kids?"
đź’¬ "Find properties within 100 metres of these coordinates"
For detailed usage examples, tips, and troubleshooting, see the User Guide.
đź”§ MCP Servers
INE — National Statistics
@spain-ai-kit/ine-mcp-server — connects to the Instituto Nacional de EstadĂstica JSON API. 70+ statistical operations covering demographics, economics, employment, housing, tourism, and more.
Tool | Description |
| List all available statistical operations |
| Search operations by keyword (in Spanish) |
| Get metadata for a specific operation |
| List data tables for an operation |
| Get actual data from a table |
| Get a specific time series |
| Get values for a variable (provinces, age groups, etc.) |
BOE — Legislation
@spain-ai-kit/boe-mcp-server — connects to the BoletĂn Oficial del Estado open data API and the legalize-es legislation corpus.
Tool | Description |
| Search consolidated legislation by keyword, date, scope |
| Get full document with metadata and legal analysis |
| Get document metadata (title, dates, status) |
| Get legal analysis (subjects, references, amendments) |
| Get table of contents (articles, sections) |
| Get text of a specific article |
| Get BOE daily gazette for a date |
| List all subject categories |
| List all government departments that publish in the BOE |
| List legal scopes (Estatal, AutonĂłmico, etc.) |
| List legal document types (Ley Orgánica, Real Decreto, etc.) |
| Full-text search across 12,000+ laws (requires legalize-es submodule) |
| Read a specific law's full Markdown text |
Catastro — Land Registry
@spain-ai-kit/catastro-mcp-server — connects to the Dirección General del Catastro web services. Property lookups, address resolution, and geocoding for all of Spain.
Tool | Description |
| List all Spanish provinces with codes |
| List municipalities in a province |
| List streets in a municipality |
| Get cadastral reference for a street address |
| Get property data by cadastral reference |
| Get property data by polygon/parcel codes |
| Get lat/lon for a cadastral reference |
| Reverse geocode: coordinates to cadastral reference |
| Find properties within distance of coordinates |
AEMET — Weather
@spain-ai-kit/aemet-mcp-server — connects to AEMET OpenData for weather forecasts, observations, and alerts across Spain.
Tool | Description |
| Search municipalities by name for forecast codes |
| List all 8,000+ Spanish municipalities |
| Daily weather forecast for a municipality |
| Hourly forecast (48h) for a municipality |
| Current weather from all stations |
| Last 12h observations from a specific station |
| Active adverse weather alerts by region |
| Beach weather forecast |
| UV radiation index prediction |
| Forest fire risk levels |
📚 Legislation Corpus
The BOE server optionally integrates with legalize-es, which provides the full consolidated text of 12,000+ Spanish laws as Markdown files with Git-tracked reform history.
To enable corpus search, clone with submodules:
git clone --recurse-submodules https://github.com/aplaceforallmystuff/spain-ai-kit.git
# Or if already cloned:
git submodule update --initCoverage: national legislation + all 17 autonomous communities and 2 autonomous cities — AndalucĂa, AragĂłn, Asturias, Baleares, Canarias, Cantabria, Castilla-La Mancha, Castilla y LeĂłn, Catalunya, Ceuta, Extremadura, Galicia, La Rioja, Madrid, Melilla, Murcia, Navarra, PaĂs Vasco, Valencia.
⚡ Technical Stack
Component | Technology | Purpose |
MCP servers | TypeScript, | AI assistant integration |
HTTP | Native fetch with rate limiting | API communication |
Data formats | JSON-stat 2.0, XML (fast-xml-parser), JSON | Handle varied Spanish government data formats |
Monorepo | Nx + npm workspaces | Consistent tooling and code sharing |
Testing | Unit and integration tests | |
Types | TypeScript strict mode, ES2022 | Type safety across the kit |
🛠️ Project Structure
spain-ai-kit/
├── mcp/
│ ├── ine/ # INE Statistics MCP server
│ ├── boe/ # BOE Legislation MCP server
│ ├── catastro/ # Catastro Land Registry MCP server
│ └── aemet/ # AEMET Weather MCP server
├── packages/
│ └── shared/ # Shared utilities (HTTP client, XML parser, validators)
├── corpus/
│ └── legalize-es/ # Git submodule — legislation as Markdown
├── docs/
│ └── GUIDE.md # User guide with examples and troubleshooting
├── nx.json
└── tsconfig.base.json🧑‍💻 Development
Prerequisites
Git (with submodule support for the legislation corpus)
Setup
# Clone with submodules
git clone --recurse-submodules https://github.com/aplaceforallmystuff/spain-ai-kit.git
cd spain-ai-kit
# Install all workspace dependencies
npm install
# Build all packages (shared first, then MCP servers)
npm run build
# Run tests
npm test
# Format with Prettier
npm run format
# Watch mode for development
npm run devConventions
npm scope:
@spain-ai-kit/*MCP servers:
@spain-ai-kit/{service}-mcp-serverShared code:
@spain-ai-kit/sharedTypeScript strict mode, ES2022 target
All tool handlers wrapped with
wrapToolHandler(unified error handling)All user inputs validated before API calls (validators live in
@spain-ai-kit/shared)Rate limiting on all API clients (
maxRequestsPerSecond)
đź”— Spanish Government Resources
🏛️ BOE — BoletĂn Oficial del Estado — Official State Gazette
📊 INE — Instituto Nacional de EstadĂstica — National Statistics Institute
🏠Catastro — Dirección General del Catastro — Land registry
🌤️ AEMET — Agencia Estatal de MeteorologĂa — State Meteorological Agency
📂 datos.gob.es — National open data portal
🧾 AEAT — Agencia Tributaria — Tax agency
💼 SEPE — Servicio Público de Empleo Estatal — Employment service
🤝 Contributing
PRs and issues welcome. See CONTRIBUTING.md for guidelines on adding new MCP servers and contributing to existing ones.
Fork → Branch → Commit → Push → PR
⚖️ License
MIT — see LICENSE for details.
Legislative content sourced from public government APIs is in the public domain. The legalize-es corpus is distributed under its own license — see that repository for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aplaceforallmystuff/spain-ai-kit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server