Connect OpenCode to NinjaTrader 8
Open-source coding agent for the terminal. 75+ providers via Models.dev. Native OAuth + DCR for CrossTrade.
OpenCode calling CrossTrade MCP tools against a live NinjaTrader 8 account. Run this yourself in 5 minutes โ
Why pair OpenCode with CrossTrade MCP
OpenCode decouples the harness from the model. Configure CrossTrade MCP once, then swap between Claude, GPT, Gemini, DeepSeek, Qwen, or local Ollama without re-authenticating. Best fit for traders who want a portable terminal-first agent.
~/.config/opencode/opencode.json with type: "remote" (not "http" or "streamable-http") What this combination unlocks
Multi-model
/model to switch providers mid-session.
OAuth + DCR
Native browser flow on first tool call.
Terminal-first
Or open in your IDE / desktop app โ same config.
The connection chain
OpenCode โ OAuth-authorized tool call โผ CrossTrade hosted MCP server (https://app.crosstrade.io/v1/api/mcp) โ โผ CrossTrade Add-On running inside NT8 on your PC โ โผ NinjaTrader 8
One URL, one consent screen, one read-only first prompt. The MCP server is hosted by CrossTrade; you don't run anything beyond NT8 + the CrossTrade Add-On.
Ready to set up OpenCode?
The full step-by-step setup lives on a dedicated page. Verified against SST's current docs.
Copy-paste prompts that work today
Also consider
Common questions
Is OpenCode a good fit for trading?
Yes, especially if you want a terminal-first multi-model agent that can swap providers mid-session. OpenCode routes to 75+ providers via Models.dev. Mine the journal with cheap DeepSeek, then /model claude-sonnet and have Claude draft the NinjaScript fix.
Do I need OpenCode, or will Cursor / Cline / Claude Code work?
OpenCode lives in the terminal (or IDE/desktop โ same config across surfaces). Cursor lives in an IDE. Cline lives in VS Code. Claude Code is single-vendor (Claude only). Pick OpenCode if you want multi-model + terminal-first; otherwise pick by your editor preference.
Cost?
Open source, free. You pay providers directly (Anthropic, OpenAI, OpenRouter, etc.). OpenCode also offers "OpenCode Zen," a curated managed-models service via /connect + opencode.ai/auth, if you prefer one bill.
Mac, Windows, and Linux?
All three. Install via curl, npm, brew, choco (Windows), or paru (Arch). The CLI launches the agent in your terminal; the desktop and IDE entry points use the same config.
Why type "remote" instead of "http" or "streamable-http"?
OpenCode uses type: "remote" (the counterpart is "local" for stdio servers). Pick from those two only. Most other tools use "http" or "streamable-http"; copying their configs verbatim will silently fail in OpenCode.
OpenCode vs Crush?
Both are terminal multi-model agents. Crush is by Charm (TUI-polished, JSON config, no native OAuth). OpenCode is by SST (web-savvy, JSON config, native OAuth + DCR). Both handle CrossTrade MCP cleanly; pick by aesthetic and OAuth preference.
How do I swap models mid-session?
/model <provider/name>, e.g. /model deepseek-v3 to switch to a cheap reasoning model, then /model claude-sonnet for the NinjaScript draft. The MCP server registration stays put across switches; only the LLM changes.
Does OpenCode need API keys for every provider?
Only for the providers you actually use. Keys live in environment variables or the config. Route everything through OpenRouter if you want a single key, or sign in to OpenCode Zen for managed access.
Connect OpenCode to NinjaTrader 8 in 5 minutes
Free Sim101 walkthrough. Read-only first. Upgrade scope only when a real workflow needs it.