The Model Context Protocol (MCP) is the emerging standard for how AI agents discover and call tools. Agent402 supports MCP in three ways: a hosted HTTP endpoint, an npm package for local use, and direct integration with Claude Code.
Hosted MCP endpoint
Correction (2026-10-02): the connector's tools were renamed to dotted names (the old names still answer as aliases), and paid tools on the hosted connector are paid with an MPP credential in the call's _meta, not an x402 header. The list and the payment sentence below are updated.
The simplest way to connect: point your MCP client at https://agent402.tools/mcp. This endpoint exposes catalog tools plus a set of flagship tools:
- catalog.search - find tools by keyword or task description
- catalog.find - resolve a task to the best-matching tool
- catalog.call - execute any tool with input parameters
- server.describe - get platform info and capabilities
The hosted endpoint handles PoW challenges internally, so pure-CPU tools are effectively free through MCP. A wallet-only tool called on the connector without payment answers with a readable tool result that carries the MPP challenges in _meta["org.paymentauth/payment-required"]; an MPP client pays it by retrying with the credential in the call's _meta["org.paymentauth/credential"]. (Updated 2026-10-11 to the connector's current answer; see MCP payments.)
Claude Code setup
To add the hosted connector to Claude Code, run:
claude mcp add --transport http agent402 https://agent402.tools/mcp
Once connected, Claude Code can search all 500+ tools, find the right one for a task, and call the free proof-of-work ones directly. Paid tools need a client that can pay: run the npm package below with AGENT_KEY set to a funded EVM key. The catalog.search and catalog.find tools help the agent discover relevant tools without needing to know the full catalog.
npm package (local / stdio)
To pay for tools from your own wallet, install the agent402-mcp npm package:
npm install -g agent402-mcp
Then configure it as a stdio MCP server in your client:
{
"mcpServers": {
"agent402": {
"command": "agent402-mcp",
"args": [],
"env": { "AGENT_KEY": "0xYOUR_FUNDED_KEY" }
}
}
}
Use a new wallet holding only a few dollars of USDC. Never your main wallet.
The npm package reads the live catalog from agent402.tools at startup and sends each call to the hosted API, signing the payment from your wallet underneath. It works with any MCP client that supports stdio transport - Claude Code, Cline, Continue, and others.
Framework adapters
Beyond MCP, we publish framework-specific adapters for direct integration: OpenAI, Anthropic SDK, Vercel AI SDK, LangChain, LlamaIndex, Google ADK, OpenAI Agents, and AWS Strands. Each adapter wraps Agent402 tools in the framework's native tool format, so you can drop them into existing agent code without protocol translation.
All adapters and the MCP package are open source and published on npm. Check the GitHub repo for the latest versions.