A Model Context Protocol (MCP) server for interacting with NinjaOne, featuring a decision tree architecture for efficient tool loading.
This MCP server uses a hierarchical tool loading approach instead of exposing all tools upfront:
- Navigation Phase: Initially exposes only a navigation tool (
ninjaone_navigate) - Domain Selection: User selects a domain (devices, organizations, alerts, tickets)
- Domain Tools: Server exposes domain-specific tools after selection
- Lazy Loading: Domain handlers and the NinjaOne client are loaded on-demand
This architecture provides:
- Reduced cognitive load (fewer tools to choose from)
- Faster initial load times
- Better organization of related operations
- Clear navigation state
npm install @wyre-technology/ninjaone-mcpSet the following environment variables:
| Variable | Required | Description |
|---|---|---|
NINJAONE_CLIENT_ID |
Yes | OAuth 2.0 Client ID |
NINJAONE_CLIENT_SECRET |
Yes | OAuth 2.0 Client Secret |
NINJAONE_REGION |
No | Region: us (default), eu, or oc |
| Region | Base URL |
|---|---|
us |
https://app.ninjarmm.com |
eu |
https://eu.ninjarmm.com |
oc |
https://oc.ninjarmm.com |
# Set credentials
export NINJAONE_CLIENT_ID="your-client-id"
export NINJAONE_CLIENT_SECRET="your-client-secret"
export NINJAONE_REGION="us"
# Run the server
npx @wyre-technology/ninjaone-mcpAdd to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"ninjaone": {
"command": "npx",
"args": ["@wyre-technology/ninjaone-mcp"],
"env": {
"NINJAONE_CLIENT_ID": "your-client-id",
"NINJAONE_CLIENT_SECRET": "your-client-secret",
"NINJAONE_REGION": "us"
}
}
}
}docker build -t ninjaone-mcp .
docker run -e NINJAONE_CLIENT_ID=xxx -e NINJAONE_CLIENT_SECRET=xxx -e NINJAONE_REGION=us ninjaone-mcpManage endpoints, reboot devices, view services and alerts.
Tools:
ninjaone_devices_list- List devices with filtersninjaone_devices_get- Get device detailsninjaone_devices_reboot- Schedule a device rebootninjaone_devices_services- List Windows services on a deviceninjaone_devices_alerts- Get device-specific alertsninjaone_devices_activities- View device activity log
Manage customer organizations and their resources.
Tools:
ninjaone_organizations_list- List organizationsninjaone_organizations_get- Get organization detailsninjaone_organizations_create- Create a new organizationninjaone_organizations_locations- List organization locationsninjaone_organizations_devices- List devices for an organization
View and manage alerts across all devices.
Tools:
ninjaone_alerts_list- List alerts with filtersninjaone_alerts_reset- Reset/dismiss a single alertninjaone_alerts_reset_all- Reset all alerts for a device or organizationninjaone_alerts_summary- Get alert count summary
Manage service tickets.
Tools:
ninjaone_tickets_list- List tickets with filtersninjaone_tickets_get- Get ticket detailsninjaone_tickets_create- Create a new ticketninjaone_tickets_update- Update an existing ticketninjaone_tickets_add_comment- Add a comment to a ticketninjaone_tickets_comments- Get ticket comments
Always available:
ninjaone_navigate- Select a domain to work withninjaone_status- Show current state and credential statusninjaone_back- Return to main menu (when in a domain)
User: Check my devices
Claude: [calls ninjaone_navigate with domain="devices"]
-> Navigated to devices domain. Available tools: ...
User: List all Windows servers
Claude: [calls ninjaone_devices_list with device_class="WINDOWS_SERVER"]
-> [device list results]
User: Now show me alerts
Claude: [calls ninjaone_back]
-> Navigated back to main menu.
[calls ninjaone_navigate with domain="alerts"]
-> Navigated to alerts domain.
NinjaOne uses OAuth 2.0 for authentication. You need to:
- Log in to your NinjaOne dashboard
- Go to Administration > Apps > API
- Create a new API application
- Note the Client ID and Client Secret
- Configure the environment variables
The client library handles token refresh automatically.
Apache-2.0