AgentStack
MCP unreviewed MIT Self-run

Agent402 — pay-per-call web tools

mcp-mikeypetrillo-agent402 · by MikeyPetrillo

1000+ pay-per-call web tools for agents: search, browser, PDF, memory. x402 USDC or proof-of-work.

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add mcp-mikeypetrillo-agent402

Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.

Are you the author of Agent402 — pay-per-call web tools? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.

About

Agent402.Tools — the open x402 index (Find · Route · Leaderboard) + 1,338 tools & 42 skill packs for AI agents

> What makes it different: Agent402 is open-source and self-hostable — and a > single integration gives a buyer three free primitives over the whole x402 > ecosystem: > > - Find/api/find?q={task} resolves a task description to the best-matching tools (route, price, schema, ready example). > - RoutePOST /api/route is the neutral Smart Order Router: rank tools across every x402 seller crawled (auto-discovered from the Coinbase CDP Bazaar), health-aware, with include=external to exclude us. > - LeaderboardGET /api/leaderboard is the public on-chain ranking of every x402 seller by Base USDC settled volume — calls served, totalUsd, unique buyers per seller. Pipeline: Bazaar → eth_getLogs → per-call ceiling → aggregate by payTo. Hourly snapshot. > > Plus the whole 1,338-tool catalog and 42 curated skill packs (multi-tool > workflows callable as MCP prompts), all runnable yourself, plus > [agent402-tollbooth](tollbooth) — an open pay-per-crawl gate for the other > side of x402.

