MCP server

agent402-mcp · npm · MIT

An MCP server for any MCP client (Claude Desktop, Claude Code, Cursor and others). Flagship tools are listed as first-class MCP tools and the rest of the catalog is reachable through catalog.search, catalog.find and catalog.call, with skill packs surfaced as MCP prompts. The hosted connector at /mcp needs no install at all.

Install

npx -y agent402-mcp

Example

{
  "mcpServers": {
    "agent402": {
      "command": "npx",
      "args": ["-y", "agent402-mcp"],
      "env": { "AGENT402_CREDITS_KEY": "a402_YOUR_KEY" }
    }
  }
}

What it exposes

  • Flagship tools under dotted names: web.search, web.answer, web.news, browser.render, market.quote, audio.transcribe, memory.read, memory.write.
  • catalog.search / catalog.find + catalog.call for the rest of the catalog, keeping the context window small.
  • payment.info, server.describe and sellers.list for orientation, spend caps and the live seller leaderboards.
  • Skill packs as MCP prompts (prompts/list, prompts/get).

How payment works

  • AGENT_KEY (EVM) or SOLANA_AGENT_KEY: the server signs an x402 payment on a chain the tool accepts and retries.
  • AGENT402_CREDITS_KEY: sends Authorization: Bearer a402_...; the list price is debited only on a 200.
  • Neither: the pure-CPU tools pay with proof-of-work (about 0.2 s of CPU).
  • AGENT402_MAX_PER_CALL and AGENT402_BUDGET are enforced before a payment is signed. The hosted /mcp connector is also payable over MPP from an mppx-wrapped MCP client.
# Claude Code, hosted connector (no install)
claude mcp add --transport http agent402 https://agent402.tools/mcp

# Claude Code, local server paying from a wallet
claude mcp add agent402 -e AGENT_KEY=0x... -- npx -y agent402-mcp

A call that fails is not charged: settlement runs after the tool and only on a successful response. Background: Payments over MCP · MPP (Machine Payments Protocol).

Tools to try first

Web search$0.02
search
Web answer$0.08
answer
News search$0.02
search-news
Browser render$0.02
render
Stock quote$0.001
stock-quote
Speech-to-text$0.030
transcribe

Every tool, price and input schema: the catalog.

Links

agent402-mcp on npm · source on GitHub
Guides: Use Agent402 from Claude Code, Cursor, VS Code, Windsurf, Cline, Roo Code, Codex CLI, Gemini CLI, Muse Code, Continue, ElizaOS, AgentCore and any OpenAI SDK · x402 and MPP on the same paywall: one server, two payment protocols
All integrations