目录 / x402-market
x402-market
**Pay-per-call API marketplace on Base (USDC).** x402-market lets AI agents discover and invoke any listed API end-to-end with one tool call. The MCP server handles HTTP 402 payment challenges automatically using your wallet, so Claude (or any MCP client) pays for API calls on its own. ## How it works 1. `list_catalog` — discover available paid APIs in the marketplace 2. `get_listing` — inspect endpoint schema, pricing, and usage notes 3. `pay_and_call` — invoke the API end-to-end; pays the seller via x402 / USDC on Base if a 402 challenge is returned 4. `claim_refund` — auto-judge refund for failed calls or >30s upstream latency ## Setup - `MCP_BUYER_PRIVATE_KEY` (required): Hot wallet on Base mainnet with a small USDC + ETH balance. **Use a separate wallet, not your main one.** - `MCP_MAX_PRICE`: Hard cap per call (USDC). Default `1`. - Other params have safe defaults. ## Links - npm: `@x402-market/mcp-server` - GitHub: https://github.com/AsaiShota/x402-market - Marketplace API: https://x402-market-api.lien-studio-akiyama.workers.dev
接入信息
- 传输形态
- http
- 鉴权方式
- 需 API Key(需要配置:MCP_BUYER_PRIVATE_KEY)
- 端点
https://x402-market--lien-studio-akiyama.run.tools
{
"mcpServers": {
"x402-market": {
"headers": {
"Authorization": "Bearer \u003cYOUR_KEY\u003e"
},
"url": "https://x402-market--lien-studio-akiyama.run.tools"
}
}
}
能力清单
| 工具 | 说明 |
|---|---|
| list_catalog | Use this tool when the user asks what APIs are available, or you need to discover paid APIs to satisfy a task. Returns a JSON array of active marketplace listings with seller_slug, listing slug, name, description, price_usdc, category, use_cases, and tags. |
| get_listing | Use this tool when you already have a listing slug and need its full schema before invoking it. Returns one listing as JSON (request_schema, response_schema, when_to_use, output_format_description, example_calls). |
| pay_and_call | Use this tool when the user wants to actually invoke a paid API and receive its response. End-to-end: GET the 402 price, send USDC on Base from the configured buyer wallet, retry with X-Payment, return the upstream JSON. Returns { status, data, tx_hash, price_paid_usdc, pay_to } as text. |
| claim_refund | Use this tool when a previously paid call failed and the user asks for a refund. Auto-judge approves on upstream failure or >30s latency, rejects otherwise. Returns the API's HTTP status + JSON response. Signs the request with the configured buyer private key. |
提交举报 / 纠错
侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。