AgentPay-mcp
AgentPay MCP is a Model Context Protocol server that provides AI agents with a governed payment wallet featuring spend controls, human-approval workflows, and audit trails across multiple payment protocols and blockchain networks.
Wallet Management
deploy_wallet: Deploy a new smart contract wallet (AgentAccountV2) using CREATE2 deterministic addressingget_wallet_info: Retrieve wallet address, balances, spend limits, remaining period allowance, and transaction queue depth
Governed Payments
send_payment: Send ETH or ERC-20 tokens; transactions within spend limits execute immediately, over-limit transactions are queued for human reviewcheck_spend_limit: Verify whether a proposed payment is within autonomous spend limits before transactingset_spend_policy: Enforce on-chain per-transaction caps, daily aggregate limits, and recipient allowlists via smart contracts
Human-in-the-Loop Oversight
queue_approval: List, approve, or cancel over-limit transactions queued for owner review
Automated x402 Payments
x402_pay: Fetch a URL and automatically handle HTTP 402 Payment Required responses, with support for payment caps and session reusex402_session_start: Pay once to establish a reusable signed session token for repeated API calls to a single endpointx402_session_fetch: Make HTTP requests within an active session without additional paymentsx402_session_status: View active sessions with TTL remaining, call counts, and payment infox402_session_end: Explicitly close an active session before natural expiry
Audit & Compliance
get_transaction_history: Retrieve filterable on-chain transaction history (executions, queued, approvals, cancellations, policy updates) for FinOps and compliance reporting
Additional Highlights
Multi-chain support: Base, Arbitrum, Optimism, Polygon, Ethereum, and other EVM networks
Multi-protocol support: x402 V1/V2, Stripe Machine Payments Protocol, and Circle Nanopayments
Non-custodial key management with EU AI Act, CoSAI, and OAuth 2.1 alignment
Compatible with Claude, Cursor, NVIDIA NeMo-Agent-Toolkit, Google A2A, and OpenAI Delegated Payment Spec
Facilitates multi-chain USDC settlement using Circle's CCTP infrastructure for cross-chain payments.
Enables non-custodial payments and native USDC settlement on the Base Layer 2 network.
Supports on-chain payment execution and x402-native settlement on the Polygon network.
Provides tools for automated on-chain payments and native USDC settlement on the Stellar network.
AgentPay MCP
AgentPay MCP is a stdio Model Context Protocol server for x402 payments and wallet operations. It exposes Agent Wallet SDK functions as MCP tools and loads a caller-controlled signing key from the local process environment.
The current npm package is agentpay-mcp v4.1.17.
Start without funds
Check the installed command without loading wallet credentials:
npx -y agentpay-mcp --version
npx -y agentpay-mcp --helpUse the AgentPay Wallet Starter for a no-funds verification of allowed, approval-required, and blocked policy outcomes.
Related MCP server: 402-mcp
MCP client configuration
Wallet tools read the following environment variables:
Variable | Required for wallet tools | Meaning |
| Yes | Local hot-wallet signing key |
| Yes | Deployed |
| No |
|
| No | Caller-selected Base RPC endpoint |
| For deployment | Wallet factory address |
| For deployment | Token contract bound to a wallet |
| No | Local session lifetime in seconds |
Example MCP configuration:
{
"mcpServers": {
"agentpay": {
"command": "npx",
"args": ["-y", "agentpay-mcp"],
"env": {
"AGENT_PRIVATE_KEY": "<secret-reference-or-local-key>",
"AGENT_WALLET_ADDRESS": "0x<deployed-wallet-address>",
"CHAIN_ID": "84532"
}
}
}
}Do not commit a real signing key. Use the client or operating system's secret mechanism where one exists. Start on Base Sepolia before using Base mainnet.
Tool groups
The tool registry in src/index.ts exposes these groups:
Group | Examples |
Wallet |
|
Payments |
|
Policy |
|
Tokens | Lookup, custom-token registration, balances, and transfers |
Execution | Swap, USDC bridge, and mutual-stake escrow |
Trust | ERC-8004 identity, reputation, and UAID verification |
History |
|
Tool schemas and handlers live under src/tools/.
Security boundaries
These boundaries matter more than the feature list:
The server reads
AGENT_PRIVATE_KEYinto its local Node.js process and uses viem for signing. Protect the process, environment, and MCP client config.set_spend_policystores policy in the MCP server process. The same agent can call that tool again, and a process restart clears its rolling state.Every current value-moving handler calls the in-process policy check, but this is still application-level enforcement.
On-chain limits exist only when the wallet owner configures them directly on
AgentAccountV2.set_spend_policydoes not write those contract limits.An over-limit transaction is a human gate only when the owner key is kept separate from the agent key.
get_transaction_historyreads on-chain wallet events. It is not an MCP request log and does not record rejected pre-chain attempts or read-only calls.Runtime wallet configuration currently supports Base mainnet and Base Sepolia. Unsupported chain IDs fail closed in
src/utils/client.ts.Swap, bridge, escrow, and payment tools can move funds and consume gas. Test with bounded values and independent wallet limits.
Read docs/security-posture.md for the detailed
control map and known limitations.
Technical proof index
The repository keeps deeper interoperability and buyer-safety evidence in versioned documents:
docs/agentpay-buyer-flow-parity.mdcovers typed payment errors and buyer flow behavior.docs/paid-mcp-gateway-hardening.mdcovers default-deny controls and quota envelopes.docs/agentpay-five-tool-parity-proof.mdrecords the five-tool parity check.docs/agentpay-escrow-reputation-boundary.mddefines the escrow and reputation boundary.docs/paid-mcp-proxy-discovery-readiness.mdrecords discovery readiness evidence.docs/x402-chain-neutral-gateway-profile.mddefines the packaged chain-neutral profile.docs/x402-dynamic-paid-mcp-manifest-drift.mddocuments checks for stale paid-tool metadata.docs/mcp-registry-listing-proof.mdandllms.txtexpose directory metadata.docs/smithery-paid-mcp-installation.mdandexamples/smithery-paid-mcp-installationdocument the packaged Smithery path without asserting a live listing.docs/paid-provider-health-proof.mddefines provider-health evidence.docs/hosted-x402-proxy-verification.mddefines hosted-proxy preflight checks.docs/x402-native-vs-stripe-proxy.mdseparates local spend control from hosted proxy billing.docs/dependency-pin-policy.mddefines the release gate for payment-critical packages.
AgentPay pins viem exactly at 2.56.0.
The directory comparison was captured against agentpay-mcp@4.1.9; the
package version at the top of this README is the current release.
Verify a clean checkout
npm ci
npm run build
npm run typecheck
npm test
npm run lint
npm run security
npm run smoke:clean-installThe CI workflow is separate from scheduled daily review and repair workflows. A scheduled-review failure is not a product-test result, and a repair success does not replace CI.
Related repositories
Agent Wallet SDK provides the wallet and policy library used by this server.
AgentPay Wallet Starter provides the combined no-funds onboarding path.
NVIDIA NeMo Agent Toolkit Examples PR 17 is an independently merged integration example.
Support and disclosure
File product bugs through the GitHub issue queue.
Report security issues through
SECURITY.md.Contribution rules live in
CONTRIBUTING.md.
License
MIT. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAg402 is the payment layer for Coinbase's x402 protocol. Wrap any API or MCP server with a paywall in one command (ag402 serve), or let your AI agent auto-pay for paid APIs (ag402 run). Zero code changes for both buyers and sellers. Solana USDC, ~0.5s settlement, non-custodial, 648+ tests, MIT licensed. Works with Claude Code, Cursor, OpenClaw, LangChain, AutoGen, CrewAI out of the box.9MIT
- AlicenseAqualityAmaintenanceL402 + x402 client MCP. AI agents discover, pay for, and consume any payment-gated API autonomously. Supports Lightning (NWC), Cashu ecash, stablecoins, and human-in-the-loop payments.11586MIT
- AlicenseNot gradedqualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain — Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets your AI coding agent (Claude Code, OpenClaw, Codex, Cursor, etc.) discover and pay on-chain agents registered on ERC-8004, using Coinbase's official x402 protocol. No smart account. No bundler. No relay. Just your EOA, an HTTPS request, and an automatic 402 → sign → retry flow.35MIT
Related MCP Connectors
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/up2itnow0822/agentpay-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server