s

smard-x402

@moldy93/smard-x402
Hosted
0 Stars 6 次浏览 moldy93 更新于 2026-08-23

Paywalled SMARD day-ahead electricity prices (DE-LU, 15鈥憁inute resolution) via x402 on Base mainnet.

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (5 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

tavily_search 14 个参数 需填 1 项

Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.

必填参数:query

tavily_extract 6 个参数 需填 1 项

Extract content from URLs. Returns raw page content in markdown or text format.

必填参数:urls

tavily_crawl 11 个参数 需填 1 项

Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.

必填参数:url

tavily_map 8 个参数 需填 1 项

Map a website's structure. Returns a list of URLs found starting from the base URL.

必填参数:url

tavily_research 2 个参数 需填 1 项

Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.

必填参数:input

服务介绍

SMARD Energy Prices (x402)

Paywalled SMARD day‑ahead electricity prices (DE‑LU, 15‑minute resolution) via x402 on Base mainnet. Hosted MCP (streamable‑http) + HTTP endpoint.

# Homepage

https://smard-energy-prices-x402.favo.workers.dev

# Endpoints

  • HTTP: GET https://smard-energy-prices-x402.favo.workers.dev/prices
  • MCP: POST https://smard-energy-prices-x402.favo.workers.dev/mcp

# Pricing

$0.001 per call (USDC on Base). Requires X-PAYMENT header (exact scheme).

# MCP Connect (example)

{
  "mcpServers": {
    "smard-x402": {
      "url": "https://smard-energy-prices-x402.favo.workers.dev/mcp",
      "headers": {
        "Accept": "application/json, text/event-stream"
      }
    }
  }
}

# Node.js Example (x402)

import { createWalletClient, http } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";
import { createPaymentHeader, selectPaymentRequirements } from "x402/client";

const url = "https://smard-energy-prices-x402.favo.workers.dev/prices";

// 1) Get payment requirements
const res = await fetch(url);
const data = await res.json();
const req = selectPaymentRequirements(data.accepts, "base", "exact");

// 2) Create payment header
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const client = createWalletClient({ account, chain: base, transport: http("https://mainnet.base.org") });
const xPayment = await createPaymentHeader(client, data.x402Version, req);

// 3) Call API with payment
const paid = await fetch(url, { headers: { "X-PAYMENT": xPayment } });
console.log(await paid.json());

# Notes

  • MCP endpoint uses streamable‑http. Send Accept: application/json, text/event-stream.
  • Data source: SMARD (DE‑LU), 15‑minute resolution.

相关 MCP 服务