Docs
Add 619 tools, the cross-seller index and router, and an OpenAI-compatible /v1 gateway to your agent. Start free with proof-of-work, then pay per call over x402 or MPP.
# one file, no install - pays with COMPUTE (no wallet) curl -s https://agent402.tools/demo.js -o demo.js node demo.js # or settle USDC on Base with a funded EVM key (four packages, same file) npm i @x402/core @x402/evm @x402/fetch viem # Use a new wallet holding only a few dollars of USDC. Never your main wallet. AGENT_KEY=0xYOUR_FUNDED_KEY node demo.js
To pay on Solana, Stellar or Algorand, see Paying with x402.
How payment works.
The chains x402 settles on
x402 settles in USDC on Base, Solana, Polygon, Arbitrum One, Monad, Celo, Avalanche C-Chain, Sei, OP Mainnet, Arc, Ink, Stellar, or Algorand - or USDG on Robinhood Chain.
Three ways in.
No terminal, in Claude desktop or claude.ai: In the sidebar, open Customize, then Connectors. Choose Add, then Add custom connector, name it Agent402 and paste this address: https://agent402.tools/mcp.
# Claude Code - hosted connector (no install; free proof-of-work tools, paid tools need a wallet client) claude mcp add --transport http -s user agent402 https://agent402.tools/mcp # Claude Code - npm server with a funded EVM key (paid tools settle via x402) # Use a new wallet holding only a few dollars of USDC. Never your main wallet. claude mcp add agent402 -s user -e AGENT_KEY=0xYOUR_FUNDED_KEY -- npx -y agent402-mcp@0.17.2 # Cursor - ~/.cursor/mcp.json { "mcpServers": { "agent402": { "url": "https://agent402.tools/mcp" } } } # any host, one-shot install curl -fsSL agent402.sh/install | sh
No wallet yet? Fund a first one with USDC on Base, no ETH needed, or run npx -y agent402-mcp@0.17.2 wallet new to make one on this computer: it stores the key and prints the address and the config, never the key.
Other hosts: Start here and the host guide. Official packages.
// npm i @x402/core @x402/evm @x402/fetch viem import { x402Client } from "@x402/core/client"; import { registerExactEvmScheme } from "@x402/evm/exact/client"; import { wrapFetchWithPayment } from "@x402/fetch"; import { privateKeyToAccount } from "viem/accounts"; const client = new x402Client(); client.setSpendControls?.(false); // your own code bounds spend registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) }); const payFetch = wrapFetchWithPayment(fetch, client); const res = await payFetch("https://agent402.tools/api/extract", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://example.com" }) }); console.log(await res.json());
npm install agent402-client
import { Agent402 } from "agent402-client";
const a = new Agent402(); // free tier (proof-of-work)
const out = await a.call("hash", { text: "hello", algo: "sha256" });Free tier - proof-of-work.
The 187 pure-CPU tools need no wallet: your machine solves a short sha256 puzzle instead of paying. Details: Paying with compute.
/v1 - OpenAI-compatible LLM gateway.
Point any OpenAI SDK at base_url https://agent402.tools/v1 and pay per call, with no API key. These routes are model-backed. The gateway is an Agent402 service: it prices each call before it runs (a flat tier price, or a quote from the request on the metered routes), routes auto chat calls to a model chosen for the task, falls back to the next model on a chat tier when one fails, and signs a receipt for each settled paid answer. Set a client timeout of at least 120 s: the answer is generated and the payment settled before the response is sent, which takes a few seconds on most calls and longer for long answers, and a client that disconnects after the payment settles is charged without the answer (the charge is recorded as owed and reviewed for a refund). Wires: LLM Gateway.
The /v1 routes and their prices
Decide - a plan for any job.
Describe a job and get a call-ready plan, each step with its tool, price and fallbacks; third-party steps cost the seller's price plus a 5% markup. Rules: Decide.
Why pay here.
Seven claims, each linked to the surface that proves it.
Pay for usage, under a quoted ceiling.
Metered calls quote a ceiling in the 402 and settle the actual usage under it, with a receipt on each settled call.
details +
Pay for what the model used, with the ceiling quoted first. On the metered gateway every 402 quotes this exact request from its own body. A wallet that can pay with the upto scheme settles the actual usage under that ceiling; provider discounts such as prompt-cache reads pass through. Every settled x402 or MPP response carries a receipt. A JSON answer bought with an EVM wallet can then be attested on Base by that same wallet: POST /api/attest with the settlement transaction writes an Ethereum Attestation Service record of the tool, the response digest and the payment, from our wallet, so an agent can prove afterwards what it acted on. Streamed and binary answers carry no digest, and wallet-scoped routes such as memory are never attested.
A failed x402 call is not charged.
Settlement runs after the answer and an error cancels it; a keyed retry replays the paid answer instead of paying twice.
details +
A failed x402 call is not charged, and the response shows it. Settlement runs after the handler answers and an error status cancels it, so a failed call is answered with no payment receipt, or with a receipt marked success:false, and is not charged. Some calls are paid before they run; a failed one can be retried free with the same payment, or is refunded. A call paid before it ran answers charged: true. One exception, on the EVM chains: a transfer that lands after a timed-out settle, a disconnect during settle, or a settle the facilitator answered as pending whose receipt was not read in time, is booked as a refund owed and repaid after on-chain proof. Not so for a receipt whose errorReason is settlement_unconfirmed (a settle that ended without showing whether the transfer was sent): the transfer may still land, so do not sign a new authorization for that call before the expiry the answer names (authorizationValidBefore, lastValidRound or expirationLedger), or, when it names none, before the paying wallet shows whether the transfer landed, and follow the answer's retry (watch-transaction: watch the named transaction; check-wallet: check the paying wallet). A receipt whose errorReason is settled_refund_owed was charged: its transfer landed after an earlier attempt with the same payment and is booked as owed to the paying wallet, repaid after on-chain proof (refundStatusUrl shows where it stands), and a new authorization makes the call. A retry that carries the same idempotency key and the same payment credential replays the paid answer instead of paying again. A settled receipt on an error response is detected by our own alarm and recorded as a debt in a refund ledger, never written off silently. A Tempo push payment is sent before the call runs, so a call that then fails or is not served is recorded as a refund owed the same way. Anyone holding the settlement transaction can check it for free at /api/refunds/lookup and see our refund transaction once it is sent.
One key buys everything.
One wallet pays for LLM tiers on four wires, embeddings, images, speech, 500+ tools and finished reports.
details +
One key buys everything. The same wallet pays for flat LLM tiers and a metered tier on four wires (OpenAI chat, OpenAI Responses, Anthropic Messages, Gemini generateContent), embeddings, rerank, images, video, speech, transcription, grounded answers with citations, 500+ tools and finished reports, and an EVM wallet also keys its own memory. One paywall, one key.
Some calls need no wallet.
Proof-of-work pays for the pure-CPU tools, and cards pay over MPP and at report checkout.
details +
Some calls need no wallet. Proof-of-work pays for the pure-CPU tools, cards over MPP pay any route priced at $0.50 or more, and card checkout sells the finished reports, beside USDC or USDG on 14 chains and native MPP on Tempo. An agent with a wallet never needs an account.
Finished work, ready to use.
Dossiers, 13F holdings, filing reports, domain audits and deep research from live sources; monitors re-run them on change.
details +
Finished work, ready to use. Company dossiers, insider flow, 13F holdings, filing reports, IPO digests, domain audits, token risk, deep research, market briefs, recall watch and a professional article package, grounded in live sources, most with a downloadable data appendix. Monitors check for free on a schedule and re-run the paid report when the facts change, up to 4 full reports in any 30 days; past that a change arrives as an alert.
We source from other sellers.
Route-and-execute buys the result from the best seller, ours or anyone else's, under one receipt.
details +
We source from other sellers. Route-and-execute resolves a task to the best seller across the whole ecosystem, ours or anyone else's, buys the result from that seller with our own wallet and sells it to the agent under one receipt. Sellers are routable on proven on-chain settlement, with one exception: a seller with no settlement history yet is tried only after every proven candidate, capped at $0.05 a call on Base (at most $0.25 a day per seller, $5.00 a day in all), $0.01 a call on Solana and $0.01 a call on Polygon, Arbitrum and Celo, and flagged unproven on the receipt.
Everything is checkable.
Outside uptime probes, a daily real-money canary, published transactions, open source and an on-chain operator identity.
details +
Everything is checkable. Uptime is observed by two probes outside production, a real-money canary buys through every on-chain rail daily, transactions are published by rail and by wire, and the whole server is open source and self-hostable. The deterministic tools are pure code with no model in their path - parsers, hashes, math, a real browser - and the ones that DO run a model are named rather than blended in: the /v1 gateway tiers, the report products, the image, speech, transcription, embedding and AI-answer tools, the Decide planner, and the judgment model that can pick among the router's shortlisted candidates. Every 402 also carries the SHAPE of the answer before you pay: its first x402 accept declares an outputSchema, so an agent can check what came back against what was promised instead of taking a status code on trust. The operator is identified on-chain too: Agent402 is agent 94639 in the ERC-8004 Identity Registry on Base, and /.well-known/agent-registration.json is the record that registration points at, beside an A2A agent card at /.well-known/agent-card.json. So an agent can resolve who serves this catalog from the chain rather than from this page.
Side by side with the other ways in
| Task | Here | Building it yourself | Calling each provider directly |
|---|---|---|---|
| Getting started | One MCP add or one HTTP call | Write, host and monitor each handler | An account and an API key per provider |
| Paying | Per call over x402 or MPP; proof-of-work for the pure-CPU tools | Billing is yours to build | A plan or a prepaid balance per provider |
| Finding a tool | A searchable catalog and /api/find | Only what you have built | Each provider's own docs |
| Errors and retries | One JSON error shape; a keyed retry replays the paid answer | Yours to design | A format per provider |
| Running it | Hosted, or self-host it: the server is open source | Yours to run | Each provider's own uptime |
Examples.
3 tasks, their calls and their costs
Research 50 public companies overnight
An analyst's agent walks 50 tickers, pulling filings and reported financials for each, and leaves 50 structured summaries ready for review in the morning.
Tools: edgar-filings, edgar-company-facts
Cost at list price: $0.40 for 50 companies 50 × edgar-filings at $0.00350 × edgar-company-facts at $0.005
Watch competitor pricing daily
A pricing agent reads 40 product pages every morning (render for the 20 JavaScript-heavy ones, extract for the 20 static ones, both returning markdown it scans for prices) and logs changes to its wallet-keyed memory for trend analysis.
Tools: render, extract, memory-write
Cost at list price: $0.10 per day 20 × render at $0.00320 × extract at $0.00120 × memory-write at $0.001
Answer customer questions with live web search
A support agent searches the live web for product documentation, gets a cited, model-written synthesis from the answer tool (model-backed) and includes the source URLs in its reply.
Cost at list price: $0.09 per question 1 × search at $0.011 × answer at $0.08
Badges.
Badge styles and snippets for a README or site
Default
Shields-style badge with the tool count
[](https://agent402.tools)
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/default.svg" alt="Agent402"></a>
Flat
Flat version without the gradient
[](https://agent402.tools)
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/flat.svg" alt="Agent402"></a>
Powered by
Wider badge for project footers
[](https://agent402.tools)
<a href="https://agent402.tools"><img src="https://agent402.tools/badges/powered-by.svg" alt="Agent402"></a>