Pick your stack, copy the snippet, and you're live.
One command and you're done — 1,323 tools available instantly.
Installclaude mcp add agent402 -s user -- npx -y agent402-mcp@latest
# "extract the tables from this PDF"
# "geocode these 50 addresses"
# "fetch Apple's latest 10-K"
Or paste the hosted connector URL (zero install):
https://agent402.tools/mcp
Standard HTTP — POST JSON, get JSON back. No SDK required.
See a 402 quote (free)curl -i -X POST https://agent402.tools/api/hash \
-H "Content-Type: application/json" \
-d '{"text":"hello world","algo":"sha256"}'
# Grab a challenge
CHAL=$(curl -s "https://agent402.tools/api/pow/challenge?slug=hash")
# Solve the challenge, then retry with:
curl -X POST https://agent402.tools/api/hash \
-H "Content-Type: application/json" \
-H "X-Pow-Solution: <nonce>:<hash>" \
-d '{"text":"hello world","algo":"sha256"}'
Idempotency-Key header for safe retriesInstall agent402-client — auto-payment via proof-of-work, no wallet needed.
Installnpm install agent402-client
import { Agent402 } from "agent402-client";
const a = new Agent402(); // free tier (proof-of-work)
const result = await a.call("hash", {
text: "hello world",
algo: "sha256"
});
console.log(result);
a.find("geocode") to search tools programmaticallyDrop-in tool definitions for OpenAI, Anthropic, and Vercel AI SDK.
Installnpm install agent402-openai-tools
# also: agent402-anthropic-tools, agent402-ai-sdk
import { agent402Tools } from "agent402-openai-tools";
// also: agent402-anthropic-tools, agent402-ai-sdk
const { tools, execute } = await agent402Tools();
// pass tools to your LLM call
// when it returns a tool_call, run:
await execute(name, args);
agent402Tools({ categories: ["search"] })Use the x402 protocol for on-chain payment — no API keys, no accounts.
Installnpm install @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
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/article" }),
});
Idempotency-Key header so retries never double-charge