AgentPay402 MCP
v0.4.0Pay for x402 APIs safely with your own wallet: Seller Probe check, on-chain proof, receipt refetch.
Values you need
| Variable | What it is | |
|---|---|---|
WALLET_PROVIDER | required | Wallet that pays: cdp, privy or crossmint; none runs only the discovery and checking tools. Default: none |
CDP_API_KEY_ID | optional secret | CDP API key ID (WALLET_PROVIDER=cdp). |
CDP_API_KEY_SECRET | optional secret | CDP API key secret (WALLET_PROVIDER=cdp). |
CDP_WALLET_SECRET | optional secret | CDP wallet secret (WALLET_PROVIDER=cdp). |
PRIVY_APP_ID | optional secret | Privy app ID (WALLET_PROVIDER=privy). |
PRIVY_APP_SECRET | optional secret | Privy app secret (WALLET_PROVIDER=privy). |
PRIVY_WALLET_ID | optional secret | Privy Ethereum server wallet ID that pays on Base (WALLET_PROVIDER=privy). |
CROSSMINT_SERVER_API_KEY | optional secret | Crossmint server-side API key (WALLET_PROVIDER=crossmint). |
CROSSMINT_SIGNER_SECRET | optional secret | Crossmint server signer secret (WALLET_PROVIDER=crossmint). |
CROSSMINT_WALLET_ADDRESS | optional secret | Crossmint smart wallet address (WALLET_PROVIDER=crossmint). |
NVM_API_KEY | optional secret | Optional Nevermined API key for nvm:erc4337 credit plans (sandbox: with testnet, live: with mainnet). |
X402_NETWORK | optional | testnet (Base Sepolia, Solana Devnet) or mainnet (real USDC on Base and Solana). Default: testnet |
X402_PER_CALL_MAX_USD | optional | Largest single payment in USD; anything above it is refused before signing. Default: 0.10 |
X402_PER_SESSION_MAX_USD | optional | Total USD that may be paid while the server runs. Default: 1.00 |
X402_ALLOWED_HOSTS | optional | Comma-separated hosts that may be paid; empty allows every host. |
X402_PROBE_MODE | optional | When Seller Probe recorded the host as paid but not delivered: block, warn or off. Default: block |
X402_PRICE_MISMATCH | optional | When the 402 price differs from the Bazaar listing: block, warn or off. Default: warn |
X402_RETRY_WITH_RECEIPT | optional | Refetch once with the same payment from Delivery Receipt sellers after a failed delivery. Default: true |
X402_REPORT_TO_PROBE | optional | Send an anonymous not_delivered report to Seller Probe. Default: false |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add agentpay402-mcp -e WALLET_PROVIDER=none -- npx -y agentpay402-mcp@0.4.0Add to
claude_desktop_config.json{
"mcpServers": {
"agentpay402-mcp": {
"args": [
"-y",
"agentpay402-mcp@0.4.0"
],
"command": "npx",
"env": {
"WALLET_PROVIDER": "none"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"agentpay402-mcp": {
"args": [
"-y",
"agentpay402-mcp@0.4.0"
],
"command": "npx",
"env": {
"WALLET_PROVIDER": "none"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "WALLET_PROVIDER",
"id": "wallet-provider",
"password": true,
"type": "promptString"
}
],
"servers": {
"agentpay402-mcp": {
"args": [
"-y",
"agentpay402-mcp@0.4.0"
],
"command": "npx",
"env": {
"WALLET_PROVIDER": "${input:wallet-provider}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.agentpay402-mcp]
command = "npx"
args = ["-y", "agentpay402-mcp@0.4.0"]
env = { "WALLET_PROVIDER" = "none" }For AI agents
- Ask the user for: WALLET_PROVIDER. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: get_wallet_address, get_wallet_balance, show_wallet_app, check_sign_in_status, list_bazaar_resources, get_resource_details, make_x402_request, check_payment_requirements, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json