Install x402-mcp, discover live paid APIs, and make your first agent payment. No accounts. No API keys per service.
Add x402-mcp to your Claude, Cursor, or Windsurf config. No signup required.
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["-y", "@nullbuilds/x402-mcp"]
}
}
}
Restart your client after saving. The package downloads automatically on first use.
Discovery and estimation tools work immediately with no credentials. Ask your agent:
→ "Find me x402 weather APIs" discover_paid_services returns 15 live results with prices → "What does it cost to call x402-data-bazaar.vercel.app/api/weather/current?" estimate_payment probes live — no payment made → "Check the USDC balance of 0x000...000" check_wallet_balance reads on-chain
x402-mcp never stores or manages keys — you bring your own. Two options:
Generate a new wallet address:
# With Foundry (cast) cast wallet new # Or use Coinbase, MetaMask, Rainbow — any ETH wallet works
Fund it with USDC on Base. From Coinbase: Withdraw → select Base network → USDC. $5 covers hundreds of calls.
Add the private key to your MCP config:
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["-y", "@nullbuilds/x402-mcp"],
"env": {
"X402_PRIVATE_KEY": "0x..."
}
}
}
}
1. Go to portal.cdp.coinbase.com and create a project.
2. Generate an API key — you'll get CDP_API_KEY_ID and CDP_API_KEY_SECRET.
3. Create a Server Wallet — you'll get CDP_WALLET_SECRET.
4. Add to your MCP config:
{
"mcpServers": {
"x402": {
"command": "npx",
"args": ["-y", "@nullbuilds/x402-mcp"],
"env": {
"CDP_API_KEY_ID": "your-key-id",
"CDP_API_KEY_SECRET": "your-key-secret",
"CDP_WALLET_SECRET": "your-wallet-secret"
}
}
}
}
5. Ask your agent "What's my x402 wallet address?" — then fund that address with USDC on Base.
Ask your agent to call a live API. It discovers, estimates, pays, and returns the result in one shot.
→ "Get the current weather in San Francisco" Finds weather API · estimates $0.005 · pays · returns conditions → "What's the median household income for ZIP 90210?" → "Vet this company name against the OFAC sanctions list" → "Decode this VIN: 1HGBH41JXMN109186"
All payments are logged to ~/.x402-mcp/history.jsonl. Ask "Show my payment history" to review.
| Name | Type | Description | |
|---|---|---|---|
| query | string | optional | Search term. E.g. "weather", "FDA", "sanctions". |
| network | string | optional | Filter by network. E.g. "base", "ethereum". |
| limit | number | optional | Max results. Default 20, max 100. |
| Name | Type | Description | |
|---|---|---|---|
| resource_url | string | required | Full URL to probe. |
| method | string | optional | "GET" or "POST". Default "GET". |
| Name | Type | Description | |
|---|---|---|---|
| wallet_address | string | required | Wallet address (0x...) or ENS name. |
| Name | Type | Description | |
|---|---|---|---|
| resource_url | string | required | Exact URL of the x402 resource (from catalog). |
| Name | Type | Description | |
|---|---|---|---|
| resource_url | string | required | URL of the x402 API to call. |
| max_cost_usdc | number | optional | Spending cap per call. Request aborts if cost exceeds this. Default 1.0. |
| method | string | optional | "GET" or "POST". Default "GET". |
| body | string | optional | JSON body for POST requests. |
| Name | Type | Description | |
|---|---|---|---|
| limit | number | optional | Records to return. Default 20, max 100. |