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.
20 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
- 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 a given asset, including 1h and 24h change percentages, long/short ratio, and per-exchange breakdown. Pairs with funding_rates to complete the derivatives picture.
- orderbook_depthFreeGet real bid/ask depth and slippage estimates at $10k, $50k, and $250k notional for a trading pair. Returns best bid/ask, spread percentage, and how much slippage to expect at each trade size.
- 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.
- 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, retries with X-Payment header. Payment verified on Stellar or Base.
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.
Stellar mainnet
Native USDC, sub-cent fees (~$0.000001 per tx), Horizon-verified. Fully supported as an alternative settlement rail — pick it per call or per session. Circle's CCTP is live on Stellar, so funds bridge 1:1 to and from Base.