# España — datos oficiales (MCP server) (`daniizarsan/mcp-espana-datos`) Actor

Servidor MCP que expone 6 herramientas sobre datos oficiales españoles: buscar convocatorias de subvención (BDNS), ficha de subvención con BOE, sociedades del Registro Mercantil (BORME), ficha catastral de inmuebles y subastas públicas (inmuebles/vehículos) del BOE.

- **URL**: https://apify.com/daniizarsan/mcp-espana-datos.md
- **Developed by:** [Daniel de la Zarza Sánchez](https://apify.com/daniizarsan) (community)
- **Categories:** MCP servers
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## España — datos oficiales (MCP server)

Servidor MCP que conecta Claude Desktop, Cursor, n8n o cualquier cliente MCP con **datos oficiales españoles**: subvenciones (BDNS), Registro Mercantil (BORME), Catastro inmobiliario y Subastas públicas del BOE. Pregúntale a tu IA en español y ella llama a las herramientas.

### Herramientas que expone (6)

| Herramienta | Qué hace |
|---|---|
| `subvenciones_buscar` | Busca convocatorias de subvención en la BDNS oficial (texto, fechas, tipo de administración). |
| `subvencion_ficha` | Ficha completa de una convocatoria: presupuesto, plazos, bases reguladoras, sectores CNAE y documento del BOE vinculado. |
| `empresas_recientes` | Sociedades del Registro Mercantil por fecha y provincia: constituciones con capital, CNAE y administradores; disoluciones, cargos... |
| `inmueble_buscar` | Ficha catastral por referencia catastral (14-20 car.) o por dirección completa (provincia, municipio, vía, número): uso, superficie, año, plantas. |
| `subastas_buscar` | Subastas del BOE por tipo de bien (inmuebles/vehículos/muebles), provincia, CP y estado, con valores de subasta y tasación. |
| `subasta_ficha` | Detalle completo de una subasta (SUB-XX-AAAA-N): lotes, dirección, cargas, inscripción registral y anuncio oficial. |

### Cómo conectar

**1. Activa Standby** en la pestaña *Standby* de este actor (una vez).

**2. Añade el servidor a tu cliente MCP.** Claude Desktop (`claude_desktop_config.json`) o Cursor:

```json
{
  "mcpServers": {
    "espana-datos": {
      "url": "https://daniizarsan--mcp-espana-datos.apify.actor/mcp?token=TU_TOKEN_APIFY"
    }
  }
}
```

**3. Pregunta en lenguaje natural.** Ejemplos reales:

- "Busca convocatorias de subvención para digitalización de pymes abiertas ahora mismo"
- "¿Qué sociedades se constituyeron esta semana en Albacete y con qué capital?"
- "Dame la ficha catastral de CL Alcalá 1, Madrid"
- "¿Hay subastas de inmuebles en Valencia? Dime valor de subasta y tasación"
- "Ficha de la subasta SUB-AT-2026-23R2886001483 con su cruce catastral"

### Facturación

- Las herramientas consumen los actores de la familia **España — datos oficiales** (BDNS, BORME, Catastro, Subastas), que facturan pago-por-resultado (desde $0.003 por registro).
- El token que pongas en la URL (o en el campo `apifyToken` de cada llamada) **paga los consumos de esa cuenta**. Sin token del cliente, usa el del servidor.
- Un uso típico de consulta (10-30 registros) cuesta céntimos.

### Fuentes (todas públicas y oficiales)

- **BDNS** — Base de Datos Nacional de Subvenciones (infosubvenciones.es)
- **BORME** — Registro Mercantil vía BOE datos abiertos (boe.es)
- **Catastro** — servicios OVC de la Sede Electrónica del Catastro
- **Subastas** — Portal de Subastas Electrónicas del BOE

Este servidor es la capa MCP de la familia de actores `bdns-subsidios`, `borme-espana`, `catastro-espana` y `subastas-espana` del mismo autor — cada uno también usable por separado como actor de Apify.

### Notas

- Transporte: MCP streamable HTTP (Apify Standby).
- Una entidad = una fila en las respuestas (respuestas JSON estables, fáciles de citar).
- Los fallos de las fuentes externas no rompen la respuesta: los items salen en su modo base.

# Actor input Schema

## `apifyToken` (type: `string`):

Opcional. Si se deja vacío, el servidor usa su propio APIFY_TOKEN. Las herramientas también aceptan 'apifyToken' por llamada para facturar al usuario que conecta.

## Actor input object example

```json
{}
```

# Actor output Schema

## `urlMcp` (type: `string`):

Conecta desde Claude Desktop, Cursor o n8n a https://daniizarsan--mcp-espana-datos.apify.actor/mcp (con token de Apify). Herramientas: subvenciones_buscar, subvencion_ficha, empresas_recientes, inmueble_buscar, subastas_buscar, subasta_ficha.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("daniizarsan/mcp-espana-datos").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("daniizarsan/mcp-espana-datos").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call daniizarsan/mcp-espana-datos --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,daniizarsan/mcp-espana-datos"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oAyI4ySZIVFyiBhhM/builds/8DqEisWiCxuhSEiJ1/openapi.json
