@tools402/mcp
v0.2.2
Published
MCP stdio server for tools402 — 146 AI agent tools auto-exposed from /v1/_meta (pay-per-use, USDC on Base)
Readme
@tools402/mcp
MCP stdio server — exposes all 146 tools402 endpoints as MCP tools, auto-fetched from /v1/_meta.
Install in 30 seconds
Add tools402 to your AI client by pasting the config snippet below. No account, no API key — just a session token you generate once.
Claude Desktop
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Config file: %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"tools402": {
"command": "npx",
"args": ["-y", "@tools402/mcp"],
"env": { "TOOLS402_SESSION_TOKEN": "<paste-here>" }
}
}
}Cursor
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"tools402": {
"command": "npx",
"args": ["-y", "@tools402/mcp"],
"env": { "TOOLS402_SESSION_TOKEN": "<paste-here>" }
}
}
}Cline
Open VS Code → Extensions → Cline → Settings (gear icon) → MCP Servers → Edit MCP Settings.
Config file: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (macOS)
{
"mcpServers": {
"tools402": {
"command": "npx",
"args": ["-y", "@tools402/mcp"],
"env": { "TOOLS402_SESSION_TOKEN": "<paste-here>" }
}
}
}Quick install (macOS/Linux)
One-liner: generates a session token and merges tools402 into your Claude Desktop config without overwriting existing MCP servers.
SESSION=$(npx tools402-authorize --amount 10 --days 30 --private-key 0x<your-base-wallet-key>) && \
jq --arg t "$SESSION" \
'.mcpServers.tools402 = {command:"npx",args:["-y","@tools402/mcp"],env:{TOOLS402_SESSION_TOKEN:$t}}' \
~/Library/Application\ Support/Claude/claude_desktop_config.json > /tmp/c402.json && \
mv /tmp/c402.json ~/Library/Application\ Support/Claude/claude_desktop_config.json
jqmerges thetools402key into an existingmcpServersobject — other servers are untouched. Install jq if needed:brew install jq(macOS) orapt install jq(Debian/Ubuntu).
Detailed setup
Step 1 — Generate a session token (runs locally, private key never transmitted):
npx tools402-authorize --amount 10 --days 30 --private-key 0x<your-base-wallet-key>Output:
TOOLS402_SESSION_TOKEN=eyJ...This token authorizes tools402 to pull up to 10 USDC from your wallet over 30 days. Worst case: lose 10 USDC before expiry. tools402 pays gas (~$0.00001/call).
Step 2 — Paste the token into <paste-here> in your client config above, then restart the client.
Environment variables
| Var | Required | Default |
|-----|----------|---------|
| TOOLS402_SESSION_TOKEN | Yes | — |
| TOOLS402_BASE_URL | No | https://api.tools402.dev |
How it works
Your wallet tools402
│ │
│ sign EIP-3009 locally │
│ (private key stays here)│
├─ TOOLS402_SESSION_TOKEN ─►│
│ │ transferWithAuthorization()
│ ├─────────────────► Base mainnet
│ │ tools402 pays gas (~$0.00001)
│◄─────── API response ────┤No account. No API key. No KYC. Each call is 0.001–0.05 USDC, verifiable on-chain.
