Ninja MCP Server
A comprehensive integration platform for NinjaRMM (NinjaOne) API that works seamlessly with Managed Cloud Provider (MCP) servers. This project provides PowerShell modules and scripts for MSPs to automate device monitoring, generate reports, and perform various management tasks against their NinjaRMM environment.
Features
- Comprehensive API Integration : Full access to NinjaRMM API functionality through a well-structured PowerShell module
- Device Monitoring : Automated monitoring of device status, alerts, and disk space usage
- HTML Reporting : Generate detailed HTML reports with device statistics and critical issues
- Email Alerts : Configurable email notifications when issues are detected
- Extensible Architecture : Easily add custom functionality or extend existing features
- MCP Server Compatible : Designed to work seamlessly on Managed Cloud Provider (MCP) servers
Quick Start
Installation
- Clone this repository to your MCP server:
New-Item -ItemType Directory -Path "C:\NinjaMCPServer" -Force
cd C:\NinjaMCPServer
git clone https://github.com/jasondsmith72/NinjaMCPServer.git .
- Configure API credentials:
Copy-Item .\config\config-sample.json .\config\config.json
notepad .\config\config.json # Update with your credentials
- Create required directories:
New-Item -ItemType Directory -Path ".\reports" -Force
New-Item -ItemType Directory -Path ".\logs" -Force
- Run the example script:
.\examples\Example-NinjaRMM.ps1 -ClientId "your-client-id" -ClientSecret "your-client-secret" -Region "US" -ListOrganizations
For detailed installation instructions, see the Installation Guide.
Usage
Run Device Monitoring
.\examples\MCP-Tasks-Main.ps1 -ClientId "your-client-id" -ClientSecret "your-client-secret" -ExportDeviceInventory -GenerateAlertReport -CheckDiskSpace -VerifyPatchStatus
Example Scripts
The examples
directory contains sample scripts demonstrating various aspects of the NinjaRMM API integration:
- Example-NinjaRMM.ps1 : Basic usage of the API module
- MCP-Tasks-Main.ps1 : Comprehensive monitoring and reporting tool
- More examples to be added...
Documentation
Project Structure
NinjaMCPServer/
├── config/ # Configuration files
├── docs/ # Documentation
├── examples/ # Example scripts
├── logs/ # Log files
├── reports/ # Generated reports
└── src/ # Source code
└── NinjaRMMAPI.psm1 # Main API module
Requirements
- Windows Server 2016 or later
- PowerShell 5.1 or later
- NinjaRMM API credentials (Client ID and Client Secret)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add some amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments