AgentPay402 MCP Server
Pay for x402 APIs safely with your own wallet: Seller Probe check, on-chain proof, receipt refetch.
AgentPay402 MCP scores 66 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 9 tools. Filed under Finance. GitHub shows 0 stars. Package registries report about 376 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
66 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Where the 66 comes from
22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "kato9292929-x402-wallet-mcp": { "command": "npx", "args": [ "-y", "agentpay402-mcp@0.4.0" ], "env": { "WALLET_PROVIDER": "none", "CDP_API_KEY_ID": "YOUR_CDP_API_KEY_ID", "CDP_API_KEY_SECRET": "YOUR_CDP_API_KEY_SECRET", "CDP_WALLET_SECRET": "YOUR_CDP_WALLET_SECRET", "PRIVY_APP_ID": "YOUR_PRIVY_APP_ID", "PRIVY_APP_SECRET": "YOUR_PRIVY_APP_SECRET", "PRIVY_WALLET_ID": "YOUR_PRIVY_WALLET_ID", "CROSSMINT_SERVER_API_KEY": "YOUR_CROSSMINT_SERVER_API_KEY", "CROSSMINT_SIGNER_SECRET": "YOUR_CROSSMINT_SIGNER_SECRET", "CROSSMINT_WALLET_ADDRESS": "YOUR_CROSSMINT_WALLET_ADDRESS", "NVM_API_KEY": "YOUR_NVM_API_KEY", "X402_NETWORK": "testnet", "X402_PER_CALL_MAX_USD": "0.10", "X402_PER_SESSION_MAX_USD": "1.00", "X402_ALLOWED_HOSTS": "", "X402_PROBE_MODE": "block", "X402_PRICE_MISMATCH": "warn", "X402_RETRY_WITH_RECEIPT": "true", "X402_REPORT_TO_PROBE": "false" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
WALLET_PROVIDER | Required | Wallet that pays: cdp, privy or crossmint; none runs only the discovery and checking tools. |
CDP_API_KEY_IDSecret | Optional | CDP API key ID (WALLET_PROVIDER=cdp). |
CDP_API_KEY_SECRETSecret | Optional | CDP API key secret (WALLET_PROVIDER=cdp). |
CDP_WALLET_SECRETSecret | Optional | CDP wallet secret (WALLET_PROVIDER=cdp). |
PRIVY_APP_IDSecret | Optional | Privy app ID (WALLET_PROVIDER=privy). |
PRIVY_APP_SECRETSecret | Optional | Privy app secret (WALLET_PROVIDER=privy). |
PRIVY_WALLET_IDSecret | Optional | Privy Ethereum server wallet ID that pays on Base (WALLET_PROVIDER=privy). |
CROSSMINT_SERVER_API_KEYSecret | Optional | Crossmint server-side API key (WALLET_PROVIDER=crossmint). |
CROSSMINT_SIGNER_SECRETSecret | Optional | Crossmint server signer secret (WALLET_PROVIDER=crossmint). |
CROSSMINT_WALLET_ADDRESSSecret | Optional | Crossmint smart wallet address (WALLET_PROVIDER=crossmint). |
NVM_API_KEYSecret | Optional | 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). |
X402_PER_CALL_MAX_USD | Optional | Largest single payment in USD; anything above it is refused before signing. |
X402_PER_SESSION_MAX_USD | Optional | Total USD that may be paid while the server runs. |
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. |
X402_PRICE_MISMATCH | Optional | When the 402 price differs from the Bazaar listing: block, warn or off. |
X402_RETRY_WITH_RECEIPT | Optional | Refetch once with the same payment from Delivery Receipt sellers after a failed delivery. |
X402_REPORT_TO_PROBE | Optional | Send an anonymous not_delivered report to Seller Probe. |
Tools9Tool docs quality grade C
All capabilitiesWhat a 402 asks for and whether it fits the limits — does not pay
check_sellertoolThe pre-payment checks only — does not pay
Whether the wallet is set up and can sign, and what is missing
Price, payment options and input/output for one service
Your wallet address, per chain
USDC balance on each supported chain
Search x402 services in the CDP Bazaar
Calls a URL; on 402, checks, pays within the limits and confirms delivery
show_wallet_apptoolDeposit address, chain, faucet hints and the current limits
About
AgentPay402 MCP
A Claude Code plugin that lets Claude discover, check and pay for x402 APIs with your own wallet (CDP, Privy, Crossmint, or your own browser wallet: Phantom, Rabby or MetaMask; USDC on Base and Solana, plus Nevermined credits). Before paying it checks the seller; after paying it confirms the transfer on chain and the delivery.
Install
claude plugin marketplace add kato9292929/x402-wallet-mcp
claude plugin install agentpay402-mcp@x402inc
- Enter your settings when Claude Code asks (or run
/plugin configure agentpay402-mcp@x402inc). Credentials are kept in your system's secure credential store. - Start a new session and ask Claude to run
check_sign_in_status.
To update: claude plugin marketplace update x402inc.
Claude Code only (terminal, IDE extensions, the desktop app's Code tab). It does not work in Claude chat on claude.ai, the desktop app's chat, or Cowork. Node.js 20+ must be on your PATH.
Settings
| Setting | Meaning | Default |
|---|---|---|
| Wallet provider | cdp, privy, crossmint, browser, or none (discovery and checking tools only) | none |
| CDP API key ID / secret, CDP wallet secret | for cdp | — |
| Privy app ID / secret, Privy wallet ID | for privy | — |
| Crossmint server API key / signer secret / wallet address | for crossmint | — |
| Phantom address (Solana) / Browser wallet address (Base) | for browser: set one or both | — |
| Nevermined API key | optional, Nevermined credit plans | — |
| Network | testnet or mainnet | testnet |
| Per-call / per-session limit (USD) | spending limits | 0.10 / 1.00 |
| Allowed hosts | comma-separated; empty = all hosts | empty |
| Seller Probe check | block / warn / off | block |
| Bazaar price mismatch | block / warn / off | warn |
| Refetch with Delivery Receipt | true / false | true |
| Report non-delivery to Seller Probe | true / false | false |
Only the keys of the provider you choose need values.
Where to get the keys
- browser (no keys): enter your Phantom address to pay on Solana, and/or your Rabby / MetaMask address to pay on Base. Each payment opens a page in your browser showing the amount, recipient and API; you approve it in Phantom (or sign it in Rabby / MetaMask) or reject it. On
testnet, turn on testnet mode in Phantom so it previews the payment correctly. Nothing is paid without your signature, and the plugin never holds your key. The spending limits still apply before the page opens. - cdp: API key ID and secret from CDP Portal → API Keys; wallet secret from Wallets → Non-custodial → Security. Accounts are created on first use.
- privy: app ID and secret from Privy Dashboard → App settings → Basics. Create the wallet with
privy-create-wallet ethereum(see Helper commands). - crossmint (Base only): server API key from the Crossmint Console (
sk_staging_...works only withtestnet,sk_production_...only withmainnet). Create the signer secret and wallet withcrossmint-gen-secretandcrossmint-create-wallet. - Nevermined: nevermined.app → Settings → API Keys. A
sandbox:key works only withtestnet, alive:key only withmainnet. Nevermined bills in credits, so the USD limits do not apply to it; cap it with the delegation's own limit.
Test USDC for Base Sepolia and Solana Devnet: Circle faucet.
Tools
| Tool | What it does |
|---|---|
get_wallet_address | Your wallet address, per chain |
get_wallet_balance | USDC balance on each supported chain |
show_wallet_app | Deposit address, chain, faucet hints and the current limits |
check_sign_in_status | Whether the wallet is set up and can sign, and what is missing |
list_bazaar_resources | Search x402 services in the CDP Bazaar |
get_resource_details | Price, payment options and input/output for one service |
check_payment_requirements | What a 402 asks for and whether it fits the limits — does not pay |
check_seller | The pre-payment checks only — does not pay |
make_x402_request | Calls a URL; on 402, checks, pays within the limits and confirms delivery |
Only make_x402_request moves money.
Spending limits and checks
Only you can set the limits — in the plugin settings, or in ~/.x402-wallet-mcp/config.json, which wins over the plugin settings. No tool lets Claude change them. The server only reads config.json, and re-reads it on every payment, so edits apply without a restart.
{
"perCallMaxUsd": "0.10",
"perSessionMaxUsd": "1.00",
"allowedHosts": [],
"network": "testnet",
"probeMode": "block",
"priceMismatch": "warn",
"retryWithReceipt": true,
"reportToProbe": false
}
- A payment over the per-call limit, or one that would exceed the per-session total, is refused before signing.
testnetpays only on Base Sepolia / Solana Devnet. Real USDC is paid only after you switch tomainnet.- Only known USDC is paid; other assets are refused.
- Limit and balance values are never written into tool results or logs; a refusal says which limit was hit, not its value.
What make_x402_request does, in order:
- Before paying — stops without signing when:
- the host is not in your allowed hosts;
- Seller Probe's latest paid purchase from the host was paid but not delivered (
probeMode: block); - an input the 402 marks as required is missing;
- the price is over a limit, or differs from the Bazaar listing (
priceMismatch: block); - every network the seller offers refused a payment recently.
- with a browser wallet (Phantom), every Solana option goes through a facilitator known to refuse the transactions Phantom signs (
facilitator_incompatible): a built-in list, plus any facilitator that refused such a payment in the last 7 days. Another option the seller offers (such as Base) is chosen instead when there is one; - the seller's Solana address has no account to receive the token (
payto_account_missing); if the RPC cannot tell, the payment goes ahead with a warning.
- Pay — sign, record the attempt, send.
- After paying — find the transfer on chain (the seller's header is only a hint). If the seller took the money but did not deliver, and it publishes Delivery Receipt keys, refetch once with the same payment. A payment is never sent twice.
The result says fulfilled, not_delivered, recovered_by_retry, blocked or rejected_by_seller, with the transaction, a hash of the body and the receipt. A blocked or rejected_by_seller result carries a detail: what happened, which side the problem is on (wallet, facilitator, seller, or AgentPay's own check) and what to do next.
Approval links (the connector at agentpay.x402jp.com/mcp)
- One wallet can have at most 20 approval links waiting at once. Each link expires in 5 minutes, nothing is paid unless it is signed, and the per-payment and 24-hour limits are checked again when it is signed, so this number only caps how many links are open. 20 is enough to test a batch of APIs in one go. An expired, rejected or finished link frees its place at once.
- After a payment is signed and sent, AgentPay waits up to 45 seconds for the seller's answer. If none comes, the outcome is settled from the chain:
not_delivered(paid) when the transfer landed, orno_response(nothing paid) once the payment can no longer land: after the EIP-3009validBeforeon Base, or 3 minutes after it was built on Solana (its blockhash has expired by then). Until thenget_x402_resultreturnsprocessing.
Privacy Policy
This plugin runs on your computer. It has no server of its own, collects no analytics and sends no telemetry.
- Credentials you enter in the plugin settings are kept by Claude Code in your system's secure credential store and passed only to the local server. They are sent only to the provider they belong to (CDP, Privy, Crossmint or Nevermined), for requests you trigger.
- What leaves your computer: the sellers you ask Claude to call (your request and, when you pay, the signed payment); your wallet provider; the CDP Bazaar (
api.cdp.coinbase.com); Seller Probe lookups by host name (probe.x402jp.com); the seller's/.well-known/x402-receipt.json; and chain RPC reads (Base, Base Sepolia, Solana, Solana Devnet public RPCs, or your own viaBASE_RPC_URLetc.). - Seller Probe reports are off by default. When on, a failed delivery sends the host, the URL without its query, network, amount, outcome, HTTP status, latency and which checks passed. Your address, the transaction and the response body are never sent.
- Stored on your computer, in
~/.x402-wallet-mcp/:payments.jsonl(each payment's URL, price, network, payer key, transaction and body hash),net-failures.jsonl(hosts and networks that refused a payment) and, if you create it,config.json. Delete the folder to remove them. - Third parties you reach (sellers, facilitators, wallet providers, RPCs, Seller Probe) handle data under their own policies.
Questions: open an issue at https://github.com/kato9292929/x402-wallet-mcp/issues.
Helper commands
Wallet setup commands, run from a clone of this repository after npm install:
node dist/index.js status # is the wallet ready
node dist/index.js check-seller <url> # pre-payment checks (does not pay)
node dist/index.js privy-create-wallet [ethereum|solana]
node dist/index.js crossmint-gen-secret
node dist/index.js crossmint-create-wallet
Run them with the same keys as environment variables (WALLET_PROVIDER, PRIVY_APP_ID, PRIVY_APP_SECRET, CROSSMINT_SERVER_API_KEY, …; see .env.example).
Development
npm install
npm run build
npm test
claude --plugin-dir . # try this checkout without installing
License
MIT
Frequently asked questions
What is AgentPay402 MCP Server?
Pay for x402 APIs safely with your own wallet: Seller Probe check, on-chain proof, receipt refetch.
How do I install AgentPay402 MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. AgentPay402 MCP Server runs locally from the npm package agentpay402-mcp with the command npx -y agentpay402-mcp@0.4.0.
Is AgentPay402 MCP Server free and open source?
Yes. AgentPay402 MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does AgentPay402 MCP Server support remote (HTTP) connections?
No remote endpoint is listed for AgentPay402 MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does AgentPay402 MCP Server provide?
AgentPay402 MCP Server provides 9 tools, including check_payment_requirements, check_seller, check_sign_in_status, and get_resource_details. See the full tool list for descriptions and parameters.
How is AgentPay402 MCP Server's trust score calculated?
AgentPay402 MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.