PVPC MCP Server
The PVPC MCP Server fetches Spain's Voluntary Price for the Small Consumer (PVPC) electricity tariffs published daily by Red Eléctrica de España at 8:15 PM for the following day.
Key Capabilities:
Retrieve hourly electricity prices for specific date ranges (ISO 8601 format, defaults to current day)
Filter by geographical region including Spain (3), Península (8741), Canarias (8742), Baleares (8743), Ceuta (8744), and Melilla (8745)
Aggregate data by time using sum or average methods, with truncation by hour, day, month, or year
Aggregate geographically using sum or average, with grouping by country or electric system
Multi-language support with Spanish or English translations
Structured JSON output containing price amounts, currency, timestamps (local and UTC), geographical identifiers, and last update times
Flexible integration as a local or remote MCP server for Claude Desktop and other MCP-compatible applications
Note: Requires an API key from Esios Red Eléctrica de España for authentication.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PVPC MCP Servershow me electricity prices for tomorrow in Spain"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Voluntary Price for the Small Consumer (PVPC) MCP Server
Fetch the Voluntary Price for the Small Consumer (PVPC) published daily by Red Eléctrica at 8:15 p.m. This includes the hourly electricity tariffs that will apply the following day for consumers billed under the 2.0 TD tariff.
🧩 Components
Tools
fetch_prices: Fetches the Voluntary Price for the Small Consumer (PVPC) prices for a given date range and geographical area.Inputs:
locale: Get translations for sources. Accepted values:es,en. Defaults toes.startDate: Beginning of the date range to filter indicator values in iso8601 format. E.g. 2025-06-29T00:00:00.000+02:00. Defaults to the start of today.endDate: End of the date range to filter indicator values in iso8601 format. E.g. 2025-06-29T23:59:59.999+02:00. Defaults to the end of today.timeAggregation: How to aggregate indicator values when grouping them by time. Accepted values:sum,average. Defaults tosum.timeTruncation: Tells how to truncate data time series. Accepted values:hour,day,month,year. Optional parameter.geographicalAggregation: How to aggregate indicator values when grouping them by geographical ID. Accepted values:sum,average. Defaults tosum.geographicalIds: Tells the geographical IDs to filter indicator values. Accepted values:3(España),8741(Península),8742(Canarias),8743(Baleares),8744(Ceuta),8745(Melilla). Defaults to8741,8742,8743,8744,8745.geographicalTruncation: Tells how to group data at geographical level when the geographical aggregation is informed. Accepted values:country,electric_system. Optional parameter.
Returns: Text content with the PVPC prices in JSON format.
Related MCP server: Datadis MCP Server
🔧 Configuration
Requirements
You need to register an API key from Esios Red Eléctrica de España to access the Esios Red Eléctrica de España API.
You will find the API documentation at API e·sios Documentation.
Claude Desktop
Remote Server Connection
Open Claude Desktop and navigate to Settings > Connectors > Add Custom Connector. Enter the name as PVPC and the remote MCP server URL like https://mcp.example.com/mcp.
Local Server Connection
Add this to your Claude Desktop claude_desktop_config.json file. See Claude Desktop MCP docs for more info.
{
"mcpServers": {
"pvpc": {
"command": "npx",
"args": ["-y", "@rfdez/pvpc-mcp-server@latest", "--api-key", "your_esios_api_key"]
}
}
}💻 Development
Clone this repository and install the dependencies:
npm installBuild the project:
npm run buildRun the server:
node dist/index.jsCLI Arguments
pvpc-mcp-server accepts the following CLI flags:
--transport <stdio|http>: Transport to use (stdioby default).--port <number>: Port to listen on when usinghttptransport (default8080).--api-key <key>: Your e·sios API key for authentication.
Example with http transport and port 8080:
node dist/index.js --transport http --port 8080Example with stdio transport:
node dist/index.js --transport stdio --api-key YOUR_ESIOS_API_KEYLocal Configuration Example
{
"mcpServers": {
"pvpc": {
"command": "npx",
"args": ["-y", "tsx", "/path/to/folder/pvpc-mcp-server/src/index.ts", "--api-key", "YOUR_ESIOS_API_KEY"]
}
}
}Testing with MCP Inspector
npx -y @modelcontextprotocol/inspector npx -y @rfdez/pvpc-mcp-serverLicense
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
1 toolfetch_pricesFetch PVPC PricesAInspect
Fetches the Voluntary Price for the Small Consumer (PVPC) prices for a given date range and geographical area.
| Name | Required | Description | Default |
|---|---|---|---|
| locale | No | Get translations for sources. Accepted values: `es`, `en`. Defaults to `es`. | es |
| startDate | No | Beginning of the date range to filter indicator values in iso8601 format. E.g. 2025-06-29T00:00:00.000+02:00. Defaults to the start of today. | 2026-04-29T00:00:00.000Z |
| endDate | No | End of the date range to filter indicator values in iso8601 format. E.g. 2025-06-29T23:59:59.999+02:00. Defaults to the end of today. | 2026-04-29T23:59:59.999Z |
| timeAggregation | No | How to aggregate indicator values when grouping them by time. Accepted values: `sum`, `average`. Defaults to `sum`. | sum |
| timeTruncation | No | Tells how to truncate data time series. Accepted values: `hour`, `day`, `month`, `year`. | |
| geographicalAggregation | No | How to aggregate indicator values when grouping them by geographical ID. Accepted values: `sum`, `average`. Defaults to `sum`. | sum |
| geographicalIds | No | Tells the geographical IDs to filter indicator values. Accepted values: `3` (España), `8741` (Península), `8742` (Canarias), `8743` (Baleares), `8744` (Ceuta), `8745` (Melilla). Defaults to `8741`, `8742`, `8743`, `8744`, `8745`. | |
| geographicalTruncation | No | Tells how to group data at geographical level when the geographical aggregation is informed. Accepted values: `country`, `electric_system`. |
Output Schema
| Name | Required | Description |
|---|---|---|
| prices | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided and description does not disclose behavioral traits like read-only, rate limits, or side effects. Relies entirely on schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no superfluous information, directly to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Description is minimal given the 8 parameters and no siblings. Output schema exists, so return details are covered, but more context on usage patterns would help.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds no extra meaning beyond the already detailed parameter descriptions. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches PVPC prices for a date range and geographical area, using specific verb and resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use, but with no sibling tools, the context is implied. No when-not-to-use or alternatives mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v3.2.3- Changed
fetch_prices2 fields changed- changed
Input schema / properties / endDate / defaultPrevious value: -"2026-01-03T23:59:59.999Z"New value: +"2026-04-29T23:59:59.999Z" - changed
Input schema / properties / startDate / defaultPrevious value: -"2026-01-03T00:00:00.000Z"New value: +"2026-04-29T00:00:00.000Z"
1 tool update
v1.0.0- Changed
fetch_prices2 fields changed- changed
Input schema / properties / endDate / defaultPrevious value: -"2025-12-31T23:59:59.999Z"New value: +"2026-01-03T23:59:59.999Z" - changed
Input schema / properties / startDate / defaultPrevious value: -"2025-12-31T00:00:00.000Z"New value: +"2026-01-03T00:00:00.000Z"
1 tool update
- First observed
fetch_prices
TDQS
With only one tool, there is no ambiguity; the tool's purpose is clear and distinct.
A single tool follows the verb_noun pattern, which is consistent and descriptive.
The server has only one tool, which is minimal for a domain that could potentially include more operations (e.g., listing areas or historical data). However, for a focused PVPC price fetcher, it is borderline acceptable.
The tool covers the primary use case of fetching prices for a date range and area. Minor gaps like additional filtering options or bulk data retrieval are not critical, but the surface is quite narrow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Real-time electricity prices for AI agents. 40+ countries, 100+ zones. No auth required.
Real-time electricity price signals for AI agents. Spot prices, cheapest hours, and contract recommendations. 31 countries across Europe and Oceania. No authentication required.
European day-ahead electricity prices (43 zones), accuracy-published forecasts, carbon, optimize.
European power-market data: day-ahead & balancing prices, load, generation, flows, outages. 47 zones
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables natural language conversations with Spain's electrical grid data through Claude, providing real-time access to electricity demand, generation, prices, and emissions data from Red Eléctrica de España (REE).21811MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access and analyze Spanish electricity consumption data via the Datadis API, providing tools for supply management, consumption analysis, anomaly detection, and executive reporting.MIT

mcp-nesoofficial
AlicenseNot gradedqualityCmaintenanceAccess Great Britain electricity grid open data from the NESO API, enabling queries about generation, demand, and market data.4MIT
Voltcast MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables access to European electricity data including day-ahead prices, probabilistic forecasts, carbon intensity, and cheapest-window optimization for 43 bidding zones.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rfdez/pvpc-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server