SuperAPIAI Directory

clawpay-mcp

github.com · AI agents

Non-custodial x402 payments for AI agents on Base: agents sign transactions from their own wallet with on-chain spend limits.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsAPI

About this tool

Purpose

AgentPay MCP is a stdio-based Model Context Protocol (MCP) server for x402 payments and wallet operations. It exposes the functions of the Agent Wallet SDK as MCP tools and loads caller-controlled signing keys from the local process environment. The project is positioned as a non-custodial x402 MCP payment layer for AI agents, and is an open-source alternative to Vercel x402-mcp. The current npm package version is agentpay-mcp v4.2.0.

Main capabilities

The tool registry is located in src/index.ts, and the tool schemas and handlers are located under src/tools/, exposed by group. The wallet tools read environment variables, among which AGENT_PRIVATE_KEY is read into the local Node.js process and used for signing with viem. Runtime wallet configuration currently supports Base mainnet and Base Sepolia; unsupported chain IDs fail closed in src/utils/client.ts.

Tools that involve the movement of funds include swap_tokens, bridge_usdc, escrow, and payment tools, which can transfer funds and consume gas. swap_tokens and bridge_usdc reserve spending at approve time, then settle, release, or remain in an unknown state; quotes, validation, and confirmed revert failures without fees charged release the reservation and remain retryable; when the result after broadcast is unclear, the intent is locked and there is no timer.

get_transaction_history reads on-chain wallet events; for unscoped full queries, it also lists the x402 settlement records completed by this server process (the final URL of the paid response, which under redirects may differ from the 402 issuer, method, amount, token, payee, transaction hash, replay count). These x402 receipts indicate that the payment was broadcast (a transaction hash was returned), not that the receipt has been confirmed; they are kept only in memory, capped at 256 entries, lost after restart, and do not appear in block-scoped queries. This is not an MCP request log, and does not record rejected pre-chain attempts or read-only calls.

Usage

It is possible to inspect the installed command without loading wallet credentials, and makeUse AgentPay Wallet Starter for unfunded verification to check allowed, approval-required, and blocked policy outcomes. In the MCP client configuration, the wallet tool reads environment variables; see the repository for an example configuration. Do not commit real signing keys; use the client or operating system's key mechanism instead. It is recommended to test on Base Sepolia first, then use Base mainnet.

Security Boundaries

These boundaries are more important than the feature list: the server reads AGENT_PRIVATE_KEY into the local Node.js process and signs with viem, so the process, environment, and MCP client configuration must be protected. set_spend_policy stores the policy in the MCP server process; the same agent can call this tool again, and a process restart clears its rolling state. Currently every handler involving fund movement calls an in-process policy check, but this is still application-layer enforcement. On-chain limits exist only when the wallet owner configures them directly on AgentAccountV2; set_spend_policy does not write these contract limits. Only when the owner key and the agent key are kept separately does an over-limit transaction constitute a human gate.

Applicable Scenarios and Limitations

It is suitable for scenarios where an AI agent needs to make x402 payments, perform wallet operations, token swaps, cross-chain bridging, and escrow in a non-custodial manner on the Base network, and where you want to integrate it into an existing MCP client as MCP tools. Limitations include: only Base mainnet and Base Sepolia are supported; policies are enforced at the application layer in-process and are cleared on restart; on-chain limits must be configured separately in the contract; x402 receipts are stored only in memory and do not represent confirmation; tools involving fund movement consume gas, so testing should use bounded amounts and separate wallet limits. For the detailed control diagram and known limitations, see docs/security-posture.md.

Other Information

The repository also contains multiple versioned technical proof documents covering buyer flow consistency, paid MCP gateway hardening, five-tool consistency checks, escrow and reputation boundaries, discovery readiness evidence, chain-neutral gateway configuration, dynamic paid MCP manifest drift, MCP registry listing proof, Smithery paid MCP installation, provider health proof, hosted x402 proxy verification, distinguishing x402 native from Stripe proxy, dependency pinning policy, and more. AgentPay pins viem exactly to 2.57.4. Related repositories include Agent Wallet SDK, AgentPay Wallet Starter, and the NVIDIA NeMo Agent Toolkit Examples PR 17 integration example. Product defects are submitted through the GitHub issue queue, security issues are reported through SECURITY.md, contribution rules are in CONTRIBUTING.md, and it is licensed under MIT.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools