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.
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.
What you need
v1.13.0 or higher.Claude Desktop setup
- Open Claude Desktop.
- Settings โ Developer โ Edit Config.
- Add the CrossTrade server:
{
"mcpServers": {
"crosstrade": {
"url": "https://app.crosstrade.io/v1/api/mcp"
}
}
} - Save and restart Claude Desktop.
- On your next message that references CrossTrade, Claude opens a browser tab to the CrossTrade consent screen. Approve mcp:read.
- Verify by asking Claude to call
GetMcpCapabilitiesandMcpSelfTest.
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.
Run these first to prove the connection
Pre-session brief
Journal review
Webhook audit
Copier diagnosis
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:
For backtests:
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
GetNinjaScriptHelpandLookupNinjaScriptSymbol. - The agent must summarize every compile repair so you can review what changed.
- The agent must not call
DeployStrategywithout an explicit confirmation, regardless of how good the backtest looked.
For the full pattern, see Vibe Coding NinjaScript Strategies with CrossTrade MCP.
Hosted CrossTrade MCP vs running your own
mcp:read and mcp:trade as standard.Safety notes worth repeating
- Default to
mcp:read. Upgrade tomcp:tradeonly 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.
Common Claude setup errors
LookupNinjaScriptSymbol on the failing identifier.is_trading: falseGetDeployedStrategyState.errors.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.