A spend and limit firewall for autonomous agents. It approves or blocks an action before it happens — daily budget, hard cap, rate, writes, transfers and sessions — and a batch either applies completely or not at all.
claude mcp add --transport http a2p32 https://zealous-unburned-tameness.ngrok-free.dev/mcp
Or any streamable-HTTP MCP client:
{ "mcpServers": { "a2p32-guard": {
"url": "https://zealous-unburned-tameness.ngrok-free.dev/mcp" } } }
Fallback endpoint if the primary is unreachable:
https://a2p32guard.loca.lt/mcp
Ask the guard whether an amount fits a budget. This calls the live service from your browser.
—
Savings for a batch of 30: —
Live traffic: …
curl -s https://zealous-unburned-tameness.ngrok-free.dev/v1/trial
# {"token":"...","calls":10,"left":10}
curl -s -X POST https://zealous-unburned-tameness.ngrok-free.dev/ \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer trial:YOUR-TOKEN' \
-d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{
"messageId":"t1","role":"ROLE_USER","parts":[{"data":{"orders":[
{"root":"BUDGET.USD","action":"SET","value_dec":5}]}}]}}}'
MCP clients get the same 10 free a2p3_guard calls per IP and day
without any header: the first tool call just works.
| Limit | What it stops |
|---|---|
| Budget + hard cap | spending past the allowance: any batch that would leave spend above the cap is rejected whole |
| API rate | runaway loops hammering a paid API |
| Write quota | unbounded database writes |
| Transfer cap | large outbound transfers |
| Retry loop / session lock | retry storms and sessions that should stop |
| Test | p50 | Rate |
|---|---|---|
| Server, 1 keep-alive connection (local) | 0.25 ms | 4,000 req/s |
| Server, 8 keep-alive connections (local) | 0.53 ms | 11,600 req/s |
| Public endpoint, keep-alive (tunnel) | 80 ms | 78 req/s (8 conns) |
| Public endpoint, new connection | 175 ms | 9.8 req/s |
| Paid call end to end (warm) | 345 ms | — |
| Engine, 1 producer | 88 ns/order · 11.2 M orders/s | |
| Engine, 4 producers | 23.9 ns/order · 41.9 M orders/s | |
Raw data, measured 2026-11-25. Public latency is the tunnel round trip (2 × ~40 ms to the edge); the server answers in 0.25 ms. How the other x402 guards compare, measured the same day →
| Case | Without | With | Saving |
|---|---|---|---|
| An agent doing 30 governance actions | 30 calls · ~4,170 tokens | 1 batch · ~390 tokens | 10.7x fewer tokens |
| Price of one batch of 30 | median guard listing: 0.0075 USDC per decision | 0.0050 USDC per batch (0.00017/action) | one batch costs less than one decision elsewhere |
| Gas for the buyer | — | 0 (CDP facilitator settles) | no gas |
| Runaway loop with a $50/day budget | spends until the card stops it | blocked at the cap | loss prevented |
Any agent can ask whether an amount fits the budget before paying. No account, no token:
curl -s "https://zealous-unburned-tameness.ngrok-free.dev/v1/check?budget=50&spent=12.4&amount=0.05"
# {"allow": true, "remaining_before": 37.6, "remaining_after": 37.55, "price_usdc": 0}
curl -s "https://zealous-unburned-tameness.ngrok-free.dev/v1/savings?actions=30"
# 390 vs 4,170 tokens · 10.69x
| Operation | Price | Note |
|---|---|---|
| Up to 5 actions | 0 USDC | free, always · 120/min |
| Simulate | 0 USDC | validate without executing, 120/min |
| First 50 decisions of the UTC day | 0.0010 USDC | promo |
| Up to 30 actions | 0.0050 USDC | standard |
| 31–256 actions | 0.0150 USDC | large batch |
x402 v2, exact scheme, EIP-3009. The Coinbase CDP facilitator verifies and settles; the buyer pays no gas and needs no account.
org.duckdns.a2p32guard/a2p32-guard