
X402 Mcp Server
io.github.Jannis-EPublished by GitHub account Jannis-Ev1.0.5Updated Oct 24, 2026
Pay-per-call x402 tools on Base: web extract/render, burn-once secret vault, chart, GeoTIFF
Overview
A local MCP server that gives an assistant pay-per-call tools on Base Mainnet, settling each call in USDC from a wallet you supply.
- What you can do
- Fetch a public URL and return clean markdown, or render JavaScript-heavy single-page apps in headless Chromium and serialize the result to markdown for LLM use. Create a burn-once secret vault that returns a claim link yielding the secret exactly once, with a signed attestation. Generate deterministic SVG bar charts from labeled scalar data. Transcode GeoTIFF/COG imagery into PNG or WebP with georeference metadata and source stats.
- When to use it
- Useful when you want web extraction, SPA rendering, one-time secret sharing, chart rendering or GeoTIFF conversion inside an assistant without signing up for API keys, and are willing to pay small per-call USDC amounts from a Base wallet.
- Requirements
- Runs locally via npx, so Node.js 18 or newer is needed. Requires a Base Mainnet EVM wallet funded with a small amount of real USDC, whose private key is set in the BASE_PRIVATE_KEY environment variable. Network access to the tool endpoints and payment facilitators is required.
Installation
In SourceWeft
- Open X402 Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 034ab3a
Tools
0Version history
2- v1.0.5LatestSep 23, 2026
- v1.0.4Sep 22, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts