igaming-odds-mcp
MCP server providing deterministic betting odds tools including conversions, margin, parlay pricing, settlement, and Kelly staking.
README
igaming-odds-mcp
An MCP server that gives an AI assistant a set of exact, deterministic betting-odds tools: format conversions, bookmaker margin, parlay pricing, bet settlement, and Kelly staking. All the money math is integer-cents and floor-rounded, the same discipline a real settlement ledger uses.
It pairs with a companion project, bet-settlement-service, which settles bets on a double-entry ledger.
Tools it exposes
convert_odds converts a price between decimal, fractional, American and implied probability. bookmaker_margin works out the overround of a market and the fair odds once the margin is stripped out. parlay_odds combines several legs into one accumulator price. settle_single returns the return and profit in integer cents for a single bet. settle_accumulator settles a multi-leg accumulator, where any losing leg loses the whole bet and void legs drop to 1. settle_each_way settles an each-way bet, win and place parts separately. kelly_stake works out a Kelly-criterion stake for a given edge; a negative edge just recommends no stake at all.
Every input goes through a strict Zod schema, so bad odds (a decimal at or below 1, a probability outside 0 to 1, American at 0) come back as a readable tool error instead of a crash.
Install
pnpm install
pnpm build
pnpm test # 22 tests: pure math + a real MCP handshake over stdio
Using it from Claude Desktop
Add this to claude_desktop_config.json (on macOS that's ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"igaming-odds": {
"command": "node",
"args": ["/absolute/path/to/igaming-odds-mcp/dist/index.js"]
}
}
}
Then just ask things like "convert 3/2 to American odds", "what's the margin on a 1.90 / 1.90 market", or "Kelly stake for decimal 2.0 at a true 60% with a $1000 bankroll" and it calls the tools instead of guessing at the math.
Example
Calling bookmaker_margin with decimalOdds [1.9, 1.9] returns:
{
"overround": 1.052632,
"marginPct": 5.2632,
"fairDecimalOdds": [2, 2],
"fairProbabilities": [0.5, 0.5]
}
A couple of implementation notes
All the logic is pure functions in src/odds.ts; the tool layer only validates input and formats output. Money stays as integer cents and rounding always favors the house, which is asserted in the tests, matching the rule a real settlement engine would follow. Odds convert to exact fractions through a bounded continued-fraction approximation, so something like 1.3333 round-trips to 1/3 instead of some ugly exact decimal.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.