x402-payagent-mcp
v4.1.0Pay x402 APIs in USDC on Base, Solana, and BNB Chain with spend mandates, receipts, idempotency.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
setup
Creates or recovers an ArisPay account for delegated custody and provisions a USDC payer wallet in one call (side effects: registers the email, creates a Coinbase CDP-managed wallet, writes credentials to ~/.payagent/config.json on this machine). Moves no money — it does NOT spend funds. Idempotent: re-running with the same email recovers the existing account and its wallets. Not needed in self-custody mode: if PAYAGENT_PRIVATE_KEY is set, skip setup entirely — pay works with the local key alone.
| Parameter | Type | Description |
|---|---|---|
email * | string | Email to register the account under. It is also the recovery key — use a real address. |
name | string | Human name. Falls back to the email local-part. |
discover
Searches the ArisPay marketplace for paid APIs by capability or plain-language intent, optionally budget-bounded (integer cents). Read-only — spends no money, needs no API key. Returns ranked candidates with endpoint URL, price in cents, health and verification flags. Select this to FIND an endpoint; then inspect to price a specific URL, then pay to call it.
| Parameter | Type | Description |
|---|---|---|
query * | string | Capability or plain-language intent, e.g. 'flight search'. |
budgetCentsMax | integer | Maximum acceptable price in INTEGER CENTS (500 = $5.00). Free listings always pass. |
category | string | Optional category filter (inference, data, media, search, social, infrastructure, trading, other). |
limit | integer | Max results (default 5, max 20). |
inspect
Fetches an x402-protected URL WITHOUT paying and reports its price, asset, network, and payment requirements. Read-only — spends no money, sends no payment header, needs no API key or account. Always safe. Select this before pay to know exactly what a resource costs.
| Parameter | Type | Description |
|---|---|---|
url * | string | The URL to inspect. Expected to return HTTP 402 with an x402 challenge. |
pay
SPENDS REAL MONEY — on-chain and irreversible. The complete machine payment path: makes the HTTP request, and if the server answers 402, selects the supported asset/network variant (USDC on Base/Ethereum/Polygon; delegated mode also settles Solana and BNB Chain variants), validates policy, pays, retries the request, and returns the response plus a structured machine-readable receipt. Requires an idempotencyKey: re-calling with a key that already paid returns the cached receipt and does NOT pay again. Mode selection: PAYAGENT_PRIVATE_KEY set → signs locally (self-custody; wallet balance is…
| Parameter | Type | Description |
|---|---|---|
idempotencyKey * | string | Caller-chosen unique key for this payment intent (min 8 chars, e.g. a UUID). Re-calling with a key that already paid returns the cached receipt WITHOUT paying again. Use a fresh key for each new payme… |
url * | string | The full URL of the API endpoint to call. |
agent | string | Optional name of a stored x402 payer agent (delegated mode). |
body | string | |
headers | object | |
method | string |
balance
Read-only: shows the active payment identity — the stored ArisPay agent (delegated) or the PAYAGENT_PRIVATE_KEY-derived address (self-custody) — with its USDC deposit address, on-chain balance, and (delegated) spend-mandate limits. Spends no money, never pays. Select this to find where to send USDC, to confirm a deposit landed, or when a payment fails.
| Parameter | Type | Description |
|---|---|---|
agent | string | Optional name of a locally-stored x402 agent. |
history
Read-only: lists recent payments — the server-side activity feed in delegated mode (newest first), or locally recorded receipts in self-custody mode. Spends no money. Select this to reconcile what was paid, retrieve a past receipt, or audit an agent's spending.
| Parameter | Type | Description |
|---|---|---|
agent | string | Optional stored agent name — limits the feed to that wallet (delegated mode). |
limit | integer | Max entries (default 10, max 50). |
check_payment_signal
SPENDS REAL MONEY — 1¢ (USDC, Base mainnet) per UNCACHED call; a still-valid cached artifact returns WITHOUT spending, and an unknown resource is answered free. Buys ArisPay Signal: recent signed probe evidence about an x402 resource (did a real paid probe settle and deliver?) as an arispay.signal.v1 artifact, verified against the published JWKS. Use it BEFORE a material first payment to an unfamiliar resource, or after cached evidence expires. The decision denominator is CUMULATIVE exposure before the artifact expires — planned spend across all intended calls, or the expected cost of one…
| Parameter | Type | Description |
|---|---|---|
resource * | string | The exact absolute HTTPS URL of the x402 resource you are about to pay. Signal evidence is keyed by this exact URL. |
agent | string | Optional name of a stored x402 payer agent (delegated mode). |