Skip to main content

trading-vol-regime — Volatility Regime MCP Server

One tool call answers: "what volatility regime are we in?"

Derived from Cboe public data (15-min delayed): VIX family indices (VIX9D, VIX, VIX3M, VIX6M, VIX1Y, VVIX, SKEW) and the VX futures curve. Classification is a published, deterministic rule set — see METHODOLOGY.md. No black box, no LLM.

Informational only — not financial advice. VIX® is a registered trademark of Cboe Global Markets; this project is not affiliated with or endorsed by Cboe.

Tools

Tool Returns
get_vol_regime regime label (CALM_CARRY / COMPRESSED_SPRING / STRESS_BUILDING / RISK_OFF / CAPITULATION), confidence, rationale, key ratios
get_term_structure(kind) cash: index levels, ratios, slope, 1y/5y percentiles · futures: full VX curve, roll yield, basis, twist
get_regime_transitions(lookback_days) timestamped log of regime changes
explain_regime plain-English narrative of the current state
subscribe(channel, target, triggers) push alerts via ntfy or webhook; returns a subscription_id
get_subscription(subscription_id) / unsubscribe(subscription_id) manage a subscription

Every data payload carries as_of, data_freshness, attribution, and disclaimer.

Install

Requires Python 3.12+. With uv:

uv tool install trading-vol-regime

This installs two commands: trading-vol-regime (data pipeline, alerts, scheduling) and trading-vol-regime-server (the MCP server). pip install trading-vol-regime works too.

Quick start

The MCP server only reads snapshots; the pipeline produces them. Load history (for percentile context) and take a first snapshot:

trading-vol-regime backfill
trading-vol-regime snapshot

Connect an MCP client

Claude Code

claude mcp add trading-vol-regime -- uvx --from trading-vol-regime trading-vol-regime-server

Claude Desktop / Cursor / generic stdio client — add to your MCP config:

{
  "mcpServers": {
    "trading-vol-regime": {
      "command": "uvx",
      "args": ["--from", "trading-vol-regime", "trading-vol-regime-server"]
    }
  }
}

If you installed with uv tool install, "command": "trading-vol-regime-server" with no args also works.

Streamable HTTP

trading-vol-regime-server --http --port 8000
# endpoint: http://127.0.0.1:8000/mcp

Keep it running

trading-vol-regime run loops on a fixed cadence: every 15 min during market hours, a 30-min heartbeat off-hours, and a history refresh each weekday evening (or immediately if history is more than 4 days old).

On macOS, install it as a launchd agent so it starts at login and restarts on crash:

trading-vol-regime schedule install     # status | uninstall
tail -f ~/.trading-vol-regime/logs/run.log

macOS blocks background jobs from reading ~/Documents, ~/Desktop, and ~/Downloads, so the agent must run from an environment outside them. A uv tool install qualifies; schedule install refuses temporary uvx environments and environments inside those folders, and explains what to do instead.

Elsewhere, run trading-vol-regime run under systemd, supervisord, or a container.

Push alerts

Alerts are evaluated after every snapshot. Triggers: regime changes (default), curve inversion / re-normalization, and percentile crossings — rules and cooldowns are in METHODOLOGY.md.

Phone notifications with ntfy: install the ntfy app, subscribe to a hard-to-guess topic name, then:

trading-vol-regime subscribe ntfy my-vol-alerts-x7k2 --regime --curve --percentile VVIX:0.9
trading-vol-regime subscriptions
trading-vol-regime unsubscribe <subscription_id>

ntfy.sh topics are public: anyone who knows the name can read them, so use a random name (alerts contain only public market data). Webhook: subscribe webhook https://... POSTs JSON with key, title, message, priority, and structured data.

Agents can do the same through the subscribe MCP tool. Over HTTP the subscription tools are disabled unless the server is started with --allow-subscriptions, so a hosted instance can't be used as an open relay.

Architecture

The server never computes on the request path: the trading-vol-regime pipeline is the only snapshot writer (ingest → derive → classify → SQLite snapshot → alert fan-out), and MCP data tools read the latest snapshot. Storage sits behind a small protocol so a hosted deployment can swap SQLite for DynamoDB without touching calc code. Built on signal-platform; see the platform architecture.

DB location: ~/.trading-vol-regime/trading_vol_regime.db (override with TRADING_VOL_REGIME_DB).

Development

From a checkout of the monorepo:

uv sync --all-packages
uv run trading-vol-regime backfill && uv run trading-vol-regime snapshot
uv run pytest                 # unit + in-memory server tests (no network)
uv run ruff check .           # lint
uv run ruff format --check .  # formatting (enforced in CI)

Connect a client to the checkout with uv --directory /path/to/signal-platform run trading-vol-regime-server. From a checkout, schedule install copies the code into ~/.trading-vol-regime/runtime (checkouts usually live in ~/Documents), so re-run it after changing the code.

For local webhook testing, TRADING_VOL_REGIME_ALLOW_PRIVATE_TARGETS=1 permits http:// and localhost targets. Never set it on a hosted deployment.

License

MIT

Metadata

Release files for trading-vol-regime 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trading-vol-regime 0.1.1
File Size Uploaded
trading_vol_regime-0.1.1.tar.gz 38.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trading-vol-regime 0.1.1
File Interpreter ABI Platform
trading_vol_regime-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 69.2 kB

Release files / trading_vol_regime-0.1.1.tar.gz

Download URL trading_vol_regime-0.1.1.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4a42981f78f2b34993902c4e2c31aef3edb4cb185a53a05601253f8d248163d1
BLAKE2b-256 checksum
How to use checksums
fedc6eff062d669d4c9f0ac2f97e2c6ae67889eefec501892920fb7ea220c9e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / trading_vol_regime-0.1.1-py3-none-any.whl

Download URL trading_vol_regime-0.1.1-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f7203a1ff70ba838943f95d7d2c5ce5c25752813af56e5cd77ed4b45f584e13
BLAKE2b-256 checksum
How to use checksums
778dcb13a91002d55cf550e83e6ce6f32fab996a2042636aeafa0acce266caf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page