About KellyIQ
KellyIQ is a hosted betting-slate optimizer for people using scripts, spreadsheets, models, or AI assistants. It adjusts prices for bookmaker margin and sizes chosen bets together using fractional Kelly and exposure limits.
Key features
- 01Joint slate stake sizing
- 02Bookmaker-margin adjustment
- 03Per-bet and total exposure limits
- 04Python and JavaScript examples
- 05Excel spreadsheet integration
Use cases
- 01Size a slate from model probabilities
- 02Import bets from CSV and export stakes
- 03Use an AI assistant to size a slate
MCP support
KellyIQ provides a hosted MCP server at https://api.kellyiq.com/mcp, exposing slate sizing as a tool for AI assistants. Claude connects by signing in; coding tools use an API key.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://api.kellyiq.com/mcpclaude mcp add --transport http com-kellyiq-kellyiq https://api.kellyiq.com/mcp{"mcpServers":{"com-kellyiq-kellyiq":{"type":"http","url":"https://api.kellyiq.com/mcp"}}}Open in Cursor{"servers":{"com-kellyiq-kellyiq":{"type":"http","url":"https://api.kellyiq.com/mcp"}}}Open in VS Code{"mcpServers":{"com-kellyiq-kellyiq":{"type":"http","url":"https://api.kellyiq.com/mcp"}}}{"mcpServers":{"com-kellyiq-kellyiq":{"serverUrl":"https://api.kellyiq.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
https://api.kellyiq.com/mcpAuth requiredTools
Details
From the project READMEKellyIQ examples
Working examples for the KellyIQ API: size a whole sports betting slate as one portfolio from your own scripts, models, spreadsheets and AI assistants.
You send your bankroll and the bets you have chosen, with your view of each. KellyIQ removes the bookmaker's margin from each price, applies your view, and returns a dollar stake for every bet, sized across the slate together under per-bet and total-exposure limits.
Get a key
Create an API key in the KellyIQ app under Settings → API. Every plan includes API access, Free included, each with its own daily allowance. Then:
export KELLYIQ_API_KEY="kiqa_..."
Recipes
Each recipe is a complete script in Python (requests) and JavaScript (Node 18+, no packages).
| Recipe | What it shows |
|---|---|
first-optimize | Size a three-bet slate and read every part of the result |
slate-from-csv | Keep your slate in a spreadsheet: CSV in, CSV of stakes out (slate.csv) |
reproducible-results | Get exactly the same answer again with the returned seed |
handling-limits | Back off and retry on rate limits and a busy server |
cd recipes
python first-optimize.py # or: node first-optimize.mjs
Each recipe has a walkthrough in the docs: Recipes.
Python package
pip install kellyiq (kellyiq-python): the same API with
specific exceptions for each error and automatic retries when the server is busy.
| Example | What it shows |
|---|---|
python/size-a-slate.ipynb | A notebook: stakes, the probabilities behind them, and the risk at each Kelly fraction, as tables |
python/slate_from_csv.py | CSV in, CSV of stakes out, with each error handled (slate.csv) |
python/size_from_model.py | Your model's probabilities in, stakes merged back into the DataFrame (model_output.csv); needs pandas |
python/nba_home_teams.py | A real NBA slate (DraftKings prices, Oct 30, 2026) sized with every home team at the same assumed Moderate Edge (nba_2026-10-30.csv); needs pandas |
Guide: Python SDK.
Excel
spreadsheets/kellyiq-slate.xlsx: enter your bankroll and your
bets, press Ctrl+Alt+F5, and get a stake for every bet with a summary of the slate. No macros, and your API key stays in a
file on your computer, never in the workbook. Excel for Windows. Setup: spreadsheets/.
Benchmark
benchmarks/slate-sizing: three NBA slates sized by cap-then-scale, by
the exact constrained optimum and by KellyIQ, scored by exact expected log growth. The slates, the
scoring script and every stake are included so you can rerun it.
AI assistants (MCP)
KellyIQ runs a hosted MCP server at https://api.kellyiq.com/mcp, so your assistant can size a
slate as one of its tools. Claude connects by signing in; coding tools use an API key, with
ready-to-use configs in mcp/:
| Assistant | Setup |
|---|---|
| Claude (web, desktop, mobile) | Settings, Connectors, Add custom connector, paste the URL, then Connect and sign in |
| Claude Code | mcp/claude-code.md |
| Cursor | mcp/cursor.json |
| VS Code (GitHub Copilot) | mcp/vscode.json |
| Gemini CLI | mcp/gemini-cli.md |
Full guide: AI assistants (MCP).
Skills
skills/analyze-my-slate teaches the assistant to collect your
slate in one message, confirm before using an optimize, and explain the stakes and the risk.
Install steps for Claude and Claude Code: skills/.
Docs and support
- Quickstart, API reference, OpenAPI spec
- [email protected] (include the
requestIdfrom any error)
Keep your key out of code you commit or share; every example here reads it from the environment.
KellyIQ sizes the bets you choose; it does not choose bets or predict outcomes. Results are calculations, not betting advice. 21+, where legal.
The examples are MIT licensed. The KellyIQ optimizer itself runs as a hosted service.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.