> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Connect Your AI Agent

**Beta, pre-release.** The NinjaTrader MCP server and its trading skills are in beta and
aren't yet generally available. The beta runs on Demo only, which trades simulated money.
Live access opens later. Server hostnames, the tool set, the skills, and the onboarding
flow may change before launch.

The NinjaTrader MCP server is a remote server you connect to over HTTPS. There's nothing to install. You add the server URL to your AI client, then authorize it with your NinjaTrader account through OAuth. After that, your agent can use the available [tools](/mcp/tools).

## Server URLs

The beta runs on Demo, which trades simulated money. Each URL hosts a single environment with its own accounts.

| Environment             | MCP server URL                          |
| ----------------------- | --------------------------------------- |
| Demo, simulated trading | `https://mcp-demo.tradovateapi.com/mcp` |

The Demo environment trades simulated money, so it's the safe place to learn how your
agent acts.

The server uses the Streamable HTTP MCP transport. When your client first connects, it discovers the NinjaTrader authorization server automatically and walks you through signing in. See [Authentication & Access](/mcp/authentication) for what happens during that step.

## Connect by platform

The following are AI clients that work with the NinjaTrader MCP server. Use the Demo URL in the steps below while testing. Where your client asks you to name the server, use `ninjatrader-demo`. The trading-skills plugin declares that same name in its manifests. The [trading skills](/mcp/skills) name every tool without a prefix, so any server name works. Matching the plugin name avoids a second registration for the same server.

### Claude Code

1. Run this command in your terminal:

   ```bash title="Terminal"
   claude mcp add ninjatrader-demo --transport http https://mcp-demo.tradovateapi.com/mcp
   ```

2. Enter `/mcp` in Claude Code.

3. Select `ninjatrader-demo` and authenticate.

For details, review the [Claude Code documentation](https://docs.claude.com/en/docs/claude-code).

### Claude Desktop

1. Go to **Settings → Connectors → Add custom connector**.
2. Add this MCP URL: `https://mcp-demo.tradovateapi.com/mcp`.
3. Open the connector and authenticate when prompted.

For details, review the Claude Desktop documentation.

### ChatGPT

1. Turn on **Developer Mode**.
2. Go to **Settings → Apps → Create app**.
3. Add this MCP URL: `https://mcp-demo.tradovateapi.com/mcp`.

For details, review the ChatGPT documentation.

### Codex

1. Go to **Settings → MCP servers**.
2. Select **Streamable HTTP**.
3. Add this MCP URL: `https://mcp-demo.tradovateapi.com/mcp`.

For details, review the Codex documentation.

### Codex CLI

1. Run this command in your terminal:

   ```bash title="Terminal"
   codex mcp add ninjatrader-demo --url https://mcp-demo.tradovateapi.com/mcp
   ```

2. Enter `/mcp` in Codex CLI.

3. Select `ninjatrader-demo` and authenticate.

For details, review the Codex CLI documentation.

### Cursor

1. Go to **Settings → Cursor Settings → Tools & MCPs**.
2. Add a new MCP server with this URL: `https://mcp-demo.tradovateapi.com/mcp`.
3. Select **Connect** and authenticate.

For details, review the Cursor documentation.

### Other platforms

You can connect from any AI client that supports remote MCP servers with OAuth. Add the Demo URL, `https://mcp-demo.tradovateapi.com/mcp`, wherever your client accepts a Streamable HTTP MCP server. Complete the sign-in when prompted.

{/* The beta runs on Demo only. When Live opens to users, name both the
    Demo URL and the Live URL at mcp-live.tradovateapi.com/mcp here. */}

## Authorize your account

The first time your client connects, it redirects you to sign in to NinjaTrader and approve the connection. This uses OAuth. Your agent never sees your password. You must complete authorization in a desktop browser.

After you approve, the client stores a session and your agent can start calling tools. Sessions expire after a period of inactivity. If your agent stops working, reconnect to start a new session. See [Authentication & Access](/mcp/authentication) for the full flow and session details.

## Verify the connection

Once connected, confirm the server is working with a read-only prompt before doing anything else:

```text title="Example prompt"
List my NinjaTrader accounts and show my current positions and working orders.
```

This calls the read-only [`my_portfolio`](/mcp/tools) tool. If your agent returns your accounts, you're connected. From there, see the [Tools reference](/mcp/tools) for everything your agent can do.

If your client lists the connected server's tools, you should see tools such as `my_portfolio`, `search_contracts`, `market_snapshot`, and `place_order`. If no tools appear, see <a href="/mcp/troubleshooting">Troubleshooting</a>.