# CNMC MCP for AI Agents AI Agent Connect

> CNMC MCP gives your AI agent direct access to Spain's official market and competition datasets. It pulls public records on energy, telecommunications, and transport. Instead of manual CSV downloads, your agent finds specific resources and extracts raw data points for immediate analysis.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_JSx3Nrz9CP762s87eYFcDgvORa1rTBabYbrxGVQZ/ai-agent-connect
- **Tags:** spain, market-regulation, open-data, energy-data, telecom-data

## Description

Imagine you are tasked with analyzing the latest telecommunications market shares in Spain or tracking energy consumption trends across different regions. Usually, this means navigating a complex government portal, hunting for the right files, and wrestling with inconsistent formatting before you can even start your actual work. This Connector changes that by letting your agent do the heavy lifting. It can scour the official CNMC open data catalog to find the exact datasets you need and then pull the raw records directly into your workflow.

When you connect this to your setup via the Vinkius catalog, your AI becomes a specialized researcher for Spanish market data. It handles the tedious navigation of the public sector's archives, allowing you to focus on high-level analysis or policy reporting. Whether you are looking for postal sector stats or energy regulation records, you get clean data points without the manual overhead of downloading and cleaning files one by one.

## Tools

### datastore_search
Pull actual records and rows from a specific CNMC resource using its unique ID. This lets you extract the raw data you need for analysis.

### package_search
Search the CNMC catalog to find specific datasets and get their unique resource IDs. Use this to identify the correct data source for your query.

## Prompt Examples

**Prompt:** 
```
Find the latest dataset for gas consumption in Spain.
```

**Response:** 
```
I found the following dataset in the CNMC catalog:

**Dataset:** Consumo de gas natural
**Resource ID:** `e123-abc` 
**Update Frequency:** Monthly

Would you like me to pull the records from this resource?
```

**Prompt:** 
```
Get the first 10 records for the telecom market share resource 06935639-5561-4608-9580-59367208479e.
```

**Response:** 
```
I have retrieved the first 10 records for that resource. Here is a summary of the market share data:

| Operator | Market Share (%) | Region |
| :--- | :--- | :--- |
| Operator A | 34.2 | National |
| Operator B | 28.1 | National |
| Operator C | 15.5 | National |

*(Additional 7 records retrieved)*
```

**Prompt:** 
```
Search for electricity data from 2022.
```

**Response:** 
```
I searched the CNMC catalog for electricity data from 2022 and found 3 relevant resources:

1. **Estadística mensual de energía eléctrica (2022)**
2. **Consumo anual por región (2022)**
3. **Precios de mercado eléctrico (2022)**

Which one should I pull records from?
```

## Capabilities

### Find specific datasets
Use keywords to locate datasets and resources within the CNMC catalog.

### Pull raw data records
Extract actual rows and data points from a specific resource using its unique ID.

### Filter results by date or region
Apply JSON filters to narrow down results to specific timeframes or geographical areas.

### Inspect resource formats
Check update frequencies and license types before you start processing data.

### Identify data types
Quickly see if a resource is a CSV, a table, or another specific format.

## Use Cases

### Energy consumption analysis
An analyst needs 2022 gas consumption data. They ask the agent to find the dataset, then use datastore_search to pull 2022 records.

### Telecom market share tracking
A researcher wants to see market shares. The agent finds the telecom resource and pulls the latest Q1 data into a table.

### Regulatory monitoring
A legal team monitors transport regulations. They ask the agent to search for the latest postal sector updates in the catalog.

### Economic modeling
A policy expert pulls historical energy data to build a 5-year trend model for a government report.

## Benefits

- Stop manual CSV downloads by using package_search to find data instantly.
- Get specific records directly into your workspace using datastore_search.
- Save hours of navigation by letting your agent browse the CNMC catalog.
- Apply filters to narrow down energy or telecom data by region or date.
- Check resource formats and update frequencies before you start processing.

## How It Works

The bottom line is your agent handles the search and extraction so you can skip the manual portal navigation.

1. Subscribe to the Connector and provide your CNMC API Key.
2. Ask your agent to search for a specific market category or keyword.
3. Provide the resource ID to pull the actual records into your chat or editor.

## Frequently Asked Questions

**What kind of data does the CNMC MCP provide?**
This Connector provides access to official Spanish market data regarding energy, telecommunications, transport, and postal sectors. It includes records on consumption, market shares, and regulatory updates.

**Can I use the CNMC MCP for Spanish market research?**
Yes, it is designed for that. Your agent can browse the official catalog to find specific datasets and extract the raw records you need for research reports.

**How do I get data from the CNMC portal without downloading files?**
The Connector allows your agent to pull data directly. By using the search tools, your agent fetches the records into your workspace so you can skip the manual download and cleaning steps.

**Does the CNMC MCP support specific regions in Spain?**
Yes, you can use filters to narrow down the results to specific regions or categories within the Spanish market datasets.

**Is the CNMC MCP good for energy sector analysis?**
It is a primary source for energy data in Spain. You can find specific datasets for gas, electricity, and other energy metrics directly through the portal.

**Can I search for specific keywords like 'telecom' in the CNMC MCP?**
Yes, you can ask your agent to search for any keywords like 'telecom', 'transport', or 'postal' to find the relevant datasets in the official catalog.

**What happens when I connect the CNMC MCP to my agent?**
Your agent gains the ability to query the official CNMC portal. It can find datasets, check their details, and extract specific rows of data for you automatically.

**How do I find the resource_id needed for data retrieval?**
Use the `package_search` tool with a query related to your topic. The response will include a list of resources, each with a unique `id` (the resource_id) that you can then use in `datastore_search`.

**Can I limit the number of records returned to avoid large payloads?**
Yes! The `datastore_search` tool includes an optional `limit` parameter. You can specify exactly how many rows you want to retrieve (e.g., 10 or 100) to keep the response concise.

**Is it possible to filter data by a specific field, like a year or a city?**
Absolutely. Use the `filters` parameter in `datastore_search`. It accepts a JSON string (e.g., `{"Year": "2023"}`) to return only the records that match your criteria.