Every payment your agent makes passes through x402warden before reaching the merchant.
1. Your agent requests a service
2. Service returns HTTP 402 with price + merchant address
3. x402warden checks your spending policy on-chain
4. If allowed, USDC moves to escrow (not directly to merchant)
5. Request retried with payment proof, service responds with data
6. 5-min dispute window to get a refund if the service failed
7. After window closes, funds released to merchant
Works with any AI agent, any language, any framework.
Get free devnet SOL and USDC from Solana and Circle faucets.
Deploy an on-chain smart account that enforces your spending rules.
Define per-call limits, daily caps, merchant allowlists, and dispute windows.
Your agent calls x402warden pay as a subprocess. Returns JSON to stdout, parseable by any language.
$ npx x402warden pay https://api.example.com/research
{
"status": "paid",
"txSignature": "4fW...ABCD",
"amountPaid": 5000000,
"body": { ... }
}Start a local proxy. Your agent's HTTP requests go through it. 402 payments are handled automatically — your agent doesn't know it's paying.
# Start the proxy
$ npx x402warden-proxy --port 4020
# Your agent code — no changes needed
client = httpx.Client(proxy="http://localhost:4020")
response = client.get("http://api.example.com/data")Give your AI agent native x402 payment capabilities. Works with Claude, GPT, and any MCP-compatible client.
$ npm install -g x402warden-mcpDrop this into your project's .mcp.json and your AI agent gains x402 payment tools automatically.
{
"mcpServers": {
"x402warden": {
"command": "npx",
"args": [
"-y", "x402warden-mcp"
],
"env": {
"SOLANA_KEYPAIR_PATH": "./keypair.json",
"AGENT_ID": "0"
}
}
}
}Full on-chain wallet management through natural language. No SDK code required.
x402_payPay an x402 service and return the responsex402_balanceCheck SOL and USDC balancesx402_statusView agent account and policy on-chainx402_initCreate a new agent accountx402_set_policySet spending limits and rulesx402_settleSettle payment after dispute window