Skip to main content

sentient-trader-mcp

Autonomous Kalshi BTC prediction market trader — MCP server for Claude Code

Give Claude Code full authority to analyze Kalshi BTC options markets and place real trades on your behalf. The engine uses a Markov chain momentum signal with empirically-tuned gates (timing, vol regime, Hurst exponent, price cap) to identify high-probability entries.

Backtest (30 days, $200 start): +397% return · 82% win rate · 5% max drawdown


Install

pip install sentient-trader-mcp

Configure

Create ~/.sentient-trader/config.env:

KALSHI_API_KEY=your-kalshi-api-key-id
KALSHI_PRIVATE_KEY_PATH=~/.kalshi/private_key.pem

Or set environment variables directly.

You need a Kalshi account with API access and an RSA key pair.
Generate keys in Kalshi → Settings → API.

Register with Claude Code

claude mcp add -s user sentient-trader -- python -m sentient_trader_mcp

Use it

Open Claude Code and type /trade — Claude will:

  1. Check the active KXBTC15M market
  2. Run the full Markov signal
  3. Place a real order if all gates pass
  4. Report balance and P&L

Or ask directly:

  • "What's the current market signal?"
  • "Check my Kalshi balance"
  • "Show my open positions"

Tools

Tool Description
get_market Current active KXBTC15M market — strike, BTC price, minutes left
analyze_signal Full Markov signal — recommendation, position size, all gate results
place_trade Place a real Kalshi limit order ⚠
get_balance Account balance
get_positions Open positions + resting orders
cancel_order Cancel a resting order
kelly_size Calculate Kelly-optimal position size

The Signal

Markov chain momentum — a 9-state model of 5-min BTC price changes. Chapman-Kolmogorov propagation over T steps gives P(BTC above strike at expiry).

Gates (all must pass to trade):

  • Markov gap ≥ 11pp from 50% — model must be ≥61% confident
  • Markov persistence ≥ 82% — momentum state must be self-reinforcing
  • Garman-Klass vol ≤ 1.25× reference — skip chaotic windows
  • Hurst exponent ≥ 0.50 — trending regime only, not mean-reverting
  • Timing: 6–9 min (standard) or 3–12 min (65–73¢ golden zone)
  • Entry price ≤ 72¢ — above this the market is efficiently priced

Kelly sizing (tiered by price zone):

  • 65–73¢: 35% Kelly · 73–79¢: 12% Kelly · 79–85¢: 8% Kelly

Blocked UTC hours: 11:00 and 18:00 (empirically -40pp to -57pp margin)


Overridable Parameters

Set via environment variables:

MARKOV_MIN_GAP=0.11
MIN_PERSIST=0.82
MAX_ENTRY_PRICE=72
MAX_VOL_MULT=1.25
MIN_HURST=0.50

Disclaimer

This places real orders with real money on a regulated prediction market exchange. Use at your own risk. Nothing here is financial advice. Start with analyze_signal in read-only mode before enabling live trading.

License

MIT

Metadata

Release files for sentient-trader-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentient-trader-mcp 0.1.3
File Size Uploaded Provenance Actions
sentient_trader_mcp-0.1.3.tar.gz 12.9 kB Without provenance Details for sentient_trader_mcp-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sentient-trader-mcp 0.1.3
File Interpreter ABI Platform Actions
sentient_trader_mcp-0.1.3-py3-none-any.whl Python 3 none any Details for sentient_trader_mcp-0.1.3-py3-none-any.whl

Total release size: 25.2 kB

Release files / sentient_trader_mcp-0.1.3.tar.gz

Download URL sentient_trader_mcp-0.1.3.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
21ea4b688464cb8ab162378be24efbad65c0a833144af4f376bc0f0fd3de099b
BLAKE2b-256 checksum
How to use checksums
3842a3e562a5c81b0ba9825dca8c0e5f36933fb4239c443839e97093ed7f6dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / sentient_trader_mcp-0.1.3-py3-none-any.whl

Download URL sentient_trader_mcp-0.1.3-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63e0ac05e27b990cf0aa1f6799581cae757fe637efb680ee9d9c91da2cbf20dd
BLAKE2b-256 checksum
How to use checksums
67d4184f287cd59745c41c97a625eb7cc4ffdb6def2f2ef2651d66a87e55dde0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for sentient-trader-mcp 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page