Datos.gob.es-MCP
Click on "Deploy 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., "@Datos.gob.es-MCP Search for datasets about air quality in Madrid"
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.
Datos.gob.es-MCP. MCP integration with the Spanish Government Open Data Portal
Datos.gob.es-mcp enables querying and analyzing over 90,000 public datasets available on the datos.gob.es portal directly from Claude AI and other compatible MCP clients using the Model Context Protocol (MCP).
This MCP server exposes tools for LLMs to search, filter, and access open data across multiple sectors.
Main features
Keyword search across dataset titles, descriptions and tags.
Thematic category filtering (environment, transportation, education, etc.)
Detailed metadata access for each dataset.
Available distributions listing (formats and access URLs)
Custom SPARQL queries execution against the official SPARQL endpoint.
Related MCP server: Opendata.cat MCP Server
Installation
Install via uv
Prerequisites
Python 3.10 or higher
uv package manager
uv Installation
First install uv, a modern Python package manager.
Install from command line:
En MAC y Linux:
curl -LsSf https://astral.sh/uv/install.sh | shEn Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"También se puede instalar con pip:
pip install uvFor more information about installing uv, visit the uv documentation.
Integration with clients like Claude for Desktop
Once uv is installed, you can use the MCP server with any compatible client like Claude Desktop. Configuration steps:
Go to Claude > Settings > Developer > Edit Config >
claude_desktop_config.jsonAdd this configuration block under
"mcpServers":
"datos_gob_es_mcp": {
"command": "uvx",
"args": [
"datos_gob_es_mcp"
]
}If you have other MCP servers configured, separate them with commas
,
For other MCP-compatible clients like Cursor, CODEGPT or Roo Code, add the same configuration block to their respective MCP server settings.
Usage Examples
Once properly configured, you can request operations like:
- "Search for public transportation datasets in Madrid"
- "List latest datasets published by Barcelona City Council"
- "Show details for dataset with URI https://datos.gob.es/es/catalogo/l01330241-padron-de-vehiculos-ano-2023-autobuses"
---Available Tools
10 toolsget_dataset_detailsC
Get detailed information about a specific dataset.
Args: dataset_uri: URI of the dataset to get details for
Inputs: dataset_uri (required).
get_dataset_distributionsC
Get available distributions (file formats) for a specific dataset.
Args: dataset_uri: URI of the dataset
Inputs: dataset_uri (required).
get_datasets_by_themeA
Get datasets belonging to a specific theme/category.
Args: theme_uri: URI of the theme limit: Maximum number of datasets to return (default: 10)
Inputs: theme_uri (required), limit.
get_latest_datasetsC
Get the most recently published datasets.
Args: limit: Maximum number of datasets to return (default: 10)
Inputs: limit.
get_publisher_datasetsB
Get datasets published by a specific organization.
Args: publisher_uri: URI of the publisher limit: Maximum number of datasets to return (default: 10)
Inputs: publisher_uri (required), limit.
list_datasetsB
List datasets available in the Spanish Government Open Data Portal.
Args: limit: Maximum number of datasets to return (default: 10)
Inputs: limit.
list_publishersB
List publishers (organizations) that publish datasets.
Args: limit: Maximum number of publishers to return (default: 10)
Inputs: limit.
list_themesA
List all themes/categories available in the data portal.
Inputs: no named parameters.
run_custom_sparqlC
Run a custom SPARQL query against the datos.gob.es endpoint.
Args: sparql_query: SPARQL query string (must be valid SPARQL)
Inputs: sparql_query (required).
search_datasetsA
Search datasets by keyword in title, description, and keywords/tags.
Args: keyword: Keyword to search for (case-insensitive). limit: Maximum number of datasets to return (default: 10).
Inputs: keyword (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: listing, searching, filtering by theme/publisher, getting details/distributions, and running SPARQL queries. There is no overlap that could cause confusion.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_datasets, get_dataset_details). The only exception, run_custom_sparql, still fits the verb_noun style and is clear.
10 tools is well-scoped for the domain of accessing open government data, covering all essential operations without being excessive or too few.
The tool set covers dataset discovery, filtering, details, and distributions, plus listing publishers and themes. A custom SPARQL endpoint adds flexibility. Minor gaps include no drill-down into publisher/theme details, but core workflows are supported.
Maintenance
Related MCP Connectors
Discover, resolve, and query official Brazilian economic data with semantic search and provenance.
Search, sample and query open reproducible datasets published as immutable Parquet with schemas.
Search open Spanish public-sector tenders, updated daily, and estimate an offer. Read-only.
31Search 77k public-sector open data APIs across 10 countries. Read-only, no API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables discovering, describing, and querying public datasets from Catalunya, including Socrata, IDESCAT, and Open Data BCN portals.22MIT
- AlicenseAqualityCmaintenanceConnects LLMs to over 2,850 datasets from 13 Catalan and Spanish open data portals, enabling natural language search and real-time queries of public data.877 npm22MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying Portugal's national open data portal (dados.gov.pt) through natural language.318 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search and retrieve datasets, publishers, and themes from Spain's national open-data catalogue through keyless MCP tools or HTTP endpoints.128 npmMIT