AI assistants (MCP)
KellyIQ runs a hosted Model Context Protocol server at https://api.kellyiq.com/mcp. It uses the same API key as the rest of the API, and an optimize through your assistant counts against the same daily allowance. Nothing to install on our side; you add one entry to your assistant’s settings.
1. Get your API key
In the app, open Settings → API and create a key (see the quickstart). Most setups below read it from an environment variable:
export KELLYIQ_API_KEY="kiqa_…" # macOS, Linux, Git Bash
$env:KELLYIQ_API_KEY = "kiqa_…" # Windows PowerShellThe shell commands below use the bash form ($KELLYIQ_API_KEY); in PowerShell write $env:KELLYIQ_API_KEY instead.
Claude Code
claude mcp add --transport http --scope user kellyiq https://api.kellyiq.com/mcp \
--header "Authorization: Bearer $KELLYIQ_API_KEY"Then run /mcp in a session to check it connected. --scope user makes it available in every project.
Cursor
In ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"kellyiq": {
"url": "https://api.kellyiq.com/mcp",
"headers": { "Authorization": "Bearer ${env:KELLYIQ_API_KEY}" }
}
}
}Restart Cursor after editing. The variable must be set in the environment Cursor starts from.
VS Code (GitHub Copilot)
In .vscode/mcp.json, or run MCP: Open User Configuration for all workspaces. VS Code asks for the key once and stores it securely:
{
"inputs": [
{ "type": "promptString", "id": "kellyiq-key", "description": "KellyIQ API key", "password": true }
],
"servers": {
"kellyiq": {
"type": "http",
"url": "https://api.kellyiq.com/mcp",
"headers": { "Authorization": "Bearer ${input:kellyiq-key}" }
}
}
}Gemini CLI
gemini mcp add --scope user --transport http --header "Authorization: Bearer $KELLYIQ_API_KEY" kellyiq https://api.kellyiq.com/mcpThis writes the entry, with the key, to your user settings (~/.gemini/settings.json). Keep --scope user: without it, the key is saved in the current project’s folder, where it can end up in a commit.
Claude Desktop
Claude Desktop reaches remote servers through the open-source mcp-remote bridge, which needs Node.js. In Settings → Developer → Edit Config:
{
"mcpServers": {
"kellyiq": {
"command": "npx",
"args": ["mcp-remote@latest", "https://api.kellyiq.com/mcp", "--header", "Authorization:${KELLYIQ_AUTH}"],
"env": { "KELLYIQ_AUTH": "Bearer kiqa_…" }
}
}
}Quit Claude Desktop completely and reopen it. (The header is split this way because Claude Desktop on Windows mangles arguments that contain spaces.)
2. Try it
Ask your assistant something like:
Size this slate with KellyIQ. Bankroll $1,000.
Dodgers -145 vs Padres +125, strong edge.
Cubs +120 vs Cardinals -140, moderate edge.It should call optimize_slate and show a stake for each bet. The assistant explains the numbers; the numbers themselves come from KellyIQ, from your odds and your view of each bet. KellyIQ does not choose bets or predict outcomes.
Tools
| Tool | What it does | Counts against the allowance |
|---|---|---|
optimize_slate | Size a slate: a stake for each bet, and the risk. Same as POST /v1/optimize. | Yes |
list_sports | The sports KellyIQ can size now, and their keys (GET /v1/sports). | No |
get_limits | Your plan, today’s usage and default settings (GET /v1/me). | No |
remove_vig | Fair probabilities with the margin removed (POST /v1/devig). | No |
implied_probability | The probability a price implies (POST /v1/implied-probability). | No |
kelly_single_bet | Kelly for one bet on its own (POST /v1/kelly). | No |
Each tool takes exactly the fields of the endpoint it calls, and returns the same result, so the API reference describes both.
If it does not connect
- 401 or “needs authentication”: the key is missing, mistyped or regenerated. Check the header starts with
Bearerand the variable is set where the assistant runs. - A tool returns an error: the assistant sees the API’s own error (for example
VALIDATION_ERRORnaming the field), so it can usually fix the call itself. See Errors. - “Not offered right now”: that sport is out of season. Ask the assistant to check
list_sports. - Still stuck? Email support@kellyiq.com with the assistant you use.