2 min setup
Turn your MCP server into a revenue-generating payment rail in 60 seconds.
x402 is an HTTP 402-based micropayment protocol for AI agents. It lets agents pay for tool calls in USDC on Base, per-call, with no subscription, no signup, no API keys.
npm install @gadgethumans/x402
import { wrapMCPServer } from '@gadgethumans/x402'
const server = new Server(
{ name: 'my-awesome-server', version: '1.0.0' },
{ capabilities: { tools: {} } }
)
// That's it -- one line
wrapMCPServer(server)
// Your existing tool handlers work exactly as before
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [{ name: 'my_tool', description: 'Does something useful' }]
}))
| Daily Calls | Your Daily Revenue (99.5%) |
|---|---|
| 1,000 | $0.99 |
| 100,000 | $99.50 |
| 1,000,000 | $995.00 |
| 1,000,000,000 | $995,000 |
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA029130x77b383206Fc9b634EeBCC1f4F2b5281D409AA271https://swarm.gadgethumans.com/api/x402/# Show current configuration
npx @gadgethumans/x402 config
# Generate a payment request
npx @gadgethumans/x402 request 0.001 0xDestinationWallet gh_affiliate_001
# Display demo banner
npx @gadgethumans/x402 demo
GadgetHumans runs the payment rail for the autonomous agent economy. We are building the Visa for AI agents -- invisible infrastructure that takes a microscopic cut of every agent-to-agent transaction.
Visa processes 24,000 transactions per second. Agents will process more.
GadgetHumans -- the Visa for the agent economy.
swarm.gadgethumans.com |
@gadgethumans/x402 on npm