Skip to main content
Glama
Trading Volatility MCP

Trading Volatility MCP

Official

Trading Volatility MCP

The options & volatility data source agents can query.

A Model Context Protocol server for Trading Volatility — lets any AI agent discover and retrieve options market-structure data (GEX, gamma flip levels, dealer positioning, skew, max pain, expected-move levels, options flow, and ranked trade setups) over the public v2 API, in conversation.

  • Read-only — discovers and retrieves data over your existing Trading Volatility subscription. No orders, payments, or monitoring.

  • Stateless passthrough — forwards your Authorization: Bearer <key> to the v2 API and stores nothing. Local and hosted modes are the same code path.

  • Two transports — stdio for local agents, streamable HTTP + SSE for remote, multi-user hosting.

  • Works without a key — the demo tickers (AAPL, VIX, KO, META, AMZN, XOM, GM, MCD) work out of the box.

Tools

Tool

What it returns

list_capabilities

The v2 capability manifest (/llm-spec) — call first to self-orient

get_auth_status

Whether you're in keyed or demo mode

get_ticker_state

Canonical compact state snapshot

explain_ticker

Deterministic narrative interpretation of the regime

get_market_structure

Headline signal, regime, expected behavior, levels

get_signals

Current setup/positioning signals

get_levels

Key levels (json / tradingview / tos)

get_series

Historical daily series for selected metrics over a window

get_gamma_curve

Gamma strike curve (per expiration, optionally realtime)

get_gamma_by_expiration

Gamma decomposition by expiration bucket

get_gex_by_strike

Net GEX strike curve with call/put contributions

get_options_volume

Options volume by strike for an expiration

rank_top_setups

Cross-ticker opportunity ranking, with filters

run_screener

A named thesis preset over the ranking

rank_income_setups

Cross-ticker covered-call / cash-secured-put ranking, with filters

get_trade_setup

Compact agent-oriented trade setup for one ticker

Related MCP server: FlashAlpha MCP Server

Quickstart (local, stdio)

# Run straight from PyPI with uvx (or: pipx run tv-mcp)
uvx tv-mcp                       # stdio; uses TV_API_KEY or a config file

# …or from source
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
cp config.example.json config.json   # add your API key (git-ignored)
python -m tv_mcp                      # stdio by default

Validate:

ruff check . && pytest

Credentials & precedence

The key is resolved in this order (first match wins):

  1. Per-request header — Authorization: Bearer <key> (or X-Api-Key) — hosted mode.

  2. Environment — TV_API_KEY.

  3. Local JSON config — tv_api_key in config.json (see config.example.json; values support ${ENV_VAR} substitution so the key can stay in the environment).

  4. Demo mode — no key; only the demo tickers are available.

The key is never logged or persisted.

Remote (hosted, HTTP + SSE)

TV_MCP_TRANSPORT=http PORT=8000 python -m tv_mcp   # serves http://0.0.0.0:8000/mcp

Each request carries its own key, so one deployment serves many users:

POST /mcp           Authorization: Bearer <your-key>
GET  /health        liveness probe
GET  /AGENTS.md      agent-discovery doc (how to use this server)

Container build (binds $PORT, runs the HTTP transport — deploys to any container host such as Cloud Run, Fly, or ECS):

docker build -t tv-mcp .
docker run -p 8080:8080 tv-mcp

The server is stateless and holds no secrets, so it scales horizontally with no extra setup; tune limits with the env vars in .env.example.

Connecting an agent

Claude Code / Claude Desktop (local, stdio) — claude_desktop_config.json:

{
  "mcpServers": {
    "trading-volatility": {
      "command": "uvx",
      "args": ["tv-mcp"],
      "env": { "TV_API_KEY": "your-key" }
    }
  }
}

Remote MCP clients (Claude web custom integrations, OpenAI Responses mcp tool, Gemini function-calling, the Vercel AI SDK, ADK's MCPToolset, LangChain/LangGraph's MultiServerMCPClient) all point at the same endpoint and pass the key as a header:

  • URL: https://<your-deployment>/mcp

  • Header: Authorization: Bearer <your-key>

