> ## Documentation Index
> Fetch the complete documentation index at: https://syntalic.com/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 or social question, the MCP pays and returns the answer.

## Install

Requires Node.js 20 or later. The server runs locally over stdio; its [source code and changelog](https://github.com/Syntalic/mcp-server) are public.

```bash theme={null}
npx -y @syntalic/mcp-server@latest --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

Setup adds the server to Claude Code as `npx -y @syntalic/mcp-server@latest`, so every start runs the newest release. Setup before 0.14.0 left out `@latest`, and `npx` can keep running an older cached release. If you set up before then, re-add it:

```bash theme={null}
claude mcp remove -s user syntalic
claude mcp add -s user syntalic -- npx -y @syntalic/mcp-server@latest
```

After setup, fund the wallet with USDC on Solana or Base, or USDC.e on Tempo:

```bash theme={null}
# Back up your generated wallet before funding; run privately, never in logs
npx @syntalic/mcp-server@latest --export-keys

# Show your wallet addresses, balances, and config
npx @syntalic/mcp-server@latest --info
```

Calls cost \$0.01 to \$0.05 each, so a few dollars buys hundreds of queries. See [Pricing](https://syntalic.com/docs/reference/pricing.md).

> [!WARNING]
>
> Use a dedicated agent wallet, not your primary wallet. The MCP only needs a small balance to operate.

## Bring your own keys

To pay from your own keys instead of a generated wallet, set both env vars and run setup:

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

When setup asks how to set up, type **2** ("Use your own private keys"): it then creates no wallet and only wires the MCP into Claude Code. Pressing Enter, or passing `--yes`, picks option 1 and generates a wallet anyway. If a wallet file already exists, setup doesn't ask and prints that wallet's addresses. Either way the server pays from your keys, so don't fund the addresses setup prints.

When both are set, the wallet file (`~/.syntalic/wallet.json`) is ignored entirely. Both env vars are required together — setting only one is an error. Make sure your MCP client process also receives both variables; exporting them in one terminal does not persist them to unrelated processes. Never commit keys to your MCP configuration or share exported keys.

## Manual MCP config

For Cursor or any other MCP client, or if you skipped the Claude Code step in setup, add this to the client's MCP configuration:

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

## Choosing the tool set

By default the MCP offers 17 tools: six free discovery tools and eleven paid [measure tools](https://syntalic.com/docs/reference/mcp-tools.md#measure-tools), one per [measure](https://syntalic.com/docs/reference/measures.md). To use the per-route tools instead (`best_price`, `price_positioning`, `ontology_resolve` and the rest; 39 tools, the 0.12 set without the unavailable inflation tool), set `SYNTALIC_TOOLS=routes`:

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

The value is case-insensitive and whitespace is trimmed; unset or empty selects `measures`. Any other value stops the server at startup. Use `@syntalic/mcp-server@latest` to avoid unintentionally running an older cached version. See the [changelog](https://github.com/Syntalic/mcp-server/blob/main/CHANGELOG.md) for recent changes.

## Which chain pays

The MCP tries Solana, then Base, then Tempo. Solana and Tempo are skipped when a balance pre-check shows too little; Base has no pre-check. After a payment attempt, the MCP moves to the next chain on insufficient balance, a network error, or a settlement response it cannot read. Any other rejected payment stops the request, and an API error returned after payment is passed back without trying another chain. Base and Tempo use the same EVM address.

* In automatic mode an unreadable Solana balance is skipped. If pinned to Solana, the MCP attempts payment even if the balance cannot be read. A dedicated `SYNTALIC_SOLANA_RPC_URL` can avoid public RPC rate limits.
* If the Tempo RPC is down, the MCP attempts the payment anyway. Balance checks use short timeouts.
* To pay on one chain only, set `SYNTALIC_PAYMENT_NETWORK` to `solana`, `base` or `tempo`.

## Configuration

All variables are optional; a wallet is generated on first run.

| Env var | Purpose |
| - | - |
| `SYNTALIC_EVM_PRIVATE_KEY` | EVM key (Base and Tempo), instead of the wallet file |
| `SYNTALIC_SOLANA_PRIVATE_KEY` | Solana key, instead of the wallet file |
| `SYNTALIC_API_BASE` | API base URL (default `https://api.syntalic.com`, HTTPS required) |
| `SYNTALIC_SOLANA_RPC_URL` | Solana RPC for balance checks and for building Solana payments (default: the public mainnet-beta RPC) |
| `SYNTALIC_BASE_RPC_URL` | Base RPC for the balances `wallet_info` shows (default `https://mainnet.base.org`) |
| `SYNTALIC_TEMPO_RPC_URL` | Tempo RPC for balance checks (default `https://rpc.tempo.xyz`) |
| `SYNTALIC_PAYMENT_NETWORK` | Pay on one chain: `solana`, `base` or `tempo` |
| `SYNTALIC_PAYMENT_TRACE` | `1` prints one stderr line per paid call: the chain, the payer and the transaction |
| `SYNTALIC_TOOLS` | `measures` (default) or `routes`; see above |

RPC addresses must use HTTPS (localhost is allowed); any other address is ignored and the default is used. `SYNTALIC_PAYMENT_NETWORK` must be `solana`, `base` or `tempo`; any other value is an error.

## CLI commands

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

## What's next

> [card] [Available tools](https://syntalic.com/docs/reference/mcp-tools.md)
>
> The 17 default tools — six free, eleven measures — with example prompts.

> [card] [Direct HTTP](https://syntalic.com/docs/integrate/http.md)
>
> Skip the MCP and call the API directly with x402.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.