Pvpc Mcp Server

io.github.rfdez由 GitHub 账号 rfdez 发布v3.2.3更新于 Oct 24, 2026

Retrieve daily PVPC electricity tariffs for 2.0 TD consumers, published by Red Eléctrica.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

本地 MCP 服务器,让助手从西班牙电网公司 ESIOS API 获取每日 PVPC 受监管电价,可按日期和地区筛选。

可以做什么
按日期范围和地理区域获取 PVPC 每小时电价,支持西班牙语或英语输出,结果以 JSON 返回。
适用场景
适合需要助手查询西班牙某日或某时段的受监管电价、比较不同地区价格,或按日、月、年汇总每小时电价时使用。
运行要求
通过 npx 在本地运行,需要 Node.js。需要 ESIOS(西班牙电网公司)API 密钥,通过 --api-key 命令行参数或 X-API-Key 请求头传入。需要能访问 ESIOS API 的网络。
安装前请注意
ESIOS API 密钥属于机密,通过命令行传入,可能出现在 shell 历史记录或进程列表中。该服务器只读取已公布的电价数据,不会修改任何内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pvpc Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Voluntary Price for the Small Consumer (PVPC) MCP Server

[License: MIT] [NPM Version]

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 to es.
      • 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 to sum.
      • 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 to sum.
      • 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 to 8741, 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.

json
{  "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:

bash
npm install

Build the project:

bash
npm run build

Run the server:

bash
node dist/index.js

CLI Arguments

pvpc-mcp-server accepts the following CLI flags:

  • --transport <stdio|http>: Transport to use (stdio by default).
  • --port <number>: Port to listen on when using http transport (default 8080).
  • --api-key <key>: Your e·sios API key for authentication.

Example with http transport and port 8080:

bash
node dist/index.js --transport http --port 8080

Example with stdio transport:

bash
node dist/index.js --transport stdio --api-key YOUR_ESIOS_API_KEY

Local Configuration Example

json
{  "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

bash
npx -y @modelcontextprotocol/inspector npx -y @rfdez/pvpc-mcp-server

License

This project is licensed under the MIT License - see the LICENSE file for details.

来源:README.md,提交 c145663

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v3.2.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分