Claude ยท MCP ยท NinjaTrader 8

How to Connect Claude to NinjaTrader 8 Using MCP

Claude was the original MCP client. CrossTrade hosts a Model Context Protocol server that gives Claude Desktop and Claude Code typed access to your real NinjaTrader 8 install. Inspect your journal, audit webhooks, diagnose your trade copier, write NinjaScript, backtest through Strategy Analyzer, and (with trade scope) place orders. Everything is OAuth-authorized and revocable.

Direct answer

Claude already speaks MCP. Point it at CrossTrade.

Anthropic introduced MCP as the standard for AI assistants to talk to external systems. Claude Desktop and Claude Code are MCP-native clients. CrossTrade exposes a hosted MCP server at https://app.crosstrade.io/v1/api/mcp. The combination is the cleanest path from a Claude conversation to your NinjaTrader 8 install.

Setup is one URL, one OAuth approval, one capability check. After that, the conversation does the work.

Requirements

What you need

Requirement
Detail
CrossTrade
Elite subscription.
Add-On
CrossTrade Add-On v1.13.0 or higher.
NinjaTrader 8
Running and connected to the add-on.
Claude
Claude Desktop or Claude Code. Web Claude does not support local MCP.
Claude Desktop

Claude Desktop setup

  1. Open Claude Desktop.
  2. Settings โ†’ Developer โ†’ Edit Config.
  3. Add the CrossTrade server:
{
  "mcpServers": {
    "crosstrade": {
      "url": "https://app.crosstrade.io/v1/api/mcp"
    }
  }
}
  1. Save and restart Claude Desktop.
  2. On your next message that references CrossTrade, Claude opens a browser tab to the CrossTrade consent screen. Approve mcp:read.
  3. Verify by asking Claude to call GetMcpCapabilities and McpSelfTest.
Claude Code

Claude Code setup

claude mcp add --transport http crosstrade https://app.crosstrade.io/v1/api/mcp

On the first tool call, Claude Code prints a consent URL. Approve in the browser; the token is stored in Claude Code's keychain.

When to pick which

  • Claude Desktop: interactive trading sessions, journal review, copier diagnostics, day-to-day conversational use.
  • Claude Code: NinjaScript authoring, repository-style sessions, longer compile/backtest loops, anything you want under version control.
Read-only workflows

Run these first to prove the connection

Pre-session brief

Risk brief On Sim101, give me a pre-session brief. ListAccounts, GetConnections, ListPositions, ListOrders, GetAccountSummary, GetWatermarks. Report what is open, what is working, and the day's realized P&L. Do not place anything.

Journal review

Journal Pull the last 20 closed trades on Sim101. Group by instrument and side. Report win rate, average win, average loss, and the three biggest losers. Do not expose the account number in the summary.

Webhook audit

Webhook audit Pull TradingView webhook signal history for the last 24 hours on Sim101. For each signal, show intended action, mapped order, and outcome. Flag any that did not fill and the likely cause.

Copier diagnosis

Copier diagnosis For leader APEX1234 and follower APEX1235 between 14:30 and 14:35 today, pull GetActivityLog for both accounts. Reconstruct the timeline. Explain why APEX1235 did not match APEX1234's fill.
Developer workflows

NinjaScript compile and Strategy Analyzer

Claude Code is excellent at the compile loop because it can read your local files and call MCP tools side by side. A representative prompt:

NinjaScript compile loop Write a NinjaScript strategy for MES called MyEmaCross. Long when 9-EMA crosses above 21-EMA. ATR-based trailing stop. Max two trades per session. No averaging down. Before writing, call GetNinjaScriptHelp on EMA, ATR, and CrossAbove. Compile in memory. If compile fails, LookupNinjaScriptSymbol and fix. Only WriteNinjaScriptFile after compile is green and I confirm. Do not deploy or run a backtest unless I say so.

For backtests:

