Open data from Spain Government API integration with MCP (Model Context Protocol)
Project description
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.
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 | sh
En Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
También se puede instalar con pip:
pip install uv
For 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.json - Add 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"`
---
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datos_gob_es_mcp-0.1.0.tar.gz.
File metadata
- Download URL: datos_gob_es_mcp-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ab0ef78d5ffe10575f15c7398ec25cf378d9c40ea247b98bcca0020d4ad3ab
|
|
| MD5 |
50c63da5221fbaea92dd034bbe9d89f3
|
|
| BLAKE2b-256 |
4297a89d6f78918b508e080112f97f35a09bc07d9dc2434829da40408bf2ad7b
|
Provenance
The following attestation bundles were made for datos_gob_es_mcp-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on AnCode666/datos.gob.es-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datos_gob_es_mcp-0.1.0.tar.gz -
Subject digest:
36ab0ef78d5ffe10575f15c7398ec25cf378d9c40ea247b98bcca0020d4ad3ab - Sigstore transparency entry: 201053468
- Sigstore integration time:
-
Permalink:
AnCode666/datos.gob.es-mcp@51edfc0af36bc6061baea68cbd0f975d692080a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AnCode666
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@51edfc0af36bc6061baea68cbd0f975d692080a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file datos_gob_es_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datos_gob_es_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
327bd628ec8e22f0ea048c151e7c2041c6aa5aad49d19b0703aa58c847e091f4
|
|
| MD5 |
56e1ab82308cce859a3217a372724d2e
|
|
| BLAKE2b-256 |
50cafd735a8c676080b2ab0f72a7985f1de8fa6f6e4772a7b9ef4132c476f394
|
Provenance
The following attestation bundles were made for datos_gob_es_mcp-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on AnCode666/datos.gob.es-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datos_gob_es_mcp-0.1.0-py3-none-any.whl -
Subject digest:
327bd628ec8e22f0ea048c151e7c2041c6aa5aad49d19b0703aa58c847e091f4 - Sigstore transparency entry: 201053469
- Sigstore integration time:
-
Permalink:
AnCode666/datos.gob.es-mcp@51edfc0af36bc6061baea68cbd0f975d692080a4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AnCode666
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@51edfc0af36bc6061baea68cbd0f975d692080a4 -
Trigger Event:
release
-
Statement type: