---
title: "Claude Desktop"
description: "Add Horizon to Claude Desktop for conversational prediction market trading."
icon: "desktop"
---

Claude Desktop supports MCP servers natively. Add Horizon to trade prediction markets, check positions, and analyze markets through conversation.

## Setup

<Steps>
  <Step title="Install Horizon">
    ```bash
    pip install horizon-sdk[mcp]
    ```
  </Step>
  <Step title="Find your Python path">
    The Claude Desktop config needs the full path to your Python interpreter:

    ```bash
    which python
    # e.g., /Users/you/.pyenv/shims/python
    # or:   /opt/miniconda3/bin/python
    ```
  </Step>
  <Step title="Edit Claude Desktop config">
    Open Claude Desktop settings and navigate to the MCP configuration file:

    - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
    - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

    Add the Horizon server:

    ```json
    {
      "mcpServers": {
        "horizon": {
          "command": "/full/path/to/python",
          "args": ["-m", "horizon.mcp"],
          "env": {
            "HORIZON_API_KEY": "your-key",
            "HORIZON_EXCHANGE": "paper"
          }
        }
      }
    }
    ```

    <Note>
    Replace `/full/path/to/python` with the output of `which python`. Claude Desktop does not inherit your shell's PATH, so the full path is required.
    </Note>
  </Step>
  <Step title="Restart Claude Desktop">
    Quit and reopen Claude Desktop. You should see a hammer icon indicating MCP tools are available.
  </Step>
</Steps>

## Conversation Examples

### Morning portfolio check

```
You: How are my positions doing?

Claude: Let me check your trading engine.

Your engine has been running for 2 hours:
- Daily PnL: +$15.30
- 3 open positions:
  1. will-btc-hit-100k: 50 YES @ 0.52 → unrealized +$4.00
  2. fed-rate-cut-march: 20 NO @ 0.40 → unrealized +$1.20
  3. eth-above-5k: 15 YES @ 0.30 → unrealized -$0.90

No kill switch active. 5 open orders working.
```

### Research and trade

```
You: Find me prediction markets about the Fed on Kalshi

Claude: [calls discover_markets]

Found 4 Fed-related markets on Kalshi:
1. KXFED-26MAR19  - "Fed rate cut in March 2026?" (active)
2. KXFED-26APR30  - "Fed rate cut by April 2026?" (active)
3. KXFED-26JUN18  - "Fed rate cut by June 2026?" (active)
4. KXFED-26TOTAL  - "Total Fed cuts in 2026" (active)

Would you like to analyze any of these?
```

```
You: I think there's a 70% chance the Fed cuts in March. The market is at 55 cents.
    What's my optimal size with a $5000 bankroll?

Claude: [calls kelly_sizing]

Kelly analysis for your Fed March cut thesis:
- Your edge: +15 cents (70% vs 55%)
- Quarter Kelly size: 340 contracts at $0.55
- Expected edge per contract: $0.15
- Recommended: start with 100 contracts to test the thesis

Want me to place a buy order?
```

## For Live Trading

Update the env variables in the config to switch to a live exchange:

```json
{
  "mcpServers": {
    "horizon": {
      "command": "/full/path/to/python",
      "args": ["-m", "horizon.mcp"],
      "env": {
        "HORIZON_API_KEY": "your-key",
        "HORIZON_EXCHANGE": "polymarket",
        "POLYMARKET_API_KEY": "...",
        "POLYMARKET_API_SECRET": "...",
        "POLYMARKET_API_PASSPHRASE": "...",
        "POLYMARKET_PRIVATE_KEY": "0x..."
      }
    }
  }
}
```

<Warning>
Always test with `HORIZON_EXCHANGE=paper` first. Live trading submits real orders with real money.
</Warning>

## Troubleshooting

| Issue | Fix |
|-------|-----|
| No hammer icon | Check that the Python path is absolute and correct |
| "Module not found" | Ensure `horizon-sdk[mcp]` is installed in the Python environment at that path |
| Tools not appearing | Restart Claude Desktop after editing config |
| Connection timeout | Check `HORIZON_API_KEY` is set and valid |
