Most agent-payment tools are a wallet — they move money. AgentPay is the layer that decides whether to spend it at all.
AgentPay is the economic intelligence layer for MCP servers and AI agents.
Agents spend money. Most don't know how much, or why, until the session ends. AgentPay gives agents the ability to reason about cost while they work — not after.
Start free — 17 tools, zero cost → Browse the toolsBudget enforced at the payment layer
A hard cap the agent can't ignore — set at the point where money moves, not in code a model can bypass.
Cost awareness before every call
Check price before committing. Route to a cheaper alternative mid-task if the math doesn't work.
Full receipt when the session ends
Every call, every cost, every decision — proof of economic accountability, not a debug log.
Use it in your agent
Any agent — one command (Claude Code, Codex, Droid, OpenCode & more, via the skills CLI):
npx skills add romudille-bit/agentpay
Claude Code plugin:
/plugin marketplace add romudille-bit/agentpay
/plugin install agentpay@agentpay
Any MCP runtime — self-contained (pure Node, no Python, no keys to start):
npx -y @romudille/agentpay-mcp
When your agent needs a paid tool, AgentPay finds the options across the x402 marketplace, drops the fake/empty stubs, and recommends the cheapest one relevant to the need that's actually used — within a budget. The agent pays the provider directly (peer-to-peer, no custody) and keeps a verifiable receipt.
New in MCP v2.4.0: set AGENTPAY_BASE_KEY (+ AGENTPAY_MAX_SPEND, default $0.10) and paid tools settle in-place — gasless EIP-3009 on Base, hard session cap enforced before anything is signed. Keyless stays the default.
3 lines. 17 free tools. Zero setup.
# pip install agentpay-x402
from agentpay import quickstart
s = quickstart(max_spend="0.10") # registers + mints a wallet, no funding, no human
print(s.call("token_price", {"symbol": "ETH"}).data["price_usd"])
print(s.spending_summary()) # receipt: every call, cost, tx, chain
17 tools are free — no USDC, no wallet setup. Every call gets a session receipt (tool, cost, timestamp). Works with LangChain, CrewAI, AutoGen, or plain Python.
22 tools — 17 free
- crypto_newsFreeLatest crypto news and community sentiment from r/CryptoCurrency for any token
- defi_tvlFreeDeFi protocol Total Value Locked from DeFiLlama. Returns top 10 or a specific protocol.
- dune_queryFreeRun any Dune Analytics query and return live onchain results by query ID. Use fast_only=True for live bots — returns cached result instantly or raises immediately, never blocks.
- fear_greed_indexFreeCrypto Fear & Greed Index (0=extreme fear, 100=extreme greed) with optional history
- funding_ratesFreeGet perpetual futures funding rates across Binance, Bybit, and OKX
- funding_spread$0.01Cross-venue perp funding divergence for one asset — the basis/carry read, not the raw rates. Reads Binance, Bybit, OKX, Gate.io, Bitget, Hyperliquid, dYdX, MEXC and KuCoin in parallel, normalises every rate to a per-8h figure (hourly venues scaled), and returns the spread (max minus min, cheapest and dearest venue, deviation from the median), its percentile against the last 7 days of cross-venue spreads, a plain-English read, and — given notional_usd — a carry estimate (per 8h / day / 30d) net of an assumed taker fee with the breakeven holding time. Venues that fail to answer are named in venues_unavailable; the spread is computed over the ones that did.
- gas_trackerFreeGet current Ethereum gas prices (slow, standard, fast)
- market_snapshotFreeFed rate, inflation proxy, S&P 500, BTC, ETH, and gas in one call. Replaces three separate API integrations with a single normalized response — the only tool that gives you macro + crypto in one shot.
- open_interestFreeGet total open interest in perpetual futures for any asset, with 1h and 24h change rates. Pairs with funding_rates to complete the derivatives picture — rising OI with high funding = overcrowded position.
- orderbook_depthFreeGet real bid/ask depth and slippage estimates at $10k, $50k, and $250k notional from Binance, Bybit and OKX. Use before sizing a position to know if you can execute without moving the market.
- pre_trade_check$0.01One-call pre-trade sanity check: 'I want to long $X of SYMBOL — is now sane?' Combines live orderbook slippage at YOUR size, cross-exchange funding (carry cost), open-interest crowding, and contract security (GoPlus) into a single ok/caution/avoid verdict with a per-factor breakdown. Major ERC-20 addresses (LINK, UNI, ARB, OP, AAVE, PEPE, SHIB) resolve automatically; native assets (BTC, ETH, SOL, ...) report security n/a; an unrecognized token without token_address reads 'unknown' and caps the verdict at caution — an unscreened contract can never read 'ok'. Replaces four API integrations and the judgment layer on top of them. Raw component data embedded so you can apply your own thresholds. Stacks tokens (STX, sBTC, USDCx, stSTX, ZEST, LEO, USDh, aeUSDC, stBTC) add the Bitflow DEX venue: price impact at YOUR size from a live route quote, the pools and bins the swap crosses, and their TVL; STX and sBTC keep their CEX perp legs, DEX-only tokens report funding/OI n/a and contract risk unscreened (no GoPlus coverage on Stacks).
- sbtc_peg$0.01The sBTC peg as an agent-readable feed — the one dataset only Stacks state can answer. Live sBTC supply (and share of the peg cap), peg-in and peg-out flows for 24h and 7d (sats, counts, unique recipients, net), in-flight bridge requests (pending and accepted deposits with the oldest pending age, pending withdrawals, 24h failures), the last peg events with Bitcoin txids, the signer set and signature threshold, and the rolling withdrawal cap with its current headroom. Read from the sBTC token and registry contracts and the bridge API (Emily); a source that fails degrades to null plus a note. Signer liveness is not public and is reported as null — the pending ages and withdrawal headroom are the proxies.
- session_create$0.01Open a budget-capped agent session on AgentPay. Pay $0.01 USDC once — get a session_id, budget config, and gateway URL. Enforces a hard max_spend cap across all subsequent tool calls via the AgentPay SDK. The entry point for agents discovering AgentPay on Base Bazaar.
- token_market_dataFreeGet market cap, 24h volume, ATH, and price change for any token. Note: does NOT return pool depth or slippage — for pre-trade liquidity estimates, use a dedicated orderbook tool.
- token_priceFreeGet the current USD price of any cryptocurrency token
- token_securityFreeScan any token contract for honeypot, rug pull, and security risks
- url_readerFreeConvert any URL to clean, LLM-ready markdown. Strips ads, nav, and boilerplate — returns just the content. No API key needed.
- verified_route$0.01Paid buyer-side trust oracle: 'I need X, budget $Y — which x402 tool is real?' Sweeps the WHOLE x402 marketplace across many queries (a single search shows only a slice), collapses sybil/factory clusters (one wallet stamping many fake-distinct listings → one entry), ranks the genuinely-used survivors by real unique-payer usage, and returns ONE vetted recommendation with a ready-to-pay x402 challenge. The credit-bureau check an agent cannot do itself in one query — pay $0.01 to avoid paying a scam or a dead stub.
- wallet_balanceFreeGet the token balances for any Ethereum or Stellar wallet address
- web_searchFreeSearch the web and return the top 5 results with their full content as clean markdown. Better than DIY because zero setup and results include page content, not just links.
- whale_activityFreeDetect recent large wallet movements for a token (whale tracking)
- yield_scannerFreeFind best DeFi yield opportunities across protocols for a given token
How it works
Agent calls a tool
POST to /tools/<name>/call with parameters.
Free tools return 200 directly
17 tools return data immediately — no payment, no wallet required. Session receipt included on every call.
Paid tools use x402
Gateway returns HTTP 402 with payment instructions. Agent pays USDC on-chain and retries with proof. Base and Stellar settle via the standard x402 exact scheme — any standard x402 client can pay; Stacks settles from any Stacks x402 client.
Live proof
x402 delivery scores →
Our Prober pays x402 services real USDC twice a week and scores whether they
actually deliver. Every score is public and feeds verified_route
ranking. Usage says what's popular — paying says what works.
Receipt ledger →
Autonomous agents run on AgentPay daily under hard budget caps — every paid call leaves a verifiable on-chain receipt. The cap-and-receipt loop, live, in public.
Settlement layer
Base mainnet
Native USDC, gasless EIP-3009 settlement via the CDP facilitator — the default paid chain. Discovery via Coinbase's Bazaar directory: session_create, pre_trade_check, and verified_route are indexed and settle here today.
Stacks mainnet
sBTC or STX from any Stacks x402 client (AIBTC wallet, x402-stacks), sBTC from the AgentPay SDK: the agent signs a SIP-010 sbtc-token::transfer or a plain STX transfer and never broadcasts; the gateway verifies every field against its own quote, checks the wallet's session cap, broadcasts, and waits for confirmation before the tool runs. Receipts are chain-verified on the public ledger. Walkthrough.
Stellar mainnet
Native USDC, sub-cent fees, settled through the standard x402 exact scheme via the Built on Stellar (OpenZeppelin) facilitator — any @x402/stellar client can pay, with the network fee sponsored. The AgentPay SDK's classic payment + memo path, verified on Horizon, still works. Next: verified-delivery probes on Stellar x402 services, and Stellar USDC buying any verified endpoint in the catalog — Circle's CCTP is live on Stellar, so USDC moves 1:1 to and from Base.