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.
🔧 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.
💻 Development
Clone this repository and install the dependencies:
Build the project:
Run the server:
CLI 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:
Example with stdio transport:
Local Configuration Example
Testing with MCP Inspector
License
This project is licensed under the MIT License - see the LICENSE file for details.