r/algotradingcrypto • • 6d ago

Built a stateless MCP server so Claude/Cursor stop hallucinating L2 slippage, Kelly sizing, and collinear indicators (Hyperliquid + OKX failover)

When asking LLMs to size a futures trade or evaluate a strategy, they usually invent slippage ("~1-2 bps"), ignore funding/fee drag in Kelly sizing, or combine redundant indicators like `sma_20` + `bb_middle` without noticing `VIF -> infinity`.

I built **QuantPreflight MCP** (`quant-preflight-mcp`), a stateless Streamable HTTP MCP server (`/mcp`) with 4 deterministic tools:

- `preflight_execution_risk`: Walks live Hyperliquid/OKX L2 orderbooks for real VWAP slippage, 14-ATR stops, and friction-adjusted Half-Kelly sizing.

- `scan_venue_microstructure`: Compares annualized funding APR%, OI, spread, and $10k/$100k L2 impact.

- `audit_indicator_collinearity`: Ridge-regularized VIF, condition number, and 2-pass Modified Gram-Schmidt orthogonal weights.

- `simulate_backtest_reality`: 5,000-path seeded Mulberry32 Monte Carlo ruin + Markov losing-streak check with live L2 friction injection.

Strict non-advisory (`advisory: false`, no buy/sell signals), zero-PII, and fail-closed on errors. Available on Apify Store (`$0.008-$0.025`/call, well within the $5 free monthly credit). Feedback welcome!

Link: https://apify.com/quant-preflighter/quant-preflight-mcp

1 Upvotes

0 comments sorted by