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 分