Skip to main content
MCP server CX Codex

mcp-server-kalshi — Claude Code MCP server: trade on Kalshi

Wires Kalshi prediction markets into your agent: browse markets, read settlement rules, and place orders through MCP tools.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env KALSHI_ENV=<KALSHI_ENV> --env KALSHI_API_KEY=<KALSHI_API_KEY> --env KALSHI_PRIVATE_KEY_PATH=<KALSHI_PRIVATE_KEY_PATH> --env BASE_URL=<BASE_URL> --transport stdio mcp-server-kalshi -- uvx mcp-server-kalshi
Open on GitHub

What mcp-server-kalshi does

The server covers a full trade cycle. list_markets and get_market locate a market, get_market_orderbook and get_market_candlesticks supply the numbers, and get_market_rules pulls together primary and secondary rules, early-close conditions and settlement sources. fetch_rules_pdf downloads the legal contract and extracts its text so the agent can read it. Orders go through create_order, cancel_order, amend_order and decrease_order. Kalshi offers no free-text search, so list_markets filters are how you look.

Safety defaults matter here. The server points at Kalshi's demo sandbox unless you set KALSHI_ENV=prod. Order-placing tools need confirm=true; without it you get a preview with a readable summary and the exact payload, and nothing is submitted. Market and rules tools run unauthenticated — an API key plus RSA private key are only required for portfolio and trading calls.

Prices are given as whole cents alongside action (buy/sell) and side (yes/no), and the server translates that into Kalshi's V2 format, buy-NO and sell-YES price inversion included. Running it locally takes Python 3.10+ and uv sync, then uv run start. Requests are signed with RSA-PSS, so trading tools stay dead until the .pem private key path is set.

What it helps with

  • find a Kalshi market through filters when there is no text search
  • read the exact settlement rules before committing to a trade
  • download and extract the contract-terms PDF
  • check the orderbook and recent trades for a market
  • place an order with a preview instead of firing it off blind

Example prompts for the agent

  • List open Kalshi markets matching my filters and pick the most liquid ones
  • Pull the settlement rules for this market and fetch the contract PDF
  • Place a buy YES order at 40 cents, but show me the preview first

How to install mcp-server-kalshi

Platform CLI

claude mcp add --env KALSHI_ENV=<KALSHI_ENV> --env KALSHI_API_KEY=<KALSHI_API_KEY> --env KALSHI_PRIVATE_KEY_PATH=<KALSHI_PRIVATE_KEY_PATH> --env BASE_URL=<BASE_URL> --transport stdio mcp-server-kalshi -- uvx mcp-server-kalshi

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-kalshi <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-server-kalshi

How do I install mcp-server-kalshi in Claude Code?

Run claude mcp add mcp-server-kalshi -e KALSHI_API_KEY=<KALSHI_API_KEY> -- uvx mcp-server-kalshi. To pass the other environment variables as well, use `claude mcp add --env KALSHI_ENV=<KALSHI_ENV> --env KALSHI_API_KEY=<KALSHI_API_KEY> --env KALSHI_PRIVATE_KEY_PATH=<KALSHI_PRIVATE_KEY_PATH> --env BASE_URL=<BASE_URL> --transport stdio mcp-server-kalshi -- uvx mcp-server-kalshi`.

What does mcp-server-kalshi do?

It exposes Kalshi prediction markets to your agent: market and event discovery, orderbook, candlesticks, trade history, settlement rules, and order placement or cancellation.

Do I need a Kalshi API key to use it?

Only for portfolio and order tools. Market and rules tools work without credentials; authenticated calls need an API key ID and the path to your RSA .pem key.

Similar MCP servers

Everything for Finance and business →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor