Paid MCP Metering

io.github.dev55acc-aiv2.0.0更新於 Oct 8, 2026

Metered MCP tools: free discovery over MCP; per-call execution settled in USDC via x402 v2.

已驗證Streamable HTTP可網頁執行FinanceWeb Search & Scraping

概覽

AI 產生的概覽

按次計費的 MCP 工具,可免費探索工具,網頁搜尋與深度研究按次以 USDC 結算。

功能
透過 MCP 提供兩個付費工具:web_search 回傳附來源網址的即時網頁排名結果,deep_research 回傳多來源綜合答案與引用來源。initialize、tools/list、ping 等探索方法透過 JSON-RPC 2.0 免費呼叫。執行走計量端點,位於 x402 v2 付費牆之後;未付費請求會回傳 HTTP 402 與付款要求,已付費請求帶有 PAYMENT-SIGNATURE 標頭,並在工具執行前透過 facilitator 結算 USDC。上游為 Exa,備援為 Tavily。
適用情境
當助理需要即時網頁搜尋或多來源研究,而你願意按次以 USDC 付費、不想自備搜尋 API 金鑰時,可以考慮使用。適合能處理 402 付款協商的 x402 用戶端。
執行需求
遠端 streamable HTTP 端點;不需要本機執行環境或安裝套件。付款需要 x402 v2 用戶端,以及 X402_NETWORK 所設網路上的 USDC(預設 Base Sepolia 測試網,CAIP-2 eip155:84532)。伺服器端設定使用 X402_PAY_TO、X402_NETWORK、X402_FACILITATOR_URL,以及 EXA_API_KEY 或 TAVILY_API_KEY。需要網路存取。
安裝前請注意
呼叫需要付費:web_search 每次 0.001 美元,deep_research 每次 0.01 美元,以 USDC 結算,費用會累積。目前部署因未設定 X402_PAY_TO 而回傳 503 settlement_not_configured,在設定收款地址前無法接受付款。付費請求帶有 PAYMENT-SIGNATURE 標頭。搜尋查詢會傳送給第三方上游 Exa 與 Tavily。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Paid MCP Metering,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "paid-mcp-metering": {
      "type": "http",
      "url": "https://paid-mcp-metering-clsiojdd7-benlafreniere6-3913s-projects.vercel.app/mcp"
    }
  }
}

README

paid-mcp-metering

Metered MCP tools, priced per call.

Discovery is free: POST /mcp speaks JSON-RPC 2.0 per the Model Context Protocol (initialize, tools/list, ping). Execution is metered: POST /v1/t/{tool} sits behind an x402 v2 paywall. An unpaid request gets HTTP 402 with payment requirements; a paid request carries a PAYMENT-SIGNATURE header and settles USDC through the facilitator before the tool runs.

Live deployment

Base URL: https://paid-mcp-metering.vercel.app

  • GET /health — free, public
  • POST /mcp — free discovery
  • POST /v1/t/{tool} — metered; currently answers 503 settlement_not_configured because X402_PAY_TO is unset on the deployment (settlementConfigured:false in /health is the honest switch). No payment can be accepted until a receiving address is configured.

server.json declares this URL as the registry remote.

Tools

ToolPriceWhat it returns
web_search$0.001/callRanked live web results with source URLs
deep_research$0.01/callMulti-source research pass with a synthesized answer plus cited sources

Upstreams are Exa (primary) and Tavily (fallback). Every handler returns live upstream output or throws — there is no canned response.

Rails

x402 v2, USDC, EIP-155 network selected by X402_NETWORK (default Base Sepolia testnet, CAIP-2 eip155:84532). Facilitator defaults to https://x402.org/facilitator.

Env varPurpose
X402_PAY_TOReceiving address. Required for settlement; unset serves 402 requirements only
X402_NETWORKCAIP-2 network id (default eip155:84532)
X402_FACILITATOR_URLx402 facilitator endpoint
EXA_API_KEY / TAVILY_API_KEYSearch upstream credentials

Run

bash
npm installnpm run buildnpm start          # node dist/x402-server.jsnpm test           # build + node --test dist/test-x402.js

Free discovery:

bash
curl -s localhost:4021/mcp -H 'Content-Type: application/json' \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Paid execution:

bash
curl -s localhost:4021/v1/t/web_search -H 'Content-Type: application/json' \  -d '{"query":"x402 protocol","max_results":3}'# -> 402 with payment requirements; pay via an x402 client and retry with PAYMENT-SIGNATURE

Registry

server.json targets the official MCP Registry as io.github.dev55acc-ai/paid-mcp-metering. Tagging v* runs .github/workflows/publish-mcp.yml: tests, build, npm publish (when NPM_TOKEN is set), then registry publish authenticated by GitHub OIDC — no stored registry credential.

License

MIT

來源:README.md,提交 ef85ddd

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v2.0.0最新Sep 16, 2026