MCP server: the rail AI agents use to trade prediction markets. Self-hosted, non-custodial, on-chain builder-code attribution + overshoot & dispute-risk signals.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add oddsrail -- python -m oddsrail{
"mcpServers": {
"oddsrail": {
"command": "python",
"args": ["-m", "oddsrail.server"]
}
}
}MCP Servers overview
# oddsrail <!-- mcp-name: app.oddsrail/polymarket-kalshi-trading --> **The rail AI agents use to trade prediction markets.** An MCP server that gives any agent (Claude Code, Claude Desktop, or anything MCP-compatible) prediction-market access across **Polymarket and Kalshi**: market search, orderbooks, price history, positions, and order routing, with **on-chain builder-code attribution** on Polymarket, plus two premium signal tools (in-play overshoot/fade detection, resolution dispute-risk). **Free to use, and free of fees.** oddsrail ships with a project builder code registered at **0 bps**, so orders routed through it are attributed without adding a single basis point to anyone's trade. The project's income is a share of Polymarket's weekly builder reward pool, paid by Polymarket's own program, not by you. Running your own builder profile instead is one environment variable (`ODDSRAIL_BUILDER_CODE`), and `server_info` always tells you which code is in use. No fee tiers, no paywalled tools, no account required. ## How oddsrail compares Verified against each alternative directly (their repos, live endpoints, and registry entries, September 2026), not from their marketing: | | oddsrail | raw venue APIs | pmxt | Simmer | Polymarket agent-skills | |---|---|---|---|---|---| | What it is | self-hosted MCP server | the venues themselves | unified API + SDK + MCP, "CCXT for prediction markets" | agent trading platform + SDK + MCP | markdown skill docs for agents | | Venues you can trade | Polymarket, Kalshi | one each | Polymarket, Opinion, Limitless (hosted writes); a dozen more for data | Polymarket, Kalshi, plus its own $SIM sandbox markets | Polymarket only | | Custody | non-custodial; keys never leave your machine | yours | hosted mode: "PMXT handles custody, signing infrastructure"; self-hosted mode: your keys | self-custody, local signing | yours (documentation only) | | Attribution you control | yes: `ODDSRAIL_BUILDER_CODE` overrides the 0 bps default | n/a | not documented | not documented | documents builder headers for your own code | | Cost to the trader | 0 bps, free tools | free | hosted pricing not in the README | not documented | free | | Open source | MIT, full source | n/a | MIT, ~2.1k stars | not stated | docs; license not stated | | Operator guardrails | notional caps, open-order cap, allowed markets; enforced pre-request, in dry-run too | none | not documented | per-trade limits, daily caps, stop-loss/take-profit, kill switch | none | | Paper trading | dry-run fills against the live book, P&L | none | not documented | virtual $SIM sandbox, then graduate to real money | none | | Book-walked cost, settlement audit, jurisdiction-classified failures, dated venue-quirk notes | yes, all four | no | not documented | not documented | quirks partly documented | | Realtime | `watch_book`, bounded | websocket, yours to wire | not documented in the README | not documented | websocket documented | Verified 2026-09-02 from each project's own README or docs (pmxt: github.com/pmxt-dev/pmxt; Simmer: docs.simmer.markets; agent-skills: github.com/Polymarket/agent-skills). "Not documented" means exactly that, not "absent". Re-check before quoting; these projects move. **The wedge, in one line:** pmxt is the reference for trading *everywhere*; Simmer is the reference for an agent economy with a sandbox and a reputation layer; oddsrail is the reference for trading *correctly, non-custodially, with attribution you own*. **Where the others are honestly ahead:** pmxt trades three venues to our two and covers a dozen more for data, with hosted convenience and a community many times ours. Simmer has a virtual-balance sandbox, stop-loss and take-profit rails we do not have, a public reasoning/reputation layer, and a strategy-skills marketplace. Polymarket's agent-skills is the venue's own documentation and covers bridging and deposits, which oddsrail does not. ¹ The raw Polymarket API *has* the endpoints. It also models rejections as `ok:false` return values, orders its books worst-first, ships a trades endpoint that returns the market's **public** tape, and enforces an undocumented $1 minimum notional. oddsrail exists because we hit every one of those and encoded the fix. ² Kalshi prices are dollar strings (integer cents were removed 2026-03), its orderbook is bids-only on both sides, and its current SDK requires Python ≥3.13. All normalised here. ## Quickstart Python 3.11+ required. ```bash pip install oddsrail ``` ```bash claude mcp add --transport stdio oddsrail -- oddsrail ``` Or from a clone, without installing: ```bash python3 -m venv .venv && .venv/bin/pip install -r requirements.txt ``` ```bash claude mcp add --transport stdio oddsrail -- /abs/path/to/oddsrail/.venv/bin/python -m oddsrail.server ``` Then ask the agent: *"search markets about the World Cup final and run the overshoot signal on the favorite"*. ## See the footguns yourself, no keys ```bash pip install oddsrail && python examples/footguns.py ``` Six things the venue APIs get wrong, shown live against the public endpoints: the worst-first order book, Kalshi's bids-only dollar-string ladders, geoblocks that look healthy until the order, the advisory geoblock verdict, the deprecated Gamma endpoint, and naive cross-venue matching. Each section prints the raw trap, then the oddsrail call that returns the right answer. About ten seconds, read-only. ## How attribution works (CLOB V2, verified Aug 2026) 1. Get your **builder code** (a bytes32) at polymarket.com → **Settings → Builders**. Set your fee rates there: taker up to 100 bps, maker up to 50 bps, additive on top of platform fees, settled to your builder wallet. 2. `export ODDSRAIL_BUILDER_CODE=0x...` where the server runs. 3. Every order any agent routes through `place_order` has the code placed in the V2 order struct's `builder` field **before signing**, so attribution is on-chain, visible in every `OrderFilled` event on CTF Exchange V2. 4. Verify with the `builder_stats` tool (public builder-trades endpoint + leaderboard). If you skip this, orders carry the bundled oddsrail builder code (`0xa576c5ce…`, registered at 0 bps maker / 0 bps taker), costing you nothing and funding the project. If you set your own, yours wins; the default is a default, not a lock-in. The oddsrail builder profile is **Verified** in Polymarket's builder program (2026-09-02), and Polymarket's builder team confirmed builder-code attribution as the right pattern for a self-hosted, non-custodial tool: no keys ship with the product, and the code is attached and signed by the operator's own wallet. ## Environment variables | Variable | Default | Meaning | |---|---|---| | `ODDSRAIL_DRY_RUN` | `1` | `1` = orders are simulated and returned, never posted. Set `0` to trade. | | `ODDSRAIL_BUILDER_CODE` | project default | Your bytes32 builder code. Overrides the bundled project default so attribution (and any reward-pool share) accrues to you instead. | | `POLYMARKET_PRIVATE_KEY` | unset | Operator wallet key; required only for real trading. Never leaves this machine. | | `POLYMARKET_WALLET_ADDRESS` | unset | Proxy/deposit wallet address, if the account uses one. | | `POLYMARKET_RELAYER_API_KEY` | unset | Your own Relayer API key (polymarket.com → Settings → Relayer API keys), for gasless `split_position` / `merge_positions` / `redeem_positions`. | | `POLYMARKET_RELAYER_API_KEY_ADDRESS` | unset | The address the relayer key was issued for. Both halves are required; without them the gasless tools send nothing. | | `ODDSRAIL_MAX_ORDER_NOTIONAL` | unset | Guardrail: max USDC notional per order. Enforced before any request, in dry-run too. | | `ODDSRAIL_MAX_SESSION_NOTIONAL` | unset | Guardrail: max cumulative notional of live orders submitted by this server process. | | `ODDSRAIL_MAX_OPEN_ORDERS` | unset | Guardrail: max resting orders on the account (live; checked against the venue before placing). | | `ODDSRAIL_ALLOWED_MARKETS` | unset | Guardrail: comma-separated Polymarket token ids and/or Kalshi tickers the agent may trade. Anything else is refused. | | `ODDSRAIL_PAPER` | `1` | Paper-trade dry-run Polymarket orders against the live book. `0` disables. | | `ODDSRAIL_PAPER_LEDGER` | `~/.oddsrail/paper.json` | Where the paper ledger lives. One local JSON file. | | `ODDSRAIL_PAPER_BANKROLL` | `1000` | Starting paper cash in USDC. | ## Status **Offline tests:** 111 tests covering the paths where a bug costs money: the Kalshi yes/no→bid/ask translation, Kelly sizing, book walking, cross-venue pairing, signal edge cases, the dry-run safety net, and jurisdiction-failure handling (a geoblock must never read as an empty search result or a resting order). They need no keys and no network: ```bash pip install -e ".[dev]" && pytest ``` CI runs them on Python 3.11, 3.12 and 3.13 on every push and pull request. **Live venues:** every read tool and both dry-run order paths have been driven end-to-end against real Polymarket and Kalshi through a real MCP client session. Two attributed Polymarket orders (a buy and a sell) have been placed and confirmed on-chain. **Not yet exercised live:** the Kalshi *order placement* path. Its request shape is unit-tested and its endpoint verified, but no order has been sent to a real Kalshi account, because the author does not yet have a funded, verified one. This is untested, not untestable. Treat `kalshi_place_order` as unproven and start in dry-run. ## Where this works Two different things can stop oddsrail from trading, and they have opposite remedies. One is a venue restriction, enforced at the order. The other is a network filter, which breaks the connection itself. **Polymarket restrictions.** Polymarket publishes its restricted-jurisdiction list as an API reference: <https://docs.polymarket.com/api-reference/geoblock>. There are three tiers. OFAC-sanctioned jurisdictions (Iran, Syria, Cuba, North Korea, and the Crimea, Donetsk and Luhansk regions of Ukraine
What people ask about oddsrail
What is hmesutozsoy/oddsrail?
+
hmesutozsoy/oddsrail is mcp servers for the Claude AI ecosystem. MCP server: the rail AI agents use to trade prediction markets. Self-hosted, non-custodial, on-chain builder-code attribution + overshoot & dispute-risk signals. It has 0 GitHub stars and its last recorded update is dated 2026-09-02.
How do I install oddsrail?
+
You can install oddsrail by cloning the repository (https://github.com/hmesutozsoy/oddsrail) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is hmesutozsoy/oddsrail safe to use?
+
Our security agent has analyzed hmesutozsoy/oddsrail and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains hmesutozsoy/oddsrail?
+
hmesutozsoy/oddsrail is maintained by hmesutozsoy. The last recorded GitHub activity is dated 2026-09-02, with 1 open issues.
Are there alternatives to oddsrail?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy oddsrail to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/hmesutozsoy-oddsrail)<a href="https://claudewave.com/repo/hmesutozsoy-oddsrail"><img src="https://claudewave.com/api/badge/hmesutozsoy-oddsrail" alt="Featured on ClaudeWave: hmesutozsoy/oddsrail" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!