Skip to main content
Glama
U.S. Market Regime Traffic Light MCP

U.S. Market Regime Traffic Light MCP

README.md
# U.S. Market Regime MCP

[![alicexixi85/us-market-regime-mcp MCP server](https://glama.ai/mcp/servers/alicexixi85/us-market-regime-mcp/badges/score.svg)](https://glama.ai/mcp/servers/alicexixi85/us-market-regime-mcp)

An open-source [Model Context Protocol](https://modelcontextprotocol.io) server that lets Claude, Cursor or any MCP client read the **published end-of-day U.S. market regime** (GREEN / YELLOW / RED) and the metrics behind it: QQQ vs. its 200-day average, drawdown from the high, VIX vs. its 20-day average, and distribution days over the last 25 sessions.

Zero dependencies, Python 3.10+. It is a read-only client for the public feed behind [signal.usethelever.com](https://signal.usethelever.com).

> **Educational market context only.** The server returns a description of the broad index environment. It does not recommend securities, give position sizes, or predict prices. Every response includes the `as_of` date and a disclaimer.

**Try it in 10 seconds (no MCP client needed):**

```bash
git clone https://github.com/alicexixi85/us-market-regime-mcp.git && cd us-market-regime-mcp
python3 server.py --print
```

It prints the latest published reading as JSON: `regime` (GREEN / YELLOW / RED), `risk_score_0_100`, `confidence`, the `triggered_rules` and the metrics behind them (QQQ vs. its 200-day average, drawdown, VIX, distribution days).

Listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=us-market-regime-mcp) as `io.github.alicexixi85/us-market-regime-mcp` and on [Glama](https://glama.ai/mcp/servers/alicexixi85/us-market-regime-mcp).

## Tools

| Tool | Returns |
|---|---|
| `get_market_regime` | Regime, risk score (0-100), confidence, triggered rules, metrics, `as_of` / `published_at`, data age in days and a stale-data warning. If the feed cannot be reached the tool returns an error instead of an old cached value. |
| `explain_regime_model` | What each state and metric means, update cadence and the model's limits. |

## Install

```bash
git clone https://github.com/alicexixi85/us-market-regime-mcp.git
```

```json
{
  "mcpServers": {
    "us-market-regime": {
      "command": "python3",
      "args": ["/absolute/path/to/us-market-regime-mcp/server.py"]
    }
  }
}
```

Docker: `docker build -t us-market-regime-mcp . && docker run -i --rm us-market-regime-mcp`

Terminal: `python3 server.py --print`

Example prompt: *"What is today's market regime, how fresh is the data, and which rule triggered it?"*

## TradingView HUD

`qqq_traffic_light_hud.pine` is a separate, chart-only Pine Script v6 indicator that labels QQQ's trend context (supportive / choppy / downtrend) from EMAs, ATR and range efficiency. It is a simplified approximation and will not always match the published regime.

## Related

- Daily dashboard: [signal.usethelever.com](https://signal.usethelever.com) (paid access via [Gumroad](https://dejunchen770231.gumroad.com/l/awqqfc))
- Bar-by-bar replay practice for U.S. stocks: [replay.usethelever.com](https://replay.usethelever.com/mds/en/)
- Guides: [reviewing trades without hindsight bias](https://replay.usethelever.com/learn/hindsight-bias-trade-review), [position size from your stop](https://replay.usethelever.com/learn/position-size-from-stop)

## License

MIT

<!-- mcp-name: io.github.alicexixi85/us-market-regime-mcp -->

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly separate roles: get_market_regime returns data, while explain_regime_model returns documentation about semantics, cadence and limits. An agent can trivially decide which to call with no overlap in outputs.

Naming Consistency5/5

Both names follow a predictable snake_case verb_noun pattern (get_/explain_ + domain object) and are self-describing. The convention is uniform across the entire surface.

Tool Count4/5

The server exposes a single published gauge, so a data tool plus a model-explanation tool is a reasonable minimal scope. Two tools is on the thin side, but each earns its place rather than being redundant.

Completeness3/5

Only the latest end-of-day regime is reachable; there is no way to query historical regimes, a date range, or a time series of risk scores, which are natural follow-on needs for this domain. Core read access and interpretation are covered, so agents can work but hit a wall on trend questions.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues