npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@rfdez/pvpc-mcp-server

v3.2.5

Published

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

Downloads

181

Readme

Voluntary Price for the Small Consumer (PVPC) MCP Server

License: MIT NPM Version smithery badge

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.

Smithery

To install PVPC MCP Server for any client automatically via Smithery:

npx -y @smithery/cli@latest install @rfdez/pvpc-mcp-server --client <CLIENT_NAME> --profile <YOUR_SMITHERY_PROFILE> --key <YOUR_SMITHERY_KEY>

You can find your Smithery profile and key in the Smithery.ai webpage.

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 install

Build the project:

npm run build

Run the server:

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:

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

Example with stdio transport:

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

Local 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-server

License

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