Home › Quickstart

Your first Agent402 call in 60 seconds

Pick your stack, copy the snippet, and you're live.

Add to Claude Code

One command and you're done — 1,323 tools available instantly.

Install
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then ask Claude
# "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
What to try next

Call any tool with curl

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"}'
Pay with proof-of-work (free, no wallet)
# 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"}'
What to try next

Use the JavaScript SDK

Install agent402-client — auto-payment via proof-of-work, no wallet needed.

Install
npm install agent402-client
Call a tool
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);
What to try next
  • Use a.find("geocode") to search tools programmatically
  • Pass a wallet key to unlock paid-only tools
  • Enable idempotent retries for production use

Plug into any LLM framework

Drop-in tool definitions for OpenAI, Anthropic, and Vercel AI SDK.

Install
npm install agent402-openai-tools
# also: agent402-anthropic-tools, agent402-ai-sdk
Wire into your LLM call
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);
What to try next
  • Filter tools by category: agent402Tools({ categories: ["search"] })
  • Combine with the MCP connector for Claude-native integration
  • See the playground for live examples

Pay directly with USDC on Base

Use the x402 protocol for on-chain payment — no API keys, no accounts.

Install
npm install @x402/fetch @x402/core @x402/evm viem
Make a paid call
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" }),
});
What to try next
  • Check /api/pricing for per-tool USDC prices
  • Add an Idempotency-Key header so retries never double-charge
  • See /.well-known/x402 for the machine-readable payment manifest

Browse 1,323 tools

Search, filter, and preview every tool in the catalog.

Try it live

Run any tool interactively in the browser playground.

Read the docs

API reference, authentication, pricing, and advanced usage.