ninjatrader-ninjascript-mcp
v1.0.3
Published
MCP server for NinjaTrader NinjaScript documentation - query the complete SDK reference
Maintainers
Readme
NinjaTrader NinjaScript MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to the complete NinjaTrader Desktop SDK documentation for building indicators and strategies.
Installation
Using npx (recommended)
No installation required - just configure your MCP client:
{
"mcpServers": {
"ninjatrader": {
"command": "npx",
"args": ["-y", "ninjatrader-ninjascript-mcp"]
}
}
}Global Installation
npm install -g ninjatrader-ninjascript-mcpThen configure:
{
"mcpServers": {
"ninjatrader": {
"command": "ninjatrader-ninjascript-mcp"
}
}
}Configuration
Kiro
Add to your MCP config file:
| Platform | Path |
|----------|------|
| macOS/Linux | ~/.kiro/settings/mcp.json |
| Windows | %USERPROFILE%\.kiro\settings\mcp.json |
Or workspace-level: .kiro/settings/mcp.json
{
"mcpServers": {
"ninjatrader": {
"command": "npx",
"args": ["-y", "ninjatrader-ninjascript-mcp"]
}
}
}Claude Desktop
Add to your Claude Desktop config:
| Platform | Path |
|----------|------|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
{
"mcpServers": {
"ninjatrader": {
"command": "npx",
"args": ["-y", "ninjatrader-ninjascript-mcp"]
}
}
}OpenCode
Add to your OpenCode config file (opencode.json in your project root or ~/.config/opencode/opencode.json for global):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"ninjatrader": {
"type": "local",
"command": ["npx", "-y", "ninjatrader-ninjascript-mcp"],
"enabled": true
}
}
}Then add use ninjatrader to your prompts, or add this to your AGENTS.md:
When working with NinjaScript, use the `ninjatrader` MCP tools to search documentation.Available Tools
search_docs
Search the documentation by keyword.
search_docs({ query: "enterlong" })
search_docs({ query: "stop loss", max_results: 5 })get_doc
Get the full content of a specific documentation page.
get_doc({ file: "docs/enterlong.md" })
get_doc({ file: "best-practices/index.md" })list_topics
List all available documentation topics.
list_topics()
list_topics({ section: "docs" })get_workflow
Get a recommended workflow with relevant docs for common tasks.
get_workflow({ task: "indicator" })
get_workflow({ task: "strategy" })
get_workflow({ task: "drawing" })
get_workflow({ task: "multi-timeframe" })Example Usage
Ask your AI assistant:
- "Search for documentation about entering long positions"
- "Show me the workflow for building an indicator"
- "Get the documentation for OnBarUpdate"
- "What are the best practices for NinjaScript?"
Documentation Coverage
| Section | Pages | Description | |---------|-------|-------------| | docs | 1000+ | Complete API reference | | education | 1 | Learning resources | | best-practices | 1 | Coding guidelines |
Source
Documentation is sourced from the official NinjaTrader Developer Documentation.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If this project helped you, consider supporting its development:
- PayPal
- BTC:
18gT1wmq3RMoLBm2ZFv4PhiYbU5CMAQC6P
Links
License
Copyright (c) 2026 Mustafa Oransel
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
Note: The documentation content in this package is sourced from NinjaTrader's official developer documentation. Please refer to NinjaTrader's terms of use regarding the use of their documentation.
