AgentPay MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "AGENT_PRIVATE_KEY=${AGENT_PRIVATE_KEY}" -e "AGENT_WALLET_ADDRESS=${AGENT_WALLET_ADDRESS}" agent-pay -- npx agentpay-mcp
Required:AGENT_PRIVATE_KEYAGENT_WALLET_ADDRESS+ 2 optional
README.md

MCP server that gives AI agents a complete crypto wallet

AgentPay MCP

MCP server that gives AI agents a complete crypto wallet — send tokens, swap, bridge, manage budgets, verify identity.

Patent Pending — USPTO provisional filed March 2026.

Built by AI Agent Economy. Payment infrastructure integrated into NVIDIA's official NeMo Agent Toolkit Examples catalog.


What's New in v4.0.0

11 new MCP tools powered by full agentwallet-sdk v6.0.0 integration:

Category New Tools
Token Registry lookup_token, add_custom_token, list_chain_tokens
Token Transfers send_token, get_balances
DeFi swap_tokens (Uniswap V3), bridge_usdc (CCTP V2)
Spending Controls set_spend_policy, check_budget
Agent Identity verify_agent_identity, get_reputation
Escrow create_escrow

Other highlights:

  • 12 supported chains — Base, Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Linea, Unichain, Sonic, Worldchain, Base Sepolia, Arbitrum Sepolia
  • 100+ pre-loaded tokens via TokenRegistry
  • CCTP V2 cross-chain USDC bridging (10 EVM chains)
  • Uniswap V3 swaps on Base, Arbitrum, Optimism, Polygon
  • ERC-8004 on-chain agent identity verification
  • 42 new tests (149 total), 99.6% type coverage

Quick Start

1. Install

npm install -g agentpay-mcp

2. Environment Variables

Copy .env.example to .env and fill in the required values:

# Required
AGENT_PRIVATE_KEY=0x...          # Agent hot wallet private key (0x-prefixed hex)
AGENT_WALLET_ADDRESS=0x...       # Deployed AgentAccountV2 wallet address

# Optional (defaults shown)
CHAIN_ID=8453                    # 8453 = Base Mainnet (default)
RPC_URL=https://mainnet.base.org # Custom RPC URL

# For x402 session payments
SESSION_TTL_SECONDS=3600         # Session lifetime (default: 1 hour)

# For deploy_wallet tool
FACTORY_ADDRESS=0x...            # AgentAccountFactoryV2 address
NFT_CONTRACT_ADDRESS=0x...       # NFT contract that owns the wallet

3. MCP Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

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

Add to .cursor/mcp.json in your project or ~/.cursor/mcp.json globally:

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

All 23 Tools Reference

Original Tools (v1.0.0–v3.1.0)

Tool Description Key Parameters
deploy_wallet Deploy a new AgentAccountV2 wallet via factory token_id, nft_contract_address?, factory_address?
get_wallet_info Wallet address, balances, spend limits, queue depth token? (address)
send_payment Send ETH or ERC-20 via AgentAccountV2 contract to, amount_eth, token?, token_decimals?, memo?
check_spend_limit Check remaining spend limit for a token token?
queue_approval Approve or cancel a queued transaction action, tx_id, token?
x402_pay Auto-pay x402 paywalled URLs url, method?, headers?, body?, max_payment_eth?
get_transaction_history Query on-chain event logs limit?, from_block?, to_block?, event_type?
x402_session_start Pay once, get reusable session token endpoint, scope?, ttl_seconds?, label?
x402_session_fetch Make calls within an active session url, method?, headers?, body?, session_id?
x402_session_status Inspect active sessions and TTL session_id?
x402_session_end Explicitly close a session session_id

New Tools (v4.0.0)

Tool Description Key Parameters
lookup_token Look up token address and decimals by symbol symbol, chainId
add_custom_token Register a custom ERC-20 in the token registry symbol, address, decimals, chainId, name?
list_chain_tokens List all registered tokens for a chain chainId
send_token Send any registry token to a recipient tokenSymbol, chainId, recipientAddress, amount
get_balances Get balances for multiple tokens chainId, tokens?
swap_tokens Swap tokens via Uniswap V3 fromSymbol, toSymbol, amount, chainId, `slippa

Tools (5)

deploy_walletDeploy a new AgentAccountV2 wallet via factory
get_wallet_infoGet wallet address, balances, spend limits, and queue depth
send_paymentSend ETH or ERC-20 via AgentAccountV2 contract
swap_tokensSwap tokens via Uniswap V3
x402_payAuto-pay x402 paywalled URLs

Environment Variables

AGENT_PRIVATE_KEYrequiredAgent hot wallet private key (0x-prefixed hex)
AGENT_WALLET_ADDRESSrequiredDeployed AgentAccountV2 wallet address
CHAIN_IDChain ID for operations (default 8453)
RPC_URLCustom RPC URL

Configuration

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

Try it

Check my current wallet balance for USDC on Base.
Swap 0.1 ETH for USDC using Uniswap.
Send 50 USDC to this address: 0x123...
Pay for the content at this paywalled URL using x402.
Verify the identity of the agent at this address.

Frequently Asked Questions

What are the key features of AgentPay?

Complete crypto wallet functionality for AI agents. Support for 12 EVM chains including Base, Ethereum, and Arbitrum. Uniswap V3 integration for token swaps. CCTP V2 cross-chain USDC bridging. ERC-8004 on-chain agent identity verification.

What can I use AgentPay for?

Automating payments for paywalled API or content access via x402. Managing agent-controlled treasury and spending policies. Executing cross-chain DeFi swaps autonomously. Verifying the reputation and identity of other AI agents on-chain.

How do I install AgentPay?

Install AgentPay by running: npm install -g agentpay-mcp

What MCP clients work with AgentPay?

AgentPay works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep AgentPay docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare