MCP server for end-to-end trading on Kalshi prediction markets: discover, research, trade.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
An MCP server that gives Claude Code and other agent harnesses a first-class interface to Kalshi. It is built for end-to-end trading: browse markets, research them, read the exact settlement rules (including pulling the contract-terms PDFs), and execute trades β all through MCP tools.
list_markets, get_market, list_events, get_event, list_series,
get_series. (Kalshi has no free-text search; list_markets filters are the search.)get_market_orderbook, get_market_candlesticks, get_market_trades.get_market_rules consolidates a market's rules_primary/rules_secondary,
early-close conditions, settlement sources, and series prohibitions; fetch_rules_pdf
downloads and extracts the text of the actual legal contract PDF so the agent can read it.get_exchange_status, get_exchange_schedule (is the market open, and its hours).get_balance, get_positions, get_fills, get_settlements.create_order, cancel_order, amend_order, decrease_order,
plus list_orders / get_order.KALSHI_ENV=prod.create_order, amend_order) require confirm=true. Without it they
return a preview β a human-readable summary and the exact payload β and place nothing.Kalshi's V2 order API quotes everything from the YES leg (bid/ask in fixed-point dollars).
This server exposes the natural model instead β action (buy/sell) + side (yes/no) + a whole
cents limit price β and translates it (including the buy-NO β sell-YES price inversion).
| Variable | Default | Purpose |
|---|---|---|
KALSHI_ENV | demo | demo (sandbox) or prod (real money). Derives the base URL. |
KALSHI_API_KEY | (none) | Kalshi API key ID. Required only for authenticated tools. |
KALSHI_PRIVATE_KEY_PATH | (none) | Path to your RSA private key .pem. Required for authenticated tools. |
BASE_URL | (derived) | Optional explicit REST base override (must include /trade-api/v2). |
See .env-example. Get API credentials at
docs.kalshi.com/getting_started/api_keys
and a demo account via the
demo environment guide.
.env file (see .env-example).uv sync (add --extra dev for dev tools). Requires Python 3.10+.uv run start.uv run pytest.Tests are pure/offline β they exercise the order translation and confirm-gate, the HTTP client
(via an injected httpx.MockTransport), the MCP tool registry, config, and PDF extraction, all
without touching the live Kalshi API. CI (.github/workflows/ci.yml) runs ruff + black + mypy +
pytest across Python 3.10β3.13 on every push/PR, and releases are gated on that same suite.
Requests are signed with RSA-PSS (MGF1-SHA256, max salt). Each authenticated request sends
KALSHI-ACCESS-KEY, KALSHI-ACCESS-TIMESTAMP, and KALSHI-ACCESS-SIGNATURE, where the signed
message is timestamp_ms + METHOD + path (path includes /trade-api/v2, excludes the query
string).
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-server-kalshi)<a href="https://allmcps.com/mcp/mcp-server-kalshi"><img src="https://allmcps.com/api/badge/mcp-server-kalshi?style=directory" alt="Mcp Server Kalshi on AllMCPs" /></a>