Anti-firehose options-flow data for AI agents: curated daily pool, features, realized outcomes.
GammaRips MCP Server (io.github.DevDizzle/gammarips)
GammaRips is an MCP server providing “options-flow intelligence” primitives for AI agents. It ranks optionable US names by liquidity, selects a curated daily pool, and supports reasoning over that pool using point-in-time features and realized outcomes. The server exposes 9 tools for agent workflows.
Ranks 3,532 optionable US names by liquidity each trading night
Keeps bullish names from the top 100 and prices one OTM call in each (≈40–50 contracts)
🚀 Use Cases
Bring-your-own-agent trading workflows using a daily tradable contract pool
Agent reasoning over options-flow data with point-in-time features and realized results
⚡ Developer Benefits
Programmatic access via 9 server tools
Stable, daily-ranked and sized pool intended to be “actually tradeable”
⚠️ Limitations
Pool is specifically derived from US optionable names ranked by liquidity
Pool composition and size depend on the described nightly ranking and OTM-call selection
Captured live from the server via tools/list.
get_pool
The GammaRips candidate pool for a scan date. One tool, four `view`s:
* view="enriched" (DEFAULT) — the AI-enriched pool: news, technicals,
catalyst, the recommended contract (an OTM call chosen on contract
liquidity), and the 60-day momentum feature `mom_60`. Funnel for
scan_date >= 2026-08-24 (liquid-universe era): the 100 most liquid
optionable names, BULLISH only, one call each, roughly 40-50 rows.
Liquidity decides membership, not unusual activity; the $500K UOA
floor is retired and `overnight_score>=1` is a cosmetic floor.
Earlier scan dates come from the prior UOA-gated funnel (UOA>$500K,
top-50 BULLISH); the two eras are not one population.
This is the daily candidate set your agent reasons over to its OWN
contract (see get_playbook("run-your-own-tournament")). Served from a
leakage-safe view (forward-outcome columns physically stripped);
`summary=True` gives ~21 decision columns, `fields=[...]` a strict
projection, `summary=False` full rows, `offset` pages.
* view="raw" — the wide overnight scan BEFORE the pool cut (the ranked
liquid universe for scan_date >= 2026-08-24; the market-wide
unusual-activity scan for earlier dates). Honors `direction`,
`min_score`, `ticker`, `limit`.
* view="features" — point-in-time FEATURE VECTORS from the leakage-safe
allowlist view `enriched_features_v1` (identity + features + cohort
metadata only; no outcome/label/telemetry column can appear). The
quantitative substrate for joining against query_outcomes. Lags the
live pool by ~1-2 trading days.
* view="preview" — a minimal public teaser (ticker, direction, score,
headline, directional UOA) for the most recent scan; no contract
specifics or thesis.
TIER: view="preview" is FREE (no key). The enriched / raw / features views
are the paid product — they require an active pro subscription key; an anon
call to them returns `subscription_required` (get_pool(view='preview') is
named as the free entry point).
Liquidity caveat (all views): `recommended_oi`/`recommended_volume` are
scan-time snapshots, not live values; `recommended_spread_pct` is
permanently NULL on the current data plan — re-check with get_liquidity.
Args:
view: "enriched" (default) | "raw" | "features" | "preview".
scan_date: YYYY-MM-DD (default: latest available scan for the view).
direction: "bull"/"bear" prefix filter (enriched / raw).
ticker: exact ticker filter (enriched / raw / features).
min_score: overnight_score floor (raw view only; clamped 0-10).
limit: max rows (enriched/raw clamp 1-50, features 1-100, preview 1-20).
summary: enriched only — True=compact columns, False=full rows.
fields: enriched only — explicit strict column projection.
offset: enriched only — pagination offset.
Deep dive on a single ticker/contract. Two `view`s:
* view="detail" (DEFAULT) — the full enriched signal for one ticker:
thesis, catalyst, the recommended contract, and point-in-time
features (leakage-safe view). `full=true` includes the long narrative
(news_summary, flow_intent_reasoning). If the ticker isn't in the
pool for the date, the error lists the dates on which it does appear.
* view="earnings" — the doctrine earnings-window check (RM-003): the
next scheduled earnings date and whether it lands ON OR BEFORE the
contract expiration (`earnings_in_window`). The engine applies this
rail only at its own pick time, NOT in the pool, so pool rows CAN
carry earnings-window names — check every candidate yourself. Pass
the pool's `recommended_contract` and both ticker and expiration are
derived. FAIL-CLOSED: unknown date -> earnings_in_window=null, treat
as in-window.
Args:
ticker: underlying symbol (required for detail; optional for earnings
if `contract` is given).
view: "detail" (default) | "earnings".
scan_date: detail only — YYYY-MM-DD (default: latest for the ticker).
full: detail only — include the long narrative fields.
expiration: earnings only — option expiration YYYY-MM-DD to test.
contract: earnings only — OCC ticker supplying ticker+expiration.
FRESH (entry-day) liquidity — the read the pool's session-frozen
`recommended_oi`/`recommended_volume` cannot give you (the overnight sweep
only becomes OI the next morning). Two modes, chosen by whether you pass a
single `contract`:
* `contract` given — ONE contract's snapshot: open interest, session
volume, last trade, day range, underlying price, greeks. Cache-first
(the engine re-reads the pool every ~10 min in market hours); pass
live=true to force a fresh upstream fetch or read a contract NOT in
today's pool.
* `contract` omitted — the WHOLE current pool (or your `contracts`
shortlist, max 60) in ONE call — the batch companion for the ~10:00 ET
decision window. Most-recent read per contract with explicit `as_of`.
Deliberately serves NO bid/ask/mid/spread (not available on the current
data plan — absent, not NULL). Judge fill risk from open_interest (updates
once each morning), day_volume (live session), last_trade recency, and the
day range.
Args:
contract: OCC ticker for the single-contract mode (verbatim from the
pool's `recommended_contract`). Omit for the whole-pool batch.
scan_date: pool date YYYY-MM-DD (batch mode; default: latest pool).
contracts: optional shortlist filter for the batch mode (max 60).
live: single-contract mode — force a fresh upstream fetch.
The realized-outcome + receipts substrate behind the engine. One tool,
nine `view`s. Whole-pool composites under any FIXED exit are NEGATIVE by
construction — these are a research surface (how outcomes distribute
across features and exits), never a strategy track record.
* view="labels" (DEFAULT) — row-level realized bracket LABELS joined to
point-in-time features. horizon "same_day" (live V7.1 GIGO +40/-30) or
"3d" (legacy +80/-60) — never pooled. NULL-label and illiquid rows
excluded (counts in meta). `aggregate_only=True` returns summary stats
instead of rows. Filters: scan_date_from/to, ticker, delta_min/max,
min_overnight_score, exit_reason.
* view="summary" — grouped aggregates over the labeled pool. `group_by`
one of none|delta_bucket|overnight_score|premium_score|exit_reason|
day_of_week|moneyness_bucket.
* view="surface" — the OPPORTUNITY SURFACE: per-contract realized MFE/MAE
excursions with NO exit applied (profit potential, exit free). Uses
scan_date OR a `days` lookback, `ticker`, `delta_min/max`,
`include_open`. `aggregate_only=True` returns MFE/MAE quantiles over
the FULL filtered set — use it for exit design. The row mode is capped
at 200 and truncates oldest-first WITHIN a scan_date, so its oldest
date is a highest-MFE-only slice; it reports `truncated`,
`matched_rows`, and `partial_scan_date` so you can see that happen.
* view="harvest" — the touch-probability curve: P(premium touched +X%)
with CIs, day-of-peak buckets, stop-touch rates. `targets`, `stops`,
date range, delta band.
* view="exit_rule" — RESEARCH-ONLY "bring your exit, we score it":
rule="bracket" (target_pct/stop_pct) or rule="trailing" (trail_pct,
activation_pct) scored against the surface / minute tape.
* view="signal_performance" — UNDERLYING-STOCK direction outcomes for
the broad pool (NOT option PnL). Filters scan_date, ticker, direction,
outcome.
* view="win_rate" — aggregate UNDERLYING-direction win rate over `days`
(NOT option PnL; headline key carries its universe).
* view="positions" — the RECEIPTS: realized (closed) paper trades from
the engine's own daily pick, row-level, cohort-filtered
(`policy_version`, default live). Over `days`, `limit`.
* view="performance" — cohort AGGREGATE of the receipts over `days`
(win rate, avg/median/best/worst), `direction`, `min_premium_score`,
`policy_version`. When the cohort has no closed trades, every aggregate
is `null` and `total_trades` is 0 — NEVER 0.0. A `null` here means "not
measured yet", not "zero percent"; do not render it as a result.
All returns are FRACTIONS (0.40 = +40%). Realized data serves closed
windows only. Paper-traded research data; not investment advice.
Args:
view: which surface (see above). Default "labels".
horizon: "same_day" | "3d" (labels/summary/exit_rule). If omitted, the
native default per view is used: labels/summary => "same_day" (the
live GIGO policy), exit_rule => "3d" (its excursion window).
group_by: summary grouping dimension.
scan_date / scan_date_from / scan_date_to: date filters (per view).
ticker / direction / delta_min / delta_max / min_overnight_score /
exit_reason / outcome: row/aggregate filters (per view).
days: lookback window (surface/win_rate/positions/performance).
limit: max rows (labels 1-200, signal_performance 1-50, positions 1-200).
aggregate_only: labels/surface views — summary stats instead of rows.
On `surface` this is also the only mode immune to the 200-row cap.
include_open: surface view — include not-yet-closed windows.
targets / stops: harvest view — PERCENT grids.
target_pct / stop_pct / rule / trail_pct / activation_pct: exit_rule view.
policy_version: positions/performance cohort filter
Raw option price data for YOUR OWN entry/exit rule. This server does NOT
simulate or validate exits — it returns bars (the RM-002/RM-004 boundary).
Two `granularity` modes:
* granularity="minute" (DEFAULT) — the intraday minute path for one
session (`date` required). Optionally pass a bracket (target_pct/
stop_pct, PERCENT of the 10:00 ET anchor) and the response also reports
the exact FIRST-CROSSING sequence measured from the tape. Pool
excursion windows are served from the engine's minute-path table;
anything else falls back to an upstream minute fetch.
* granularity="day" — the DAILY mark series (OHLCV) over a date range,
to mark a live paper position day by day or replay a closed one. Uses
`from_date`/`to_date` (span capped at 120 days); `date` is ignored.
Option tape is THIN — minutes/days with no prints have no bar; treat
touch times as evidence, not tick-perfect truth. Paper-trade research
data; not investment advice.
Args:
contract: OCC option ticker (e.g. "O:UNIT260717C00030000").
date: minute mode — ET session date YYYY-MM-DD (required).
granularity: "minute" (default) | "day".
target_pct: minute mode — optional +X% level for first-crossing.
stop_pct: minute mode — optional -Y% level for first-crossing.
from_date: day mode — start YYYY-MM-DD (default: 30d before to_date).
to_date: day mode — end YYYY-MM-DD inclusive (default: today ET).
Point-in-time market-regime context for a scan date: VIX close, VIX3M,
SPY trend state, and the 5-day VIX delta — all as-of <= scan_date (the
selection point, leakage-safe), plus the engine's regime safety rail
evaluated on those values.
The rail: the engine fail-closes (no trade) when spot VIX > VIX3M
(backwardation — the market pricing imminent volatility is an adverse
regime for short-dated directional longs).
Served from the labeled substrate, which lags the live pool by ~1-2
trading days. Values are constant per scan_date.
Args:
scan_date: YYYY-MM-DD. Defaults to the latest scan date carrying
regime features.
Returns:
{scan_date, vix_at_scan, vix3m_at_enrich, spy_trend_at_scan,
vix_5d_delta_at_scan, regime_rail_pass, rail_definition}
Market-calendar reference. Two `view`s:
* view="status" (DEFAULT) — is the US equity market open today, plus the
next open/close, holiday, and early-close flags (NYSE calendar,
deterministic — no "is the market open?" hallucination).
* view="scan_dates" — which recent scan dates have GammaRips data, with
per-date signal counts (the pool's data-availability calendar).
Args:
view: "status" (default) | "scan_dates".
Methodology + reference, versioned server-side (re-fetch rather than
caching long-term). Arg-driven:
* `field` given — the plain-English DEFINITION + role of a signal field
(deterministic lookup, no LLM). e.g. field="mom_60". The response's
`available_fields` lists every documented field.
* `name` given — a methodology playbook (markdown) by name, OR two
special reference pages:
- name="schema" (or "data-contract") -> the machine-readable
substrate DATA CONTRACT: every outcome/label column with its
leakage classification (feature|label|opportunity|
regime_telemetry|identity) and as-of boundary. Only `feature`
columns are safe as selection inputs.
- any other name -> the playbook markdown (start-here,
daily-workflow, run-your-own-tournament, exit-lab,
leakage-and-data-contract, changelog).
* neither — the CATALOG of published playbooks (name/title/summary),
plus a pointer to the field dict (`field=`) and schema page.
Args:
name: playbook name, or "schema"/"data-contract" for the data contract.
field: a signal field name to explain (overrides `name`).
The daily intelligence report. Two `view`s:
* view="report" (DEFAULT) — the full report (title, markdown content,
scan_date) for `date`, or the most recent report if `date` is omitted.
* view="list" — recent reports, most recent first (scan_date, title,
created_at), titles deduped. Use `limit`.
Args:
date: report date YYYY-MM-DD (report view; default: most recent).
view: "report" (default) | "list".
limit: list view — how many reports (default 10, clamped 1-30).
Options-flow intelligence primitives for AI agents.
Every trading night GammaRips ranks 3,532 optionable US names by liquidity, takes the top 100, keeps the bullish ones, and prices one out-of-the-money call in each. That is a pool of roughly 40 to 50 contracts your agent can actually trade. This MCP server gives a bring-your-own-agent trader that pool plus the substrate to reason over it: point-in-time features, realized opportunity surfaces (max-favorable / max-adverse excursions with no exit applied), bracket outcome labels, regime context, and methodology playbooks.
Better-quality contracts, by the numbers. The pool is selected on contract liquidity. Since the liquidity rule went live (2026-08-24, 1,301 contracts), median open interest is 4,664 and median session volume is 1,039, against 906 and 232 in the 60 scan days before. The thinnest 10% still carry 1,635 open interest, against 29. In a 60-day study, no-fill at the 10:00 ET entry fell from 40.5% to 6.1%. Liquid contracts are the ones you can enter and exit near the quote.
Design principle: primitives, never a pick. There is no "what should I buy" endpoint. Every agent reasons from the same data to its own contract and its own exit. Paper-traded research data; educational only; not investment advice.
Server card:https://mcp.gammarips.com/.well-known/mcp/server-card.json
OAuth endpoint (chat clients):https://mcp.gammarips.com/pro. Same
server, same 9 tools, but it requires a credential, so ChatGPT, Claude
(claude.ai / Desktop), Cursor, and any MCP client that speaks OAuth 2.1
offers a GammaRips sign-in when you add it. Your subscription tier rides in
the token. Discovery: /.well-known/oauth-protected-resource/pro;
authorization server: https://gammarips.com.
Auth: two credentials, one tiering. (1) API key: gr_live_... as
Authorization: Bearer <key> (or X-API-Key), for clients that can send a
header. (2) OAuth 2.1 access token, minted by gammarips.com after you sign in
(chat clients) or by a machine client with client_credentials (headless
agents, see below). Free-tier tools work on /mcp with no credential at all;
the 4 pro tools need an active subscription on either credential. Enforce
is live. Get access at gammarips.com/pricing.
Available tools (9)
V4 (2026-07-17) consolidated the 29-tool V3 surface into 9. The absorbed tools
live on as view= / granularity= modes of these 9. web_search was removed.
Free tier (no key): get_pool, get_regime_context,
get_market_calendar_status, get_playbook, get_daily_report.
Pro tier (Agent Access, $29/mo key): get_signal, get_liquidity,
query_outcomes, replay_contract.
get_pool(free) — the candidate pool: view="enriched" (curated
narrative/technicals/contract/mom_60, leakage-safe view; default),
"raw" (pre-curation scan), "features" (point-in-time feature vectors
from the allowlist view), "preview" (public teaser).
get_signal(pro) — one ticker: view="detail" (full enrichment,
default) or view="earnings" (the doctrine earnings-window check).
get_liquidity(pro) — fresh entry-day liquidity: a single contract
(cache-first, live=true to force upstream) or the whole pool / a
contracts shortlist in one call. No quote fields on this data plan.
query_outcomes(pro) — the outcomes + receipts substrate, via view=:
labels (row-level bracket labels + features; default), summary (grouped
aggregates), surface (per-contract MFE/MAE excursions, exit-free —
aggregate_only=True gives MFE/MAE quantiles over the WHOLE window and is the
mode to use for exit design, since row mode is capped at 200 rows and declares
it via truncated / matched_rows / partial_scan_date),
harvest (touch-probability curve), exit_rule (score YOUR bracket/trailing
rule), signal_performance / win_rate (UNDERLYING-direction, not option
PnL), positions / performance (the engine's realized paper-trade receipts,
cohort-filtered). The live cohort is the pairV7_1_TILTED_GIGOand
entry on/after cohort_start (2026-08-10), which responses now carry — the
policy label ALONE does not define the cohort, because the ledger retains
disowned cohorts under that same label. Right after a reset the live cohort
is legitimately empty: total_trades: 0 with null aggregates means "has not
accrued closed trades yet", NOT "0% win rate". policy_version="all" reaches
every era but includes cohorts the engine has disowned — not a track record.
replay_contract(pro) — raw price tape for your own exit rule:
granularity="minute" (intraday path + exact first-crossing; default) or
"day" (daily OHLCV mark series). This server does not simulate exits.
get_regime_context(free) — VIX/VIX3M/SPY-trend as-of scan date + the
fail-closed regime rail.
get_market_calendar_status(free) — view="status" (NYSE open/close,
default), view="scan_dates" (which scan dates have data), or
view="freshness" (is the pool the right pool: the expected scan date,
each pipeline stage's status, the scan date get_pool serves, and a
fail-closed fresh flag with machine reasons).
get_playbook(free) — methodology + reference: no arg lists the
catalog; name= fetches a playbook (start-here, daily-workflow,
run-your-own-tournament, exit-lab, leakage-and-data-contract,
changelog) or name="schema" the machine-readable data contract (per-column
leakage classification); field= explains any signal field (deterministic,
no LLM). Playbooks are also MCP resources (gammarips://playbooks/{name}).
web_search (V4). The engine's own daily selection is not published same-day
(get_todays_pick / list_todays_picks / get_open_position removed in V3);
realized receipts remain via query_outcomes(view="positions").
Prompts
morning_brief, analyze_candidate(ticker), run_your_own_tournament — thin orchestrations over the tools above. None returns a pick.
Quick connect
Claude Code
bash
# Free tier (no key):
claude mcp add --transport http gammarips https://mcp.gammarips.com/mcp
# Pro (with your key):
claude mcp add --transport http gammarips https://mcp.gammarips.com/mcp \
--header "Authorization: Bearer gr_live_your_key"# Pro with OAuth instead of a key (sign in once in the browser, tokens refresh):
claude mcp add --transport http gammarips https://mcp.gammarips.com/pro
# then run /mcp inside Claude Code and choose "Authenticate"
ChatGPT, Claude (claude.ai / Desktop), and other OAuth chat clients
Add a custom connector / remote MCP server with the URL
https://mcp.gammarips.com/pro. The client discovers the authorization server
(gammarips.com), registers itself (Client ID Metadata Document or dynamic
registration), and opens the GammaRips sign-in + consent page. No key to paste.
Not subscribed yet? The connection still works on the free tools and the pro
tools answer with the subscribe steps; pro access applies on the next token
refresh (within an hour) after you subscribe, or when you reconnect.
Headless agents (a VM, a cron, a server): machine clients
For an agent with no browser and no human, create a machine client on
gammarips.com/account (Agent Access required).
You get a client_id + client_secret (shown once). Mint a one-hour access
token with the client_credentials grant and send it as a bearer:
bash
TOKEN=$(curl -s -u "$GR_CLIENT_ID:$GR_CLIENT_SECRET" \
-d grant_type=client_credentials \
-d resource=https://mcp.gammarips.com/pro \
https://gammarips.com/oauth/token | jq -r .access_token)
# Claude Code headless (claude -p), with the token in .mcp.json:# { "mcpServers": { "gammarips": { "type": "http",# "url": "https://mcp.gammarips.com/pro",# "headers": { "Authorization": "Bearer ${GAMMARIPS_MCP_TOKEN}" } } } }
GAMMARIPS_MCP_TOKEN="$TOKEN" claude -p "..."
Mint before each run: there is no refresh token for machine clients, and the
tier is re-read from your subscription on every mint. An API key still works
for the same purpose; the machine client is the short-lived-credential option.
Cursor
Easiest — install the plugin. This repo is an Open Plugins-standard plugin (.cursor-plugin/plugin.json): it bundles the hosted MCP server plus a gammarips-options-flow skill that teaches your agent the data-not-advice workflow. Install it from the plugin marketplace (search "GammaRips") or point Cursor at this repo. It connects on the free tier out of the box; add your gr_live_... key for pro tools.
Manual: Settings → MCP → Add new MCP server, or add to .cursor/mcp.json:
Clients that only speak SSE can use the legacy /sse endpoint during the deprecation window.
Free tier works with no account: get_pool, get_regime_context, get_market_calendar_status, get_playbook, get_daily_report. Pro tools (get_signal, get_liquidity, query_outcomes, replay_contract) require Agent Access ($29/mo, 30-day free trial) — generate a key at gammarips.com, or connect through /pro and sign in.
See .env.example for the current environment variables. Typical values include:
GCP_PROJECT_ID
FIRESTORE_DATABASE
GCS_BUCKET_NAME
LOG_LEVEL
PORT
REQUIRE_API_KEY / AUTH_SHADOW (API-key gate mode)
OAUTH_ENABLED / OAUTH_ISSUER / OAUTH_JWKS_URL / OAUTH_MCP_RESOURCE_ORIGINS
(OAuth 2.1 resource server; defaults are production, see src/utils/oauth.py)
Validation
Python compile check
bash
python -m compileall src
Docker build check
bash
docker build -t gammarips-mcp:test .
Deployment
Deployment is manual (the CD workflow was removed; .github/workflows/ci.yml
only runs ruff format --check + ruff check on pushes/PRs to main).
Ship a new revision with the deploy script, which uses a Cloud Run source
deploy and reproduces the live config exactly (secrets via Secret Manager,
REQUIRE_API_KEY=false):
The API keys are mounted from Secret Manager — never pass them as plain env
vars (that clobbers the secret mounts).
Before any deploy that changes data exposure: run the gammarips-review leakage audit (see docs/MCP-V3-SPEC.md §2.4).
Security
See SECURITY.md for the trust model — read-only guarantee,
parameterized-query SQL-injection defense, response-size bounds, per-IP rate
limits, sanitized errors, leakage-safe views, the column-classification
data contract, and the OAuth 2.1 resource-server model (this service only
verifies tokens; gammarips.com is the authorization server).