Every NinjaOne API call. None by accident.
An MCP server that gives AI agents safe, complete access to the NinjaOne RMM Public API v2. It starts read-only, and it takes two deliberate settings before an agent can touch a device.
Each square is one tool. Flip the settings to see what an agent can run.
154 of 314 tools can run. Writes are listed but refuse.
- Read 154
- Write 105
- Destructive 55
Ask in plain words
The agent picks the tools. You see the answer, and every change it proposes.
-
Which clients have the most offline servers?
ninjaone_report_fleet_healthchecks every client at once, with a cap on concurrent requests. -
Show patch failures for Example Org this week.
A fleet report from
/v2/queries, scoped to one organization. -
What is wrong with device 1042?
ninjaone_get_device_profilereturns the device, hardware, volumes, patches and alerts in one call. -
Reboot device 1042 after hours.
Needs both gates and
confirm: true. Never retried automatically.
Safe by construction
An agent with access to your RMM can reach every endpoint you manage. These rules live in the server, so they hold no matter which client or model is calling.
-
Read
Default
Lists, profiles, reports, alerts. 154 tools. Nothing changes.
-
Write
NINJAONE_MODE=writeUpdates and creates. 105 tools. Every call also takes
confirm: true. -
Destructive
NINJAONE_ALLOW_DESTRUCTIVE=trueDeletes, reboots, scripts, patch installs, full replacements, secret-bearing downloads, raw writes. 55 tools.
- Dry runs and undo
- Wide writes are dry runs until
dry_run: false. Writes read the record back and return before and after, so a change can be undone. - An organization boundary
NINJAONE_ALLOWED_ORG_IDSholds every call inside a set of clients. Device filters are narrowed, and since NinjaOne filters only combine with AND, appending can never widen them. Devices are checked. Unscoped tools refuse.- Secrets stay out
- Secure custom field values are never requested. Signed and tokenized URLs come only from gated download tools with
reveal: true. Credentials are redacted from every result, error and log. OAuth client credentials only, never in a query string. - No surprise repeats
- Scripts, reboots and patch installs are never retried automatically.
- Errors that point forward
- Every error ends with a
Next step:line the agent can act on. - Checked in CI
- A conformance suite runs over 5,000 checks against the built server. A coverage check maps every spec operation to a tool.
The whole API, not a sample
All 315 operations in the Public API v2 spec are reachable. 314 have a typed tool. A few multipart and UI-config endpoints go through a gated raw passthrough.
- 23 fleet reports from
/v2/queries: inventory, patches, antivirus, health, custom fields. - Interactive views with MCP Apps: a fleet dashboard, a device page, and alerts with a gated Reset button.
- NinjaOne docs on hand. An
llms.txtof NinjaOne's public docs ships as an MCP resource. - Toolsets keep the default list to 107 tools.
NINJAONE_TOOLSETS=alllists everything. Some clients cap tools, such as VS Code Copilot at 128 per request.
Tool catalog
Every tool the server can list, with its tier and toolset.
Loading the catalog.
Toolsets
Set NINJAONE_TOOLSETS to a comma-separated list, or all. Defaults are marked.
Install
You need an API client first. In NinjaOne, open Administration, Apps, API. Choose the application platform API Services (machine-to-machine) and grant Client Credentials. Scopes: monitoring to read, management for writes, control for scripts and remote actions.
As a plugin. It asks for your client id, secret and region, and stores the secret in the OS keychain.
/plugin marketplace add patrickking67/ninja-one-mcp
/plugin install ninjaone@ninja-one-mcpOr with the CLI.
claude mcp add ninjaone -e NINJAONE_CLIENT_ID=your-id -e NINJAONE_CLIENT_SECRET=your-secret -e NINJAONE_REGION=us -- npx -y github:patrickking67/ninja-one-mcpDownload ninja-one-mcp.mcpb from the latest GitHub release and open it. Claude Desktop asks for the credentials.
codex mcp add ninjaone --env NINJAONE_CLIENT_ID=your-id --env NINJAONE_CLIENT_SECRET=your-secret --env NINJAONE_REGION=us -- npx -y github:patrickking67/ninja-one-mcpOr install the plugin.
codex plugin marketplace add patrickking67/ninja-one-mcpAdd to .cursor/mcp.json. Cursor works best with a small toolset.
{
"mcpServers": {
"ninjaone": {
"command": "npx",
"args": ["-y", "github:patrickking67/ninja-one-mcp"],
"env": {
"NINJAONE_CLIENT_ID": "your-id",
"NINJAONE_CLIENT_SECRET": "your-secret",
"NINJAONE_REGION": "us",
"NINJAONE_TOOLSETS": "core,devices,alerts"
}
}
}
}Add to .vscode/mcp.json for GitHub Copilot. VS Code prompts for the secret.
{
"inputs": [
{ "type": "promptString", "id": "ninjaone_client_id", "description": "NinjaOne client id" },
{ "type": "promptString", "id": "ninjaone_client_secret", "description": "NinjaOne client secret", "password": true }
],
"servers": {
"ninjaone": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:patrickking67/ninja-one-mcp"],
"env": {
"NINJAONE_CLIENT_ID": "${input:ninjaone_client_id}",
"NINJAONE_CLIENT_SECRET": "${input:ninjaone_client_secret}",
"NINJAONE_REGION": "us"
}
}
}
}One endpoint for a whole team, on Azure Container Apps. People sign in with Microsoft Entra ID, the NinjaOne secret lives in Key Vault, and the same gates apply. VS Code signs in on its own. See the Azure guide for the design and every step.
azd env new ninjaone-prod
infra/scripts/entra-app.sh
azd env set NINJAONE_CLIENT_ID your-id
azd env set-secret NINJAONE_CLIENT_SECRET
azd upAny MCP client that runs a local stdio server works the same way. Use command npx, args -y github:patrickking67/ninja-one-mcp, and set NINJAONE_CLIENT_ID, NINJAONE_CLIENT_SECRET and NINJAONE_REGION in its environment.
npx -y github:patrickking67/ninja-one-mcpConfiguration
Everything is an environment variable. You need a client id, a secret, and a region or base URL.
| Variable | What it does | Default |
|---|---|---|
NINJAONE_CLIENT_ID | OAuth client id of your API client. | Required |
NINJAONE_CLIENT_SECRET | OAuth client secret. Redacted from every result, error and log. | Required |
NINJAONE_REGION | us (app.ninjarmm.com), us2, eu, ca or oc. Set this or a base URL. | None |
NINJAONE_BASE_URL | Full instance URL. Wins over the region when both are set. | None |
NINJAONE_SCOPES | OAuth scopes to request: monitoring, management, control. | monitoring |
NINJAONE_MODE | read or write. Write tools refuse until this is write. | read |
NINJAONE_ALLOW_DESTRUCTIVE | Set true to allow the destructive tier. Needs write mode too. | false |
NINJAONE_ALLOWED_ORG_IDS | Comma-separated organization ids. Every call stays inside this set. | All |
NINJAONE_ORG_ID | Default organization for tools that take one. | None |
NINJAONE_WRITE_ALLOWLIST | Comma-separated tool names. Narrows which write tools may run. | None |
NINJAONE_TOOLSETS | Comma-separated toolsets to list, or all. | 107 tools |
NINJAONE_MAX_CONCURRENCY | Parallel requests for fleet-wide fan-out, 1 to 16. | 4 |
Read more
- Source on GitHubCode, issues and releases.
- docs/TOOLS.mdEvery tool with its parameters.
- llms.txtThe NinjaOne docs index the server bundles.
- NinjaOne API docsThe Public API v2 reference.