Because the server is a standard streamable-HTTP MCP endpoint with header auth, no per-client shim is needed — configure the URL and header in whichever framework you use. Copy-pasteable guides with real code for each:

How it works

agent ──tools──▶  TV MCP  ──HTTPS (Bearer key)──▶  stocks.tradingvolatility.net/api/v2
                 (stateless)

The agent carries continuity between turns; the server keeps no session state. It forwards the caller's key and returns the v2 payloads unchanged (they are already agent-shaped).

Repository layout

src/tv_mcp/
  cli.py          stdio | http entry point
  server.py       FastMCP wiring (tools, resources, /health, /AGENTS.md)
  settings.py     config loading + precedence
  auth.py         credential resolution (header → env → config → demo)
  tv/             v2 API client + normalized errors
  tools/          one module per tool group (tickers, curves, discovery, auth)
  transports/     stateless HTTP + SSE app, per-request key middleware
tests/            client, auth, settings, tools, transport, smoke
docs/             design, build plan, implementation notes

Docs

  • docs/integrations/ — per-framework integration guides (Claude, OpenAI, Gemini, ADK, LangChain, AI SDK)

Deployment runbooks and maintainer planning artifacts are kept internal and excluded from public releases.

License

MIT — see LICENSE. Open source under the Trading Volatility brand.

Available Tools

17 tools
explain_tickerA

Get a deterministic narrative interpretation of a ticker's current regime and positioning — a plain-language read of the state. Optional view selects an alternate explanation view when available.

Inputs: ticker (required), view. Returns: object

get_auth_statusA

Check how the Trading Volatility MCP is authenticated for this session. Returns mode='keyed' when an API key is present (full access), or mode='demo' when no key is set (only the demo tickers are available). Does not reveal the key.

Inputs: no named parameters. Returns: object

get_gamma_by_expirationA

Get the strike-aligned gamma decomposition by expiration bucket for a ticker (combined, nearest, first_weekly, first_monthly, all_other_expiries).

Inputs: ticker (required). Returns: object

get_gamma_curveA

Get the gamma strike curve (net gamma per strike) for a ticker. exp selects the expiration: 'combined' (default), 'nearest', 'first_weekly', 'first_monthly', or a 'YYYY-MM-DD' date. Set realtime=true for an intraday pull (requires trading hours when exp is a specific date).

Inputs: ticker (required), exp, realtime. Returns: object

get_gex_by_strikeA

Get the net GEX (gamma exposure) strike curve for a ticker, with call/put contributions — identifies key strikes and call-vs-put dominance. exp selects the expiration: 'combined' (default), 'nearest', or 'first_monthly'.

Inputs: ticker (required), exp. Returns: object

get_levelsA

Get key price levels for a ticker (gamma flip, walls, max pain, expected-move bounds). Optional view formats the output: 'json' (default), 'tradingview', or 'tos' (thinkorswim).

Inputs: ticker (required), view. Returns: object

get_market_structureA

Get the assembled market-structure interpretation for a ticker: headline signal, regime classification, expected behavior, key levels, and supporting metrics. Optional include adds sections (e.g. 'state', 'call_diag').

Inputs: ticker (required), include. Returns: object

get_options_volumeA

Get real-time options volume aggregated by strike for a ticker and a specific expiration. exp (the expiration date, required) selects the contract month; set include='iv' to add implied-volatility columns.

Inputs: exp (required), ticker (required), include. Returns: object

get_seriesA

Get a historical daily time series for a ticker, for charting and regime context. metrics is a comma-separated list of metric keys (e.g. 'price,iv_rank,gex_flip'); window is a lookback like '30d', '180d', or '2y'. Both are optional and fall back to the API defaults.

Inputs: ticker (required), window, metrics. Returns: object

get_signalsC

Get the current signals for a ticker (active setup/positioning signals).

Inputs: ticker (required). Returns: object

get_ticker_stateA

Get the canonical compact state snapshot for a ticker — the default starting point for analysis (price, gamma regime, IV rank, key positioning metrics). Optional include is a comma-separated list of add-ons (e.g. 'call_diag').

