npm package: @pelletfi/mcp
Description: Token intelligence on Base — MCP server with x402 micropayments
Latest version: 0.7.1

# @pelletfi/mcp

Token intelligence on Base for AI assistants. Market data, safety flags, contract forensics, and full briefings — accessible via [x402](https://x402.org) micropayments per call, or unlimited with a [Pellet Pro](https://pelletfi.com/pro) subscription ($49/mo, no per-call signing).

## Tools

| Tool | Description | Cost |
|------|-------------|------|
| `search_token` | Search by symbol or address | Free |
| `lookup_token` | Market data + safety flags | Free |
| `get_safety_flags` | Quick safety check | Free |
| `batch_lookup` | Batch market data + flag counts (up to 25 tokens) | Free |
| `pulse_tokens` | Lightweight monitoring signal + severity (up to 25 tokens) | Free |
| `get_contract` | Contract forensics (verification, ownership, risk score, flags) | $0.02 USDC or Pro |
| `analyze_token` | Full AI analysis (Claude reasoning, contract forensics, creator history) | $0.05 USDC or Pro |

## Try it

```bash
npx pelletfi BRETT
```

Add `--contract` ($0.02) or `--analyze` ($0.05) for paid features. Requires `EVM_PRIVATE_KEY` env var.

## Install

### Claude Code

```bash
# Free tools only
claude mcp add pellet -- npx -y @pelletfi/mcp

# With Pellet Pro subscription ($49/mo — pelletfi.com/pro)
claude mcp add pellet -e PELLET_KEY=pellet_pro_... -- npx -y @pelletfi/mcp

# With per-call x402 payments (funded EVM wallet)
claude mcp add pellet -e EVM_PRIVATE_KEY=0x... -- npx -y @pelletfi/mcp
```

### Cursor / Windsurf / .mcp.json

```json
{
  "mcpServers": {
    "pellet": {
      "command": "npx",
      "args": ["-y", "@pelletfi/mcp"],
      "env": {
        "PELLET_KEY": "pellet_pro_..."
      }
    }
  }
}
```

Use `PELLET_KEY` (Pro subscription, recommended) or `EVM_PRIVATE_KEY` (per-call x402). Omit both for free tools only.

## Configuration

| Variable | Required | Description |
|----------|----------|-------------|
| `PELLET_KEY` | For paid tools (recommended) | Pellet Pro Bearer key — bypasses x402 entirely. Get one at [pelletfi.com/pro](https://pelletfi.com/pro). |
| `EVM_PRIVATE_KEY` | For paid tools (alternative) | Private key for x402 micropayments on Base. Pay per call. |
| `PELLET_API_URL` | No | Override API URL (default: `https://pelletfi.com`) |

`PELLET_KEY` and `EVM_PRIVATE_KEY` are alternatives — set whichever fits your usage. If both are set, the Pro key is used.

## How payments work

Two modes:

**Pro subscription (recommended for production agents):**
1. Subscribe at [pelletfi.com/pro](https://pelletfi.com/pro) — connect wallet, sign one $49 USDC transaction on Base
2. Receive an API key starting with `pellet_pro_`
3. Drop it in `PELLET_KEY` and every paid tool call sends `Authorization: Bearer pellet_pro_...` — no per-call signing
4. 10,000 cached briefings/month, 500 req/hr rate limit, 30 days

**Per-call x402 (recommended for ad-hoc / try-before-you-buy):**
1. Fund a Base wallet with USDC
2. Set `EVM_PRIVATE_KEY` to its private key
3. The server signs each individual call ($0.02 contract, $0.05 analysis)
4. No subscription, pay only when used

Free tools (`search_token`, `lookup_token`, `get_safety_flags`, `batch_lookup`, `pulse_tokens`) never trigger payments in either mode.

## Links

- [pellet.fi](https://pelletfi.com)
- [x402scan listing](https://www.x402scan.com/server/a5d704ec-9b46-4b1e-8f19-cd47de71bf06)
- [API docs](https://pelletfi.com/v1/openapi.json)