Skip to main content

Open data from Spain Government API integration with MCP (Model Context Protocol)

Project description

en es

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:

  1. Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json
  2. Add this configuration block under "mcpServers":
"datos_gob_es_mcp": {
    "command": "uvx",
    "args": [
        "datos_gob_es_mcp"
    ]
}
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datos_gob_es_mcp-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datos_gob_es_mcp-0.1.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

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

Hashes for datos_gob_es_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 36ab0ef78d5ffe10575f15c7398ec25cf378d9c40ea247b98bcca0020d4ad3ab
MD5 50c63da5221fbaea92dd034bbe9d89f3
BLAKE2b-256 4297a89d6f78918b508e080112f97f35a09bc07d9dc2434829da40408bf2ad7b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datos_gob_es_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for datos_gob_es_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 327bd628ec8e22f0ea048c151e7c2041c6aa5aad49d19b0703aa58c847e091f4
MD5 56e1ab82308cce859a3217a372724d2e
BLAKE2b-256 50cafd735a8c676080b2ab0f72a7985f1de8fa6f6e4772a7b9ef4132c476f394

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page