{
  "markdown": "# Voluntary Price for the Small Consumer (PVPC) MCP Server\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![NPM Version](https://img.shields.io/npm/v/%40rfdez%2Fpvpc-mcp-server)](https://www.npmjs.com/package/@rfdez/pvpc-mcp-server)\n\nFetch 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.\n\n## 🧩 Components\n\n### Tools\n\n- `fetch_prices`: Fetches the Voluntary Price for the Small Consumer (PVPC) prices for a given date range and geographical area.\n  - Inputs:\n    - `locale`: Get translations for sources. Accepted values: `es`, `en`. Defaults to `es`.\n    - `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.\n    - `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.\n    - `timeAggregation`: How to aggregate indicator values when grouping them by time. Accepted values: `sum`, `average`. Defaults to `sum`.\n    - `timeTruncation`: Tells how to truncate data time series. Accepted values: `hour`, `day`, `month`, `year`. Optional parameter.\n    - `geographicalAggregation`: How to aggregate indicator values when grouping them by geographical ID. Accepted values: `sum`, `average`. Defaults to `sum`.\n    - `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`.\n    - `geographicalTruncation`: Tells how to group data at geographical level when the geographical aggregation is informed. Accepted values: `country`, `electric_system`. Optional parameter.\n  - Returns: Text content with the PVPC prices in JSON format.\n\n## 🔧 Configuration\n\n### Requirements\n\nYou need to register an API key from [Esios Red Eléctrica de España](https://www.esios.ree.es/es/pagina/api) to access the Esios Red Eléctrica de España API.\n\nYou will find the API documentation at [API e·sios Documentation](https://api.esios.ree.es/).\n\n### Claude Desktop\n\n#### Remote Server Connection\n\nOpen 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`.\n\n#### Local Server Connection\n\nAdd this to your Claude Desktop `claude_desktop_config.json` file. See [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info.\n\n```json\n{\n  \"mcpServers\": {\n    \"pvpc\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@rfdez/pvpc-mcp-server@latest\", \"--api-key\", \"your_esios_api_key\"]\n    }\n  }\n}\n```\n\n## 💻 Development\n\nClone this repository and install the dependencies:\n\n```bash\nnpm install\n```\n\nBuild the project:\n\n```bash\nnpm run build\n```\n\nRun the server:\n\n```bash\nnode dist/index.js\n```\n\n### CLI Arguments\n\n`pvpc-mcp-server` accepts the following CLI flags:\n\n- `--transport <stdio|http>`: Transport to use (`stdio` by default).\n- `--port <number>`: Port to listen on when using `http` transport (default `8080`).\n- `--api-key <key>`: Your e·sios API key for authentication.\n\nExample with http transport and port 8080:\n\n```bash\nnode dist/index.js --transport http --port 8080\n```\n\nExample with stdio transport:\n\n```bash\nnode dist/index.js --transport stdio --api-key YOUR_ESIOS_API_KEY\n```\n\n### Local Configuration Example\n\n```json\n{\n  \"mcpServers\": {\n    \"pvpc\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"tsx\", \"/path/to/folder/pvpc-mcp-server/src/index.ts\", \"--api-key\", \"YOUR_ESIOS_API_KEY\"]\n    }\n  }\n}\n```\n\n### Testing with MCP Inspector\n\n```bash\nnpx -y @modelcontextprotocol/inspector npx -y @rfdez/pvpc-mcp-server\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
  "bytes": 4071,
  "sha": "3f344c5534ee4f7bb95ee1c2e293afeddceaf38313b3a67f10b713fbddb9cac2",
  "repo_slug": "rfdez/pvpc-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_ai_smithery_rfdez_pvpc_mcp_server_ab370329/readme"
}