Skip to main content

How to Connect Roo Code to NinjaTrader 8 with CrossTrade MCP

Roo Code is a Cline fork with additional modes (Architect, Code, Ask, Debug). The MCP integration uses streamable-http in kebab-case — different from upstream Cline's streamableHttp camelCase. Authentication is via headers, not native OAuth.

OAuth scope: mcp:tradeMulti-model harness

Prerequisites

RequirementDetail
CrossTrade subscriptionElite
CrossTrade Add-Onv1.13.0 or higher
NinjaTrader 8Running, broker connected
AccountSim101 for first runs
OAuth scopemcp:trade
Config filemcp_settings.json in VS Code globalStorage (or .roo/mcp.json in project)
CrossTrade MCP server
https://app.crosstrade.io/v1/api/mcp
Transport: streamable-http. Auth: OAuth 2.1 + PKCE. Request scope mcp:trade. Read plus write. Place/cancel orders, deploy strategies, compile NinjaScript.

Step 1: Add CrossTrade MCP

Open mcp_settings.json in VS Code globalStorage:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
  • Linux: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
  • Windows: %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json

Or for project scope, use .roo/mcp.json in your repo root.

{
"mcpServers": {
"crosstrade": {
"type": "streamable-http",
"url": "https://app.crosstrade.io/v1/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
},
"alwaysAllow": [],
"disabled": false,
"timeout": 60
}
}
}
type is kebab-case in Roo Code

Roo Code uses "type": "streamable-http" (kebab-case). Cline (the upstream) uses "streamableHttp" (camelCase). Sharing configs between them requires translation.

Optional fields: alwaysAllow (auto-approve tool names), disabled (boolean), timeout (1-3600 sec, default 60), disabledTools (block specific tools).

Step 2: Pick a mode

Roo Code has these modes:

  • Architect mode: useful for planning a strategy spec before writing.
  • Code mode: for the actual NinjaScript compile loop.
  • Ask mode: read-only Q&A about your codebase plus trading state.
  • Debug mode: for "why did this signal not fill" workflows.

Step 3: First prompt

ListAccounts and GetConnections. One-line status per account.

Step 4: NinjaScript compile loop

Same pattern as Cline.

FAQ

Why use Roo Code instead of Cline?

The mode system. Architect mode in particular is useful for planning trading strategies before generating any code.

Marketplace identifier?

rooveterinaryinc.roo-cline (the -cline suffix reflects its fork heritage; this is the active Roo Code extension).

OAuth handshake

The first tool call surfaces an authorization URL. Open it in a browser, approve mcp:trade, and return to the harness. The access token is stored by the harness (keychain, config file, or memory depending on the client).

See CrossTrade MCP OAuth for the full flow, and 403/408 troubleshooting if the handshake fails.

Verify the connection

Smoke-test before doing anything stateful:

Call GetMcpCapabilities and McpSelfTest. Then ListAccounts and GetConnections.
Report add-on version, NT8 version, and which accounts are linked.

If you authorized mcp:trade, also confirm Sim101 is the default account before any order placement.

Funded-account safety
The mcp:trade scope grants order placement. The scope does not protect a funded account; your prompt and account selection do. Default to Sim101 during setup. For funded accounts, verify the firm's automation policy first.

Troubleshooting

SymptomLikely causeFix
403 insufficient_scopeToken authorized at mcp:read but tool requires mcp:tradeReauthorize the connection and select mcp:trade
OAuth callback failsSystem browser blocked the redirect or popupCopy the auth URL manually, complete it, paste the code back
Tools list is empty after connectServer registered but session did not refreshRestart the harness or trigger a tool list refresh
Add-on offline errorNT8 not running, or add-on not loadedConfirm NT8 is open and the CrossTrade add-on (v1.13.0+) is installed
type: "streamableHttp" silently failsWrong casing for Roo CodeRoo Code uses type: "streamable-http" (kebab-case). Cline uses the camelCase form; do not copy between them
OAuth flow does not startRoo Code docs do not describe a native browser OAuth flow for remote MCPObtain a token via another OAuth-capable client and paste it as a Bearer header