About Nt8 MCP
Nt8 MCP is an MCP server published by tbraman-dev in the Browser category: mCP server + NinjaTrader 8 AddOn that gives an AI coding assistant eyes and a build loop for NinjaScript: offline and in-platform compile with structured errors, chart / indicator / drawing reads, Print and log capture, headless backtests, optimize and walk-forward, screenshots. Read-only by default. Conduid read 97 tools from its source: nt_account, nt_analyze, nt_api, nt_api_search, nt_atm_change, nt_atm_close and 91 more. No package is published for it, so it installs from a source checkout.
The repository has 36 stars and 9 forks, and its last commit was on 29 Nov 2026. The latest release is v1.4.0 (20 Sep 2026): Order module: brackets, close, reverse, and manage-any-order. It follows v1.3.1 (20 Sep 2026), and the 4 most recent releases go back to v1.2.0 (19 Sep 2026). Its topics include backtesting, devtools, ninjascript, ninjatrader, ninjatrader8 and trading-tools.
Install
git clone https://github.com/tbraman-dev/nt8-mcpTools (97)
nt_accountRead-only account state: cash, realized/unrealized P&L, positions, orders. No name = all accounts.| Parameter | Type | Description |
|---|---|---|
| name | string |
nt_analyzeBreakdowns for a saved run's trade list, or one handed in directly: by month (exit| Parameter | Type | Description |
|---|---|---|
| run_id | string | |
| trades | array |
nt_apiLook up one type's real shape by reflection: kind, base type, interfaces, and its public +| Parameter | Type | Description |
|---|---|---|
| member | string | |
| type_name * | string |
nt_api_searchSearch the loaded NinjaTrader assemblies for public types and members whose name matches| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| query * | string |
nt_atm_changeMove a running ATM strategy's stop and/or target to a new price.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| atm_id * | string | |
| confirm | string | |
| issued_at | number | |
| stop_price | number | |
| target_index | integer | |
| target_price | number |
nt_atm_closeClose ONE ATM strategy: NinjaTrader cancels its working orders and flattens the position it| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| atm_id * | string | |
| confirm | string | |
| issued_at | number |
nt_atm_startSend ONE entry order under a saved ATM strategy template. This OPENS a position, and| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| action * | string | |
| confirm | string | |
| instrument * | string | |
| issued_at | number | |
| limit_price | number | |
| order_type * | string | |
| quantity * | integer | |
| stop_price | number | |
| template * | string | |
| tif | string |
nt_atm_statusThe ATM strategies that are still working: their entry, stop and target orders with the TRUE| Parameter | Type | Description |
|---|---|---|
| account | string |
nt_atm_templatesList the saved ATM strategy templates and the bracket parameters that can be read from them.nt_backtestRun a strategy backtest and wait for it to finish, returning the final status doc (summary + trades +| Parameter | Type | Description |
|---|---|---|
| bars_period | object | |
| break_at_eod | boolean | |
| chart | string | |
| commission_template | string | |
| fill_limit_on_touch | boolean | |
| fill_resolution | string | |
| fill_resolution_type | string | |
| fill_resolution_value | integer | |
| from_date | string | |
| include_commission | boolean | |
| include_trade_history | boolean | |
| inputs | object | |
| instrument | string | |
| max_trades | integer | |
| save_run | boolean | |
| slippage_ticks | number | |
| strategy * | string | |
| template | string | |
| tick_replay | boolean | |
| to_date | string | |
| wait_s | integer |
nt_backtest_cancelCancel a running backtest on the Backtest account (Terminated) and drop its record. id from nt_backtest or nt_backtests.| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_backtest_statusStatus of one backtest by id: state, and once state is done, summary + trades. id from nt_backtest or nt_backtests.| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_backtestsList all backtests (id, strategy, instrument, period, from/to dates, state).nt_barsLast n OHLCV bars of chart's primary series, oldest first. chart id from nt_charts, or 'first'.| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| n | integer |
nt_bridge_logLast n lines of the AddOn's own ring-buffer log (requests, errors) — for debugging the AddOn itself.| Parameter | Type | Description |
|---|---|---|
| n | integer |
nt_cancel_orphansCancel every working order on ONE account (optionally one instrument) whose owning strategy| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| caller * | string | |
| confirm | string | |
| instrument | string | |
| issued_at | number |
nt_chart_indicator_addAdd an indicator to a chart. indicator is a short ("SMA") or full type name; unknown = error.| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| indicator * | string | |
| inputs | object | |
| panel | integer |
nt_chart_indicator_removeRemove an indicator from a chart, by its display name (indicator, exact match, from| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| force | boolean | |
| index | integer | |
| indicator | string |
nt_chart_reloadReload NinjaScript on ONE chart — NinjaTrader's own Reload NinjaScript command, run inside the| Parameter | Type | Description |
|---|---|---|
| chart | string |
nt_chart_scroll_toScroll a chart so `time` (local NT8 time, "yyyy-MM-ddTHH:mm:ss") is visible, keeping the| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| time * | string |
nt_chart_set_seriesChange a chart's primary series: instrument (a name nt_data_coverage/nt_backtest would| Parameter | Type | Description |
|---|---|---|
| bars_period | object | |
| chart | string | |
| instrument | string | |
| restore | boolean |
nt_chart_stateFull state of one chart: instrument, tick size, visible range, panels, strategies. chart id from nt_charts, or 'first'.| Parameter | Type | Description |
|---|---|---|
| chart | string |
nt_chartsList open charts (id, title, instrument, period, bar count, indicators). Precondition: AddOn running.nt_checkCompile-check files against the real NinjaTrader.Custom.csproj in a scratch build dir — same compiler and| Parameter | Type | Description |
|---|---|---|
| files | array |
nt_compatThe reflection-resolution table for every NT8 member this repo binds by name — what an NT8nt_compileCompile-check every NinjaScript .cs under bin\\Custom with NinjaTrader's own compiler, through the| Parameter | Type | Description |
|---|---|---|
| timeout_s | integer |
nt_compile_f5Cold-start compile: press F5 in NT8's NinjaScript Editor and wait for NinjaTrader.Custom.dll to be| Parameter | Type | Description |
|---|---|---|
| timeout_s | integer |
nt_connectionsEvery connection NinjaTrader has configured or is actually running, with why each one last dropped.| Parameter | Type | Description |
|---|---|---|
| n | integer | |
| since | integer |
nt_crash_reportREAD-ONLY: what happened just before NinjaTrader last restarted. Finds the most recent| Parameter | Type | Description |
|---|---|---|
| n | integer |
nt_data_coveragePre-flight the local data store for one instrument: which days NinjaTrader actually has on disk,| Parameter | Type | Description |
|---|---|---|
| from_date | string | |
| instrument * | string | |
| kind | string | |
| to_date | string |
nt_data_downloadQueue a historical/market-replay download into NinjaTrader's own data store and return {id, state} at| Parameter | Type | Description |
|---|---|---|
| big | boolean | |
| from_date * | string | |
| instrument * | string | |
| kinds | array | |
| overwrite | boolean | |
| to_date * | string | |
| types | array |
nt_data_download_cancelCancel a queued or running data download by id. The worker stops before the next date; a date already| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_data_download_statusStatus of one data download by id (from nt_data_download): state (queued|running|done|error|cancelled|| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_data_probeHow far back the CONNECTED provider actually serves data for one instrument, at one resolution| Parameter | Type | Description |
|---|---|---|
| instrument * | string | |
| kind | string | |
| wait_s | integer |
nt_desk_recoverRestart recovery in one call: re-enable every allowlisted leg (desk_legs.json; `account`| Parameter | Type | Description |
|---|---|---|
| account | string | |
| caller * | string | |
| confirm | string | |
| issued_at | number |
nt_desk_statusREAD-ONLY desk check in one call: NinjaTrader process start time and the last "Session Break"nt_drawingsDrawing objects (lines/rays/rectangles/text) on chart, with owner and anchors.| Parameter | Type | Description |
|---|---|---|
| chart | string |
nt_editor_openOpen NinjaTrader's NinjaScript Editor window (`POST /editor/open`), exactly as Control Center >nt_executionsReal order fills on one live/Sim account over a date range, oldest first — the raw executions| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| from_date | string | |
| instrument | string | |
| n | integer | |
| to_date | string |
nt_feedhealthLast-tick age per instrument, to catch a feed that is frozen but still reports Connected.| Parameter | Type | Description |
|---|---|---|
| instruments * | array |
nt_flattenREDUCE-ONLY kill switch: cancel an account's working orders and flatten its open positions.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| instrument | string | |
| issued_at | number |
nt_grid_disableDisable ONE existing Strategies-grid row by its strategyId, with NinjaTrader's own| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| caller * | string | |
| confirm | string | |
| issued_at | number | |
| strategy_id * | string |
nt_grid_disable_allDisable a LIST of Strategies-grid rows by strategyId, each through nt_grid_disable. It| Parameter | Type | Description |
|---|---|---|
| caller * | string | |
| confirm | string | |
| ids * | array | |
| issued_at | number |
nt_grid_enableRe-enable ONE existing Strategies-grid row by its strategyId. From then on the strategy| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| caller * | string | |
| confirm | string | |
| issued_at | number | |
| strategy_id * | string |
nt_grid_removeRemove ONE Strategies-grid row by its strategyId (from nt_strategies_running). Refused when| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| caller * | string | |
| confirm | string | |
| issued_at | number | |
| strategy_id * | string |
nt_healthAddOn health: version, NT8 version, connections, chart count. Precondition: AddOn running.nt_indicatorsIndicators on chart with their inputs and last n plot values each. name filters by substring (case-insensitive).| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| n | integer | |
| name | string |
nt_installCopy .cs files into NT8's Custom/<AddOns|Strategies|SuperDomColumns|Indicators> (folder decided by class| Parameter | Type | Description |
|---|---|---|
| files * | array |
nt_install_addonInstall the whole NT8Bridge AddOn: delete orphan NT8Bridge*.cs files in NT8's Custom/AddOns (a partialnt_leg_decisionsREAD-ONLY: each leg's own decision log — every line of the last `days` dates in| Parameter | Type | Description |
|---|---|---|
| days | integer | |
| strategy | string |
nt_lintStatic hazard scan of NinjaScript .cs files (files, folders or globs; folders are read recursively).| Parameter | Type | Description |
|---|---|---|
| paths * | array | |
| rules | array |
nt_lockTake, renew or release the local NT8 lock that nt_cancel_orphans, nt_grid_remove,| Parameter | Type | Description |
|---|---|---|
| caller * | string | |
| minutes | number | |
| release | boolean |
nt_logNinjaTrader's own log (connection, order, execution, strategy and system events) from the AddOn's ring.| Parameter | Type | Description |
|---|---|---|
| contains | string | |
| level | string | |
| n | integer | |
| name | string | |
| since | integer |
nt_matchNT8 trade match: does NinjaTrader trade the same entries as the research reference? (The >=95%| Parameter | Type | Description |
|---|---|---|
| backtest | object | |
| backtest_id | string | |
| bars_chart | string | |
| bars_csv | string | |
| bars_n | integer | |
| bars_time_is_close | boolean | |
| columns | object | |
| entry_tol_min | number | |
| exit_map | object | |
| from_date | string | |
| gate | string | |
| max_rows | integer | |
| news_minutes | array | |
| nt8_columns | object | |
| nt8_time_shift_min | integer | |
| nt8_trades | any | |
| price_tol_ticks | number | |
| reference_csv * | string | |
| run_id | string | |
| session_start | string | |
| threshold | number | |
| tick_size | number | |
| to_date | string |
nt_nrd_bookRebuild the order book from NinjaTrader market-replay .nrd files, one snapshot every step_s seconds, with| Parameter | Type | Description |
|---|---|---|
| contract * | string | |
| out_dir * | string | |
| replay_dir | string | |
| session_date * | string | |
| step_s | integer | |
| t_from | string | |
| t_to | string |
nt_nrd_exportDecode NinjaTrader market-replay .nrd files straight to per-day L1/L2 UTC parquet — pure local Python,| Parameter | Type | Description |
|---|---|---|
| force | boolean | |
| instrument_glob * | string | |
| levels | array | |
| out_dir * | string | |
| replay_dir | string |
nt_optimizeGrid-search a strategy's inputs by running one ordinary backtest per combination and ranking the results.| Parameter | Type | Description |
|---|---|---|
| bars_period | object | |
| chart | string | |
| commission_template | string | |
| fill_limit_on_touch | boolean | |
| fill_resolution | string | |
| fill_resolution_type | string | |
| fill_resolution_value | integer | |
| fitness | string | |
| from_date | string | |
| include_commission | boolean | |
| include_trades | boolean | |
| inputs | object | |
| instrument | string | |
| max_combos | integer | |
| max_runs | integer | |
| min_trades | integer | |
| params * | any | |
| slippage_ticks | number | |
| strategy * | string | |
| tick_replay | boolean | |
| to_date | string | |
| top_n | integer | |
| wait_s | integer |
nt_order_bracketSubmit an entry with its stop loss and its profit target(s) under ONE plan and ONE confirm.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| action * | string | |
| confirm | string | |
| instrument * | string | |
| issued_at | number | |
| limit_price | number | |
| order_type * | string | |
| quantity * | integer | |
| stop_loss_price | number | |
| stop_loss_ticks | integer | |
| stop_price | number | |
| targets | array | |
| tif | string |
nt_order_cancelCancel ANY live order on a Simulator or Playback account, by order id.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| issued_at | number | |
| order_id * | string |
nt_order_changeChange the quantity and/or the prices of ANY live order on a Simulator or Playback account.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| issued_at | number | |
| limit_price | number | |
| order_id * | string | |
| quantity | integer | |
| stop_price | number |
nt_order_submitSubmit ONE order on ONE Simulator or Playback account. This can OPEN a position.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| action * | string | |
| confirm | string | |
| instrument * | string | |
| issued_at | number | |
| limit_price | number | |
| order_type * | string | |
| quantity * | integer | |
| stop_price | number | |
| tif | string |
nt_outputNinjaScript Print() output from the AddOn's ring buffer, whether or not the Output window is open.| Parameter | Type | Description |
|---|---|---|
| contains | string | |
| n | integer | |
| since | integer | |
| tab | integer |
nt_output_windowLast n lines SCRAPED from the NinjaScript Output window (tabs 1+2 merged, tagged). Precondition: the| Parameter | Type | Description |
|---|---|---|
| n | integer |
nt_performanceRound-trip trades and performance metrics for real fills on one live/Sim account — the same| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| from_date | string | |
| instrument | string | |
| n | integer | |
| to_date | string |
nt_playbackRead NinjaTrader's Market Replay transport: whether the Playback connection is connected, whether| Parameter | Type | Description |
|---|---|---|
| budget_s | integer | |
| coverage | boolean | |
| instrument | string |
nt_playback_runRun Market Replay as a bounded job and wait for it to finish. Positions the clock at `from_time`| Parameter | Type | Description |
|---|---|---|
| from_time | string | |
| speed | integer | |
| to * | string | |
| wait_s | integer |
nt_playback_run_cancelCancel a queued or running playback run: the AddOn pauses the clock, reports what it saw, and| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_playback_run_statusStatus of one playback run by id (from nt_playback_run): "state" (queued|running|done|error|| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_playback_seekMove the Market Replay clock to `time` (US Eastern, e.g. "2026-08-10T09:30:00" — the same basis| Parameter | Type | Description |
|---|---|---|
| time * | string | |
| wait_s | integer |
nt_playback_speedSet the Market Replay playback speed. speed=0 pauses; a positive whole number plays at that| Parameter | Type | Description |
|---|---|---|
| speed * | integer |
nt_position_closeCancel the working orders of ONE instrument on ONE Simulator or Playback account, then flatten| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| instrument * | string | |
| issued_at | number |
nt_position_reverseCancel the working orders of ONE instrument on ONE Simulator or Playback account, flatten that| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| instrument * | string | |
| issued_at | number |
nt_reconcileReconcile a backtest's trades against a Market Replay run's real fills — the check no other| Parameter | Type | Description |
|---|---|---|
| backtest_id | string | |
| backtest_run_id | string | |
| backtest_trades | array | |
| playback_executions | array | |
| playback_run_id | string | |
| tick_size | number | |
| tolerance_seconds | number | |
| tolerance_ticks | number |
nt_reload_assemblyCompile for real AND make NinjaTrader swap the running assembly (`POST /compile?reload=1`), so new and| Parameter | Type | Description |
|---|---|---|
| timeout_s | integer |
nt_reportStats — and optionally a one-page PDF — for a finished backtest: equity curve, drawdown, KPI tiles.| Parameter | Type | Description |
|---|---|---|
| id | string | |
| pdf_path | string | |
| status_doc | object |
nt_runOne saved run in full: the original request, inputs, cost settings, from/to and barsFrom/barsTo,| Parameter | Type | Description |
|---|---|---|
| id * | string |
nt_run_compareDiff two saved runs by id (from nt_runs): differing inputs, differing cost settings, the| Parameter | Type | Description |
|---|---|---|
| a * | string | |
| b * | string |
nt_runsList saved backtest runs (newest first), one compact row each: id (pass to nt_run/nt_run_compare),| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| strategy | string |
nt_screenshotScreenshot of chart's window content, returned as a PNG image. chart id from nt_charts, or 'first'.| Parameter | Type | Description |
|---|---|---|
| chart | string |
nt_shotScreenshot a top-level window by title substring (empty = whole virtual screen), returned as a PNG| Parameter | Type | Description |
|---|---|---|
| out | string | |
| title | string |
nt_statusIs the running assembly newer than the newest .cs on disk (GET /ntstatus), PLUS annt_strategiesList strategies available to backtest (name, full type name, [NinjaScriptProperty] inputs with defaults).nt_strategies_runningRead the Control Center's Strategies grid: the strategy population that is NOT on a chart and| Parameter | Type | Description |
|---|---|---|
| materialize | boolean |
nt_strategy_runsThe strategies THIS server started, read back off the running instances: state, position,nt_strategy_startAdd a strategy to NinjaTrader's Strategies grid on a Simulator or Playback account and enable| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| bars_period * | object | |
| break_at_eod | boolean | |
| confirm | string | |
| days_to_load | integer | |
| inputs | object | |
| instrument * | string | |
| issued_at | number | |
| strategy * | string | |
| trading_hours | string |
nt_strategy_stopDisable and remove a strategy THIS server started, by the id nt_strategy_start returned.| Parameter | Type | Description |
|---|---|---|
| account * | string | |
| confirm | string | |
| id * | string | |
| issued_at | number |
nt_templatesList the NinjaTrader strategy templates saved for one strategy, for use as nt_backtest(template=...).| Parameter | Type | Description |
|---|---|---|
| strategy * | string |
nt_traceLast n lines of the newest NT8 trace file and the newest NT8 log file, tagged by source.| Parameter | Type | Description |
|---|---|---|
| n | integer |
nt_trade_shotScreenshot of `chart` scrolled to one trade's entry time. run_id is a saved run id (nt_runs)| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| run_id * | string | |
| trade_index * | integer |
nt_walkforwardWalk-forward test: slice from_date..to_date into in-sample/out-of-sample windows, optimize on each| Parameter | Type | Description |
|---|---|---|
| anchored | boolean | |
| bars_period | object | |
| chart | string | |
| commission_template | string | |
| fill_limit_on_touch | boolean | |
| fill_resolution | string | |
| fill_resolution_type | string | |
| fill_resolution_value | integer | |
| fitness | string | |
| from_date | string | |
| include_commission | boolean | |
| include_trades | boolean | |
| inputs | object | |
| instrument | string | |
| max_backtests | integer | |
| max_combos | integer | |
| max_runs | integer | |
| min_trades | integer | |
| optimization_period_days | integer | |
| params * | any | |
| slippage_ticks | number | |
| strategy * | string | |
| test_days | integer | |
| test_period_days | integer | |
| tick_replay | boolean | |
| to_date | string | |
| train_days | integer | |
| wait_s | integer |
nt_window_shotPNG of one NinjaTrader window, captured in-process with PrintWindow and returned as an image.| Parameter | Type | Description |
|---|---|---|
| chart | string | |
| hwnd | integer | |
| path | string | |
| window | string |
nt_windowsList NT8 top-level windows (title, kind). Precondition: AddOn running.nt_workspaceThe loaded NinjaTrader workspace and every window the AddOn can see, in one read: `name` (thent_workspace_closeClose an open workspace with no click needed (WorkspaceOptions.CloseWorkspace,| Parameter | Type | Description |
|---|---|---|
| name * | string | |
| save | boolean |
nt_workspace_openOpen a workspace FILE from NinjaTrader's workspaces folder (WorkspaceOptions.OpenWorkspace),| Parameter | Type | Description |
|---|---|---|
| activate | boolean | |
| name * | string |
nt_workspace_save_asSave an OPEN workspace under a new name with no dialog (WorkspaceOptions.SaveWorkspaceAs).| Parameter | Type | Description |
|---|---|---|
| name * | string | |
| new_name * | string | |
| overwrite | boolean |
nt_workspace_switchMake an OPEN NinjaTrader workspace the active one (WorkspaceOptions.SwitchToWorkspace).| Parameter | Type | Description |
|---|---|---|
| name * | string |
Security checks
6 checks have not been run yet.