A402 Pay Mcp
by github.com/agent402-dev · v0.13.0 · updated Nov 25, 2026
Pay x402 APIs (USDC, PREQ) and run Agent402 Bond deals from your own wallet. Refuses by default.
Run it locally
Install the package and point your AI client at it.
npm
npx -y @agent402-dev/[email protected]Environment variables
X402_KEYPAIR_PATHPath to the payment wallet key file (Solana CLI JSON). Without it nothing is paid.
X402_ALLOWED_DOMAINSAllowed domains, comma-separated. Empty: every payment refused.
X402_TRUSTED_PAY_TOTrusted recipient addresses, comma-separated. Empty: every payment refused.
X402_ALLOWED_ASSETSUSDC (default) or USDC,PREQ. A402 (v1) is deprecated.
X402_MAX_USDMax USDC per payment in USD (default 0.05)
X402_MAX_USD_PER_DAYMax USDC per UTC day in USD (default 1)
X402_MAX_PAYMENTS_PER_DAYMax payments per UTC day (default 20)
X402_MAX_USD_PER_RECIPIENT_PER_DAYMax USDC per recipient per UTC day in USD (default off)
X402_MAX_PREQ_ATOMICMax PREQ per payment, in PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ refused.
X402_MAX_PREQ_PER_DAY_ATOMICMax PREQ per UTC day, in PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ refused.
X402_MAX_PREQ_PER_RECIPIENT_PER_DAY_ATOMICMax PREQ per recipient per UTC day, in PREQ smallest units (1 PREQ = 1,000,000). Default off.
X402_CONFIRM_ABOVE_USDAsk a human at or above this USDC amount (USD). Default off.
X402_CONFIRM_ABOVE_PREQ_ATOMICAsk a human at or above this PREQ amount (PREQ smallest units). Default off.
X402_REQUIRE_LOCKyes = pay only sellers whose registered on-chain lock meets the minimums (default off)
X402_REQUIRE_LOCK_ABOVE_USDRequire a seller lock only for USDC payments at or above this amount (USD)
X402_MIN_LOCK_DAYSThe minimum must still be locked this many days from now (default 90)
X402_MIN_LOCK_PREQ_ATOMICMinimum PREQ locked by the seller, PREQ smallest units (1 PREQ = 1,000,000)
X402_MIN_LOCK_USDC_ATOMICMinimum USDC locked by the seller, USDC smallest units (1 USDC = 1,000,000)
X402_MIN_LOCK_SOL_ATOMICMinimum wrapped SOL locked by the seller, lamports (1 SOL = 1,000,000,000)
X402_BOND_SELLERSAgent402 Bond: seller addresses you may open deals with, comma-separated. Empty: bond_open refused.
X402_BOND_MAX_USDAgent402 Bond: max price per deal (USD). Unset: bond_open refused.
X402_BOND_MIN_SELLER_BOND_BPSAgent402 Bond: minimum seller bond as a share of the price, basis points (default 500 = 5%).
X402_BOND_MAX_DAYSAgent402 Bond: max days from now to the delivery deadline (default 30).
X402_BOND_CONFIRM_ABOVE_USDAgent402 Bond: ask a human at or above this amount in USD (default 0 = always ask).
X402_BOND_MAX_PREQ_ATOMICAgent402 Bond: max PREQ price per deal, PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ deals refused.
X402_BOND_CONFIRM_ABOVE_PREQ_ATOMICAgent402 Bond: ask a human at or above this PREQ amount, smallest units (default 0 = always ask).
X402_BOND_DIRECTORY_URLAgent402 Bond: seller directory for bond_find_sellers (https). Default: the toolkit list. off = tool off.
X402_NETWORKmainnet or devnet
X402_RPC_URLsecretSolana RPC URL used to build payment transactions
X402_PAY_WITHPreferred asset: USDC or PREQ
X402_PREQ_MINTPREQ mint override (only needed before the PREQ mint is built into this version, or for devnet rehearsal)
X402_HISTORY_PATHLocal payment log (JSONL). Daily limits are counted from this file.
More from github.com/agent402-dev
More MCP servers
AgentFund
github.com/agentIgris
Fundraising tools for AI agents on Solana: create campaigns, donate via x402, check reputation.
Slimcontext Mcp Server
github.com/agentailor
MCP Server for SlimContext - AI chat history compression tools
Agent Arena
github.com/agentarenaleague
Paper trading only. 26 leagues for AI bots. Spot Crypto + Crypto 35 live. Register by MCP.
AgentBodega MCP
github.com/agentbodegastore
Discover AgentBodega paid data tools, contracts, and x402/L402 HTTP payment handoff metadata.
X402Engine Mcp
github.com/agentc22
50+ pay-per-call APIs for AI agents — images, LLM, code, crypto, travel & more via x402
Agentcity Robinhood Chain Research
github.com/agentcitylabs
Read-only Robinhood Chain token research via GMGN, built for Agentcity agents and any MCP client.