Kalshi MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install kalshi-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "KALSHI_API_KEY=${KALSHI_API_KEY}" -e "KALSHI_PRIVATE_KEY_PATH=${KALSHI_PRIVATE_KEY_PATH}" kalshi-mcp -- node "<FULL_PATH_TO_KALSHI_MCP>/dist/index.js"

Replace <FULL_PATH_TO_KALSHI_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:KALSHI_API_KEYKALSHI_PRIVATE_KEY_PATH
README.md

Search, analyze, and trade prediction markets directly through Claude Desktop.

Kalshi MCP Server

mcp-name: io.github.yakub268/kalshi

Model Context Protocol server for Kalshi prediction markets. Search, analyze, and trade prediction markets directly through Claude Desktop.

Built with production-grade authentication and rate limiting from a live trading system with 4+ months of uptime.

Features

Tools (6)

  • search_markets - Search by keyword, get prices/volume
  • get_market_details - Full market info + orderbook depth
  • get_portfolio - Account balance + open positions
  • get_trending_markets - Top markets by 24h volume
  • place_order - Execute limit orders
  • get_series_markets - All markets in a series (e.g., Fed events)

Resources (2)

  • kalshi://balance - Current account balance
  • kalshi://positions - Open positions list

Installation

Prerequisites

  1. Kalshi API credentials: Get from kalshi.com/profile/api-keys

    • Download your API key ID
    • Download the RSA private key (.pem file)
  2. Python 3.10+

Quick Install (PyPI)

pip install kalshi-mcp

From Source

# Clone repository
git clone https://github.com/yakub268/kalshi-mcp.git
cd kalshi-mcp

# Install dependencies
pip install -e .

Claude Desktop Configuration

Add to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "kalshi": {
      "command": "python",
      "args": ["-m", "kalshi_mcp"],
      "env": {
        "KALSHI_API_KEY": "your-api-key-here",
        "KALSHI_PRIVATE_KEY_PATH": "C:\\Users\\YourName\\.trading_keys\\kalshi_private_key.pem"
      }
    }
  }
}

Note:

  • Replace your-api-key-here with your actual Kalshi API key
  • Update the private key path to where you saved your .pem file
  • On Windows, use double backslashes (\\) in paths

Test the Connection

Restart Claude Desktop, then try:

What's my Kalshi balance?

or

Search for bitcoin prediction markets

Usage Examples

Search for Markets

Search for markets about the Federal Reserve

Get Market Analysis

Show me details for ticker KXFED-26MAR19-B5.25

Check Portfolio

What's my current Kalshi portfolio?

Place an Order

Buy 10 contracts of KXHIGHNYC-26FEB20-B34.5 YES at 25 cents

Authentication

This server uses RSA-PSS signature authentication:

  1. Each request is signed with your private key
  2. Kalshi verifies the signature with your public key
  3. Thread-safe rate limiting (150ms between requests)
  4. Automatic retry on 429 rate limit errors

Security: Your private key never leaves your machine. The server only signs requests locally.

Rate Limiting

  • Built-in 150ms spacing between requests (~6.6 req/s)
  • Automatic exponential backoff on 429 errors (0.5s → 1s → 2s)
  • Safe for concurrent use across multiple Claude conversations

Architecture

Built on production code from a live Kalshi trading bot:

  • Authentication: Reused from kalshi_client.py (4+ months uptime)
  • Rate limiting: Shared across all client instances
  • Error handling: Battle-tested retry logic
  • Market discovery: Liquidity scoring from scanner.py

Contributing

Issues and PRs welcome! This is an open-source project built to fill a gap in the MCP ecosystem.

License

MIT License - see LICENSE file

Acknowledgments


Questions? Open an issue or reach out on GitHub.

Tools (6)

search_marketsSearch by keyword, get prices/volume
get_market_detailsFull market info + orderbook depth
get_portfolioAccount balance + open positions
get_trending_marketsTop markets by 24h volume
place_orderExecute limit orders
get_series_marketsAll markets in a series (e.g., Fed events)

Environment Variables

KALSHI_API_KEYrequiredYour Kalshi API key ID
KALSHI_PRIVATE_KEY_PATHrequiredFile path to your RSA private key (.pem file)

Configuration

claude_desktop_config.json
{"mcpServers": {"kalshi": {"command": "python", "args": ["-m", "kalshi_mcp"], "env": {"KALSHI_API_KEY": "your-api-key-here", "KALSHI_PRIVATE_KEY_PATH": "path/to/your/private_key.pem"}}}}

Try it

Search for markets about the Federal Reserve
Show me details for ticker KXFED-26MAR19-B5.25
What's my current Kalshi portfolio?
Buy 10 contracts of KXHIGHNYC-26FEB20-B34.5 YES at 25 cents

Frequently Asked Questions

What are the key features of Kalshi MCP Server?

Search and analyze prediction markets by keyword or volume. Retrieve full market details and orderbook depth. Execute limit orders directly through Claude. View account balances and open positions. Production-grade RSA-PSS signature authentication.

What can I use Kalshi MCP Server for?

Quickly checking the current market sentiment on political or economic events. Automating trade execution for specific prediction market strategies. Monitoring portfolio performance and open positions without leaving the chat interface. Discovering high-volume trending markets for potential trading opportunities.

How do I install Kalshi MCP Server?

Install Kalshi MCP Server by running: pip install kalshi-mcp

What MCP clients work with Kalshi MCP Server?

Kalshi MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Kalshi MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare