Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
MCP server for Kalshi prediction markets: native RSA-PSS auth, rate limiting, demo/prod safety.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
KALSHI_API_KEY_ID, KALSHI_PRIVATE_KEY_PATH, KALSHI_PRIVATE_KEY_PEM, KALSHI_ENV, KALSHI_ALLOW_PROD, KALSHI_TRADING_ENABLED标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"kalshi": {
"command": "uvx",
"args": [
"kalshi-mcp-server"
],
"env": {
"KALSHI_API_KEY_ID": "your-value",
"KALSHI_PRIVATE_KEY_PATH": "your-value",
"KALSHI_PRIVATE_KEY_PEM": "your-value",
"KALSHI_ENV": "your-value",
"KALSHI_ALLOW_PROD": "your-value",
"KALSHI_TRADING_ENABLED": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add kalshi --env KALSHI_API_KEY_ID=your-value --env KALSHI_PRIVATE_KEY_PATH=your-value --env KALSHI_PRIVATE_KEY_PEM=your-value --env KALSHI_ENV=your-value --env KALSHI_ALLOW_PROD=your-value --env KALSHI_TRADING_ENABLED=your-value -- uvx kalshi-mcp-server运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"kalshi": {
"command": "uvx",
"args": [
"kalshi-mcp-server"
],
"env": {
"KALSHI_API_KEY_ID": "your-value",
"KALSHI_PRIVATE_KEY_PATH": "your-value",
"KALSHI_PRIVATE_KEY_PEM": "your-value",
"KALSHI_ENV": "your-value",
"KALSHI_ALLOW_PROD": "your-value",
"KALSHI_TRADING_ENABLED": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"kalshi": {
"type": "stdio",
"command": "uvx",
"args": [
"kalshi-mcp-server"
],
"env": {
"KALSHI_API_KEY_ID": "your-value",
"KALSHI_PRIVATE_KEY_PATH": "your-value",
"KALSHI_PRIVATE_KEY_PEM": "your-value",
"KALSHI_ENV": "your-value",
"KALSHI_ALLOW_PROD": "your-value",
"KALSHI_TRADING_ENABLED": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
KALSHI_PRIVATE_KEY_PATH envKALSHI_ENV envKALSHI_ALLOW_PROD envKALSHI_TRADING_ENABLED env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月9日
注册名称已通过 GitHub 账户 cejor6 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:KALSHI_API_KEY_ID, KALSHI_PRIVATE_KEY_PEM
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.8)于5个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv), Docker。
同一分类中有:Spec Driven Development, Remote Desktop Commander, Mcphost
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
📦 [PyPI](https://pypi.org/project/kalshi-mcp-server/) · 🗂️ [MCP Registry](https://registry.modelcontextprotocol.io/?search=io.github.cejor6/kalshi-mcp-server) · 🐳 [Container image](https://github.com/cejor6/kalshi-mcp-server/pkgs/container/kalshi-mcp-server) · 🚀 [Deploy guide](DEPLOY.md)
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}/orderbook
live 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.
pipx install kalshi-mcp-server # or: pip install kalshi-mcp-server
Point any MCP client at it (this is the Claude Desktop / Claude Code shape — see the full client matrix for others):
{
"mcpServers": { "kalshi": { "command": "kalshi-mcp", "args": ["--env-file", "/Users/you/.kalshi/.env"] } } }
Minimal ~/.kalshi/.env (get a demo key at demo.kalshi.co — it's shown once):
KALSHI_API_KEY_ID=<your-demo-key-id>
KALSHI_PRIVATE_KEY_PATH=/absolute/path/to/demo_private_key.pem KALSHI_ENV=demo
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):
{
"scanned": 300, "markets": [ { "ticker": "KXNBAGAME-25JUL12BOSLAL-BOS", "title": "Will the Celtics beat the Lakers?", "yes_bid_dollars": 0.58, "yes_ask_dollars": 0.60, "volume_24h_fp": 41230, "open_interest_fp": 88400, "status": "active", "close_time": "2026-07-12T23:30:00Z" }, { "ticker": "KXHIGHNY-26JUL12-B90.5", "title": "Will NYC's high temp exceed 90.5°F today?", "yes_bid_dollars": 0.31, "yes_ask_dollars": 0.34, "volume_24h_fp": 12760, "open_interest_fp": 23110, "status": "active", "close_time": "2026-07-13T04:00:00Z" } ] }
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:
pipx install kalshi-mcp-server # or: pip install kalshi-mcp-server
git clone https://github.com/cejor6/kalshi-mcp-server.git
cd kalshi-mcp-server uv sync
Multi-arch (amd64 + arm64) images are published to GHCR on every tagged release, tagged :latest and :vX.Y.Z:
docker pull ghcr.io/cejor6/kalshi-mcp-server:latest
See DEPLOY.md for hosted deployment.
.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.cp .env.example ~/.kalshi/.env
KALSHI_API_KEY_ID=<your-key-id>
KALSHI_PRIVATE_KEY_PATH=/absolute/path/to/your_kalshi_private_key.pem KALSHI_ENV=demo
For prod, also set:
KALSHI_ENV=prod
KALSHI_ALLOW_PROD=1 KALSHI_TRADING_ENABLED=1 # only if you want writes
On startup, the server resolves config in this order (highest wins):
env: block, or exported in your shell.--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:
pipx install kalshi-mcp-server
MCP client config then collapses to:
{
"mcpServers": { "kalshi": { "command": "kalshi-mcp", "args": ["--env-file", "/Users/you/.kalshi/.env"] } } }
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:
{
"mcpServers": { "kalshi": { "command": "uv", "args": [ "run", "--directory", "/absolute/path/to/kalshi-mcp-server", "kalshi-mcp", "--env-file", "/Users/you/.kalshi/.env" ] } } }
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:
{
"mcpServers": { "kalshi": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "/Users/you/.kalshi/demo.pem:/secrets/demo.pem:ro", "-e", "KALSHI_API_KEY_ID= ", "-e", "KALSHI_PRIVATE_KEY_PATH=/secrets/demo.pem", "-e", "KALSHI_ENV=demo", "ghcr.io/cejor6/kalshi-mcp-server:latest" ] } } }
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.
| Client | Config location |
|---|---|
| Claude Desktop | claude_desktop_config.json (Settings → Developer) |
| Claude Code | project .mcp.json or ~/.claude/mcp.json |
| Cursor | Settings → MCP → Add new MCP Server (UI fills the same JSON) |
| Zed | ~/.config/zed/settings.json under context_servers |
| Continue | ~/.continue/config.json under experimental.modelContextProtocolServers |
| Cline | Cline settings → MCP Servers → Edit JSON |
| Goose | ~/.config/goose/config.yaml under extensions |
If you'd rather inline secrets in the MCP config (acceptable for local dev where the config file is on your own machine):
{
"mcpServers": { "kalshi": { "command": "kalshi-mcp", "env": { "KALSHI_API_KEY_ID": "your-key-id", "KALSHI_PRIVATE_KEY_PATH": "/path/to/your/private_key.pem", "KALSHI_ENV": "demo" } } } }
Why not just `.env` in the project dir? MCP clients spawn the
server as a subprocess from their own working directory (typically
your home dir on macOS/Linux, the client's install dir on Windows),
so a
.envsitting in this repo wouldn't get found. Hence
--env-fileto point at it explicitly. Running the server directly
from the project dir (no client) still works without flags — the
CLI auto-loads
./.envwhen launched there.
For clients that don't speak local stdio — currently the main one being claude.ai's custom connector form, which only supports OAuth-protected HTTP — host the server somewhere reachable and point the client at it. The OAuth proxy is bundled with the server; you just need to configure it.
The proxy lets any GitHub account sign in, so HTTP transport also requires an identity allowlist — MCP_ALLOWED_GITHUB_IDS (numeric ids, preferred: they survive renames) and/or MCP_ALLOWED_GITHUB_LOGINS — enforced on every MCP request (tool calls, resource reads such as kalshi://balance, and listings). HTTP refuses to start on a partial OAuth config, and unauthenticated HTTP (MCP_ALLOW_INSECURE_HTTP=1) is confined to a loopback bind with DNS-rebinding protection unless you also set MCP_ALLOW_INSECURE_PUBLIC_BIND=1.
See DEPLOY.md for an end-to-end walkthrough using Render + GitHub OAuth + Upstash
只显示了开头部分;其余内容请在仓库中阅读