# Backtest SPX dealer-gamma rules from your AI assistant

> Source: <https://dev.to/gexlive/backtest-spx-dealer-gamma-rules-from-your-ai-assistant-2ffn>
> Published: 2026-08-20 18:21:11+00:00

gex.live has an MCP server. Add it to Claude, Cursor, ChatGPT or any MCP client and the assistant can read the dealer-positioning archive and drive the backtesting Lab on your behalf. The one-line version is the title. Here is the rest.

**Free, no key** — the same finished-session data that is free on the website:

`list_sessions`

— finished SPX sessions in the archive, newest first, paged (max 50 a call).`get_session(day)`

— one session's dealer-positioning summary: OHLC, the zero-gamma flip and how often price crossed it, call/put walls, the hold band, net-gamma percentile, ATM IV at the open. Measurements only.`get_levels(day)`

— just the level set for one session — flip, call resistance, put support, hold band — plus where the session closed relative to them.**Keyed** — the Lab, metered in credits exactly as on the site. These tools only appear in the tool list once the client sends a Lab token:

`lab_compile(message)`

— turn a plain-words idea ("fade a +3 sigma stretch above vwap on top-decile volume") into a testable rule. Free of credits, needs a positive balance. Returns the compiled spec, a clarifying question, or compile errors — never a guess.`lab_run(id, kind)`

— one conveyor step: `backtest`

first (rule → tested), then `quant`

(the LightGBM optimize, tested → ready). One credit, refunded on failure. The result is the engine's honest verdict: per-leg era tables — all / this year / holdout.`lab_state`

— your whole Lab in one call: ideas with stages and results, which idea holds the conveyor, your credit balance.`lab_thread(id)`

— the compile-chat thread for one idea.`lab_idea(id, action)`

— desk actions: put a ready idea on the desk, drop it back to the start, delete, or set its desk display/alert options.When a keyed tool is called without a token, the error is the instruction: what it does, where to get a key (gex.live/account → LAB & API, shown once, scoped to the Lab only, revocable), what it costs. The assistant relays it verbatim. The funnel is one sentence.

Header-based auth is fine for Cursor and the CLI (`claude mcp add --transport http gex https://mcp.gex.live/mcp --header "Authorization: Bearer labk_…"`

). claude.ai web and desktop cannot send headers, so there is an OAuth facade on the product host: discovery documents, dynamic client registration, a consent page behind the normal login, PKCE required, codes encrypted and short-lived. Connect once, the Lab tier is there.

`list_sessions`

, `get_session`

× 10, an honest summary.`lab_compile`

, then `lab_run(backtest)`

, a verdict with era tables and a holdout column — probably a polite no.`lab_state`

: stages, results, balance.A signal service, and not a live feed: today's positioning is the paid stream on the site, not an MCP tool. The server exposes finished measurements and a way to test rules against them. If a rule survives the holdout the Lab will say so; so far, very few do, including the site's own levels. The MCP server is listed in the official registry (`registry.modelcontextprotocol.io`

, `live.gex/gex-mcp`

) and on glama.ai.

Install: [https://gex.live/mcp](https://gex.live/mcp) · free archive: [https://gex.live/sessions](https://gex.live/sessions)
