Kalshi MCP Server
About
A simple MCP server to interact with prediction market Kalshi
Details
- Author
- xilei-wang-90
- Categories
- Other, Finance, API
Jump to
Setup
Install Kalshi MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/xilei-wang-90/kalshi-mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
An mcp server that allows AI to operate on the prediction market, Kalshi
- get_tags_for_series_categories
- Calls Kalshi public endpoint:GET /search/tags_by_categories
- No API key required
- Calls Kalshi private endpoint:GET /portfolio/balance
- Requires API key authentication (KALSHI_API_KEY_ID+KALSHI_API_KEY_PATH)
- Calls Kalshi private endpoint:GET /portfolio/subaccounts/balances
- Requires API key authentication (KALSHI_API_KEY_ID+KALSHI_API_KEY_PATH)
- Calls Kalshi private endpoint:POST /portfolio/subaccounts
- No arguments
- Creates a new subaccount (maximum 32 per user)
- Returns:subaccount_number(int, 1-32)
- Requires API key authentication (KALSHI_API_KEY_ID+KALSHI_API_KEY_PATH)
- Calls Kalshi private endpoint:GET /portfolio/orders
- Optional arguments:
- ticker(string; market ticker)
- event_ticker(string; comma-separated event tickers, maximum 10)
- status(string: resting|canceled|executed)
- min_ts/max_ts(int; unix seconds)
- limit(int, 1-200)
- cursor(string)
- subaccount(int, 0-32)
- Calls Kalshi private endpoint:GET /portfolio/orders/{order_id}
- Required arguments:
- order_id(string; the order identifier)
- Calls Kalshi private endpoint:POST /portfolio/orders
- Required arguments:
- ticker(string; market ticker)
- side(string: yes|no)
- action(string: buy|sell)
- client_order_id(string; caller-specified order ID)
- count(int, >=1; contract quantity)
- count_fp(string; fixed-point contract count)
- yes_price(int, 1-99; price in cents)
- no_price(int, 1-99; price in cents)
- yes_price_dollars(string; yes price in dollars)
- no_price_dollars(string; no price in dollars)
- expiration_ts(int; unix timestamp for order expiry)
- time_in_force(string: fill_or_kill|good_till_canceled|immediate_or_cancel)
- buy_max_cost(int; maximum cost in cents)
- sell_position_floor(int; deprecated, only0allowed if set)
- post_only(boolean)
- reduce_only(boolean)
- self_trade_prevention_type(string: taker_at_cross|maker)
- order_group_id(string)
- cancel_order_on_pause(boolean)
- subaccount(int, 0-32)
- Calls Kalshi private endpoint:DELETE /portfolio/orders/{order_id}
- Required arguments:
- order_id(string; the order identifier)
- Calls Kalshi private endpoint:GET /portfolio/positions
- Optional arguments:
- cursor(string)
- limit(int, 1-1000; defaults to 100)
- count_filter(string; comma-separated frompositionand/ortotal_traded)
- ticker(string; market ticker)
- event_ticker(string; comma-separated event tickers, maximum 10)
- subaccount(int, 0-32)
- Calls Kalshi public endpoint:GET /search/tags_by_categories
- Returns only the category names
- No API key required
- Calls Kalshi public endpoint:GET /search/tags_by_categories
- Requires one argument:category(exact category name)
- Returns tags for the selected category
- No API key required
- Calls Kalshi public endpoint:GET /series
- Optional arguments:
- category(string)
- tags(string)
- cursor(string)
- limit(int, 1-1000)
- include_product_metadata(boolean)
- include_volume(boolean)
- Pages Kalshi public endpoint:GET /series
- Required arguments:
- category(string)
- tags(string)
- limit(int, 1-1000; defaults to 1000)
- max_pages(int, 1-10000; defaults to 1000)
- Calls Kalshi public endpoint:GET /markets
- Optional arguments:
- cursor(string)
- limit(int, 1-1000)
- status(string; Kalshi docs list values like unopened|open|paused|closed|settled)
- tickers(string; comma-separated market tickers)
- event_ticker(string; comma-separated event tickers)
- series_ticker(string)
- mve_filter(string: only|exclude)
- min_created_ts/max_created_ts(int; unix seconds)
- min_updated_ts(int; unix seconds)
- min_close_ts/max_close_ts(int; unix seconds)
- min_settled_ts/max_settled_ts(int; unix seconds)
- Pages Kalshi public endpoint:GET /markets
- Required arguments:
- series_ticker(string)
- limit(int, 1-1000; defaults to 1000)
- max_pages(int, 1-10000; defaults to 1000)
- Pages Kalshi public endpoint:GET /markets
- Required arguments:
- series_ticker(string)
- limit(int, 1-1000; defaults to 1000)
- max_pages(int, 1-10000; defaults to 1000)
- KALSHI_API_BASE_URL
- Default:https://api.elections.kalshi.com/trade-api/v2
- Required for authenticated/private endpoints (for exampleget_balance)
- Required for authenticated/private endpoints
- Path to your Kalshi API private key PEM file
- load_settings()reads a local.envfile from the repo root and loads variables when they are not already set in the environment
- Command (installed/editable):
- python3 -m pip install -e .
- python3 -m kalshi_mcp.server
- PYTHONPATH=src python3 -m kalshi_mcp.server
- JSON-RPC 2.0 over newline-delimited JSON on stdin/stdout
- Run unit tests (unittest):
- python3 -m unittest discover -s tests -p 'test_*.py'
- Install dev deps:python3 -m pip install -r requirements-dev.txt
- Then:python3 -m pytest -q
Manage stock and crypto portfolios, place trades, and access market data via the Alpaca Trading API.
An MCP server for brokerage functionalities, built with the MCP framework.
A server for performing trading operations using the Kite Connect API.
Korea Investment & Securities (KIS) REST API
Provides stock trading and market data using the Korea Investment & Securities (KIS) REST API.
An unofficial server to integrate with the Questrade API, providing access to trading accounts, market data, and portfolio information.
Access the Shioaji trading API for financial data and trading operations, requiring a SinoPac Securities account.
A MCP server for integrating with the Upstox trading API by Upstox.
A Model Context Protocol (MCP) server that integrates with the Upstox Trading API, enabling AI agents like Claude to securely access Indian stock market data, perform technical analysis, and view account information in read-only mode.
The Capital.com MCP Server lets your AI assistant talk to your trading account directly. Market data, position checks, trade previews – all in plain language, without leaving your AI tool.
US/HK markets — 110 tools: real-time quotes, options, orders, fundamentals, alerts, DCA & portfolio
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




