# true402 MCP server

> Enables AI agents to access pay-per-call AI inference, web extraction, and on-chain token safety tools using USDC micropayments on Base.

- Repository: https://github.com/true402/mcp-server
- Page: https://hostedmcp.org/servers/true402/mcp-server
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 1.3.2

## Install

### Claude Code

```sh
claude mcp add --env 'WALLET_PRIVATE_KEY=<YOUR_WALLET_PRIVATE_KEY>' mcp-server -- npx -y @true402.dev/mcp-server
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@true402.dev/mcp-server"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<YOUR_WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@true402.dev/mcp-server"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<YOUR_WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp-server","type":"stdio","command":"npx","args":["-y","@true402.dev/mcp-server"],"env":{"WALLET_PRIVATE_KEY":"<YOUR_WALLET_PRIVATE_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@true402.dev/mcp-server"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<YOUR_WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp-server --env 'WALLET_PRIVATE_KEY=<YOUR_WALLET_PRIVATE_KEY>' -- npx -y @true402.dev/mcp-server
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp-server]
command = "npx"
args = ["-y", "@true402.dev/mcp-server"]

[mcp_servers.mcp-server.env]
WALLET_PRIVATE_KEY = "<YOUR_WALLET_PRIVATE_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'WALLET_PRIVATE_KEY=<YOUR_WALLET_PRIVATE_KEY>' mcp-server npx -- -y @true402.dev/mcp-server
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@true402.dev/mcp-server"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "<YOUR_WALLET_PRIVATE_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `WALLET_PRIVATE_KEY` | no | yes | Funded Base wallet private key for x402 payment signing (optional; without it, paid tools return the 402 requirements). |
| `MAX_PAYMENT_USDC` | no | no | Client-side per-call spend ceiling in USDC (default 0.10). The signer refuses to auto-pay a 402 whose amount exceeds this — protects the wallet from a hostile endpoint. |
| `SERVER_URL` | no | no | true402 API base (default https://true402.dev/api). Must be https (or localhost) — the signer refuses to send a payment over cleartext. |

## Tools (13)

- `list_models`: List every LLM model available through true402's pay-per-call inference, with live per-token pricing (3% over provider cost, min $0.0001/request). Returns each model's id, provider, and input/output token prices across OpenAI, Anthropic, Google, Groq, Mistral and Together — so an agent can pick a model and know the exact cost before paying via x402 (USDC on Base, no account or API key).
- `chat`: Send a chat completion request to an LLM via true402 (PAID x402 service, USDC on Base). Requires a funded wallet (WALLET_PRIVATE_KEY) on the MCP server.
- `seo_audit`: Audit a web page for SEO + GEO (generative-engine-optimization). Returns a structured JSON report: meta tags, an SEO score with per-category breakdown + issues, a GEO score with breakdown + issues, and a combined percentage. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `web_extract`: Fetch a URL and return its clean readable text, a light markdown rendering, all links (in document order), and metadata (title, description, word count, byte size). PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `link_preview`: Fetch a URL and return its link-preview / Open Graph unfurl card: title, description, image, siteName, type, canonical URL, favicon, and theme color (image/canonical/favicon resolved to absolute URLs). PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `robots_check`: Report a site's AI-crawler policy (GPTBot, ClaudeBot, Google-Extended, PerplexityBot, and ~15 other AI bots: allow | block | unspecified), plus declared sitemaps and whether an llms.txt is present. Pass any URL on the target site. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `headers_check`: Analyse a URL's HTTP security headers (HSTS, CSP, X-Frame-Options, and more) into a present/missing breakdown plus a 0-100 score, along with status, HTTPS flag, and server banner. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `token_safety`: Rug/honeypot safety check for an ERC-20 token on Base (on-chain reads, no API key): ERC-20 conformance, ownership renounce, mint capability, WETH/USDC liquidity depth (Uniswap V3 + Aerodrome), and a buy/sell honeypot simulation (a gas-free eth_call that round-trips a tiny WETH→token→WETH trade to catch tokens you can buy but not sell). Returns a 0-100 score + risk band + flags. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `new_pairs`: Recently-created Base DEX pairs (Uniswap V3 + Aerodrome) — fresh token launches for trading/sniper agents. Returns each new token, its quote (WETH/USDC), pool, fee|stable, block and approx age, newest first. Bundle with token_safety for a pre-trade rug/honeypot check. On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `liquidity_pulls`: Liquidity-pull / rug alerts on Base — liquidity-removal (Burn) events on recently-launched DEX pools (Uniswap V3 + Aerodrome). Returns the pool, token, and WETH/USDC amount removed (the rug magnitude), newest first — an early rug warning. Cross-check the token with token_safety. On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `whale_swaps`: Recent large ($-value) Base DEX Swap events (whale trades) on tracked pools — a whale-following / copy-trade signal. Returns the pool, dex, token, quote (WETH/USDC), USD size, direction (buy/sell of the non-quote token), block and approx age, newest first. On-chain log indexing, no API key. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `liquidity_history`: Observed liquidity history for one Base token, from true402's own DEX archive. Returns every pool indexed for it, every liquidity-removal event with the amount removed, block and transaction hash, and the OTHER tokens drained in the same transaction (one actor, several pools). Unlike a live honeypot simulation this answers what already happened — a pool drained last month simulates fine today if it was re-seeded. Every answer carries the exact block range the removal index covers, so 'none observed' is never a claim of safety. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.
- `tx_preflight`: Check a Base transaction BEFORE signing it. Send an UNSIGNED transaction and get three independent lenses: a simulation against current state (does it revert?), the decoded intent (is this an unlimited approval that outlives the trade?), and the counterparty's liquidity-removal history from true402's archive. Takes NO private key and NO signature, so the service cannot broadcast or front-run the transaction it inspects. Never returns 'safe': a clean result means these checks found nothing, and every response states its limits. PAID x402 service (USDC on Base) — needs a funded wallet on the MCP server.

## FAQ

### Do I need an API key to use this server?

No, the server uses a wallet-based identity system where the agent's wallet serves as its identity for micropayments.

### What happens if I don't provide a funded wallet?

The server will still function, but paid tools will return the specific payment requirements instead of failing.

### Do I need ETH to pay for tools?

No, you only need USDC on the Base network, as the facilitator sponsors the gas fees.

### How does the server handle new tools being added to the marketplace?

Tools are automatically discovered from the live catalog at startup, meaning new tools appear without needing a package update.
