
X402 Api
Give your agent paid, per-call access to DeFi data on Base via x402 and USDC without building the billing stack yourself.
Overview
x402 API MCP is a MCP server for the Build phase that serves DeFi data to AI agents with pay-per-call billing via x402 and USDC on Base.
What is this MCP server?
- DeFi data API exposed as MCP for AI agents with pay-per-call economics
- x402 and USDC on Base chain for metered access instead of flat subscriptions
- npm package @x402-api/mcp-server v1.0.2 with stdio transport
- Configurable X402_API_BASE_URL (default https://x402-api.fly.dev)
- npm package @x402-api/mcp-server version 1.0.2
- Default API host https://x402-api.fly.dev via X402_API_BASE_URL
What problem does it solve?
You want your agent to pull live DeFi data but cannot justify a flat API bill or custom micropayment plumbing as a solo builder.
Who is it for?
Crypto-native indie builders prototyping agent tools that need on-demand DeFi reads with usage-based cost.
Skip if: Builders who need free unlimited market data or who are not set up for USDC on Base.
What do I get? / Deliverables
After install, your agent can call metered DeFi endpoints through MCP while payments settle per request on Base.
- Stdio MCP bridge to the x402 DeFi HTTP API
- Agent tools that incur per-call DeFi data access on Base
- Configurable API base URL for staging versus production hosts
Recommended MCP Servers
Journey fit
Build integrations is where you wire external paid APIs into the product or agent you are shipping. Integrations covers third-party data and micropayment protocols, not initial market research or post-launch analytics.
How it compares
Pay-per-call DeFi data MCP on Base, not a free public JSON-RPC or narrative research server.
Common Questions / FAQ
Who is x402 API MCP for?
Solo developers shipping agent or API products on Base who want DeFi data with x402 micropayments per tool call.
When should I use x402 API MCP?
Use it during Build when integrating agent-facing DeFi queries and you are ready to fund USDC pay-per-call usage.
How do I add x402 API MCP to my agent?
Install @x402-api/mcp-server from npm, add the stdio server to your MCP config, and set X402_API_BASE_URL if you are not using the default fly.dev host.