MCP.so
Sign In
A

Agentpay Mcp

@up2itnow0822

About Agentpay Mcp

The MCP server that lets your AI agent pay for APIs safely. Human-approval mode, on-chain spend caps, full audit trail. 23 tools for payments, wallet management, DeFi, and identity. Works with Claude, Cursor, Windsurf, and any MCP client.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "agentpay": {
      "command": "npx",
      "args": [
        "agentpay-mcp"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "0x...",
        "AGENT_WALLET_ADDRESS": "0x...",
        "CHAIN_ID": "8453"
      }
    }
  }
}

Tools

27

Deploy a new AgentAccountV2 wallet via the factory contract. The wallet is deterministically addressed (CREATE2) and owned by an NFT. Returns the wallet address and deployment transaction hash. Requires FACTORY_ADDRESS and NFT_CONTRACT_ADDRESS env vars (or pass them as arguments).

Get comprehensive wallet information including address, on-chain balance, spend limits, remaining period allowance, and queue depth. Use token parameter to check budget for a specific ERC20 (defaults to ETH).

Send ETH or ERC20 tokens from the Agent Wallet. If the amount is within the configured spend limits, it executes immediately and returns the tx hash. If it exceeds limits, the transaction is queued for owner approval (use queue_approval to manage). Always check spend limits first with check_spend_limit to avoid surprises.

Check whether a proposed payment amount is within the wallet's autonomous spend limits. Returns a clear yes/no with remaining budget details. Use this before send_payment to avoid surprise queuing.

Manage over-limit transactions queued for owner review. Use action="list" to see pending transactions, "approve" to approve one by ID, or "cancel" to cancel one by ID. Approve/cancel require the agent key to have owner privileges.

Use when an agent needs one capped x402 paid HTTP request and has already verified the URL, price, payTo, asset, and Base network. Automatically handles HTTP 402 Payment Required responses with the x402 v2.11 Payment-Signature flow. If an active x402 V2 session covers this URL, the session token is used instead of making a new payment. Do not use when the endpoint is an uninitialized Streamable HTTP MCP session, the offered network is unsupported, the buyer lacks a spend cap, or a reusable entitlement should use x402_session_start instead.

Retrieve the wallet's recent on-chain transaction history from event logs. Shows executions, queued transactions, approvals, cancellations, spend policy updates, and operator changes. Filter by event type or block range for targeted queries.

Use when a paid endpoint supports a reusable x402 session or entitlement. Makes one capped payment, stores a non-custodial signed session token, and returns a session_id for x402_session_fetch. Do not use for providers without session semantics, unknown networks, missing spend caps, or calls where the buyer cannot store and audit the returned mcp-session-id/session_id.

Use after x402_session_start returns a valid session_id. Injects the stored session token and makes a covered request without a new payment. Do not use before initialize/session creation, as a payment bypass, after expiry, or for URLs outside the session scope.

Check the status of x402 V2 payment sessions. Without arguments, lists all active sessions with TTL remaining. With a session_id, shows full details for that session including call count, payment info, and the signed session token.

Explicitly close an x402 V2 session before it expires naturally. After calling this, x402_session_fetch will return an error for the closed session. Useful for security hygiene or when you know a session is no longer needed.

Look up a token by symbol and chain ID from the global token registry. Returns the token address, decimals, and metadata if found.

Register a custom ERC-20 token in the global token registry so it can be used by send_token, get_balances, and swap_tokens.

List all tokens registered for a given chain ID in the global token registry.

Send any ERC-20 token from the Agent Wallet to a recipient. Resolves the token address and decimals from the global registry, then calls agentTransferToken through the AgentAccountV2 contract. Subject to configured spend limits.

Get all ERC-20 token balances for the configured Agent Wallet address. Uses the global token registry to enumerate tokens for the given chain.

Swap one ERC-20 token for another using Uniswap V3. Resolves token addresses from the registry, executes the swap via SwapModule. Supported chains: base (8453), arbitrum (42161), optimism (10), polygon (137).

Bridge USDC across chains using Circle's CCTP V2 protocol. Supported chains: base, ethereum, optimism, arbitrum, polygon, avalanche, linea, unichain, sonic, worldchain. The bridge approves USDC, burns on source, polls Circle IRIS for attestation, then mints on destination.

Configure the Agent Wallet spend policy. Sets a daily limit, per-transaction cap, and optional recipient allowlist. The policy is enforced in-process for the lifetime of the MCP server.

Check the remaining on-chain budget for the Agent Wallet. Returns per-transaction limit and period remaining. Optionally include any configured spend policy details.

Verify an agent's on-chain identity using ERC-8004. Looks up the agent by owner address and returns identity details including agent ID, URI, and registration file.