[](https://agent402.tools) [](https://www.npmjs.com/package/agent402-mcp) [](https://www.npmjs.com/package/agent402-client) [](https://www.npmjs.com/package/agent402-tollbooth) [](https://github.com/MikeyPetrillo/Agent402/actions/workflows/deploy.yml) [](LICENSE)

Framework adapters (drop-in tools for the major agent stacks — auto-payment underneath): [](https://www.npmjs.com/package/agent402-openai-tools) [](https://www.npmjs.com/package/agent402-anthropic-tools) [](https://www.npmjs.com/package/agent402-ai-sdk) [](https://www.npmjs.com/package/agent402-langchain) [](https://www.npmjs.com/package/agent402-llamaindex) [](https://www.npmjs.com/package/agent402-strands) [](https://www.npmjs.com/package/agent402-google-adk) [](https://www.npmjs.com/package/agent402-openai-agents)

Give your AI agent 1,338 ready-to-use web tools — plus 42 multi-tool skill packs — from one server. Browser rendering, web search, PDFs, images, OCR, live financial/crypto/macro data, SEC EDGAR, deterministic stats and forecasting, compression, and ~1,000 pure-CPU utilities. Run it yourself for free in 30 seconds (MCP or plain HTTP, no API keys, no signup), connect it to Claude/ChatGPT/any MCP client, and add your own tools in a few lines. Every tool is deterministic — no LLM in the serving path — and re-tested against its own example before every release.

> Optionally, the same server can charge per call over the x402 > protocol (USDC on Base, Solana, Polygon & Arbitrum) — so the instance you self-host for > free can also be a hosted, monetized one. That part is opt-in; by default > everything runs free.

🟢 Hosted demo: agent402.tools · 📖 Wiki · 📦 npm · 🔌 MCP Registry

Run it yourself in 30 seconds

Pick whichever fits — all three are free and need no wallet:

1. Zero install — add the hosted connector to Claude (claude.ai → Settings → Connectors → Add custom connector):

https://agent402.tools/mcp

2. One command — run the MCP server locally (the pure-CPU tools work with no key; it pays the tiny proof-of-work for you):

npx -y agent402-mcp
# in Claude Code:  claude mcp add agent402 -- npx -y agent402-mcp

3. Clone and host the whole thing (all 1,338 tools as an HTTP API + MCP, free mode, no payments):

git clone https://github.com/MikeyPetrillo/Agent402 && cd Agent402
npm install
FREE_MODE=true npm start          # → http://localhost:3000  (HTTP API + /mcp)
# try a tool over HTTP — no auth in free mode
curl -s -X POST localhost:3000/api/hash -H 'content-type: application/json' \
  -d '{"text":"hello world","algo":"sha256"}'

4. One-click deploy to Railway (full self-hosted instance — adds optional Postgres + Redis plugins for analytics + response caching):

[](https://railway.com/new/template?template=https%3A%2F%2Fgithub.com%2FMikeyPetrillo%2FAgent402)

Boots straight from the repo's railway.toml + Dockerfile. Optional plugins are auto-detected via env: add RedisREDIS_URL enables the upstream response cache (X-Cache: hit|miss), add PostgresDATABASE_URL enables the public /api/analytics dashboard and the tollbooth waitlist. No env vars required to boot in free mode.

What's in the catalog (1,338 tools)

| | Examples | |---|---| | Browser & web | render (headless Chromium, executes JS), screenshot, extract (article→markdown), meta | | Live search & answers | search (real web index), answer (web answer with citations), depth/news/images variants, suggest | | PDFs & media | pdf-to-markdown, pdf-merge/extract-pages/rotate, images-to-pdf, audio-convert, audio-normalize (EBU R128, real ffmpeg) | | Images | image-resize, image-convert, image-thumbnail, barcode-decode (jimp/zxing, pure-CPU) | | OCR | ocr-image (text out of any image — pure-CPU, no model) | | Geo | geo-distance, geo-bbox, geo-bearing, geo-geohash (vincenty / haversine — deterministic) | | Live data | fx-rate (ECB), barcode-lookup (Open Food Facts), gov-data (data.gov), weather-forecast/weather-alerts, earthquakes (USGS) | | Finance & crypto | stock-quote/stock-history/stock-earnings (Yahoo), crypto-price/crypto-market/crypto-history/crypto-trending/crypto-global (CoinGecko) | | Macro (FRED + more) | yield curve, treasury, fiscal, Fed funds, CPI, unemployment, Sahm rule, ECB FX, World Bank, FRED bulk release observations | | SEC EDGAR | ticker→CIK, filing list, 10-K/10-Q text, XBRL frames, insider transactions, 13F holdings, IPO calendar, full-text search | | Network truth | dns, tls-cert, whois, http-check, robots-check, email-validate, ip-info | | Crypto & payments | usdc-balance, tx-status, gas-estimate, ens-resolve, x402-quote/verify, transfer-authorization — non-custodial, multi-chain (Base/Polygon/Arbitrum/Optimism/Ethereum) | | Agent memory | wallet-keyed KV + TTL, atomic counters, cross-wallet grants, hash-chained audit log, similarity recall | | Stats & forecasting | stats-summary, stats-correlation, linear-regression, moving-average, outliers; forecast-naive/ses/holt/holt-winters + forecast-eval (MAPE/RMSE backtest) | | Finance math | compound-interest, loan-payment, amortization, npv, irr (pure-CPU, deterministic) | | Compression | gzip/gunzip, brotli-compress/decompress, compress-compare (algorithm shootout, pure-CPU via node:zlib) | | HTML extraction | html-select (CSS query), html-table, html-strip, html-links, html-meta — deterministic counterpart to extract | | Network ops | dns-lookup, dns-propagation, spf/dmarc/dkim checks, email-deliverability; cert-transparency, http-headers (security audit), tech-stack, asn-info (IP geo) | | ~1,000 pure-CPU utilities | hashing, JWT, base58, JSON⇄CSV/YAML, token-count, text-chunk, json-validate, text stats, cron math, validators, ~970 unit conversions |

Full schemas live in /openapi.json; a machine-readable catalog is at /api/pricing and /llms.txt. Don't know which tool you need? /api/find?q= resolves a task description to the right tool — route, price, schema, and a ready example — so an agent skips the token-heavy "search around to find a tool" step.

Skill packs — 42 multi-tool workflows

For jobs that span several tools — "audit a domain", "diagnose deliverability", "work up a time-series", "peel an opaque blob" — Agent402 ships curated skill packs: ordered, typed sequences of tool calls with a Claude-ready prompt template. Callable as MCP prompts (prompts/listprompts/get { name, arguments }) or plain HTTP at /api/skill-packs/{slug}/prompt. A task-shaped query to search_tools returns the matching pack alongside individual tools.

| Featured pack | Chains | Use it for | |---|---|---| | security-audit | dns · dmarc · spf · dkim · cert-transparency · http-headers · tech-stack | Domain security posture | | trend-analysis | stock-history · fred-series · stats-summary · moving-average · linear-regression · outliers · correlation · forecast-eval | Quant workup on any time series | | structured-scrape | extract · render · html-select · html-table · html-strip · html-links · html-meta | Deterministic scraping decision tree | | decode-blob | jwt-decode · gunzip · brotli-decompress · base64 · hex · json-format · hash | Identify and peel any opaque string | | forecasting-bake-off | forecast-naive · ses · holt · holt-winters · forecast-eval | Rank 4 forecasters by RMSE, pick the winner | | document-intel | pdf-info · pdf-extract · image-ocr · barcode-decode · pdf-merge | PDF/OCR/barcode pipeline | | status-snapshot | dns · http-check · http-headers · tls-cert · robots | One-shot service-health sweep | | webhook-debug | json-format · jwt-decode · hmac-verify · json-schema-validate · time-render · redact · extract-entities | Triage a webhook payload |

All 42 packs at /skills · JSON index at /api/skill-packs.json · on MCP the packs appear under prompts/list so any MCP-aware client picks them up automatically.

x402 Index — Find · Route · Leaderboard

Agent402 is also the open routing + ranking layer for the whole x402 ecosystem: it crawls public x402 sellers (the local catalog + an auto-discovered set from the Coinbase CDP Bazaar, refreshed hourly) and exposes them through three free surfaces — same logic as /api/find: discovery primitives shouldn't cost money.

| Surface | What | |---|---| | GET /api/find?q={task} | Resolve a task to the best-matching tools (route, price, schema, ready example) | | POST /api/route | Smart Order Router: { query, top, include } → ranked tools across sellers (match score, then health, then price). include=external excludes Agent402 itself | | GET /api/leaderboard | On-chain ranking of every x402 seller by Base USDC settled volume (callsSettled, totalUsd, uniqueBuyers per seller). Pipeline: Bazaar → eth_getLogs → per-call ceiling → aggregate. Hourly snapshot | | /index | Public HTML dashboard: every seller, tool count, network, last-fetched, rolling health | | GET /api/index | JSON snapshot of the same data (totals, per-seller health/routable flags) |

# "I need an OCR tool — find me the cheapest healthy one anywhere on x402"
curl -X POST https://agent402.tools/api/route \
  -H 'content-type: application/json' \
  -d '{"query":"ocr image to text","top":5}'

# "Who are the most-used x402 sellers right now? (on-chain proof, not self-reports)"
curl 'https://agent402.tools/api/leaderboard?top=25&include=external'

Health-aware: sellers whose last few crawls errored are excluded from the router (a buyer routed to a dead seller wastes money). Healthier sellers also break ties at equal match score and price, so flaky-but-cheap sellers lose to reliable ones. Brand-new sellers (no history yet) get the benefit of the doubt.

Operators get 3-rail attribution on the dashboard (/api/stats, /__operator): USDC vs. proof-of-work vs. heartbeat-probe traffic are counted separately — and the heartbeat rail is gated on a POW_SECRET-signed token (not a spoofable User-Agent), so the operator view reflects real external demand.

From code, the [agent402-client](client) npm package wraps all of this — find() a tool, then call() it, paying automatically (a built-in proof-of-work for free tools, your x402 wallet for paid ones), with caching and idempotent retries:

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 world", algo: "sha256" });

Plug into your agent framework (zero-dep adapters)

If you're already on OpenAI / Anthropic / Vercel AI SDK / LangChain / LlamaIndex, skip the wiring — there's a drop-in package that turns the Agent402 catalog into native tool objects for your framework, with payment handled underneath (proof-of-work for free tools, x402+USDC when you pass an @x402/fetch):

| Stack | npm | Returns | |---|---|---| | OpenAI function-calling (chat.completions / Assistants v2 / Responses) | agent402-openai-tools | tools[] for tools: param | | Anthropic Messages API (tool_use) | agent402-anthropic-tools | tools[] for tools: param | | Vercel AI SDK (streamText / generateText) | agent402-ai-sdk | Record | | LangChain JS / LangGraph | agent402-langchain | DynamicStructuredTool[] | | LlamaIndex TS | agent402-llamaindex | FunctionTool[] | | Strands Agents (AWS Bedrock AgentCore) | agent402-strands | StrandsTool[] for new Agent({ tools }) | | Google ADK (Agent Development Kit) | agent402-google-adk | FunctionTool[] for ADK agents | | OpenAI Agents SDK | agent402-openai-agents | Agent tools for @openai/agents |

// e.g. OpenAI — every adapter has the same surface.
import OpenAI from "openai";
import { agent402Tools } from "agent402-openai-tools";

const openai = new OpenAI();
const { tools, execute } = await agent402Tools({ slugs: ["extract", "hash", "render"] });
const res = await openai.chat.completions.create({ model: "gpt-4o-mini", tools, messages: [...] });
// when the model returns a tool call: await execute(call.function.name, JSON.parse(call.function.arguments));

Already a Claude/MCP user? agent402-mcp is still the better path — paste https://agent402.tools/mcp into your client. The adapters are for direct API integrations where MCP isn't available. Sources: [adapters/](adapters).

Add your own tool (~15 lines)

A tool is just an object in a kit array. Drop this into any file in [src/tools/](src/tools) (e.g. append to AGENT_TOOLS in src/tools/agent-kit.js) and it's live — routed, schema-published, MCP-exposed, and covered by the "every tool answers its own example" CI check:

{
  route: "POST /api/reverse",
  name: "Reverse text",
  slug: "reverse",
  category: "text",
  price

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MikeyPetrillo](https://github.com/MikeyPetrillo)
- **Source:** [MikeyPetrillo/Agent402](https://github.com/MikeyPetrillo/Agent402)
- **License:** MIT
- **Homepage:** https://agent402.tools/

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.2.3 Imported from the upstream source.