プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

AgentPay — trust routing + spend caps for x402 agents

作者:romudille-bitバージョン 2.8.1i★ 4iパソコンでもクラウドでも
レジストリ名io.github.romudille-bit/agentpay

インストール方法

What it does

Buyer-side trust oracle + capped sessions for x402 agents: verified_route, receipts, 17 free tools.

  • Connects パソコンでもクラウドでも
  • Account or key Cloud: No key needed · Local: Needs AGENTPAY_BASE_KEY
  • Category その他

インストール

使っているAIアプリを選んで、設定をコピーしてください。

チェック 4/5 合格 · 質問内容は提供元のサーバー(agentpay.tools)を通ります

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげます · 約 2 分

キー不要、インストール不要 · claude.ai かデスクトップアプリで一度設定すれば、チャットで使えます · 無料アカウントは 1 つまで · Team/Enterprise はオーナー(Owner)が追加

  1. Claude の Connectors ページを開く

    CustomizeConnectors

    CustomizeConnectors1+ Add2https://…3Add4
  2. 「+ Add」→「Add custom connector」を押し、この 2 つを入力

    ここからコピーして Claude の同じ名前の欄に貼り付け、Continue を押します

    Name · 名前AgentPay — trust routing + spend caps for x402 agents
    Remote MCP server URL · アドレスhttps://agentpay.tools/mcp

    Authentication は Claude が検出したままにして Add を押します

  3. チャットで有効にする

    +ConnectorsAgentPay — trust routing + spend caps for x402 agents

  4. 試してみる

    AgentPay — trust routing + spend caps for x402 agents を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が AgentPay — trust routing + spend caps for x402 agents を使っていると言うか、回答に AgentPay — trust routing + spend caps for x402 agents のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT は法人向けプランのみ接続できます

Web 版 ChatGPT Business・Enterprise・Edu で、ワークスペースの管理者かオーナーが追加します · Free・Plus・Pro の場合:あなたの ChatGPT プランではまだ MCP を自分でつなげません

  1. Web 版 ChatGPT で MCP の追加ページを開く

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. 名前とアドレスを入力

    名前を入れ、Connection にアドレスを貼り付け、注意事項にチェックして Create as a plugin を押します

    Name · 名前AgentPay — trust routing + spend caps for x402 agents
    Connection · アドレスhttps://agentpay.tools/mcp
  3. チャットで AgentPay — trust routing + spend caps for x402 agents を選ぶ

    新しいチャットを開き、入力前にプラグインの一覧から AgentPay — trust routing + spend caps for x402 agents を選びます

  4. 試してみる

    AgentPay — trust routing + spend caps for x402 agents を使って、私に何ができるか教えて、1 つやってみせて

    ✓ ChatGPT が AgentPay — trust routing + spend caps for x402 agents を使っていると言うか、回答に AgentPay — trust routing + spend caps for x402 agents のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に OpenAI のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Claude Code につなげます · 約 2 分

キー不要、インストール不要

  1. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  2. このコマンドを貼り付けて Enter

    claude mcp add --transport http --scope user agentpay https://agentpay.tools/mcp
  3. Claude Code で /mcp と入力

    AgentPay — trust routing + spend caps for x402 agents が一覧にあり、接続済みと表示されれば OK です

  4. 試してみる

    AgentPay — trust routing + spend caps for x402 agents を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が AgentPay — trust routing + spend caps for x402 agents を使っていると言うか、回答に AgentPay — trust routing + spend caps for x402 agents のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげます · 約 2 分

キー不要、インストール不要

  1. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  2. Cursor の AI チャットを Agent モードで開く

  3. 試してみる

    AgentPay — trust routing + spend caps for x402 agents を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が AgentPay — trust routing + spend caps for x402 agents を使っていると言うか、回答に AgentPay — trust routing + spend caps for x402 agents のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげます · 約 2 分

キー不要、インストール不要

  1. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  2. VS Code の AI チャットを Agent モードで開く

  3. 試してみる

    AgentPay — trust routing + spend caps for x402 agents を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が AgentPay — trust routing + spend caps for x402 agents を使っていると言うか、回答に AgentPay — trust routing + spend caps for x402 agents のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

Web 経由でつなぐアプリ用のアドレス

アドレスhttps://agentpay.tools/mcp

JSON 設定は下の「開発者向け」にあります

つまずいたら?AgentPay — trust routing + spend caps for x402 agents を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

Web 経由

Claude Code

claude mcp add --transport http --scope user agentpay https://agentpay.tools/mcp

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "agentpay": {
      "url": "https://agentpay.tools/mcp"
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "agentpay": {
      "type": "http",
      "url": "https://agentpay.tools/mcp"
    }
  }
}

パソコンにインストール

Claude Code

claude mcp add --scope user agentpay --env AGENTPAY_BASE_KEY=your-value --env AGENTPAY_ENABLE_PAID=your-value --env AGENTPAY_MAX_SPEND=your-value -- npx -y @romudille/agentpay-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": [
        "-y",
        "@romudille/agentpay-mcp"
      ],
      "env": {
        "AGENTPAY_BASE_KEY": "your-value",
        "AGENTPAY_ENABLE_PAID": "your-value",
        "AGENTPAY_MAX_SPEND": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": [
        "-y",
        "@romudille/agentpay-mcp"
      ],
      "env": {
        "AGENTPAY_BASE_KEY": "your-value",
        "AGENTPAY_ENABLE_PAID": "your-value",
        "AGENTPAY_MAX_SPEND": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "agentpay": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@romudille/agentpay-mcp"
      ],
      "env": {
        "AGENTPAY_BASE_KEY": "your-value",
        "AGENTPAY_ENABLE_PAID": "your-value",
        "AGENTPAY_MAX_SPEND": "your-value"
      }
    }
  }
}

自分で入力する値

  • AGENTPAY_BASE_KEY 秘密 env
    Optional EVM private key for wallet mode: settle paid tools in-place (gasless EIP-3009 on Base). Keyless free-tools mode works without it.
  • AGENTPAY_ENABLE_PAID env
    Set to 1 to settle paid tools from the wallet the server mints on first run (fund it with USDC on Base first). Off by default.
  • AGENTPAY_MAX_SPEND env
    Hard per-session spend cap in USD when wallet mode is enabled (default 0.10).

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
444/週
ライセンスi
ライセンスの記載なし
接続方法
パソコンでもクラウドでも
最新バージョンi
2.8.1
カテゴリi
その他
レジストリ公開日i
2026年11月9日
コードの最終更新i
2026年11月10日
作者
romudille-bit
パッケージ
npm: @romudille/agentpay-mcp
ウェブサイト
agentpay.tools
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

インターネット経由でつなげるアプリ

ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

