Kalshi MCP Server
FastMCP server for Kalshi's Trade API, enabling interaction with prediction markets, portfolio management, orders, and historical data.
README
Kalshi MCP Server
FastMCP server for Kalshi's Trade API.
Setup
This repo vendors fastmcp/, so run commands from the repository root:
python -m kalshi_mcp.server
By default the server uses Kalshi's demo API host. Configure it with environment variables:
export KALSHI_ENV=demo
export KALSHI_API_KEY_ID="your-key-id"
export KALSHI_PRIVATE_KEY_PATH="/path/to/kalshi-private-key.pem"
You can also provide KALSHI_PRIVATE_KEY directly. Escaped newlines are supported.
Trading tools are disabled unless explicitly enabled:
export KALSHI_ENABLE_TRADING=true
Even then, order_create, order_cancel, rfq_create, and rfq_delete require confirm=true on each call.
Tool Coverage
The server exposes 49 tools covering the core Predictions REST API areas:
- Exchange status, schedule, announcements, and user-data timestamp
- Markets, market orderbooks, market trades, candlesticks, and series
- Events, event metadata, event fee changes, event candlesticks, and multivariate events
- Portfolio balance, subaccount balances, positions, fills, settlements, deposits, and withdrawals
- Orders, order lookup, order queue positions, V2 create order, and V2 cancel order
- Account limits, API usage progress, endpoint costs, and API key listing
- Historical cutoffs, historical markets, historical candlesticks, historical trades, historical orders, and historical fills
- Communications ID, RFQs, quotes, create RFQ, and delete RFQ
Tool names are prefix-grouped for IDEs and MCP clients that display tools as a flat list:
exchange_*market_*series_*event_*portfolio_*order_*account_*historical_*communications_*,rfq_*, andquote_*
Local MCP Config
Many IDEs and MCP clients can run this server from an mcp.json config. Use this shape and adjust paths/secrets for your machine:
{
"mcpServers": {
"kalshi": {
"command": "python",
"args": ["-m", "kalshi_mcp.server"],
"cwd": "",
"env": {
"KALSHI_API_KEY_ID": "your-key-id",
"KALSHI_PRIVATE_KEY_PATH": "/path/to/kalshi-private-key.pem"
}
}
}
}
For public market-data tools, the env block can be omitted. Authenticated portfolio/order tools require KALSHI_API_KEY_ID and either KALSHI_PRIVATE_KEY_PATH or KALSHI_PRIVATE_KEY.
cwd is included because this is a source checkout that vendors fastmcp/ locally. If you install this package into the Python environment used by your MCP client, cwd is not needed.
Optional environment variables:
KALSHI_ENV=productionswitches from demo to production. The default isdemo.KALSHI_ENABLE_TRADING=trueenables write tools such as order placement and RFQ creation. Those tools still requireconfirm=trueon each call.
Notes
Kalshi authenticated requests are signed with RSA-PSS over the concatenated timestamp, HTTP method, and request path without query parameters.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.