datos.gob.es
MCP server for check Spanish Administrations data sets using datos.gob.es web API
claude mcp add --transport stdio ancode666-datos.gob.es-mcp uvx datos_gob_es_mcp
How to use
Datos.gob.es-mcp exposes tools to query and analyze the Spanish Government Open Data Portal directly through MCP clients. It supports keyword search across dataset titles, descriptions and tags, thematic category filtering (environment, transportation, education, etc.), detailed metadata per dataset, listing of available distributions with formats and access URLs, and the ability to run custom SPARQL queries against the official endpoint. This enables language models and other MCP clients to discover datasets, inspect metadata, and retrieve links or access points in a structured, queryable manner. To use it with Claude or other compatible MCP clients, configure the MCP server block so the client can invoke the server via the uvx runner (or equivalent) and pass user prompts that map to search, filter, or metadata actions. Examples of typical prompts include asking for datasets about public transportation in a city, requesting the latest datasets from a specific institution, or requesting detailed metadata for a given dataset URI.
How to install
Prerequisites:
- Python 3.10 or higher
- uv (modern Python package manager) installed on your system
Installation steps:
-
Install uv using the recommended method for your OS
- macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
- Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Alternative (pip): pip install uv
-
Ensure uv is available in your PATH. Verify by running: uv --version
-
Install the MCP package or the unit you will run with uvx. In this setup, the server is invoked via uvx with the package name datos_gob_es_mcp, so install the corresponding MCP package-package if required by your workflow (the exact install command may depend on your environment or package repository). Example usage is shown in the configuration: uvx datos_gob_es_mcp
-
Run the server with the configured command. For example, in a shell you can start it as: uvx datos_gob_es_mcp
-
Connect your MCP client (e.g., Claude Desktop, Cursor, CODEGPT, Roo Code) using the following MCP block (as shown in the README): { "datos_gob_es_mcp": { "command": "uvx", "args": ["datos_gob_es_mcp"] } }
Prerequisites note: If you plan to run locally, ensure network access to datos.gob.es and that you comply with any rate limits or terms of use of the portal.
Additional notes
Tips and considerations:
- The MCP server relies on the datos.gob.es portal’s metadata and SPARQL endpoint; accuracy depends on portal availability and dataset tagging.
- If you encounter timeouts or large result sets, consider adding more specific search terms or filters to reduce response size.
- You may need to adjust environment variables or authentication if the provider requires API keys or restricted endpoints; the README example uses open access features, but check for any portal access requirements.
- When integrating with different MCP clients, ensure the client’s MCP configuration matches the expected structure (same server key as datos_gob_es_mcp in the example).
- If you’re running behind a proxy or corporate firewall, ensure Python/uv can reach datos.gob.es endpoints and the MCP server loop remains responsive.
- For SPARQL queries, confirm the endpoint URL and any query limits; verbose queries can be expensive in terms of response size and latency.
Related MCP Servers
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
mcp-yfinance
Real-time stock API with Python, MCP server example, yfinance stock analysis dashboard
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp
servicenow-api
ServiceNow MCP Server and API Wrapper
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools