NQ Advisor MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NQ Advisor MCP
An MCP (Model Context Protocol) server that gives Claude Desktop and Claude Code a live, tool-shaped view of NinjaTrader 8 market data for the NQ futures contract, plus a deterministic research engine that answers one question: when a similar setup appeared before, what happened next?
Research and advisory only. Nothing in this repository places, modifies, or cancels an order.
What is here
Path | What it does |
| The MCP server (Python, FastMCP). One deterministic feature layer, one structured Claude call per bar, hard vetoes on bad data. |
| Deterministic research engine: export validation, session anchoring, candidate probes, MFE/MAE outcomes, kNN setup bank, expectancy report with an out-of-sample split. No network, no AI. |
| NinjaTrader 8 indicator that publishes bars and indicator values over a local HTTP endpoint. |
| Command-line entry points for the research engine. |
| Export schema, research workflow, NinjaTrader validation checklist, signal schema. |
| Unit tests for the feature engine and the suggestion payload logic. |
Related MCP server: TradingView MCP Jackson
How it works
NTBridge.csruns inside NinjaTrader 8 and serves the latest bars and indicator values onhttp://localhost:8765.The MCP server polls the bridge, computes trend and momentum features deterministically (
features.py), and exposes them as tools.nq_market_stateandnq_recent_barsnever call a model, so they are free and fast.nq_suggest_trademakes exactly one structured Claude call per bar (ai.py): direction, entry, stop, target, confidence, reasoning, and invalidation. The result is cached per bar, a server-side fallback model covers outages, and two hard vetoes cannot be overridden by the model: stale data past a trust threshold, and aHardNoTradecondition from the feature layer.nq_analog_statsfinds the k nearest historical setups in the research bank (analogs.py,research/neighbors.py) and reports their outcomes.nq_healthreports bridge connectivity, data freshness, and AI telemetry so a bad feed is visible before it becomes a bad suggestion.
Tools
Tool | Calls a model? | Returns |
| No | Live snapshot plus trend and momentum composites |
| No | Recent 1-minute bars with indicators |
| No | Outcomes of the nearest historical setups |
| No | Bridge, freshness, and AI telemetry diagnostics |
| Yes, once per bar | Direction, entry, stop, target, confidence, reasoning, invalidation |
Setup
python -m venv .venv
.\.venv\Scripts\pip install -r requirements.txt
copy .env.example .env # then add your ANTHROPIC_API_KEYRegister the server with Claude Desktop or Claude Code (adjust the path):
{
"mcpServers": {
"nq-advisor": {
"command": "C:\\path\\to\\nq-advisor-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "nq_advisor_mcp"],
"cwd": "C:\\path\\to\\nq-advisor-mcp"
}
}
}Or run it directly:
.\start_advisor_mcp.ps1 # or: .\.venv\Scripts\python.exe -m nq_advisor_mcpConfiguration lives in .env (see .env.example): ANTHROPIC_API_KEY, ANTHROPIC_MODEL, ANTHROPIC_EFFORT, ANTHROPIC_MAX_TOKENS, NT_BRIDGE_URL, NT_BRIDGE_TIMEOUT_SECONDS, and optional ADVISOR_* overrides for the fallback model, chart timezone, staleness thresholds, and replay glob.
Research workflow
Export 1-minute bars from NinjaTrader in the format described in docs/EXPORT_SCHEMA.md (exports are not included in this repository), then:
.\.venv\Scripts\python.exe validate_export.py replays\*.jsonl # check data and timezone
.\.venv\Scripts\python.exe research_report.py --latest # expectancy reportdocs/RESEARCH_WORKFLOW.md walks through the pipeline. docs/NINJATRADER_VALIDATION.md lists what must be checked manually in NinjaTrader 8, especially the chart timezone assumption, before trusting any output.
Tests
.\.venv\Scripts\python.exe -m pytest -q testsSafety and scope
Advisory only. There is no order-execution code in this repository.
The model can decline or lower confidence, but it cannot override the stale-data or
HardNoTradevetoes.Nothing here is financial advice. Validate the research engine against your own exports before relying on it.
Author
Jordan Rhodes, github.com/ReSparkOS
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Day Trade AI signals, analyses, journal and rule checks for your AI agent. Never places trades.
Claude, ChatGPT, Grok or Perplexity: draw on live charts, backtest and trade on your own broker
Connect Claude or Cursor to your LogToLast futures & forex trading journal and playbook rules.
Generate and backtest futures trading strategies from Claude with AlphaPrime (Valynox).
Related MCP Servers
- AlicenseBqualityBmaintenanceProvides 32 trading analysis tools for AI-powered market analysis, including real-time data, technical indicators, options Greeks, scanners, and Interactive Brokers portfolio management, all accessible via natural language in Claude Desktop.36416MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to control and read from the TradingView Desktop app, providing automated morning briefs, chart analysis, Pine Script development, and replay mode.-
- AlicenseAqualityDmaintenanceEnables Claude Code to directly access NinjaTrader 8 accounts, positions, orders, market data, charts, and strategy management through a NinjaScript Add-On.267MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to manage algorithmic trading workflows via natural language — maintaining watchlists, classifying market regimes, validating trades against risk rules, and submitting paper orders through a gateway to a FastAPI engine.-