MCP directory
AP

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.

npm

Run it locally

Install the package and point your AI client at it.

npm

npx -y @agent402-dev/[email protected]

Environment variables

  • X402_KEYPAIR_PATH

    Path to the payment wallet key file (Solana CLI JSON). Without it nothing is paid.

  • X402_ALLOWED_DOMAINS

    Allowed domains, comma-separated. Empty: every payment refused.

  • X402_TRUSTED_PAY_TO

    Trusted recipient addresses, comma-separated. Empty: every payment refused.

  • X402_ALLOWED_ASSETS

    USDC (default) or USDC,PREQ. A402 (v1) is deprecated.

  • X402_MAX_USD

    Max USDC per payment in USD (default 0.05)

  • X402_MAX_USD_PER_DAY

    Max USDC per UTC day in USD (default 1)

  • X402_MAX_PAYMENTS_PER_DAY

    Max payments per UTC day (default 20)

  • X402_MAX_USD_PER_RECIPIENT_PER_DAY

    Max USDC per recipient per UTC day in USD (default off)

  • X402_MAX_PREQ_ATOMIC

    Max PREQ per payment, in PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ refused.

  • X402_MAX_PREQ_PER_DAY_ATOMIC

    Max PREQ per UTC day, in PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ refused.

  • X402_MAX_PREQ_PER_RECIPIENT_PER_DAY_ATOMIC

    Max PREQ per recipient per UTC day, in PREQ smallest units (1 PREQ = 1,000,000). Default off.

  • X402_CONFIRM_ABOVE_USD

    Ask a human at or above this USDC amount (USD). Default off.

  • X402_CONFIRM_ABOVE_PREQ_ATOMIC

    Ask a human at or above this PREQ amount (PREQ smallest units). Default off.

  • X402_REQUIRE_LOCK

    yes = pay only sellers whose registered on-chain lock meets the minimums (default off)

  • X402_REQUIRE_LOCK_ABOVE_USD

    Require a seller lock only for USDC payments at or above this amount (USD)

  • X402_MIN_LOCK_DAYS

    The minimum must still be locked this many days from now (default 90)

  • X402_MIN_LOCK_PREQ_ATOMIC

    Minimum PREQ locked by the seller, PREQ smallest units (1 PREQ = 1,000,000)

  • X402_MIN_LOCK_USDC_ATOMIC

    Minimum USDC locked by the seller, USDC smallest units (1 USDC = 1,000,000)

  • X402_MIN_LOCK_SOL_ATOMIC

    Minimum wrapped SOL locked by the seller, lamports (1 SOL = 1,000,000,000)

  • X402_BOND_SELLERS

    Agent402 Bond: seller addresses you may open deals with, comma-separated. Empty: bond_open refused.

  • X402_BOND_MAX_USD

    Agent402 Bond: max price per deal (USD). Unset: bond_open refused.

  • X402_BOND_MIN_SELLER_BOND_BPS

    Agent402 Bond: minimum seller bond as a share of the price, basis points (default 500 = 5%).

  • X402_BOND_MAX_DAYS

    Agent402 Bond: max days from now to the delivery deadline (default 30).

  • X402_BOND_CONFIRM_ABOVE_USD

    Agent402 Bond: ask a human at or above this amount in USD (default 0 = always ask).

  • X402_BOND_MAX_PREQ_ATOMIC

    Agent402 Bond: max PREQ price per deal, PREQ smallest units (1 PREQ = 1,000,000). Not set: PREQ deals refused.

  • X402_BOND_CONFIRM_ABOVE_PREQ_ATOMIC

    Agent402 Bond: ask a human at or above this PREQ amount, smallest units (default 0 = always ask).

  • X402_BOND_DIRECTORY_URL

    Agent402 Bond: seller directory for bond_find_sellers (https). Default: the toolkit list. off = tool off.

  • X402_NETWORK

    mainnet or devnet

  • X402_RPC_URLsecret

    Solana RPC URL used to build payment transactions

  • X402_PAY_WITH

    Preferred asset: USDC or PREQ

  • X402_PREQ_MINT

    PREQ mint override (only needed before the PREQ mint is built into this version, or for devnet rehearsal)

  • X402_HISTORY_PATH

    Local payment log (JSONL). Daily limits are counted from this file.

More from github.com/agent402-dev

More MCP servers