agenticpay
Get paid by AI agents. Open-source payment infrastructure for the MCP ecosystem — declare a price on any tool, agents pay in USDC over x402, settles on Solana in ~1.5 seconds.
No Stripe. No accounts. No API keys.
The full stack is here — SDK, CLI, paywall middleware, self-hosted x402 facilitator, and a live LLM agent demo. All TypeScript, MIT licensed.
Just want to test it? Point your
mcp-serverat our hosted devnet facilitator:FACILITATOR_URL=https://agentpay-facilitator-e9b20a5fee6a.herokuapp.com— no setup needed.
Live demo
A real Claude Opus agent receives a task, decides which paid tools to use, pays autonomously via x402 micropayments on Solana, and answers the user.
$ pnpm --filter @agenticpay/two-agent-demo agent
Agent wallet: 3rHoEumCpH8EGrr6Lq2vBKeyec6h3yPRGj2nGG2FzEfX
Server: http://localhost:4021
Facilitator: http://localhost:4022 ← our own
Model: claude-opus-4-7
Task: Reverse the string 'agentpay rocks' and tell me how many words
are in 'The quick brown fox jumps over the lazy dog'.
[turn 1] tool_use: reverse_string({"text":"agenticpay rocks"}) → paying $0.001 USDC ...
✓ paid + got result in 1596ms: {"result":"skcor yaptnega"}
[turn 1] tool_use: word_count({"text":"The quick..."}) → paying $0.0005 USDC ...
✓ paid + got result in 1286ms: {"count":9}
Agent final answer:
1. Reversed string: skcor yaptnega
2. Word count: 9 words
=== payments summary ===
reverse_string $0.0010 USDC 1596ms
word_count $0.0005 USDC 1286ms
TOTAL $0.0015 USDC 2 calls





