NinjaOne MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NinjaOne MCP ServerList all devices and their active alerts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NinjaOne MCP Server
A comprehensive Model Context Protocol (MCP) server that integrates NinjaOne RMM with Claude. Manage devices, automate IT tasks, handle ticketing, monitor patch status, and execute remote scriptsβall through natural language conversation with Claude AI.
What is an MCP? A Model Context Protocol server extends Claude's capabilities by providing access to external systems and APIs. This server bridges Claude and NinjaOne, enabling AI-powered IT management.
β¨ Key Features
π₯οΈ Device Management
List, search, and get detailed information about devices
Monitor device status, health, and connectivity
Track active alerts and notifications
Search devices using NinjaOne filter syntax
π Device Actions
Reboot devices (graceful or forced)
Execute scripts and built-in actions remotely
Automate IT tasks across your infrastructure
π§ Patch & Software Management
View OS and software patch status
Track patch compliance
Inventory installed software across devices
Identify outdated or vulnerable software
π« Ticketing System
Create support tickets programmatically
Query existing tickets
Update ticket information
Add comments and notes
π Reporting & Monitoring
Device health reports
Antivirus status across fleet
Organization-wide reporting
Custom queries via generic API access
π Enterprise Security
OAuth 2.0 authentication with automatic token refresh
No credentials in version control (environment variables only)
Full support for NinjaOne's security model
TypeScript for type safety
βοΈ Production Ready
Node.js 20 LTS
Comprehensive error handling
Pagination support for large datasets
20+ API tools for complete NinjaOne integration
Related MCP server: Domotz MCP Server
π Quick Start
Prerequisites
Node.js 20 LTS or higher (Download)
npm (included with Node.js)
NinjaOne account with API access
Claude Desktop (for MCP integration)
Installation (5 minutes)
Clone the repository:
git clone https://github.com/SoroushAlamdari/ninjaone-mcp.git
cd ninjaone-mcpInstall dependencies:
npm installBuild the server:
npm run buildConfigure NinjaOne credentials (see OAuth Setup below)
π OAuth Setup (Required)
This server uses OAuth 2.0 client credentials flow for secure API access. Follow these steps:
Step 1: Create OAuth Application in NinjaOne
Log into your NinjaOne Dashboard
Go to Admin/Settings β API β Client app IDs
Click + Create application
Fill in the form:
Application platform:
API Services (machine-to-machine)Name:
Claude MCP(or your preferred name)Redirect URI:
http://localhost:3000/callbackScopes: Check
Monitoring,Management,ControlAllowed grant types: Check
Client credentials
Click Create and copy the generated credentials
Step 2: Add Credentials to Environment
Create a .env file in the project root:
cp .env.example .envEdit .env and add your credentials:
NINJA_CLIENT_ID=<your_client_id_here>
NINJA_CLIENT_SECRET=<your_client_secret_here>
NINJA_REDIRECT_URI=http://localhost:3000/callback
NINJA_API_BASE_URL=https://your-instance.ninjarmm.comβ οΈ Security: Never commit
.envto version control. The.gitignorefile protects it automatically.
π€ Claude Desktop Integration
Windows Setup
Edit Claude Desktop config:
Open:
C:\Users\YourUsername\AppData\Roaming\Claude\claude_desktop_config.jsonOr use:
%APPDATA%\Claude\claude_desktop_config.json
Add this to the
mcpServerssection:
{
"mcpServers": {
"ninjaone-mcp": {
"command": "node",
"args": [
"C:\\Users\\YourUsername\\ninjaone-mcp\\dist\\index.js"
],
"env": {
"NINJA_CLIENT_ID": "<your_client_id>",
"NINJA_CLIENT_SECRET": "<your_client_secret>",
"NINJA_REDIRECT_URI": "http://localhost:3000/callback",
"NINJA_API_BASE_URL": "https://your-instance.ninjarmm.com"
}
}
}
}macOS Setup
Edit Claude Desktop config:
Run:
nano ~/.claude/claude_desktop_config.json
Add MCP configuration (same structure as Windows above, using macOS paths):
{
"mcpServers": {
"ninjaone-mcp": {
"command": "node",
"args": [
"/Users/YourUsername/ninjaone-mcp/dist/index.js"
],
"env": {
"NINJA_CLIENT_ID": "<your_client_id>",
"NINJA_CLIENT_SECRET": "<your_client_secret>",
"NINJA_REDIRECT_URI": "http://localhost:3000/callback",
"NINJA_API_BASE_URL": "https://your-instance.ninjarmm.com"
}
}
}
}3. Start Using It
Close and reopen Claude Desktop
Look for the NinjaOne connector in the Connectors panel
Start using the tools:
"List all my devices" "Show me critical alerts" "Get patch status for my servers" "Create a ticket for offline devices" "Run an inventory scan on all workstations"
Verification Checklist
NinjaOne MCP appears in Claude Desktop Connectors list
All 20+ tools are visible (no "no tools available" message)
Test with:
"List my devices"Devices appear in the response
π Available Tools (20+ API Functions)
Device Management (5 tools)
Tool | Purpose |
| List all devices with pagination and filtering |
| Get detailed information about a specific device |
| Search devices using NinjaOne filter syntax |
| Get active alerts for a device |
| Get all active alerts across your fleet |
Device Actions (2 tools)
Tool | Purpose |
| Reboot a device (graceful or forced shutdown) |
| Execute a script or built-in action on a device |
Patch Management (2 tools)
Tool | Purpose |
| View OS patch status for a device |
| View software patch status for a device |
Software & Inventory (1 tool)
Tool | Purpose |
| View installed software on a device |
Ticketing (4 tools)
Tool | Purpose |
| Create a new support ticket |
| Retrieve ticket details |
| Update ticket information and status |
| Add a comment to a ticket |
Organization & Contacts (3 tools)
Tool | Purpose |
| List all organizations |
| Get organization details |
| List all contacts in your account |
Reports & Monitoring (2 tools)
Tool | Purpose |
| Generate a device health report |
| Get antivirus status across all devices |
Advanced/Generic API (2 tools)
Tool | Purpose |
| Make a GET request to any NinjaOne API endpoint |
| Make a POST request to any NinjaOne API endpoint |
π¬ Example Use Cases
Ask Claude any of these:
"List all my devices and show their status"
"Which devices haven't checked in for more than 24 hours?"
"Show me all critical and high-severity alerts"
"Get patch compliance report for all Windows servers"
"Create a ticket for all offline devices"
"Search for all devices with antivirus disabled"
"Run a compliance script on all workstations in Location XYZ"
"Show me devices running outdated versions of software"
"Get a summary of device health across the organization"
"Which devices need OS updates?"π‘ API Methods & Endpoints
All tools communicate with NinjaOne API v2.0 using the following base URL:
https://<your-instance>.ninjarmm.com/api/v2Authentication Header
All requests include:
Authorization: Bearer <access_token>
Content-Type: application/jsonTool Reference with API Methods
Tool | HTTP Method | Endpoint | Description |
| GET |
| Retrieve paginated device list |
| GET |
| Get single device details |
| GET |
| Search using filter syntax |
| GET |
| Get alerts for device |
| GET |
| Get all active alerts |
| POST |
| Initiate device reboot |
| POST |
| Execute script on device |
| GET |
| Get OS patch status |
| GET |
| Get software patch status |
| GET |
| Get installed software |
| POST |
| Create support ticket |
| GET |
| Get ticket details |
| PATCH |
| Update ticket |
| POST |
| Add ticket comment |
| GET |
| List all organizations |
| GET |
| Get org details |
| GET |
| List all contacts |
| GET |
| Get device health report |
| GET |
| Get antivirus report |
| GET |
| Custom GET request |
| POST |
| Custom POST request |
Example API Calls
List Devices (with pagination):
curl -X GET "https://your-instance.ninjarmm.com/api/v2/devices?pageNo=1&pageSize=50" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"Get Device Details:
curl -X GET "https://your-instance.ninjarmm.com/api/v2/devices/12345" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Search Devices with Filter:
curl -X GET "https://your-instance.ninjarmm.com/api/v2/devices?filter=status=online" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Create a Ticket:
curl -X POST "https://your-instance.ninjarmm.com/api/v2/tickets" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Device Offline",
"description": "Device XYZ is offline",
"priority": "high"
}'Reboot a Device:
curl -X POST "https://your-instance.ninjarmm.com/api/v2/devices/12345/reboot" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "graceful"}'NinjaOne API Documentation
For complete API reference and additional endpoints:
Main API Docs: https://app.ninjarmm.com/apidocs
Beta API: https://app.ninjarmm.com/apidocs-beta/core-resources
Authorization: https://app.ninjarmm.com/apidocs-beta/authorization/overview
π οΈ Development
Build Production Code
npm run buildWatch Mode (Auto-rebuild on changes)
npm run devType Checking
npm run type-checkRun Tests
npm testProject Structure
ninjaone-mcp/
βββ src/
β βββ index.ts # MCP server entry point
β βββ api-client.ts # NinjaOne API wrapper
β βββ oauth.ts # OAuth 2.0 handling
β βββ tools.ts # Tool definitions
β βββ types.ts # TypeScript interfaces
βββ dist/ # Compiled JavaScript (auto-generated)
βββ package.json
βββ tsconfig.json
βββ README.mdπ Security Best Practices
β Do:
β Use
.envfile for credentials (already in.gitignore)β Rotate OAuth credentials regularly
β Limit API scopes to what you need
β Use strong, unique client secrets
β Monitor API usage in NinjaOne
β Don't:
β Commit
.envfile to version controlβ Share credentials or secrets
β Use credentials in code or logs
β Store secrets in comments
β Log sensitive information
π Troubleshooting
"NinjaOne MCP connector not appearing in Claude Desktop"
Verify
dist/index.jsexists:ls dist/Rebuild:
npm run buildCheck JSON syntax: Use jsonlint.com
Close and fully reopen Claude Desktop (don't just restart)
Check file paths match your installation
"Invalid or missing credentials"
Verify credentials in
.envfile (not in config file)Check for extra spaces or quotes in values
Regenerate credentials in NinjaOne if unsure
Ensure API application has correct scopes: Monitoring, Management, Control
"Cannot find module errors"
Run:
npm installDelete
node_modulesfolder and reinstall:rm -rf node_modules && npm install
"node: command not found"
Verify Node.js 20+ is installed:
node --versionOn Windows, use full path or add Node to PATH
On macOS/Linux, ensure
/usr/local/binis in PATH
Enable Debug Logging
Set environment variable and rebuild:
export DEBUG=1 # Linux/macOS
set DEBUG=1 # Windows
npm run buildπ API Documentation
For detailed NinjaOne API documentation:
π License
MIT License - See LICENSE file for details
Free to use, modify, and distribute.
π€ Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Test your changes
Submit a pull request
π‘ Support
Issues: Use GitHub Issues
API Help: NinjaOne Support
MCP Spec: Model Context Protocol
π Project Stats
Language: TypeScript
Runtime: Node.js 20 LTS
API Integration: NinjaOne RMM v2.0
Protocol: Model Context Protocol (MCP)
Authentication: OAuth 2.0
Tools: 20+
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces β chat, links, and tasks. One-click OAuth.
Manage your IoT device fleet directly from Claude. Create device templates with datastreams and events, provision new devices, read live sensor data, and control outputs. The Blynk connector integrates with the Blynk IoT platform, enabling direct configuration and monitoring of connected devices and infrastructure.
Connect any AI assistant to Syncro: manage tickets, invoices, customers, assets, and more.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to manage Okta organizations, including users, groups, and applications, via natural language.147MIT
- AlicenseAqualityDmaintenanceEnables Claude to query and manage Domotz network monitoring through 133 API actions, covering collectors, devices, alerts, and configuration.136MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to interact with NinjaOne, providing tools for managing devices, organizations, alerts, and tickets. Uses a decision tree architecture to load domain-specific tools on demand.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude to interact with Datto RMM accounts for device, alert, site, and quick job management through natural language.Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SoroushAlamdari/Ninjaone-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server