Install
openclaw skills install openclaw-x402-skillDiscover, browse, filter, and pay for x402-compatible API endpoints and MCP tools from the x402 Bazaar — the autonomous discovery layer for agentic payments....
openclaw skills install openclaw-x402-skillThe x402 Bazaar is the discovery layer for the x402 ecosystem — a machine-readable catalog helping AI agents find and integrate with x402-compatible API endpoints and MCP tools. Query, find, pay, and use with no pre-baked integrations.
Two modes:
python3 agent.py "list services"
python3 agent.py "find weather APIs"
.env:EVM_PRIVATE_KEY="0xYourPrivateKeyHere"
MAX_SPEND_PER_CALL=0.10
pip install -r ~/clawd/skills/x402-bazaar/requirements.txt
Activate when user says any of:
Discovery
Paying for services
Do NOT activate for:
cd ~/clawd/skills/x402-bazaar && python3 agent.py "list services"
python3 agent.py "find weather"
python3 agent.py "search for AI inference"
python3 agent.py "find web scraping services"
python3 agent.py "services under 0.01"
python3 agent.py "services under 0.001 USDC"
python3 agent.py "list http services"
python3 agent.py "list mcp tools"
python3 agent.py "inspect https://api.example.com/x402/weather"
python3 agent.py "call https://api.example.com/x402/weather?location=NYC"
python3 agent.py "pay and call https://api.example.com/x402/sentiment"
python3 agent.py "find the cheapest weather API and get weather for London"
python3 agent.py "find a web scraping API and scrape https://example.com"
No accounts, no subscriptions, no API keys — just USDC per request.
This skill can be integrated with Model Context Protocol (MCP) servers to enable Claude Desktop and other MCP clients to autonomously pay for and use x402 APIs.
See the full MCP integration guide: x402-MCP.md
Key capabilities:
Example: Claude can discover weather APIs via this skill, then call them via MCP with automatic USDC micropayments on Base.
| Facilitator | Discovery URL | Notes |
|---|---|---|
| Coinbase CDP | api.cdp.coinbase.com/platform/v2/x402/discovery/resources | Largest catalog, default |
| PayAI | facilitator.payai.network/discovery/resources | Alternative catalog |
Both are queried and merged when you run "list services".
Service list:
🛒 x402 Bazaar — 42 services found
1. 🌐 Weather API
URL: https://api.weather-x402.com/current
Type: http GET
Price: $0.001 USDC
Network: Base (eip155:8453)
Updated: 2h ago
2. 🤖 Llama 3.3 70B Inference
URL: https://api.x402network.com/llm/llama
Type: http POST
Price: $0.005 USDC
Network: Base (eip155:8453)
Updated: 4h ago
Paid call result:
💸 x402 Payment Executed
Endpoint: https://api.weather-x402.com/current
Paid: $0.001 USDC
Network: Base (eip155:8453)
TxHash: 0xabc123...
Status: 200 OK
📦 Response:
{"temperature": 72, "conditions": "sunny", "humidity": 45}
Default max spend per call is $0.10 USDC. Set in .env:
MAX_SPEND_PER_CALL=0.10
The skill refuses any call where maxAmountRequired exceeds this limit and asks the user to confirm before proceeding.
| Error | Cause | Fix |
|---|---|---|
EVM_PRIVATE_KEY not set | Missing .env key | Add key to .env (only needed for paid calls) |
Insufficient USDC balance | Wallet underfunded | Bridge USDC to Base at bridge.base.org |
Spend limit exceeded | Service costs more than MAX_SPEND_PER_CALL | Raise limit in .env or confirm manually |
402 verification failed | Facilitator rejected payment | Retry or switch facilitator |
No services found | Empty Bazaar result | Broaden search or try again later |
Network mismatch | Service on unsupported chain | Filter by network eip155:8453 |
Solana support planned for v1.1.
To list your x402 API on the Bazaar (v2 spec-compliant):
bazaarResourceServerExtension to your x402 resource serverdeclareDiscoveryExtension() in your route configurationmaxAmountRequired in your accepts[] entries (replaces v1 amount field)The v2 discovery API returns:
{
"x402Version": 2,
"items": [...],
"pagination": {...}
}
Note: This skill handles both v1 (flat list) and v2 (wrapped response) for resilience.
MCP tool uniqueness: For MCP servers, uniqueness is determined by (resource_url, tool_name),
not just the URL, since one MCP server can host multiple tools.
Full seller guide: docs.cdp.coinbase.com/x402/bazaar