This file tells an AI coding agent how to install the Agent402 MCP server
into the client the user is running, with no API keys and no signup. The
hosted instance (https://agent402.tools) is free for the pure-CPU tools
(it pays a tiny proof-of-work for you); paid tools cost a few cents in USDC
on Base via the x402 protocol.
If the user has not stated a client, ask. Otherwise pick the matching section below and apply the config.
Run once in the user's project directory:
claude mcp add agent402 -- npx -y agent402-mcpTo use the hosted server instead of the npm package:
claude mcp add --transport http agent402 https://agent402.tools/mcpEdit claude_desktop_config.json (Settings → Developer → Edit Config) and
add to mcpServers:
{
"mcpServers": {
"agent402": {
"command": "npx",
"args": ["-y", "agent402-mcp"]
}
}
}For the hosted connector instead: claude.ai → Settings → Connectors → Add
custom connector → https://agent402.tools/mcp.
Open the Cline MCP Servers panel and add:
{
"mcpServers": {
"agent402": {
"command": "npx",
"args": ["-y", "agent402-mcp"],
"disabled": false,
"autoApprove": []
}
}
}Settings → MCP → Add new MCP server:
{
"mcpServers": {
"agent402": {
"command": "npx",
"args": ["-y", "agent402-mcp"]
}
}
}Add to .vscode/mcp.json in the workspace, or to the user-level mcp.json:
{
"servers": {
"agent402": {
"command": "npx",
"args": ["-y", "agent402-mcp"]
}
}
}Five MCP tools that cover all 500+ underlying Agent402 tools:
search_tools(query)- lexical search across the catalog. Task-shaped queries also return matching multi-tool skill packs, which the server publishes as MCP prompts (prompts/list/prompts/get).call_tool(slug, input)- invoke any tool; the server handles proof-of-work (free tier) or x402 payment (paid tier) under the hood.payment_info- which mode the server is in (proof-of-work or wallet), the spend caps in force, what has been spent, and what a wallet unlocks.list_top_sellers- the live x402 seller leaderboard by settled USDC. Free to call, no payment and no proof-of-work.route_and_execute(task, params, maxUsd)- reach a tool OUTSIDE this catalog: Agent402 resolves a proven external x402 seller, pays it on your behalf, and relays the result markeduntrustedContent. Needs a funded wallet. Flat routing fee by rung: $0.01 for an underlying seller at $0.005 or less, $0.05 up to $0.04, $0.55 up to $0.50.
Pure-CPU tools (200+ of them - hashing, encoding, parsing, regex, date math, validators, converters, geo math) are free via proof-of-work and need no wallet. Paid tools (browser rendering, web search, PDF tooling, live data, crypto reads) mostly cost $0.001–$0.02 in USDC on Base (or Solana/Polygon/Arbitrum/Monad/Celo/Avalanche/Sei/Optimism/Stellar/Algorand
- plus USDG on Robinhood Chain, 12 chains in all); multi-tool skill packs
run up to $1.50. See
https://agent402.tools/api/pricingfor exact prices.
After install, ask the agent to run a free tool - e.g. "use agent402 to
hash the string hello world with sha256". A successful response means
the MCP wiring + free tier are working.
Clone and run in free mode (no payments, no wallet):
git clone https://github.com/MikeyPetrillo/Agent402 && cd Agent402
npm install
FREE_MODE=true npm start # → http://localhost:3000 (HTTP API + /mcp)Point the MCP client at http://localhost:3000/mcp instead of the npm
package.