Get the on-chain reputation score for an agent. Resolves agent ID from owner address via ERC-8004, then queries the Reputation Registry for score and feedback.

Verify an agent's identity using a Universal Agent Identifier (UAID). Works across all chains — EVM (ERC-8004), Hedera, Solana, and off-chain agents. Returns identity details, payment address, and trust score from the HOL Registry.

Create a mutual-stake escrow vault between the Agent Wallet (buyer) and a counterparty (seller). Both parties lock collateral (equal to payment amount) ensuring aligned incentives. Uses USDC as the payment token. Requires FACTORY_ADDRESS env var or factoryAddress param.

Register a budget policy for an AWS AgentCore agent or task. When OTel spans report costs exceeding this budget, agentpay-mcp will enforce the configured action (warn/block/kill circuit-breaker). This fills the gap left by AgentCore Policy Controls which provide observability but no native per-agent spend caps.

Evaluate a spend event from an OTel span against registered budget policies. Returns a budget decision (allow/warn/block/kill) with utilization details. The decision is also formatted as OTel event attributes for re-emission into the AgentCore telemetry pipeline.

Get the current budget status for an AgentCore agent, including accumulated spend, remaining budget, utilization percentage, and optional decision history. Useful for dashboards and audit trails.

Overview

What is Agentpay Mcp?

Agentpay Mcp is a Model Context Protocol server that acts as a human-first trust and policy layer above payment execution rails (x402 V1/V2 and Stripe MPP). It gives MCP-compatible agents (Claude, Cursor, etc.) a payment wallet with hard spend caps, human-approval mode, and a full on-chain audit trail—designed for FinOps practitioners, platform engineers, and enterprise compliance teams.

How to use Agentpay Mcp?

Install globally via npm install -g agentpay-mcp or run with npx agentpay-mcp. Configure in your MCP client (Claude Desktop, Cursor, Gemini CLI, Windsurf) by adding a server entry with environment variables AGENT_PRIVATE_KEY, AGENT_WALLET_ADDRESS, and CHAIN_ID. Then set spend caps by instructing your agent on per‑transaction limits, daily aggregate caps, and approval thresholds.

Key features of Agentpay Mcp

  • Human‑approval mode for high‑value transactions
  • On‑chain spend caps enforced by smart contract
  • Full audit trail with merchant, amount, timestamp
  • Fail‑closed policy engine (errors → rejection)
  • Non‑custodial architecture (keys never leave local machine)
  • Multi‑protocol support (x402 V1/V2 + Stripe MPP)

Use cases of Agentpay Mcp

  • FinOps teams manage AI spend with per‑agent budget caps and cost attribution across sessions.
  • Platform engineers drop in spend governance middleware with daily limits, kill switches, and per‑task caps.
  • Enterprise compliance teams meet EU AI Act Article 14 runtime human oversight requirements.

FAQ from Agentpay Mcp

What is the difference between Agentpay Mcp and x402-mcp?

Agentpay Mcp adds governed payments: on‑chain spend caps, per‑session budget limits, daily aggregate limits, human‑in‑the‑loop approval, transaction simulation, and multi‑protocol support. x402‑mcp provides simple x402 payment execution with no governance.

Does Agentpay Mcp depend on LiteLLM or Python?

No. Agentpay Mcp has zero LiteLLM dependency and no Python runtime required. It runs on viem, @modelcontextprotocol/sdk, and a small set of auditable npm packages.

Is Agentpay Mcp non‑custodial?

Yes. Private keys never leave the local machine. On‑chain spend caps enforce limits even if the agent or its key is compromised.

How do I configure spend caps in Agentpay Mcp?

You set per‑transaction caps, daily aggregate limits, and human approval thresholds by instructing your agent. Caps are enforced on‑chain via smart contracts, not in application code.

Frequently asked questions

What is the difference between Agentpay Mcp and x402-mcp?

Agentpay Mcp adds governed payments: on‑chain spend caps, per‑session budget limits, daily aggregate limits, human‑in‑the‑loop approval, transaction simulation, and multi‑protocol support. x402‑mcp provides simple x402 payment execution with no governance.

Does Agentpay Mcp depend on LiteLLM or Python?

No. Agentpay Mcp has zero LiteLLM dependency and no Python runtime required. It runs on `viem`, `@modelcontextprotocol/sdk`, and a small set of auditable npm packages.

Is Agentpay Mcp non‑custodial?

Yes. Private keys never leave the local machine. On‑chain spend caps enforce limits even if the agent or its key is compromised.

How do I configure spend caps in Agentpay Mcp?

You set per‑transaction caps, daily aggregate limits, and human approval thresholds by instructing your agent. Caps are enforced on‑chain via smart contracts, not in application code.

Comments

More AI & Agents MCP servers