> ## Documentation Index
> Fetch the complete documentation index at: https://crushrewards.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Use Syntalic in Claude Code, Cursor, or any MCP-compatible client.

The Syntalic MCP server lets AI agents call the Pricing Intelligence API as native tools. The MCP handles wallet setup, multi-chain payment routing, and protocol negotiation automatically — you ask Claude a pricing question, the MCP pays and returns the answer.

## Install

```bash theme={null}
npx @syntalic/mcp-server --setup
```

The interactive setup walks through:

1. Generating a multi-chain wallet (Solana + EVM), or skipping if you want to bring your own keys
2. Wiring the MCP into Claude Code

After setup, fund the wallet with USDC on any of Solana, Base, or Tempo:

```bash theme={null}
# Show your wallet addresses, balances, and config
npx @syntalic/mcp-server --info

# Back up your private keys before funding — mandatory
npx @syntalic/mcp-server --export-keys
```

Per-query pricing is \$0.01–\$0.02, so a few dollars buys hundreds of queries.

<Warning>
  Use a dedicated agent wallet, not your primary wallet. The MCP only needs a small balance to operate.
</Warning>

## Bring your own keys

Skip the auto-generated wallet by setting both env vars before running setup:

```bash theme={null}
export CRUSH_EVM_PRIVATE_KEY=0x<your_evm_private_key>
export CRUSH_SOLANA_PRIVATE_KEY=<your_solana_base58_key>
npx @syntalic/mcp-server --setup
```

When both are set, the wallet file is ignored entirely. Both env vars are required together — setting only one is an error.

## Manual MCP config

If your client doesn't support automatic MCP setup, add this to your MCP config:

```json theme={null}
{
  "mcpServers": {
    "syntalic": {
      "command": "npx",
      "args": ["-y", "@syntalic/mcp-server"]
    }
  }
}
```

## Multi-chain routing

The MCP holds USDC across Solana, Base, and Tempo. On every call, it tries chains in order (Solana → Base → Tempo) and uses the first one with sufficient balance. You don't need to think about which chain to fund — top up wherever's convenient.

If a chain's RPC is rate-limited or down, the MCP attempts payment anyway rather than blocking on RPC health. Requests never hang.

## Configuration

| Env var                    | Default                    | Purpose                              |
| -------------------------- | -------------------------- | ------------------------------------ |
| `CRUSH_EVM_PRIVATE_KEY`    | (auto)                     | Override EVM key (Base + Tempo)      |
| `CRUSH_SOLANA_PRIVATE_KEY` | (auto)                     | Override Solana key                  |
| `CRUSH_API_BASE`           | `https://api.syntalic.com` | API base URL (HTTPS required)        |
| `CRUSH_SOLANA_RPC_URL`     | mainnet-beta public RPC    | Custom Solana RPC for balance checks |
| `CRUSH_TEMPO_RPC_URL`      | `https://rpc.tempo.xyz`    | Custom Tempo RPC for balance checks  |

## CLI commands

| Command                    | Purpose                                         |
| -------------------------- | ----------------------------------------------- |
| `npx @syntalic/mcp-server` | Start the MCP server (default)                  |
| `... --setup`              | Interactive setup (wallet + Claude Code wiring) |
| `... --export-keys`        | Print private keys for backup                   |
| `... --info`               | Show addresses, balances, and config            |
| `... --help`               | Usage overview                                  |

## What's next

<CardGroup cols={2}>
  <Card title="Available tools" icon="wrench" href="/reference/mcp-tools">
    The 13 pricing tools the MCP exposes, with example prompts.
  </Card>

  <Card title="Direct HTTP" icon="code" href="/integrate/http">
    Skip the MCP and call the API directly with x402.
  </Card>
</CardGroup>
