Kalshi

io.github.yakub268由 GitHub 账号 yakub268 发布v0.1.1更新于 Oct 24, 2026

Search, analyze, and trade Kalshi prediction markets through Claude Desktop

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

一个本地 MCP 服务器,让助手搜索、分析并交易 Kalshi 预测市场,包括在 Claude Desktop 中下限价单。

可以做什么
按关键词搜索市场,查看热门市场或某个系列下的全部市场,并获取价格与成交量。查看指定市场的完整信息和订单簿深度。读取账户余额与持仓,并以余额和持仓资源形式提供。在 Kalshi 市场下限价单。
适用场景
适合想在对话中研究 Kalshi 预测市场、查看自己持仓,或直接下限价单的用户。已有 Kalshi 账户和 API 凭据的人最适用。
运行要求
以 Python 包形式在本地运行(需 Python 3.10+),在 Claude Desktop 中配置。需要 Kalshi API key ID(KALSHI_API_KEY)和 RSA 私钥 .pem 文件路径(KALSHI_PRIVATE_KEY_PATH)。需要访问 Kalshi 的网络连接。
安装前请注意
该服务器可下真实限价单,会在你的 Kalshi 账户上花钱。它需要 API key ID 和 RSA 私钥文件路径;README 称签名在本地完成,但仍应妥善保护私钥文件。确认订单前请先核对内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kalshi,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Kalshi MCP Server

mcp-name: io.github.yakub268/kalshi

[MCP] [Python]

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)

bash
pip install kalshi-mcp

From Source

bash
# Clone repositorygit clone https://github.com/yakub268/kalshi-mcp.gitcd kalshi-mcp
# Install dependenciespip 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

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.

来源:README.md,提交 70fe3a7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分