
X402 Mcp Server
io.github.Jannis-E由 GitHub 帳號 Jannis-E 發布v1.0.5更新於 Oct 24, 2026
Pay-per-call x402 tools on Base: web extract/render, burn-once secret vault, chart, GeoTIFF
概覽
一個本機 MCP 伺服器,為助理提供 Base 主網上按次付費的工具,每次呼叫都從你提供的錢包以 USDC 結算。
- 可以做什麼
- 擷取公開網址並回傳精簡的 Markdown,或在無頭 Chromium 中渲染大量 JavaScript 的單頁應用程式,並序列化為適合大型語言模型的 Markdown。建立一次性秘密保險庫,產生只能領取一次的連結,並附上簽章證明。依帶標籤的純量資料產生確定性的 SVG 長條圖。將 GeoTIFF/COG 影像轉碼為 PNG 或 WebP,並回傳地理參考中繼資料與來源統計。
- 適用情境
- 適合希望在助理內完成網頁擷取、單頁應用程式渲染、一次性秘密分享、圖表產生或 GeoTIFF 轉換,又不想註冊 API 金鑰,並願意從 Base 錢包按次支付少量 USDC 的情境。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 18 以上版本。需要一個 Base 主網 EVM 錢包並存入少量真實 USDC,其私鑰透過環境變數 BASE_PRIVATE_KEY 設定。需要能連線至工具端點與付款結算服務的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 X402 Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
x402-mcp-server
A small, growing catalog of x402-paywalled HTTP tools on Base Mainnet via x402 micro-payments — no API keys, no signup, pay per call in USDC.
This MCP server exposes that catalog as native MCP tools. Every tool call pays for itself automatically: the server POSTs the request, catches the real x402 v2 402 PAYMENT-REQUIRED challenge, signs an EIP-3009 TransferWithAuthorization with viem using a local wallet, and resubmits with the PAYMENT-SIGNATURE header. No human signature prompt at call time — the agent just calls the tool.
Tools
All tools run on Base Mainnet (eip155:8453). Settlement happens server-side through an ordered facilitator chain — Coinbase CDP, then PayAI, then Primer as fallbacks — which changes nothing on your side: you sign the same EIP-3009 authorization either way, and every tool is also listed in the CDP and PayAI x402 Bazaar discovery catalogs. Exact request-body fields for each tool are also discoverable at runtime via <tool-url>/openapi.json.
Quickstart
Add this to your claude_desktop_config.json:
⚠️ Funding warning:
BASE_PRIVATE_KEYmust be a Base Mainnet wallet private key funded with a small amount of real USDC (e.g. $0.50 is enough for dozens of calls at these prices). Every tool call spends real money from this wallet. Do not use a key that holds funds you're not prepared to spend through this server, and never commit this key to source control.
Once configured, restart Claude Desktop and the tools listed above become available to the assistant automatically — no further setup, no dashboard, no API key registration.
How payment works
BASE_PRIVATE_KEY is your own wallet — whoever installs this server sets their own key and pays for their own calls. Each call settles straight to the tool provider's wallet; your key never touches anyone else's funds and no one else's key ever touches yours. To set it up:
- Use (or create) a Base Mainnet EVM wallet you're OK spending small amounts from.
- Fund it with a bit of USDC on Base (e.g. $0.50).
- Export its private key and set it as
BASE_PRIVATE_KEYin your MCP client config, as shown above.
Security
BASE_PRIVATE_KEYnever leaves your machine. It is read once from the local environment and used only to sign EIP-712 typed-data (EIP-3009TransferWithAuthorization) payment authorizations locally withviem.- No raw private key, seed phrase, or signature is ever sent over the network — only the resulting signed authorization, exactly as the x402 protocol requires to settle payment for the specific request being made.
- Payment terms (recipient, amount, network, asset contract, expiry) are read fresh from each live
402challenge returned by the resource server, never trusted from a local cache, so a stale or tampered local catalog can't redirect funds. - Spending ceiling: the live
402challenge is trusted for signing mechanics (domain, nonce window, asset) but never for the amount. Every call checks the challenge's requested amount against this catalog's known price for that tool and refuses to sign anything higher — a hijacked, compromised, or buggy endpoint can't get a blank-check signature just by asking for more. - This package does not phone home, collect telemetry, or store your key anywhere on disk.
Requirements
- Node.js 18+
- A Base Mainnet EVM wallet, funded with a small amount of USDC, whose private key you control
License
MIT
Links
來源:README.md,提交 034ab3a
工具
0版本歷史
2- v1.0.5最新Sep 23, 2026
- v1.0.4Sep 22, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分