MCP server for Kalshi prediction markets: native RSA-PSS auth, rate limiting, demo/prod safety.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
π¦ PyPI Β Β·Β ποΈ MCP Registry Β Β·Β π³ Container image Β Β·Β π Deploy guide
A Model Context Protocol server for Kalshi prediction markets. Native RSA-PSS auth, async token-bucket rate limiting, two-step prepare/confirm order flow with safety caps, optional bundled OAuth proxy for remote-MCP deployments, 26 tools + 4 resources across REST and WebSocket. MIT, designed to be forked.
Works with any MCP client β locally via stdio (Claude Desktop, Claude Code, Cursor, Zed, Continue, Cline, Goose, etc.) or remotely as a self-hosted HTTP server (claude.ai custom connectors today, any OAuth-capable MCP client in the future).
β οΈ This software lets an LLM place trades. Read DISCLAIMER.md before deploying. Trading prediction markets involves substantial risk of loss. AI agents make mistakes β sometimes confidently. The authors are not liable for any losses. Test in demo (
KALSHI_ENV=demo,KALSHI_TRADING_ENABLED=0) until you understand the failure modes.
Status β alpha. Auth (REST + WS), rate limiting, safety controls, 26 tools across REST + live channels, and 4 resources are in place. A long-lived multiplexed WebSocket session and
kalshi://markets/{ticker}/orderbooklive resource are planned for v0.2.
Read-only against Kalshi's demo environment β no real money, no trading flag. This is the safe way to try it.
Point any MCP client at it (this is the Claude Desktop / Claude Code shape β see the full client matrix for others):
Minimal ~/.kalshi/.env (get a demo key at
demo.kalshi.co β it's shown once):
Restart the client and ask it to run a Kalshi tool. Enabling prod and
trading is a deliberate opt-in β a few more flags (KALSHI_ALLOW_PROD=1,
KALSHI_TRADING_ENABLED=1) β see Configure and the
safety model.
Ask the agent for tradeable markets and kalshi_find_liquid_markets returns a
volume-ranked, combo-excluded shortlist (trimmed, illustrative):
Placing a trade is a deliberate two step β kalshi_prepare_order runs the
local safety checks and hands back a confirmation_id; nothing reaches Kalshi
until you call kalshi_confirm_order with that token. An LLM can't place an
order in a single call.
Most existing Kalshi MCPs are thin wrappers around a handful of REST endpoints. This one aims to be:
main without ever triggering a production deploy β only
tagged releases (v*) do. Your fork's deployment stays decoupled from
this repo's, and your fork's contributors can't affect what you run.Published as kalshi-mcp-server.
pipx installs the kalshi-mcp entrypoint into its own
isolated environment:
Multi-arch (amd64 + arm64) images are published to GHCR on every tagged
release, tagged :latest and :vX.Y.Z:
See DEPLOY.md for hosted deployment.
Generate a Kalshi API key at https://kalshi.com/account/profile (or the demo equivalent at https://demo.kalshi.co/account/profile). Save the private key β it is shown ONCE.
Put your secrets in one .env file. A good location for the
MCP-client use case is ~/.kalshi/.env (outside any repo). For local
dev, the repo's own .env (gitignored) works too.
For prod, also set:
On startup, the server resolves config in this order (highest wins):
env: block, or exported in your shell..env file β loaded from --env-file PATH if you pass that flag,
otherwise from ./.env in the current working directory if it exists.
Variables already in the environment from step 1 are not overridden.So you can put secrets either inline in the MCP config (env:) or in a
file the config points at (--env-file). You don't need to do both.
Every MCP stdio client uses the same shape: a command to launch the
server, optional args, optional env. The differences are just the
file/UI where you put the config.
Three install patterns work β pick whichever fits your environment.
pipx install (cleanest, recommended)Installs kalshi-mcp to a globally-available, isolated environment.
pipx is the modern Python tool for this:
MCP client config then collapses to:
Update with pipx upgrade kalshi-mcp-server when you want the latest.
uv run against a local cloneBest if you've cloned the repo and have uv
installed. Point the MCP client at uv with --directory:
uv run activates the project's venv automatically. Update with
git pull + restart the MCP client. Useful for development /
hacking on the server itself.
Best for users without Python installed, or who prefer container isolation:
The -v mount bind-mounts your PEM file read-only into the
container; KALSHI_PRIVATE_KEY_PATH points at that path. Secrets
live in the JSON config β fine for a single-user machine.
No reviews yet β be the first to share how this listing worked for you.
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/kalshi-prediction-markets)<a href="https://allmcps.com/mcp/kalshi-prediction-markets"><img src="https://allmcps.com/api/badge/kalshi-prediction-markets?style=directory" alt="Kalshi Prediction Markets on AllMCPs" /></a>