> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.ninjatrader.com/mcp/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server. # MCP ## Docs - [Connect Your AI Agent](https://docs.ninjatrader.com/mcp/connect.md): Add the NinjaTrader MCP server to your AI client and authorize it with your account. - [Authentication & Access](https://docs.ninjatrader.com/mcp/authentication.md): How your AI client authorizes with NinjaTrader and what it's allowed to do. - [Safety & Disclosures](https://docs.ninjatrader.com/mcp/safety.md): Understand the risks of agentic trading and how to stay in control. - [Pre-Trade Risk](https://docs.ninjatrader.com/mcp/pre-trade-risk.md): The server-side checks every agent order must pass before it reaches the market. - [Trading Skills](https://docs.ninjatrader.com/mcp/skills.md): Natural-language trading workflows that orchestrate the MCP tools. You describe the goal, the skills propose a plan, you approve. - [Skill Reference](https://docs.ninjatrader.com/mcp/skills-reference.md): All 13 trading skills, grouped by where they fit in a trading session. - [Workflows](https://docs.ninjatrader.com/mcp/skills-workflows.md): What a full trading session looks like when the skills handle the plumbing. - [Tools](https://docs.ninjatrader.com/mcp/tools.md): The complete catalog of actions your agent can call on the NinjaTrader MCP server. - [Resources](https://docs.ninjatrader.com/mcp/resources.md): Live account and market data your agent can read and subscribe to. - [Troubleshooting](https://docs.ninjatrader.com/mcp/troubleshooting.md): Fix the most common issues connecting and using the NinjaTrader MCP server. > **Note:** This page contains both a page directory (above) and the landing page content (below). The page directory is generated for agent use and does not appear on the landing page. > For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.ninjatrader.com/mcp/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server. # Overview The NinjaTrader MCP server lets an AI agent connect directly to your NinjaTrader account so it can answer questions about your portfolio and act on your behalf: searching contracts, reading live quotes, placing and managing orders, and monitoring risk. Instead of only describing what to do, a connected agent can do it. It works with any AI client that supports the Model Context Protocol, including Claude Code, Claude Desktop, ChatGPT, Codex, and Cursor. See [Connect Your AI Agent](/mcp/connect) to get set up. > **Note** > > The NinjaTrader MCP server is available only to Tradovate and NinjaTrader users. ## What's an MCP? The Model Context Protocol, or MCP, is an open standard that lets AI agents connect to external apps and services. Instead of just answering questions, an AI with MCP access can take actions on your behalf, in this case querying your accounts and trading futures and event contracts through NinjaTrader. The NinjaTrader MCP server is a remote server: you connect to it over HTTPS and authorize it with your NinjaTrader credentials through OAuth. There's nothing to install. See [Authentication & Access](/mcp/authentication) for how authorization works. ## What your agent can do Once connected, your agent can read your account data and place orders using the available [tools](/mcp/tools). You're always in control of what you ask it to do. A few examples: * **Check your account.** "What's the net liquidation value and open P\&L on the demo account?" * **Research the market.** "What's the current quote and margin requirement for the front-month E-mini S\&P contract?" * **Place an order with a bracket.** "Buy 1 ESU5 at market with a 20-point profit target and a 10-point stop." * **Manage positions and orders.** "Flatten all open positions" or "cancel every working order on DEMO12345." * **Review performance.** "Summarize last week's trading performance: win rate, average trade, and max drawdown." * **Watch for conditions.** "Create an alert for when crude oil rises past \$80." * **Set guardrails.** "Set a \$500 daily loss auto-liquidation limit on the account." > **Note** > > These examples are illustrative. The agent uses the same tools and permissions described > in the [Tools reference](/mcp/tools). It can't do anything through the MCP server that > those tools don't expose. ## What your agent can access When you connect an agent, it authenticates as you and operates within your NinjaTrader account's permissions. Each tool requires a specific access level on your account, enforced server-side: | Capability | Access required | Example tools | | -------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | Profile & subscriptions | Users: Read | `user_profile` | | Accounts, balances & history | Accounting: Read | `cash_history`, `daily_balance_history`, `performance_summary` | | Reading positions & orders | Positions: Read, Orders: Read | `my_portfolio`, `order_history`, `fill_history`, `order_details` | | Market data & contracts | Prices: Read, ContractLibrary: Read | `market_snapshot`, `market_history`, `dom_snapshot`, `search_contracts` | | Reading risk settings | Risks: Read | `risk_settings` | | **Placing & managing orders** | **Orders: Full Access**. `close_position` also needs **Positions: Read**. | `place_order`, `modify_order`, `cancel_order`, `close_position` | | **Changing risk settings** | **Risks: Full Access** | `update_risk_settings` | | **Creating & dismissing alerts** | **Alerts: Full Access** | `create_alert`, `dismiss_alert` | Read-only tools can only query data. Write tools can change your account. These are order placement, risk changes, and alerts. All of them except `create_alert` carry the MCP protocol's destructive-action hint, so most clients pause for approval before running them. `create_alert` carries a non-destructive, idempotent write hint instead. The full per-tool list is in the [Tools reference](/mcp/tools). ## Environments The MCP server hosts a single environment per endpoint, **Live** or **Demo**, with separate URLs and completely separate accounts. A Demo account exists only on the Demo server. A Live account exists only on the Live server. You can connect both at once, but each conversation should stay on one environment: once your agent resolves an account on a server, every follow-up call, whether quotes, orders, or history, must use that same server. Crossing between Live and Demo either fails with "account not found" or silently targets the wrong environment's account. When in doubt, tell your agent explicitly whether you mean Live or Demo. > **Tip** > > Start on **Demo** to get comfortable with how your agent behaves before connecting a Live > account that trades real money. ## Risks You are ultimately responsible for the trades your AI agent places in your account. When you use an agent to place orders, all trading decisions are yours. Depending on how you've configured your client, the agent may place trades without asking for confirmation on each one. Review your client's settings so you know whether it pauses for approval. AI agents can make mistakes, misinterpret instructions, and act on incomplete or outdated information. Use Demo first, keep [risk limits](/mcp/tools) in place, and monitor account activity. See your client's documentation for how to review or require approval of actions before they run. Read [Safety & Disclosures](/mcp/safety) before connecting a Live account. ## Next steps * [Connect Your AI Agent](/mcp/connect): set up Claude, ChatGPT, Codex, Cursor, and other clients. * [Authentication & Access](/mcp/authentication): how OAuth authorization and sessions work. * [Tools](/mcp/tools): the complete catalog of what your agent can call. * [Resources](/mcp/resources): live account and market data your agent can subscribe to. * [Safety & Disclosures](/mcp/safety): risks of agentic trading and how to stay in control.