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

# MCP Server

> Use Arbiter with Claude, Cursor, Copilot, and other AI assistants

# MCP Server

The Arbiter MCP server gives AI assistants direct access to live prediction market data. Ask your AI about market prices, trades, whale activity, and more — it calls the Arbiter API for you.

20 tools covering markets, trades, candles, orderbooks, events, wallets, whales, and cross-platform matching.

## Quick Start

**1. Install the package:**

```bash theme={null}
npm install @arbiterapi/mcp
```

**2. Find the installed path:**

```bash theme={null}
node -e "console.log(require.resolve('@arbiterapi/mcp'))"
```

This prints the absolute path (e.g. `/Users/you/project/node_modules/@arbiterapi/mcp/build/index.js`). Use this path in the config below.

**3. Get your API key** at [arbiterapi.com/signup](https://arbiterapi.com/signup).

**4. Configure your AI assistant** (see below).

## Configuration

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "arbiter": {
      "command": "node",
      "args": ["/absolute/path/to/node_modules/@arbiterapi/mcp/build/index.js"],
      "env": {
        "ARBITER_API_KEY": "your-api-key"
      }
    }
  }
}
```

Replace `/absolute/path/to/` with the actual path from step 2.

### Claude Code

Add to `.mcp.json` in your project root (after running `npm install @arbiterapi/mcp` in that project):

```json theme={null}
{
  "mcpServers": {
    "arbiter": {
      "command": "node",
      "args": ["node_modules/@arbiterapi/mcp/build/index.js"],
      "env": {
        "ARBITER_API_KEY": "your-api-key"
      }
    }
  }
}
```

### Cursor

Go to **Settings > MCP Servers** and add:

```json theme={null}
{
  "command": "node",
  "args": ["/absolute/path/to/node_modules/@arbiterapi/mcp/build/index.js"],
  "env": {
    "ARBITER_API_KEY": "your-api-key"
  }
}
```

## Available Tools

### Markets

| Tool             | Description                                                 |
| ---------------- | ----------------------------------------------------------- |
| `list-markets`   | List markets across Polymarket and Kalshi, sorted by volume |
| `get-market`     | Get a single market by ID                                   |
| `search-markets` | Full-text search across market questions                    |
| `get-price`      | Current or historical price for a market                    |
| `get-orderbook`  | Live orderbook — bids, asks, spread                         |
| `get-trades`     | Trade history for a market                                  |
| `get-candles`    | OHLCV candlestick data                                      |

### Events & Cross-Platform

| Tool               | Description                                       |
| ------------------ | ------------------------------------------------- |
| `list-events`      | Events (grouped markets)                          |
| `get-event`        | Single event with child markets                   |
| `matching-markets` | Find the same event on both Polymarket and Kalshi |
| `sports-markets`   | Markets by sport and date                         |

### Wallets

| Tool                   | Description                        |
| ---------------------- | ---------------------------------- |
| `get-wallet`           | Wallet profile and trading metrics |
| `get-wallet-trades`    | Wallet trade history               |
| `get-wallet-pnl`       | Realized and unrealized PnL        |
| `get-wallet-positions` | Current open positions             |

### Whales

| Tool               | Description                                         |
| ------------------ | --------------------------------------------------- |
| `get-whale-trades` | Large trades across all markets                     |
| `get-whale-stats`  | Whale activity summary — count, volume, top markets |

### Platform Native

| Tool                 | Description                                                   |
| -------------------- | ------------------------------------------------------------- |
| `polymarket-markets` | Polymarket data with conditionId, clobTokenIds, outcomePrices |
| `kalshi-markets`     | Kalshi data with event\_ticker, yes\_bid\_dollars, volume\_fp |
| `platform-stats`     | Trade counts, markets covered, data range                     |

## Example Prompts

Once configured, try asking your AI assistant:

* "What are the top prediction markets right now?"
* "Show me whale trades in the last 24 hours"
* "How much whale volume was there today?"
* "List events on Polymarket"
* "Get the orderbook for this market: poly\_0x..."
* "What are the current NBA sports markets?"