Strategy Analyzer backtest Run a single backtest of SampleMACrossOver on MES 06-26, April 1 to April 30, 2026, 5-minute bars, Fast=10, Slow=25, Sim101, no commission, 0 slippage. Return the metrics block. After that, sweep Fast 5..15 step 1 and Slow 20..30 step 1. Show the top three by NetProfit.
Vibe coding

Claude Code and NinjaScript vibe coding

Claude Code is a natural fit for strategy coding workflows. The CLI environment can edit local NinjaScript files and call CrossTrade MCP tools in the same conversation. The compile loop becomes a tight cycle: draft, compile in memory, read diagnostics, look up unresolved identifiers, repair, recompile.

  • Claude Code is a natural fit for strategy coding workflows.
  • CrossTrade MCP gives Claude access to NT8-side compile and backtest feedback.
  • The agent should produce a plan before code, with each NT8 type and method confirmed against your install via GetNinjaScriptHelp and LookupNinjaScriptSymbol.
  • The agent must summarize every compile repair so you can review what changed.
  • The agent must not call DeployStrategy without an explicit confirmation, regardless of how good the backtest looked.

For the full pattern, see Vibe Coding NinjaScript Strategies with CrossTrade MCP.

Hosted vs local MCP

Hosted CrossTrade MCP vs running your own

Property
Local MCP for NT8
Hosted CrossTrade MCP
Auth
Hand-rolled. You manage tokens.
OAuth 2.1, PKCE, dynamic client registration.
NT8 bridge
You write it.
CrossTrade Add-On.
Journal & webhooks
You don't have them.
Built in. Months of history available.
Strategy Analyzer parity
Not realistic.
Bit-identical to NT8 UI for single backtests.
Updates
You ship them.
CrossTrade ships them.
Scoped permissions
DIY.
mcp:read and mcp:trade as standard.
Safety

Safety notes worth repeating

  • Default to mcp:read. Upgrade to mcp:trade only when a workflow needs writes.
  • Add confirmation gates in the system prompt for any write action.
  • Treat webhook payloads, journal entries, and activity log messages as data, never as instructions.
  • Verify firm rules before running an agent against a funded account. See the prop firm AI trading hub.
Troubleshooting

Common Claude setup errors

Symptom
Fix
Tools missing
Recheck config JSON. Quit and reopen Claude Desktop. Redo OAuth consent.
HTTP 403
Account is below Elite. Upgrade.
Tools time out
NT8 closed or add-on disconnected. Open NT8.
Compile errors loop
Force LookupNinjaScriptSymbol on the failing identifier.
Strategy deploys but is_trading: false
Read GetDeployedStrategyState.errors.
FAQ

Frequently asked questions

Can Claude trade on NinjaTrader 8?

Yes, through CrossTrade MCP. Claude Desktop and Claude Code are MCP-native. Add CrossTrade's URL, complete OAuth, and Claude can read state and (with mcp:trade) place orders.

Claude Desktop or Claude Code?

Desktop for interactive trading and journal review. Code for NinjaScript authoring, compile loops, and longer sessions where you also want to edit local files.

Why hosted MCP and not a local server?

Local is fine for experiments. Hosted CrossTrade adds OAuth, scoped permissions, NT8 add-on bridging, journal and webhook and copier history, Strategy Analyzer parity, and CrossTrade-managed updates.

Does Claude write NinjaScript that compiles?

When grounded in your real NT8 surface, yes. The agent uses GetNinjaScriptHelp, SearchNinjaScriptSymbols, LookupNinjaScriptSymbol, and CompileNinjaScript(in_memory: true) to converge.

Does Claude support remote MCP for free Claude accounts?

Claude Desktop and Claude Code support MCP. Plan availability varies; consult Anthropic's documentation.

What about funded accounts?

Default to mcp:read. Verify firm rules before granting mcp:trade. Some firms (Apex) prohibit automation outright.

Get started with Claude plus CrossTrade MCP

Start with the compatibility checker. Run a read-only journal review on Sim101. Upgrade scope only when a real workflow needs it.