AgentPay402 MCP

v0.4.0
io.github.kato9292929/agentpay402-mcp Checked 22 hours ago Published 12 days ago

Pay for x402 APIs safely with your own wallet: Seller Probe check, on-chain proof, receipt refetch.

Values you need

VariableWhat it is
WALLET_PROVIDERrequired Wallet that pays: cdp, privy or crossmint; none runs only the discovery and checking tools. Default: none
CDP_API_KEY_IDoptional secret CDP API key ID (WALLET_PROVIDER=cdp).
CDP_API_KEY_SECREToptional secret CDP API key secret (WALLET_PROVIDER=cdp).
CDP_WALLET_SECREToptional secret CDP wallet secret (WALLET_PROVIDER=cdp).
PRIVY_APP_IDoptional secret Privy app ID (WALLET_PROVIDER=privy).
PRIVY_APP_SECREToptional secret Privy app secret (WALLET_PROVIDER=privy).
PRIVY_WALLET_IDoptional secret Privy Ethereum server wallet ID that pays on Base (WALLET_PROVIDER=privy).
CROSSMINT_SERVER_API_KEYoptional secret Crossmint server-side API key (WALLET_PROVIDER=crossmint).
CROSSMINT_SIGNER_SECREToptional secret Crossmint server signer secret (WALLET_PROVIDER=crossmint).
CROSSMINT_WALLET_ADDRESSoptional secret Crossmint smart wallet address (WALLET_PROVIDER=crossmint).
NVM_API_KEYoptional secret Optional Nevermined API key for nvm:erc4337 credit plans (sandbox: with testnet, live: with mainnet).
X402_NETWORKoptional testnet (Base Sepolia, Solana Devnet) or mainnet (real USDC on Base and Solana). Default: testnet
X402_PER_CALL_MAX_USDoptional Largest single payment in USD; anything above it is refused before signing. Default: 0.10
X402_PER_SESSION_MAX_USDoptional Total USD that may be paid while the server runs. Default: 1.00
X402_ALLOWED_HOSTSoptional Comma-separated hosts that may be paid; empty allows every host.
X402_PROBE_MODEoptional When Seller Probe recorded the host as paid but not delivered: block, warn or off. Default: block
X402_PRICE_MISMATCHoptional When the 402 price differs from the Bazaar listing: block, warn or off. Default: warn
X402_RETRY_WITH_RECEIPToptional Refetch once with the same payment from Delivery Receipt sellers after a failed delivery. Default: true
X402_REPORT_TO_PROBEoptional 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.0
Add 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

  1. Ask the user for: WALLET_PROVIDER. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. 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).
  3. Restart or reload the client so it starts the server.
  4. 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, ….
  5. 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