9M

9crusher/mcp-server-kalshi

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

32 stars 14 forks 品質 80 トレンド 8MIT

カルシ予測市場との交流を目的としたMCPサーバー

概要

Claude Code と他のエージェントが Kalshi にファーストクラスのインターフェイスを利用している MCP サーバー。 エンドツーエンド取引のために構築されています:市場をブラウズし、それらを調査し、正確な決済規則(契約期間のPDFを引っ張るを含む)を読んで、取引を実行します。すべてのMCPツールを介して。 - — list markets、get market、list events、get event、list series、get series。 (カルシにはフリーテキスト検索はありません。list marketsフィルタは検索です。) - — get market orderbook, get market candlesticks, get market trades. - — get market rules は、市場の規則を統合します primary/rules secondary、早期閉鎖状態、決済ソース、およびシリーズの禁止; fetch rules pdf は、実際の法的契約PDFのテキストをダウンロードして抽出し、エージェントはそれを読むことができます。 - — get exchange status、get exchange schedule(市場オープン、時間)。 - — get balance、get positions、get fills、get settlements。 - — create order、require order、remoend order、remove order、プラスlist orders/get order.

概要(AI 翻訳)

Claude コードおよび他の代理店を与えるMCPサーバーは一流のインターフェイスをに利用します カルシ エンドツーエンド取引のために構築されています:市場をブラウズし、それらを調査し、exactの決済を読みます ルール(契約期間PDFの取得を含む)、取引の実行(MCPツールによる)

##ハイライト

  • Discovery — [list_markets, [get_market], [list_events]], [[get_event]]], [[list_series]], [get_series]。 (カルシはフリーテキスト検索がありません。[list_markets]]フィルターは検索です。) -Research — [get_market_orderbook], [get_market_candlesticks]], [get_market_trades]. -Deepルール — [get_market_rulesは、市場の[[rules_primary]/[rules_secondaryを連結します。 早期閉鎖条件、決済ソース、およびシリーズ禁止; [fetch_rules_pdf] 実際の法的契約PDFのテキストをダウンロードして抽出して、エージェントはそれを読むことができます。
  • Exchange — [get_exchange_status, [get_exchange_schedule]] (市場が開いて、その時間). get_balance, get_positions, get_fills], [get_settlements]. create_order, cancel_order, amend_order, [decrease_order], [list_orders/[get_order]])

デフォルトで安全

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Server Kalshi

An MCP server that gives Claude Code and other agent harnesses a first-class interface to Kalshi. It is built for end-to-end trading: browse markets, research them, read the exact settlement rules (including pulling the contract-terms PDFs), and execute trades — all through MCP tools.

Highlights

  • Discovery — list_markets, get_market, list_events, get_event, list_series, get_series. (Kalshi has no free-text search; list_markets filters are the search.)
  • Research — get_market_orderbook, get_market_candlesticks, get_market_trades.
  • Deep rules — get_market_rules consolidates a market’s rules_primary/rules_secondary, early-close conditions, settlement sources, and series prohibitions; fetch_rules_pdf downloads and extracts the text of the actual legal contract PDF so the agent can read it.
  • Exchange — get_exchange_status, get_exchange_schedule (is the market open, and its hours).
  • Portfolio — get_balance, get_positions, get_fills, get_settlements.
  • Trading — create_order, cancel_order, amend_order, decrease_order, plus list_orders / get_order.

Safety by default

  • The server targets Kalshi’s demo (sandbox) environment unless you explicitly set KALSHI_ENV=prod.
  • Order-placing tools (create_order, amend_order) require confirm=true. Without it they return a preview — a human-readable summary and the exact payload — and place nothing.
  • Credentials are optional: all market/rules tools work unauthenticated. Only portfolio and order tools need an API key + RSA private key.

Intuitive order model

Kalshi’s V2 order API quotes everything from the YES leg (bid/ask in fixed-point dollars). This server exposes the natural model instead — action (buy/sell) + side (yes/no) + a whole cents limit price — and translates it (including the buy-NO ⇄ sell-YES price inversion).

Configuration

Variable Default Purpose
KALSHI_ENV demo demo (sandbox) or prod (real money). Derives the base URL.
KALSHI_API_KEY (none) Kalshi API key ID. Required only for authenticated tools.
KALSHI_PRIVATE_KEY_PATH (none) Path to your RSA private key .pem. Required for authenticated tools.
BASE_URL (derived) Optional explicit REST base override (must include /trade-api/v2).

See .env-example. Get API credentials at docs.kalshi.com/getting_started/api_keys and a demo account via the demo environment guide.

Claude Desktop (uvx)

"mcpServers": {
  "kalshi": {
    "command": "uvx",
    "args": ["mcp-server-kalshi"],
    "env": {
      "KALSHI_ENV": "demo",
      "KALSHI_API_KEY": "",
GitHub で README 全文を見る

インストール

uvx mcp-server-kalshi
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

"mcpServers": { "kalshi": { "command": "uvx", "args": ["mcp-server-kalshi"], "env": { "KALSHI_ENV": "demo", "KALSHI_API_KEY": "<YOUR KALSHI API KEY>", "KALSHI_PRIVATE_KEY_PATH": "PATH TO YOUR RSA KEY FILE" } } }