Inputs: ticker (required), include. Returns: object

get_trade_setupA

Get the compact agent-oriented trade setup for a ticker: market state plus a deterministic trade recommendation (regime, bias, opportunity score/tier, trade type, direction, structures, entry/stop/target framing, and caution flags).

Inputs: ticker (required). Returns: object

list_capabilitiesA

Return the Trading Volatility v2 capability manifest (the /llm-spec): the full list of endpoints, metrics, parameters, and conventions. Call this first to self-orient — to discover which metrics, expirations, regimes, and screeners are available before making other calls.

Inputs: no named parameters. Returns: object

rank_income_setupsA

Rank single-leg income setups (covered calls and cash-secured puts) across all tickers by an IVR-led, regime-guarded income-fit score (descending). Each ticker may surface as both a CC and a CSP candidate, each with a 1-sigma suggested strike, estimated premium, annualized yield, assignment/cap price, and breakeven. Filters (all optional): type ('cc' or 'csp'; omit for both), min_income_score (0-10), limit (2-50, default 10). Estimates are as-of the latest snapshot; earnings/event risk is flagged in each row's caveats but not filtered out.

Inputs: type, limit, min_income_score. Returns: object

rank_top_setupsA

Rank trade setups across all tickers by opportunity score (descending) to discover opportunities. Filters (all optional, AND'd): limit (1-200, default 20), min_score (0-10), regime (CSV of RegimeLabel values like 'trending_low_vol,range_bound'), recommended_direction (CSV of long/short/neutral), trade_bias, trend_state, momentum_state, realized_vol_state (CSV), iv_rank_min/iv_rank_max (0-100), price_min/price_max.

Inputs: limit, regime, min_score, price_max, +8 more. Returns: object

run_screenerA

Run a named screener preset over the cross-ticker ranking. name is one of: momentum_breakout, capitulation_reversal, range_premium_seller, trend_pullback, highvol_breakdown. Any filter you pass overrides the preset's value. Filters (all optional, AND'd): limit (1-200, default 20), min_score (0-10), regime (CSV of RegimeLabel values like 'trending_low_vol,range_bound'), recommended_direction (CSV of long/short/neutral), trade_bias, trend_state, momentum_state, realized_vol_state (CSV), iv_rank_min/iv_rank_max (0-100), price_min/price_max.

Inputs: name (required), limit, regime, min_score, +9 more. Returns: object

server_infoB

Basic information about this MCP server.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation3/5

    Several tools target the same ticker and provide overlapping market-state information (get_ticker_state, get_market_structure, get_trade_setup, explain_ticker). While each has a distinct output format, the boundaries are not immediately clear from names alone. Gamma curve and GEX curve tools also overlap conceptually.

    Naming Consistency5/5

    All tools use snake_case with verb-first names (get_, rank_, run_, explain_, list_), and server_info is the only exception but still follows a predictable pattern. Very consistent and easy to parse.

    Tool Count4/5

    17 tools is on the heavy side but justifiable for a comprehensive volatility analytics API covering per-ticker analysis, cross-ticker ranking, screeners, and income setups. The count is slightly above the ideal range but not bloated.

    Completeness4/5

    The server covers a wide range of analysis needs: state snapshots, narratives, signals, levels, historical series, gamma/GEX curves, options volume, rankings, screeners, and trade setups. Minor gaps like open interest or an IV surface exist, but they are not critical for its stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides AI agents with access to real-time and historical SPX 0DTE options market data from QuantData. It enables analysis of market indicators like gamma exposure walls, net drift, max pain, and trade side statistics through natural language.
      29 PyPI
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects AI assistants to live options market data with 70+ tools for exposure analytics, volatility, strategy signals, and historical backtesting.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides stock and options market data via the Tradier Brokerage API, enabling AI agents to query financial data through natural language.
      311 npm
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables an LLM agent to reason over real Bybit crypto-options data through typed, read-only tools for GEX, vanna, skew, vol surface, flow, sentiment, technicals, portfolio greeks, scenarios, and positions, and to generate trader-grade market memos and delta updates from natural-language requests.
      22
      MIT