NinjaTrader
MCP Server for NinjaTrader - Claude Code integration
What is NinjaTrader?
NinjaTrader is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for ninjatrader - claude code integration
MCP Server for NinjaTrader - Claude Code integration
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP Server for NinjaTrader - Claude Code integration
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx ninjatraderConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use NinjaTrader
The NinjaTrader MCP server bridges Claude Code and NinjaTrader 8, exposing account management, position tracking, order operations, and real-time market data tools through the MCP protocol. It supports both a local mode (connecting directly to a running NinjaTrader 8 instance on localhost) and a cloud mode (using NinjaTrader's remote API with an API key), making it suitable for both desktop traders and automated trading workflows.
Prerequisites
- Node.js 18 or higher installed
- NinjaTrader 8 installed and licensed (for local mode) OR a NinjaTrader cloud account with API access (for cloud mode)
- Git installed to clone the repository
- An MCP-compatible client such as Claude Desktop or Claude Code CLI
Clone the repository
Clone the ninjatrader-mcp repository from GitHub and navigate into it.
git clone https://github.com/ozmnf4/ninjatrader-mcp.git ~/ninjatrader-mcp
cd ~/ninjatrader-mcpInstall dependencies
Install the required Node.js packages using npm.
npm installConfigure environment variables
Set the connection mode and endpoint. For local mode, point to your running NinjaTrader 8 instance. For cloud mode, provide your API key instead.
# Local mode
export NINJATRADER_MODE=local
export NINJATRADER_LOCAL_URL=http://localhost:7890
# Cloud mode
export NINJATRADER_MODE=cloud
export NINJATRADER_API_KEY=your_api_key_hereAdd to Claude Desktop configuration
Register the server in your Claude Desktop config file, passing the environment variables inline.
{
"mcpServers": {
"ninjatrader": {
"command": "node",
"args": ["/Users/you/ninjatrader-mcp/index.js"],
"env": {
"NINJATRADER_MODE": "local",
"NINJATRADER_LOCAL_URL": "http://localhost:7890"
}
}
}
}Start NinjaTrader 8 (local mode)
Launch NinjaTrader 8 on your machine and ensure the local server or connection adapter is running on port 7890 before starting the MCP server.
Verify connection with health check
Ask Claude to call the nt_health_check tool to confirm the MCP server can reach NinjaTrader.
NinjaTrader Examples
Client configuration
Claude Desktop config for NinjaTrader MCP in local mode.
{
"mcpServers": {
"ninjatrader": {
"command": "node",
"args": ["/Users/you/ninjatrader-mcp/index.js"],
"env": {
"NINJATRADER_MODE": "local",
"NINJATRADER_LOCAL_URL": "http://localhost:7890"
}
}
}
}Prompts to try
Example prompts that exercise the NinjaTrader tools.
- "Show my current account balance and open positions"
- "Get the last 100 five-minute bars for ES (E-mini S&P 500)"
- "What is the current bid/ask and market depth for NQ?"
- "Place a market order to buy 1 ES contract"
- "Cancel all open orders on my account"
- "What is the current RSI value on my ES chart?"Troubleshooting NinjaTrader
Connection refused when using local mode
Confirm NinjaTrader 8 is open and the local connection adapter is enabled and listening on port 7890. Check your firewall settings to ensure the port is not blocked by Windows Defender or another security tool.
API key authentication fails in cloud mode
Log into your NinjaTrader cloud account portal to verify the API key is active and has not expired. Regenerate the key if needed and update the NINJATRADER_API_KEY environment variable.
NinjaScript tools (nt_indicator_values, nt_chart_state) return errors
These tools are only available in local mode with an active NinjaTrader 8 chart open. Ensure you have a chart running with the relevant instrument before calling these tools.
Frequently Asked Questions about NinjaTrader
What is NinjaTrader?
NinjaTrader is a Model Context Protocol (MCP) server that mcp server for ninjatrader - claude code integration It connects AI assistants to external tools and data sources through a standardized interface.
How do I install NinjaTrader?
Follow the installation instructions on the NinjaTrader GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with NinjaTrader?
NinjaTrader works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is NinjaTrader free to use?
Yes, NinjaTrader is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
NinjaTrader Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to NinjaTrader? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up NinjaTrader in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use NinjaTrader?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.