# MagicMarkets MCP server

> Enables AI agents to access live sports prediction markets, stream prices, and manage betting orders and positions.

- Repository: https://github.com/magicmarkets/magicmarkets-cli
- Page: https://hostedmcp.org/servers/magicmarkets/magicmarkets-cli
- Transport: remote
- Stars: 1
- License: MIT
- Latest version: 1.0.0

## Install

### Claude Code

```sh
claude mcp add --transport http magicmarkets-cli https://magicmarkets.com/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "magicmarkets-cli": {
      "url": "https://magicmarkets.com/mcp"
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "magicmarkets-cli": {
      "type": "http",
      "url": "https://magicmarkets.com/mcp"
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"magicmarkets-cli","type":"http","url":"https://magicmarkets.com/mcp"}'
```

### Codex

```sh
codex mcp add magicmarkets-cli --url https://magicmarkets.com/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.magicmarkets-cli]
url = "https://magicmarkets.com/mcp"
```

### Gemini CLI

```sh
gemini mcp add -s user --transport http magicmarkets-cli https://magicmarkets.com/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "magicmarkets-cli": {
      "url": "https://magicmarkets.com/mcp",
      "type": "http"
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MAGICMARKETS_ALLOW_TRADING` | no | no |  |
| `MAGICMARKETS_API_KEY` | no | no |  |

## FAQ

### How do I authenticate with MagicMarkets?

You can authenticate using a single API key created in your account settings. For the hosted MCP endpoint, it uses OAuth authentication.

### What is a heartbeat in MagicMarkets?

A heartbeat acts as a dead-man's switch that automatically closes all open orders if it is not refreshed before it expires, protecting against crashes during automated trading.

### How does the betting process work?

The process involves two steps: first, creating a betslip to receive a live quote, and second, placing an order to commit a stake against that quote.
