odds-mcp
MCP server for odds data that provides tools to query consensus odds, fair prices, and outliers, and to safely propose, approve, and publish boosts with audit logging.
README
odds-mcp
An MCP server over odds data where every read names its evidence and the one write is impossible without an approval token.
Model Context Protocol is how an LLM agent gets tools. The dangerous part is never the reads - it is the one tool that does something. This server demonstrates the pattern that makes side-effectful agent tools safe enough to exist: a risk envelope checked before a human ever sees the request, a single-use approval token issued by a separate step, a publish that cannot happen without it, and an append-only audit log that records every attempt - especially the refused ones.
Data comes from odds-consensus: 5 books normalized into one schema, de-margined fair prices, and a cross-book consensus view. This repo is the integration surface on top.
MCP client (Claude, any agent)
│ tools
▼
odds-mcp server ──── reads ────> store.py (consensus / fair price / outliers)
│ ▲
└──── the one write ────> gate.py propose → approve → publish
│ (envelope · token · audit)
└──────> out/audit_log.jsonl
Tools
| Tool | Kind | Behavior |
|---|---|---|
list_events |
read | events in the snapshot |
get_consensus |
read | books per market, price ranges, median fair odds, outliers |
get_fair_price |
read | one market's fair price — or an explicit not-found with the valid alternatives. Ambiguous line? It asks. Single book? "A single book is not a consensus." Never a guess. |
find_outliers |
read | books off the consensus median, with exact deviation % |
get_pipeline_health |
read | counts plus every upstream devig refusal — what the snapshot does not cover |
propose_boost |
write-intent | checked against the risk envelope (max % over fair, stake cap) before a human sees it; refusals carry the reason |
approve_proposal |
human gate | issues a single-use approval token (production: a trader's Telegram approval card; same gate logic) |
publish_boost |
write | requires proposal id + matching token; token dies on use; replay fails |
get_audit_trail |
read | the append-only log of every attempt and outcome |
Run it
pip install -r requirements.txt
python -m pytest tests/ -q # 13 tests
PYTHONPATH=src python -m odds_mcp.server # stdio MCP server
Claude Desktop config:
{"mcpServers": {"odds": {"command": "python", "args": ["-m", "odds_mcp.server"],
"cwd": "<this repo>", "env": {"PYTHONPATH": "src"}}}}
What the tests pin down
- Publishing without approval: refused. Wrong token: refused. Replaying a used token: refused. (Tokens are single-use and compared constant-time.)
- A boost priced above the envelope (default: 5% over consensus fair) is refused at propose time, with the arithmetic in the reason.
get_fair_priceon a market with two live lines demands an explicitlineinstead of picking one; on a single-book market it refuses to call one price a "consensus".- Every attempt - including every refusal - lands in the audit log.
- All 9 tools are actually registered on the server (test asserts the exact set).
Why this shape
An agent that can only read is safe but useless; an agent that can write is useful but dangerous. The resolution is not "trust the model" - it is structure: envelope, then human, then token, then audit. The model can draft; only the gate can act; and the log never forgets.
MIT licensed. Part of a set of small, honest data gates: jigonyoo.com.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。