Back to Browse

Agent402 Toolkit MCP Server

Developer ToolsLow Risk9.5MCP RegistryLocal
Free

Server data from the Official MCP Registry

Pay x402 APIs (USDC, PREQ) and run Agent402 Bond deals from your own wallet. Refuses by default.

About

Pay x402 APIs (USDC, PREQ) and run Agent402 Bond deals from your own wallet. Refuses by default.

Security Report

9.5
Low Risk9.5Low Risk

Valid MCP server (1 strong, 1 medium validity signals). 1 known CVE in dependencies ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. Trust signals: trusted author (3/3 approved). 1 finding(s) downgraded by scanner intelligence.

12 files analyzed · 2 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

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

Environment variable: X402_KEYPAIR_PATH

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

Environment variable: X402_ALLOWED_DOMAINS

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

Environment variable: X402_TRUSTED_PAY_TO

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

Environment variable: X402_ALLOWED_ASSETS

Max USDC per payment in USD (default 0.05)Optional

Environment variable: X402_MAX_USD

Max USDC per UTC day in USD (default 1)Optional

Environment variable: X402_MAX_USD_PER_DAY

Max payments per UTC day (default 20)Optional

Environment variable: X402_MAX_PAYMENTS_PER_DAY

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

Environment variable: X402_MAX_USD_PER_RECIPIENT_PER_DAY

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

Environment variable: X402_MAX_PREQ_ATOMIC

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

Environment variable: X402_MAX_PREQ_PER_DAY_ATOMIC

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

Environment variable: X402_MAX_PREQ_PER_RECIPIENT_PER_DAY_ATOMIC

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

Environment variable: X402_CONFIRM_ABOVE_USD

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

Environment variable: X402_CONFIRM_ABOVE_PREQ_ATOMIC

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

Environment variable: X402_REQUIRE_LOCK

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

Environment variable: X402_REQUIRE_LOCK_ABOVE_USD

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

Environment variable: X402_MIN_LOCK_DAYS

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

Environment variable: X402_MIN_LOCK_PREQ_ATOMIC

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

Environment variable: X402_MIN_LOCK_USDC_ATOMIC

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

Environment variable: X402_MIN_LOCK_SOL_ATOMIC

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

Environment variable: X402_BOND_SELLERS

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

Environment variable: X402_BOND_MAX_USD

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

Environment variable: X402_BOND_MIN_SELLER_BOND_BPS

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

Environment variable: X402_BOND_MAX_DAYS

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

Environment variable: X402_BOND_CONFIRM_ABOVE_USD

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

Environment variable: X402_BOND_MAX_PREQ_ATOMIC

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

Environment variable: X402_BOND_CONFIRM_ABOVE_PREQ_ATOMIC

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

Environment variable: X402_BOND_DIRECTORY_URL

Agent402 Bond v2: 1 = accept deals where a stated share of your deposit goes to the seller if you do not accept. Default: refused.Optional

Environment variable: X402_BOND_V2_ALLOW_SHARE

Agent402 Bond v2: arbiter addresses you accept, comma-separated. Default: deals with an arbiter refused.Optional

Environment variable: X402_BOND_V2_ARBITERS

on = add bond_v2_wait_result as an MCP task (experimental, read-only). Default off.Optional

Environment variable: X402_MCP_TASKS

mainnet or devnetOptional

Environment variable: X402_NETWORK

Solana RPC URL used to build payment transactionsRequired

Environment variable: X402_RPC_URL

Preferred asset: USDC or PREQOptional

Environment variable: X402_PAY_WITH

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

Environment variable: X402_PREQ_MINT

Networks payments may use: solana (default) or solana,base. Base (EVM) per-request payments are off by defaultOptional

Environment variable: X402_ALLOWED_NETWORKS

Network to use when an option passes on both: solana (default) or baseOptional

Environment variable: X402_PREFER_NETWORK

Base wallet key file (one line, 0x private key). Without it every Base payment is refusedOptional

Environment variable: X402_EVM_KEY_PATH

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

Environment variable: X402_HISTORY_PATH

Set to on to read a seller's 402 extensions.bond, check that bond account on chain (mint, owner = payment receiver, balance >= maxCover), and ask before paying a seller without a checked bond. Only adds a confirmation; limits are unchanged. Default off.Optional

Environment variable: X402_BOND_PREFER

With X402_BOND_PREFER=on: ask before paying a seller without a checked bond at or above this USD amount (non-USDC payments always ask). Default 0.05.Optional

Environment variable: X402_UNBONDED_CONFIRM_ABOVE_USD

Comma-separated base58 Ed25519 keys you trust to sign attestations about a payment receiver. When set, x402_fetch and x402_quote accept an attestation input, checked offline. Off by default.Optional

Environment variable: X402_ATTESTATION_SIGNERS

With X402_ATTESTATION_SIGNERS set: on refuses a payment that has no valid attestation. Default off.Optional

Environment variable: X402_ATTESTATION_REQUIRED

After this many refused payment attempts in a row (1-1000), refuse every x402_fetch call until pay-mcp restarts. A paid or free request resets the count. Default off.Optional

Environment variable: X402_PAUSE_AFTER_REFUSALS

Set to on to send an x402 payment-identifier with a Solana payment when the seller's 402 declares that extension. Default off.Optional

Environment variable: X402_PAYMENT_ID

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "pay-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@agent402-dev/pay-mcp"
      ],
      "env": {
        "X402_MAX_USD": "your-x402-max-usd-here",
        "X402_NETWORK": "your-x402-network-here",
        "X402_RPC_URL": "your-x402-rpc-url-here",
        "X402_PAY_WITH": "your-x402-pay-with-here",
        "X402_MCP_TASKS": "your-x402-mcp-tasks-here",
        "X402_PREQ_MINT": "your-x402-preq-mint-here",
        "X402_PAYMENT_ID": "your-x402-payment-id-here",
        "X402_BOND_PREFER": "your-x402-bond-prefer-here",
        "X402_BOND_MAX_USD": "your-x402-bond-max-usd-here",
        "X402_BOND_SELLERS": "your-x402-bond-sellers-here",
        "X402_EVM_KEY_PATH": "your-x402-evm-key-path-here",
        "X402_HISTORY_PATH": "your-x402-history-path-here",
        "X402_KEYPAIR_PATH": "your-x402-keypair-path-here",
        "X402_REQUIRE_LOCK": "your-x402-require-lock-here",
        "X402_BOND_MAX_DAYS": "your-x402-bond-max-days-here",
        "X402_MIN_LOCK_DAYS": "your-x402-min-lock-days-here",
        "X402_ALLOWED_ASSETS": "your-x402-allowed-assets-here",
        "X402_PREFER_NETWORK": "your-x402-prefer-network-here",
        "X402_TRUSTED_PAY_TO": "your-x402-trusted-pay-to-here",
        "X402_ALLOWED_DOMAINS": "your-x402-allowed-domains-here",
        "X402_MAX_PREQ_ATOMIC": "your-x402-max-preq-atomic-here",
        "X402_MAX_USD_PER_DAY": "your-x402-max-usd-per-day-here",
        "X402_ALLOWED_NETWORKS": "your-x402-allowed-networks-here",
        "X402_BOND_V2_ARBITERS": "your-x402-bond-v2-arbiters-here",
        "X402_CONFIRM_ABOVE_USD": "your-x402-confirm-above-usd-here",
        "X402_BOND_DIRECTORY_URL": "your-x402-bond-directory-url-here",
        "X402_ATTESTATION_SIGNERS": "your-x402-attestation-signers-here",
        "X402_BOND_V2_ALLOW_SHARE": "your-x402-bond-v2-allow-share-here",
        "X402_MIN_LOCK_SOL_ATOMIC": "your-x402-min-lock-sol-atomic-here",
        "X402_ATTESTATION_REQUIRED": "your-x402-attestation-required-here",
        "X402_BOND_MAX_PREQ_ATOMIC": "your-x402-bond-max-preq-atomic-here",
        "X402_MAX_PAYMENTS_PER_DAY": "your-x402-max-payments-per-day-here",
        "X402_MIN_LOCK_PREQ_ATOMIC": "your-x402-min-lock-preq-atomic-here",
        "X402_MIN_LOCK_USDC_ATOMIC": "your-x402-min-lock-usdc-atomic-here",
        "X402_PAUSE_AFTER_REFUSALS": "your-x402-pause-after-refusals-here",
        "X402_BOND_CONFIRM_ABOVE_USD": "your-x402-bond-confirm-above-usd-here",
        "X402_REQUIRE_LOCK_ABOVE_USD": "your-x402-require-lock-above-usd-here",
        "X402_MAX_PREQ_PER_DAY_ATOMIC": "your-x402-max-preq-per-day-atomic-here",
        "X402_BOND_MIN_SELLER_BOND_BPS": "your-x402-bond-min-seller-bond-bps-here",
        "X402_CONFIRM_ABOVE_PREQ_ATOMIC": "your-x402-confirm-above-preq-atomic-here",
        "X402_UNBONDED_CONFIRM_ABOVE_USD": "your-x402-unbonded-confirm-above-usd-here",
        "X402_MAX_USD_PER_RECIPIENT_PER_DAY": "your-x402-max-usd-per-recipient-per-day-here",
        "X402_BOND_CONFIRM_ABOVE_PREQ_ATOMIC": "your-x402-bond-confirm-above-preq-atomic-here",
        "X402_MAX_PREQ_PER_RECIPIENT_PER_DAY_ATOMIC": "your-x402-max-preq-per-recipient-per-day-atomic-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Agent402 toolkit

CI

Open-source tools that make agent payments checkable: spend limits before your agent signs, signed receipts after it pays, and on-chain bonds for jobs on Solana.

A402 (v1) is deprecated. The token payment option is now PREQ (mint aTbGw3gU5JyJkAdXLj8rYZ3mCXkPbyHjtTAyCX3jQLX). Official addresses: https://claude.ai/artifact/S6UafAfViJk3DJeMsDMAja

Open-source tools for x402 payments in USDC on Solana and Base, run on your own machine under rules you set: take payments for your API, and let your AI agent pay for APIs within limits and allowlists. Also: bonded jobs and factual token checks on Solana, and PREQ (a Token-2022 token) as an optional Solana payment.

Factual information from public on-chain data. Not investment advice.

Not related to agent402.tools, @agents402 or other similarly named sites, accounts or projects, including projects named "a402" on other chains.

30-second demo on Base Sepolia testnet: a seller prices a route with pay-server and checks its own 402; a buyer agent with pay-mcp quotes it within its limits and pays 0.001 test USDC

Recorded on Base Sepolia testnet with test USDC; addresses shortened.

Watch the 60-second overview (MP4). Scenes marked live today show current features with real testnet output; scenes marked concept / roadmap show goals that are not live yet.

Get paid for your API

@agent402-dev/pay-server puts an x402 price on a route you already run: it answers with a 402, has a facilitator verify the payment, runs your handler, and settles only if your handler succeeds. USDC on Solana, Base, or both. It takes only your public receiving address.

  • Start: Seller guide · one paid route · accept USDC on Base
  • Check your own 402 the way a buyer's agent reads it (no wallet, nothing paid): npx -y @agent402-dev/pay-server check https://your-endpoint.example.com/paid
  • No Node on the agent's side? The same check is also a paid x402 route run by the toolkit developer: https://agent402-check402.agent402-ebc.workers.dev/x402/check402?url=<seller URL> (add &discovery=true for /openapi.json and /.well-known/x402), 0.01 USD per request in USDC on Solana or Base. It sends one request without a payment header to the URL you give (https and public host names only) and returns the same findings as the CLI. The CLI stays free.

Let your AI agent pay for APIs

@agent402-dev/pay-mcp is an MCP server that pays x402 APIs from your own wallet, in USDC on Solana or Base, only within the per-payment and daily limits, domain allowlist and trusted recipients you set. With no configuration, every payment is refused. Public sellers it reads correctly: Works with.

Bonded jobs (Solana)

For work that takes minutes to hours, Agent402 Bond lets a seller lock a bond and the buyer pay after delivery. Internal review only, not independently audited.

New here? Try it in one minute with no wallet (live sellers and prices, nothing paid), then Getting started: let your AI agent pay for an API, or get paid by AI agents, in a few minutes.

Claude Code plugins. Install the MCP server and its skill in one step: claude plugin marketplace add agent402-dev/agent402-toolkit, then claude plugin install agent402-pay@agent402 (buyer), agent402-sell@agent402 (seller) or agent402-check@agent402 (token facts). The three plugins side by side (MCP server, skill, what each does): plugins/README.md.

Codex plugins. The same three plugins: codex plugin marketplace add agent402-dev/agent402-toolkit, then codex plugin add agent402-pay@agent402, agent402-sell@agent402 or agent402-check@agent402. Needs git on PATH.

Cursor plugins. The same three plugins also have Cursor manifests (.cursor-plugin/ at the repository root and in each plugin). They are not in the Cursor Marketplace yet; to try one locally, see plugins/README.md.

pay-mcp with no wallet: bond_find_sellers lists live sellers and their terms; x402_quote shows a 0.05 USDC price and is refused, nothing signed

Packages

PackageWhat it is
@agent402-dev/check-engineReads public on-chain data for a token mint and returns facts with evidence addresses (authorities, Token-2022 extensions, holders, liquidity locks, operator locks, early buys)
@agent402-dev/check-mcpMCP server for the checks. Free: summary from the hosted API, full report on your machine with your own RPC
@agent402-dev/pay-serverServer helpers to accept x402 payments in USDC on Solana and Base and, optionally on Solana, PREQ through external facilitators (verify → your handler → settle). Optional /bond entry for sellers running Agent402 Bond deals (takes a signer, never a key)
@agent402-dev/pay-mcpMCP server that lets an AI agent pay x402 APIs and take part in Agent402 Bond deals as a buyer, from your own wallet, on your machine, within limits and allowlists you set (with no configuration, every payment is refused)
@agent402-dev/bond-seller-mcpMCP server that lets an AI agent sell jobs backed by Agent402 Bond deals (USDC or PREQ), from your own seller wallet, on your machine: prepare deals, do the work, mark delivery, settle
@agent402-dev/bond-clientInstruction builders and the settlement rules (deadlines, possible actions, settlement preview) for the Agent402 Bond program (beta, below), plus a two-agent example

Agent402 Bond (Solana program, beta)

A performance bond for one deal: the seller locks a bond, the buyer may lock a deposit, and the outcome follows only the parties' signatures and the Solana clock. Program 9hiCZZ6ddFG9oJBR1Su43Pj4JRFHeHC5cGiCgXtTuAaK on mainnet, with no upgrade authority. Source, tests and how to check the deployed code: programs/. Terms: docs/bond/TERMS.md. Internal review (not an independent audit): docs/bond/INTERNAL-REVIEW.md.

Two agents running a bonded job over HTTP follow the Bond Job Protocol: sellers use @agent402-dev/pay-server/bond (or @agent402-dev/bond-seller-mcp when an AI agent does the work), buying agents use @agent402-dev/pay-mcp. Try it with your own AI agent, locally and without real funds: packages/pay-mcp/examples/bond-local. Sellers are listed in the seller directory (bond_find_sellers); the developer runs two of them: wallet activity CSV (1 USDC per job) and transaction receipts (0.1 USDC per job). Code-level example with a seller service, a buyer agent and a local demo: packages/bond-client/examples/job.

Agent402 Bond v2 (beta)

Program Dpvdw53zwFbNhNp4KiTBXS1SNge467M8frtHn2Gr36Ev on mainnet, with no upgrade authority. Both parties sign each deal, which also records a hash of the job and of the delivered result; payouts go to accounts fixed at opening. Source, tests and how to check the deployed code: programs-v2/. Terms: docs/bond/TERMS-v2.md. Job protocol: docs/bond/JOB-PROTOCOL-v2.md. Internal review (not an independent audit): docs/bond/INTERNAL-REVIEW-v2.md. Buyers use the bond_v2_* tools in @agent402-dev/pay-mcp; sellers use @agent402-dev/pay-server/bond-v2 or @agent402-dev/bond-seller-mcp with BOND_SELL_PROTOCOL=2.

PREQ on the developer's two services

Since 2026-11-28 03:34 UTC the two services the toolkit developer runs (wallet activity CSV and transaction receipts) take USDC only, on Solana and Base, at 0.05 USD per request. From 2026-11-27 until then they also offered PREQ at the same USD price, using the daily rate (PREQ option); that option is off and would only be turned on again by a new operator decision, announced on the PREQ disclosure page. Any PREQ these services receive counts as operator holdings: it is not sold or transferred, it is burned once a month from the seller wallet, and each burn transaction is published on that page. Internal review only, not independently audited.

What this toolkit does not do

  • It does not operate a facilitator. Payment verification and settlement are done by external x402 facilitators (for example PayAI).
  • It does not hold funds. Payments go from the buyer's wallet directly to the seller's receiving address. The Bond program's deal vaults are controlled only by the program's rules; no Agent402 key can move them.
  • It does not exchange currencies. The PREQ rate is used only to compute a PREQ price; there is no PREQ ↔ USDC conversion.
  • It does not accept or send payments on anyone's behalf. The payment MCP signs with your own wallet on your machine; the server SDK takes only your public receiving address.
  • It does not judge, score or rate tokens and gives no investment advice.

Amounts and units

USDC and PREQ both have 6 decimals. In x402 requirements, limits and logs, amounts are in the smallest unit unless marked otherwise: 1 USDC = 1,000,000 and 1 PREQ = 1,000,000 smallest units. Tool outputs add the unit next to each amount (for example "amountDisplay": "140,000 PREQ").

Development

npm install
npm test
npm run typecheck

Node 20+. Tests run offline (recorded public mainnet data and local fakes).

License

Apache License 2.0. See NOTICE.


Factual information from public on-chain data. Not investment advice.

Reviews

No reviews yet

Be the first to review this server!