Repository navigation
v1.2.0: compile loop, chart eyes, headless backtests
nt8-mcp 1.2.0
Give your AI assistant eyes and a build loop on NinjaTrader 8. An MCP server (47 tools) plus a
small AddOn that runs inside NinjaTrader. Built for developing indicators and strategies, not for
placing trades. Read-only by default.
First public release of the full toolset; earlier versions were internal.
Highlights
- Compile without the Editor.
nt_checkcompiles your files offline against your real Custom
project, so a broken draft never unloads your indicators.nt_compilethen builds through
NinjaTrader's own compiler with no Editor window open and returns file, line, column, code and
message for every error.nt_reload_assemblyloads the new code right away. - See the chart as data. Indicator inputs and plot values for the last n bars, drawing objects
with anchors, bars, and screenshots that never steal focus. - Read what your code printed.
Print()output and NinjaTrader's log as event rings: no Output
window needed, a cursor so nothing is read twice, and they still answer when the UI is blocked. - Headless backtests. Trades and metrics with no Strategy Analyzer window. Tick Replay, custom
bar types, slippage, commission templates, saved strategy templates. Every result reports the
bars that were really loaded (barsFrom,barsTo,warnings). - Optimize, walk-forward, PDF report on the same backtest engine, with a hard cap on combinations.
- Know your data. Local data coverage by day, feed health, connection drop reasons, and an
offline.nrdMarket Replay to Parquet decoder. - Executions and performance for any account, with correct pairing across multi-day positions.
- Self-checks.
nt_health,nt_status,nt_compat: which build is running, is it older than
your source, and what a NinjaTrader update broke. nt8command line. Every tool is also a shell command:nt8 health.
Safety
No order entry in this version, on purpose. The tool feeds an assistant a lot of text nobody vetted
(output, logs, third-party add-ons), and it runs inside the NinjaTrader desktop with access to every
account. The README explains the reasoning and the plan: Simulator-only order entry as a separate
opt-in module.
The one account-changing feature, the ops module (flatten, naked-position watchdog, reconnect,
restart), is off until you create an arming file by hand. Armed, it works on Simulator accounts only,
shows a dry run first, needs a signed confirm string within 30 seconds, and writes an audit log.
Install
powershell -ExecutionPolicy Bypass -File scripts\install-addon.ps1
cd server && pip install -e .
nt8 health
Requires Windows, NinjaTrader 8 (tested on 8.1.8.2) and Python 3.10+. The .NET SDK is needed for
nt_check only. Details in the README.
Known limitations
- No order entry (see above).
- Playback is read-only: no seek or speed control.
- No Strategy Analyzer automation.
- A connected Playback connection caps historical data at the replay clock. Backtest results say so
inwarnings.
Portions adapted from eman007/cli-nt-bridge (MIT). See NOTICE.
Not affiliated with NinjaTrader, LLC.
Full details: CHANGELOG.md · API.md