LabscoMCP early access ↗
AlbertoUAHMCP SERVER

Open Data Spain MCP

Spain's open-data catalogue, national statistics, weather and the official gazette behind one MCP server.

by AlbertoUAH ↗Government, Legal & Legislative RecordsCommunity

LABSCO SUMMARY

Four Spanish public APIs, one vocabulary.

The value is not any single source but the fact that a question spanning them — employment statistics from INE next to a budget dataset from a city council, on the day the gazette published the rule — becomes one conversation. Semantic search over the catalogue matters here, because Spanish dataset titles rarely match the words you would use.

What it is

One MCP server over four Spanish public-data sources: the national open-data catalogue datos.gob.es, the statistics institute INE, the meteorological agency AEMET, and the official state gazette BOE. Instead of four clients and four auth schemes, an agent asks one server.

What you get

  • Catalogue search and download — search filters datasets by title, theme, publisher, format or date, or matches by meaning using embeddings; get returns metadata and, with include_data=true, parses the CSV or JSON in the same call
  • Official statistics — ine_search finds statistical operations or lists their tables, ine_download pulls the actual series
  • Weather — aemet_list_locations, aemet_get_observations for a station, and aemet_get_forecast, which accepts a municipality name such as Madrid rather than a code
  • The state gazette — boe_get_summary for a day's issue, boe_get_document by ID, and boe_search for full text over a date range
  • Five resource templates (dataset://{dataset_id}, theme://{theme_id}, publisher://{publisher_id}, format://{format_id}, keyword://{keyword}) and six guided search prompts

Requirements

Python 3.10 or higher. Clone the repo and install with make dev, then run mcp run server.py. Only AEMET needs a key — set AEMET_API_KEY (free) if you want weather; the other three sources are open. Per-source rate limits and log level are configurable through environment variables. Package version 1.2.0.

Setup effort

Build from source — git clone https://github.com/AlbertoUAH/datos-gob-es-mcp.git