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 [email protected]

Example

{
  "mcpServers": {
    "agent402": {
      "command": "npx",
      "args": ["-y", "[email protected]"],
      "env": { "AGENT_KEY": "0xYOUR_EVM_PRIVATE_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 and server.describe for orientation and spend caps; sellers.list for the live seller leaderboards, listed when a wallet or credits key is set.
  • 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: a credits key bought earlier, sent as 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 is on by default ($4 per call, off disables it) and AGENT402_BUDGET is an opt-in session cap; both are enforced on the payment that is signed. The hosted /mcp connector is also payable over MPP from an mppx-wrapped MCP client.
# Paste this prompt into Claude Code to install and check the connector:
# "Add the agent402 MCP server with claude mcp add --transport http agent402 https://agent402.tools/mcp, then call server.describe and tell me what it returns."

# Claude Code, hosted connector (no install; proof-of-work tools)
claude mcp add --transport http agent402 https://agent402.tools/mcp

# Claude Code, local server paying from a wallet
# Use a new wallet holding only a few dollars of USDC. Never your main wallet.
claude mcp add agent402 -e AGENT_KEY=0x... -- npx -y [email protected]

# no AGENT_KEY: the local server still runs the pure-CPU tools by proof-of-work

A paid call that ends in any status of 400 or above is not charged over x402: settlement runs after the tool and only on a successful response. Background: Payments over MCP · MPP (Machine Payments Protocol).

Tools to try first

Every tool, price and input schema: our tools.

Links