Purpose: obolpay-x402-mcp is an MCP server for connecting to Obolpay's x402 gateway, enabling MCP-compatible AI agents to obtain premium data on a pay-per-use basis, settled via USDC micropayments on the Base mainnet through the HTTP 402 protocol. The project is positioned for commercial use and requires compliance with the gateway terms.
Key capabilities:
- Discovery and preview: Agents can first use discover() to discover available data, then use preview() to evaluate the data with a free preview, avoiding blind purchases.
- Receipt verification: After a purchase, an EIP-191 signed receipt is generated, and proof of purchase can be verified via /verify-receipt.
- Data freshness SLA: If data is stale, the gateway issues compensation to a non-refundable, non-transferable account balance, which can be used via signed credentials.
- Incremental delivery: Only new entries are returned via the X-Since-Seq request header, saving context tokens.
- Example code: The examples/ directory provides examples that can be copied directly and tried without MCP, without a wallet, and using only the standard library.
Usage:
- Configure claude_desktop_config.json in an MCP client such as Claude Desktop to connect.
- Live endpoint:https://pay.obolpay.xyz(旧主机 x402.obolpay.xyz redirects here).
- Discovery manifest:https://pay.obolpay.xyz/.well-known/x402。
- Non-MCP reference client (standard exact scheme):https://pay.obolpay.xyz/client.py。
- Terms, pricing, and legal information:https://pay.obolpay.xyz/terms、https://pay.obolpay.xyz/pricing、https://pay.obolpay.xyz/legal。
Current limitations (important): The repository status note (2026-10-06) states that as of 2026-09-24 the Obolpay gateway only accepts the standard x402 exact scheme (EIP-3009 transferWithAuthorization). This project and the purchase examples (buy_openunit.py, agent_tool.py) still use the old "pay first, unlock later" flow, so purchases are currently not possible: because the gateway no longer provides a payee quote for that flow, the flow stops before sending any USDC. Prepaid top-up topup() was also discontinued on 2026-09-24. discover(), preview(), and verify_receipt() still work normally. To make purchases, use a standard x402 client to connect to https://pay.obolpay.xyz,可参考网关自带的参考客户端 https://pay.obolpay.xyz/client.py。
Use cases: Suitable for developers who want AI agents to autonomously discover, preview, and verify proof of purchase for paid data, as well as for scenarios studying x402 protocol and MCP integration. Because the purchase flow is currently unavailable, actual paid purchases require switching to a standard x402 client.