ninja-one-mcp

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_health checks 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_profile returns 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.

  1. Read

    Default

    Lists, profiles, reports, alerts. 154 tools. Nothing changes.

  2. Write

    NINJAONE_MODE=write

    Updates and creates. 105 tools. Every call also takes confirm: true.

  3. Destructive

    NINJAONE_ALLOW_DESTRUCTIVE=true

    Deletes, 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_IDS holds 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.txt of NinjaOne's public docs ships as an MCP resource.
  • Toolsets keep the default list to 107 tools. NINJAONE_TOOLSETS=all lists 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-mcp

      Or 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-mcp

      Configuration

      Everything is an environment variable. You need a client id, a secret, and a region or base URL.

      VariableWhat it doesDefault
      NINJAONE_CLIENT_IDOAuth client id of your API client.Required
      NINJAONE_CLIENT_SECRETOAuth client secret. Redacted from every result, error and log.Required
      NINJAONE_REGIONus (app.ninjarmm.com), us2, eu, ca or oc. Set this or a base URL.None
      NINJAONE_BASE_URLFull instance URL. Wins over the region when both are set.None
      NINJAONE_SCOPESOAuth scopes to request: monitoring, management, control.monitoring
      NINJAONE_MODEread or write. Write tools refuse until this is write.read
      NINJAONE_ALLOW_DESTRUCTIVESet true to allow the destructive tier. Needs write mode too.false
      NINJAONE_ALLOWED_ORG_IDSComma-separated organization ids. Every call stays inside this set.All
      NINJAONE_ORG_IDDefault organization for tools that take one.None
      NINJAONE_WRITE_ALLOWLISTComma-separated tool names. Narrows which write tools may run.None
      NINJAONE_TOOLSETSComma-separated toolsets to list, or all.107 tools
      NINJAONE_MAX_CONCURRENCYParallel requests for fleet-wide fan-out, 1 to 16.4