obolpay-x402-mcp
This server enables AI agents to autonomously discover, evaluate, purchase, and manage access to premium data via USDC micropayments on Base mainnet, using the HTTP 402 payment protocol. It supports both on-chain payments and gasless transactions via prepaid balances.
Discover: Retrieve the gateway's machine-readable service manifest (price, token, network, recipient, capabilities) — no payment required.
Preview: Fetch a free data sample and the current payment challenge/invoice to evaluate quality before committing — no payment required.
Purchase: Make a one-shot on-chain USDC payment on Base to unlock the full dataset and receive a signed proof-of-purchase receipt.
Top Up: Credit a prepaid balance by providing the transaction hash of an on-chain USDC deposit, enabling future gasless calls.
Check Balance: Query a wallet's prepaid balance, remaining calls, and next nonce.
Spend Gasless: Fetch paid data by drawing from a prepaid balance — no on-chain transaction, no gas fees. Ideal for repeated use after a one-time top-up.
Verify Receipt: Verify a proof-of-purchase receipt by confirming it was signed by the server — open to anyone, no payment required.
Provides a tool for LangChain agents to autonomously discover, preview, purchase, and consume premium data via gasless prepaid USDC micropayments on Base.
obolpay-x402-mcp
📖 Tutorial: Let your AI agent autonomously buy data — x402 + gasless prepaid + MCP on Base
MCP server for the live Obolpay x402 gateway — pay-per-call premium data for AI agents, settled in USDC on Base mainnet via HTTP 402.
Give any MCP-compatible agent (Claude Desktop, etc.) the ability to discover → evaluate (free preview) → pay once → then call GASLESS forever → verify a signed receipt — autonomously.
🚀 Copy-paste examples (start here) → examples/
No MCP needed to try it. Zero setup, no wallet, stdlib only:
python3 examples/quickstart_preview.py # evaluate the data QUALITY for free (trustless preview)Then buy today's verifiable openunit value with one signed USDC micropayment
(buy_openunit.py), or drop it into a LangChain/any-LLM agent as a
tool (agent_tool.py). Full walkthrough: examples/README.md.
Related MCP server: @true402.dev/mcp-server
Tools
Tool | What it does |
| Machine-readable service manifest (price, token, network, capabilities) |
| Free data sample + price from the 402 challenge (no spend) |
| One-shot on-chain pay-and-fetch |
| Fund a prepaid balance from a USDC deposit (once) |
| Balance, calls remaining, next nonce |
| Instant, gasless pay-per-call from the prepaid balance (no on-chain tx/gas) |
| Third-party verify a proof-of-purchase receipt |
Why it's different
Free preview before paying — evaluate the data, no blind spend.
Prepaid GASLESS balance — deposit USDC once, then unlimited cheap calls via off-chain signed vouchers.
Signed receipts — EIP-191 proof-of-purchase, verifiable at
/verify-receipt.Freshness SLA + auto-refund — stale data is auto-refunded to your balance.
Delta delivery (
X-Since-Seq) — only new items, saves your context tokens.
Run
pip install -r requirements.txt # mcp[cli], web3, eth-account, requests
export X402_AGENT_PRIVATE_KEY=0x... # a Base wallet with USDC + a little ETH for gas
# optional: export X402_BASE_URL=https://x402.obolpay.xyz (default)
python x402_mcp_server.pyClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"obolpay-x402": {
"command": "python",
"args": ["/absolute/path/to/x402_mcp_server.py"],
"env": { "X402_AGENT_PRIVATE_KEY": "0x..." }
}
}
}Links
Live endpoint: https://x402.obolpay.xyz
Discovery manifest: https://x402.obolpay.xyz/.well-known/x402
Reference client (non-MCP): https://x402.obolpay.xyz/client.py
Built on x402 + Base. USDC micropayments for the AI agent economy.
Available Tools
1 tooltopupA
Credit a prepaid balance from an on-chain USDC deposit to the recipient. First send USDC to the recipient on Base, then call this with the tx_hash.
| Name | Required | Description | Default |
|---|---|---|---|
| tx_hash | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action (credit) and the prerequisite, but does not disclose behavioral traits such as whether the operation is destructive, rate limits, error handling for invalid tx_hash, or any idempotency guarantees. More detail would be beneficial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two sentences. The main action is stated first, followed by the prerequisite and input instructions. No superfluous words; every sentence adds necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema, no annotations), the description covers the essential aspects: what it does, when to use it, and what input is required. It lacks information about the return value or possible errors, but the context is mostly sufficient for an agent to decide and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates by explaining the meaning of tx_hash: the transaction hash from the on-chain USDC deposit. This adds significant value beyond the schema's minimal 'Tx Hash' label, though it could be slightly more explicit about the format or source.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action (credit a prepaid balance) and the resource (from an on-chain USDC deposit to the recipient). It distinguishes the tool's purpose by outlining the prerequisite steps, making it unambiguous even without sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when to use the tool: after sending USDC to the recipient on Base. It provides a clear prerequisite and indicates the required input (tx_hash). However, it does not discuss when not to use it or mention alternatives, though the tool is single-purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
topup
TDQS
Scored across 1 tool
Only one tool exists, so there is no risk of confusion or overlapping purposes.
With a single tool, naming consistency is inherently maintained; the name 'topup' is concise and action-oriented.
A single tool is insufficient for a payment-related server; essential operations like checking balance or initiating deposits are missing.
The tool requires prior on-chain USDC transfer but provides no tool for that step, leaving a critical gap in the workflow.
Maintenance
Related MCP Connectors
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Paid MCP tools behind one endpoint. Agents pay per call in USDC on Base via x402.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP server bringing 100+ x402-paid APIs to AI agents (Claude, Cursor, MCP-aware clients). Auto-discovers tools from CDP Bazaar; handles USDC micropayments on Base.10033 npm1MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to access paid AI inference and web tools via HTTP 402 micropayments in USDC on Base, using the agent's wallet as identity.14118 npmMIT
- AlicenseNot gradedqualityFmaintenanceMCP server for the x402 protocol that lets AI agents discover and call payment-gated HTTP APIs automatically.82 npmApache 2.0

mpp32-mcp-serverofficial
AlicenseNot gradedqualityCmaintenanceMCP server that allows AI agents to discover and pay for thousands of APIs (x402 on Solana/Base) using a single key, with automatic payment handling and a federated catalog of machine-payable endpoints.234MIT