Core MCP Tools
These tools help an AI trading agent discover the environment, manage long-running work, inspect market state, and control supported NinjaTrader connection actions.
For copy-ready trader prompts that use these tools, see Account and Risk Prompts and Market Research Prompts.
Capability and Discovery
| Tool | Use it for |
|---|---|
GetMcpCapabilities | Confirm protocol version, add-on version, feature flags, active job count, and job TTL. Call this first. |
McpSelfTest | Smoke-test the MCP surface. Use deep:true when you also want a small backtest check. |
Job Manager
CompileNinjaScript returns a job_id immediately. Poll for the result instead of waiting inside the initial call.
| Tool | Use it for |
|---|---|
GetMcpJob | Poll a job by ID. Status values are pending, running, completed, failed, and cancelled. Result blocks include progress_pct and progress_note for in-flight progress reporting (used by RunStrategyBacktest sweeps and CompileNinjaScript). |
ListMcpJobs | List recent jobs, newest first. Supports a status filter and limit. |
CancelMcpJob | Request cancellation of a running job. Cancellation is cooperative and best-effort. |
GetCompileResult | Alias for GetMcpJob. |
Polling cadence
Jobs expire 30 minutes after completion (job_ttl_minutes from GetMcpCapabilities). Don't poll faster than every 250ms: the MCP transport rate-limits per HTTP request, not per logical poll.
Account, Risk, and Market State
The MCP server exposes the public REST trading surface as typed tools. Use those tools for accounts, positions, orders, executions, quotes, bars, and market information.
Connection Control
| Tool | Use it for |
|---|---|
GetConnections | List configured NT8 connections and their current status. |
Connect | Connect a named NT8 connection through the UI dispatcher. |
Disconnect | Disconnect a named NT8 connection. API-initiated disconnects are tracked so auto-reconnect does not fight the request. |