ツールの名前と説明は、サーバーが2026年11月11日に返したそのままの内容です。書いたのは作者で、私たちではありません。プレーンテキストとして表示しています。

  • session_create

    Open 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. Use when: Y

  • pre_trade_check

    One-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 breakd

  • verified_route

    Paid 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 gen

  • funding_spread

    Cross-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 mi

  • sbtc_peg

    The 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 ol

  • token_price

    Get the current USD price of any cryptocurrency token Use when: You need the current USD price, 24h change, or market cap of any cryptocurrency. Not for: you need volume, ATH or a pair quote — token_market_data; a one-call macro + crypto overview — market_snapshot; pool depth or

  • gas_tracker

    Get current Ethereum gas prices (slow, standard, fast) Use when: You need to know current Ethereum gas prices before submitting a transaction or estimating costs. Not for: you need gas as part of a broader read — market_snapshot already includes standard gwei; only Ethereum mainn

  • yield_scanner

    Find best DeFi yield opportunities across protocols for a given token Use when: You need to find the best yield/APY for a token across DeFi protocols. Not for: you need a protocol's total TVL rather than pool APYs — defi_tvl; risk_level is a heuristic, run token_security on the p

  • open_interest

    Get 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. Use when: You need to know total open interest in perpetual futures and whe

  • orderbook_depth

    Get 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. Use when: You need to estimate slippage before executing a large trade. Tells you how mu

  • wallet_balance

    Get the token balances for any Ethereum or Stellar wallet address Use when: You need to look up the token holdings of an Ethereum or Stellar wallet address. Not for: you want a token's price or market data rather than one address's holdings — token_price / token_market_data; larg

  • fear_greed_index

    Crypto Fear & Greed Index (0=extreme fear, 100=extreme greed) with optional history Use when: You need to gauge overall crypto market sentiment or mood — whether the market is fearful or greedy. Not for: you want token-specific sentiment — crypto_news (per-token headlines) or fun

  • crypto_news

    Latest crypto news and community sentiment from r/CryptoCurrency for any token Use when: You need recent news headlines or community sentiment for one or more crypto tokens. Not for: you need general web news or documentation — web_search; a specific article's text — url_reader;

  • defi_tvl

    DeFi protocol Total Value Locked from DeFiLlama. Returns top 10 or a specific protocol. Use when: You need the Total Value Locked in a specific DeFi protocol or want to compare the top protocols by TVL. Not for: you want the best yield for a token — yield_scanner; protocol revenu

  • token_market_data

    Get 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. Use when: You need 24h trading volume, market cap, or all-time high for a token pair on decentralized

  • token_security

    Scan any token contract for honeypot, rug pull, and security risks Use when: You need to check if a token contract is safe before trading or investing. Not for: the asset is a native coin (BTC, ETH, SOL) with no contract — nothing to scan; you want liquidity or price — orderbook_

  • funding_rates

    Get perpetual futures funding rates across Binance, Bybit, and OKX Use when: You need funding rates to gauge leveraged market sentiment or cost of holding a perp position. Not for: you need open interest or long/short ratio — open_interest; one verdict combining funding, OI, slip

  • dune_query

    Run 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. Use when: You need deep onchain analytics from a specific Dune query — protocol revenue, user counts,

  • url_reader

    Convert any URL to clean, LLM-ready markdown. Strips ads, nav, and boilerplate — returns just the content. No API key needed. Use when: You need to read the content of a web page or article and get clean, structured text for further processing. Not for: you do not have a URL yet

  • web_search

    Search 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. Use when: You need to find current information on any topic — news, documentation, prices, events, or anythi

  • market_snapshot

    Fed 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. Use when: You need a combined macro + crypto market overview in one call: S&P 5

  • whale_activity

    Detect recent large wallet movements for a token (whale tracking) Use when: You need to detect large token transfers that may signal institutional moves, accumulation, or sell-offs. Not for: you need one address's holdings — wallet_balance; exchange order-book size rather than on

  • verified_route_preview

    Buyer-side trust oracle for the x402 marketplace: "I need X, budget $Y — which tool is real?" Vets Coinbase Bazaar (discover → drop stubs/factory clones → rank by real unique-payer usage → budget-gate). This MCP runs the FREE single-query PREVIEW: it returns the vetted pick (name

  • route

    Legacy alias of verified_route (kept for back-compat). Find and judge the best paid x402 tool for a need, within a budget. Discovers across Coinbase Bazaar, drops stubs (no schema / factory clones), ranks survivors by real usage (unique payers × 3 + calls + recency bonus), enforc

  • estimate_plan

    Price a multi-tool plan BEFORE spending anything. Submits the tool calls an agent intends to make to the gateway's free /v1/plan/estimate and returns per-step cost, total, a fits-budget verdict, and a cheaper alternative per paid step. No payment, no wallet needed. Use when: plan

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月12日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント romudille-bit で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:一昨日

  • ! 注意

    ライセンスがある

    GitHubがライセンスの種類を判別できませんでした。ファイルを開いて確認してください

  • ✓ 合格

    エンドポイントが応答する

    484ミリ秒で応答(HTTP 200)

  • – 対象外

    OAuthでサインイン

    サインイン不要

  • ✓ 合格

    ツールの説明に隠れた指示がない

    25件のツールの説明を読み、AIへの隠れた指示は見つかりませんでした

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

Google でログインして投稿

ユーザーレビュー

まだレビューはありません

Google でログインしてレビューを書く

その他のほかのサーバーとの比較i

  • このカテゴリのほかの19323件のうち94%よりスターが多い
  • このカテゴリのほかの19323件のうち92%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの19323件のうち51%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

AgentPay — trust routing + spend caps for x402 agentsは安全ですか?

当てはまる基本チェック5項目のうち4項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

入力が必要なもの:AGENTPAY_BASE_KEY

パソコンで動きますか、それともクラウドですか?

どちらでも使えます。パソコンにインストールしても、クラウド版につないでもかまいません。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は一昨日、最新バージョン(2.8.1)がレジストリに届いたのは3 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。URL で接続するので、リモート MCP に対応したアプリでも使えます(例:ChatGPT Business 以上)。

代わりに使えるものは?

同じカテゴリには:World Monitor, Claude Flow, Windmill

同じカテゴリのほかの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 104 tools.

作者:koala73広く使われている★ 9万今日更新

クラウドで動く✓ 提供元 · worldmonitor.app

Claude Flow

AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.

作者:ruvnet広く使われている↓ 1.4万/週★ 8.1万14 か月前更新

パソコンで動く

Windmill

Run Windmill scripts and flows and manage jobs, schedules, resources and variables.

作者:windmill-labs広く使われている★ 1.9万今日更新

クラウドで動く

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

AgentPay

*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 and the bill arrives.

AgentPay gives agents economic intelligence — the ability to reason about cost while they work, not after.

It starts with a budget. Every session opens with a hard cap enforced at the payment layer — not in code a model can ignore, but at the point where money moves. The agent knows from the first call exactly what it has to spend.

Before calling a tool, it knows what that call costs. Mid-task, it can check what's left and route to a cheaper alternative if the math doesn't work. When the session ends, a receipt captures every call, every cost, every decision — not a debug log, but proof of economic accountability.

The developer sees all of it: spending patterns per agent, anomaly flags when something loops or spikes, policy controls that enforce exactly which tools an agent can use and how much it can spend on each.

The result is an agent that doesn't just have a budget. It knows how to use one.

Start free: 22 tools (17 free), no USDC needed, no wallet setup required. Live gateway: https://agentpay.tools Settles in: USDC on Base and Stellar, sBTC on Stacks mainnet (walkthrough)


Install

pip install agentpay-x402            # core (Stellar + Stacks/sBTC)

pip install "agentpay-x402[base]" # + pay tools that settle on Base pip install "agentpay-x402[stacks]" # same as core, spelled out — pay in sBTC on Stacks


Quickstart — 3 lines, zero setup

17 free tools. No USDC, no wallet, no API keys, no human. quickstart() registers an agent, mints a wallet, and returns a ready, budget-capped session.

from agentpay import quickstart

s = quickstart() # registers + mints a wallet print(s.call("token_price", {"symbol": "ETH"})"result") print(s.spending_summary()) # receipt: every call, cost, tx

Set a hard budget, or bring your own funded wallet to pay for tools:

s = quickstart(max_spend="0.50")                   # cap this run at $0.50

s = quickstart(secret_key="S...", base_key="0x...") # your wallet (Stellar + Base)

Every call is session-tracked, and the cap is enforced before any payment is signed.


20 Tools (17 Free + 3 Paid)

Every call is session-tracked — you get a receipt showing every tool called, every cost, and every timestamp.

ToolParametersReturns
url_readerurlClean markdown content of any web page
web_searchqueryTop 5 results with full content
market_snapshot—S&P 500, Treasury yield, BTC, ETH, gas in one call
token_pricesymbol (BTC, ETH, SOL…)price_usd, change_24h_pct, market_cap_usd
gas_tracker—slow/standard/fast gwei, base_fee_gwei
fear_greed_indexlimit (days of history, default 1)value 0–100, value_classification, history[]
token_market_datatoken_a, token_bvolume_24h_usd, market_cap_usd, price_usd
wallet_balanceaddress, chain (ethereum/stellar)token balances
whale_activitytoken, min_usd (default 100k)large_transfers[] (full from/to + tx_hash), total_volume_usd
defi_tvlprotocol (optional, e.g. "uniswap")tvl, change_1d, change_7d, chains[]
token_securitycontract_address, chainrisk_level, is_honeypot, buy_tax, sell_tax
open_interestsymbol (BTC, ETH…)total_oi_usd, oi_change_1h/24h_pct, long_short_ratio
orderbook_depthsymbol (e.g. ETHUSDT)best_bid/ask, spread_pct, slippage at $10k/$50k/$250k
funding_ratesasset (optional)funding_rate_pct, annualized_rate_pct, sentiment per exchange
crypto_newscurrencies (e.g. "ETH,BTC"), filterheadlines[] with title, url, sentiment, score
yield_scannertoken, chain (optional), min_tvltop 10 pools by APY with protocol, tvl_usd, risk_level
dune_queryquery_id, limit, fast_onlyrows[], columns[], row_count from Dune Analytics
session_createagent_address, max_spend, labelsession_id, budget config, gateway_url, receipt — $0.01
pre_trade_checksymbol, size_usd, side, venue?, token_address?one-call trade verdict (ok/caution/avoid): slippage at YOUR size, side-aware funding carry, OI crowding, optional security; Stacks tokens add the Bitflow venue (price impact at size, route, pool TVL) — $0.01
funding_spreadsymbol, notional_usd?cross-venue perp funding divergence: nine venues normalised to 8h, spread (cheapest/dearest), 7-day percentile, carry estimate net of taker fees — $0.01
sbtc_peg—the sBTC peg: supply vs cap, 24h/7d peg-in and peg-out flows, in-flight and failed bridge requests, last peg events, signer set and threshold, rolling withdrawal headroom — $0.01
verified_routeneed, budget_usd?, chain?buyer-side trust oracle: sweeps the x402 marketplace, collapses sybil/factory clusters, ranks real providers by usage × delivery scores → one vetted recommendation + ready_to_pay challenge — $0.01

Session Intelligence

This is the economic intelligence layer in practice. The Session gives your agent — and you — real visibility into what happened, what it cost, and why.

from agentpay import quickstart, BudgetExceeded

quickstart() registers + mints a wallet; the returned session is also a

context manager, so you can with it for a printed receipt on exit.

Budget caps are exact: max_spend=0.10 (float) == "0.10" (str).

with quickstart(max_spend=0.10) as session:

Price an entire multi-tool plan BEFORE spending anything (free, no wallet)

plan = session.estimate_plan(["token_price", "pre_trade_check", "session_create"]) plan["total_usdc"], plan["fits_budget"] # per-step costs + cheaper alternatives inside

Reason about cost before committing (use the *_usd Decimals for comparisons)

if session.would_exceed(session.tool_cost_usd("dune_query")): alt = session.suggest_cheaper("dune_query") # {"name": ..., "price": ...}

Call a tool — budget enforced before any payment is signed

r = session.call("token_price", {"symbol": "ETH"}) r.data["price_usd"] # inner tool output (r"result" still works) r.cost # payment amount, e.g. "0" r.network # settlement chain, e.g. "stellar-mainnet" / "base"

session.remaining_usd() # Decimal('0.10')

For an external x402 tool that offers several chains, pick one:

session.call("https://some-x402-tool/endpoint", {}, chain="base")

Full receipt — every call, cost, tx hash, and settlement chain

print(session.spending_summary())

{

"calls": 1, "spent": "$0", "remaining": "$0.1", "budget": "$0.1",

"breakdown": [

{"tool": "token_price", "cost": "Free", "tx_hash": "", "network": "stellar-mainnet"}

]

}

Policy parameters

Control exactly what your agent is allowed to do:

from agentpay import AgentWallet, Session

wallet = AgentWallet(secret_key="S...", network="mainnet") # or quickstart()'s minted wallet with Session(wallet, gateway_url="https://agentpay.tools", max_spend=0.10, allowed_tools=["token_price", "gas_tracker", "web_search"], max_per_tool={"dune_query": 0.02}, rate_limit=10, # max 10 calls/min prefer_chain="base", # Base is the default; "stellar" or "stacks" to override allowed_recipients=["0x…", "SP…"], # only these payees may be paid (any rail) max_per_call="0.02", # no single payment above this approve_above="0.01", # payments above this need the approver's yes approver=lambda req: ask_human(req)) as session: ...

BudgetExceeded fires before any payment goes out if a tool would push you over the cap, isn't on the allowlist, or exceeds its per-tool limit. The recipient allowlist, per-call maximum and approval gate are checked against the 402 itself — the payee and amount that would actually be signed — on every rail, and raise PolicyRejected / ApprovalRequired (both BudgetExceeded subclasses) with nothing signed. Every refusal is listed under spending_summary()["anomalies"], alongside flags for repeated identical paid calls, a single call taking half the cap, and unconfirmed legs. budget_policy() picks the cap itself from an explicit value, an env var, a rule (share of balance) or a prompt, clamped to what the wallet holds — wallet.get_sbtc_balance_usd(rate) gives that ceiling for an sBTC payer.


Example: Market intelligence agent

Five free tools, one session, full receipt.

from agentpay import quickstart

with quickstart() as session:

snapshot = session.call("market_snapshot", {}) rates = session.call("funding_rates", {"asset": "ETH"}) oi = session.call("open_interest", {"symbol": "ETH"}) fg = session.call("fear_greed_index", {}) whales = session.call("whale_activity", {"token": "ETH", "min_usd": 500_000})

m = snapshot["result"] print(f"S&P: {m['sp500_price']:,.0f} ({m['sp500_change_pct']:+.2f}%)") print(f"ETH: ${m['eth_price_usd']:,.0f}") print(f"Gas: {m['gas_standard_gwei']} gwei")

avg_rate = sum(e["funding_rate_pct"] for e in rates"result") / len(rates"result") print(f"Funding: {avg_rate:+.4f}%/8h") print(f"OI 24h: {oi'result':+.2f}%") print(f"Sentiment: {fg'result'}") print(f"Whale vol: ${whales'result':,.0f}")

print(session.spending_summary())


Use it in your agent

Agent Skills (one command, any agent)
npx skills add romudille-bit/agentpay

Installs the `agentpay-route` skill (find, judge, and pay for the best paid x402 tool within a budget) and `agentpay-session` (hard spend cap + verifiable receipts) into Claude Code, Codex, Droid, OpenCode, or any skills-CLI-compatible runtime. Pair with the MCP below for keyless routing out of the box; add AGENTPAY_BASE_KEY + AGENTPAY_MAX_SPEND for capped, in-place paid calls.

Claude Code plugin (one command)
/plugin marketplace add romudille-bit/agentpay

/plugin install agentpay@agentpay

Installs the `agentpay-route` skill — your agent finds, judges, and pays for the best paid x402 tool within a budget — plus the 17 free tools. No keys needed to route.

MCP server (any runtime)

冒頭だけを表示しています。続きはリポジトリで読めます