- Home
- MCP servers
- SMARD Energy Prices
SMARD Energy Prices
- javascript
0
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can access paywalled SMARD day-ahead electricity prices (DE‑LU, 15‑minute resolution) through an MCP server on Base mainnet. This MCP server provides a streamable HTTP endpoint for prices and supports paid access via the x402 protocol, enabling automated querying and integration with wallet-based payments.
How to use
To use this MCP server, connect your MCP client to the provided HTTP MCP endpoint. The server offers a price feed you can request, and it supports paid access using the x402 payment flow. You will typically first fetch payment requirements, generate a payment header, and then perform your price request with the payment header included.
How to install
Prerequisites you need: a modern Node.js runtime and npm (or an equivalent JavaScript runtime and package manager). You should also be prepared to install dependencies for making MCP calls if you plan to run example code.
Step 1: Create a new project directory and initialize it.
Step 2: Install necessary packages for the MCP client example. You can adapt this to your environment, but a typical setup uses a wallet client library and an HTTP transport. For example:
mkdir smard-mcp-client
cd smard-mcp-client
npm init -y
npm install viem x402
Additional notes
For MCP connections, you will use the HTTP method to reach the MCP endpoint. The recommended request setup includes accepting a streamable response type and using the payment header for paid access.
Available tools
prices_endpoint
HTTP endpoint to retrieve paywalled SMARD day-ahead prices with 15-minute resolution.
mcp_connect_config
MCP connection setup that includes headers to enable streamable HTTP responses for MCP communications.
payment_header_creation
Process to create and attach an X-PAYMENT header using the x402 flow to authorize paid requests.