DEV Community

GEX.live
GEX.live

Posted on

Backtest SPX dealer-gamma rules from your AI assistant

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.

Two tiers, one rule: free data stays free

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.

Works in claude.ai out of the box

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.

What it is for

  • "Show me the last ten sessions where the flip was above spot at the open and tell me what the close did." → list_sessions, get_session × 10, an honest summary.
  • "Test: fade the first touch of the call wall after a gap up." → lab_compile, then lab_run(backtest), a verdict with era tables and a holdout column — probably a polite no.
  • "Where is my Lab at?" → lab_state: stages, results, balance.

What it is not

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 · free archive: https://gex.live/sessions

Top comments (0)