WA

wyre-ai/ninjaone-mcp

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

32 stars 30 forks 质量 83 趋势 21Apache-2.0

NinjaOne 的 MCP 服务器——为 AI 助手提供设备监控、补丁、脚本和警报管理工具

概览

一款用于与 NinjaOne 交互的模型上下文协议(MCP)服务器,采用决策树架构以实现高效的工具加载。 该服务器依赖于 @wyre-AI/Node-NinjaOne,托管在 NPM 注册表上。GitHub Packages 没有匿名访问权限——即使包是公开的,每个 npm 安装都需要一个令牌。云构建器会帮你运行 npm 安装,所以你必须给它一个 npm 安装,否则构建会因 npm 错误 401 未授权 ...失败而失败。 npm.pkg.github.com 1. 创建一个带有 read:packages 范围的 GitHub(经典令牌)。任何 GitHub 账户都可以使用——你需要是 wyre-ai 组织的成员才能读取其公开包。2. 在部署流程提示时将其作为构建变量添加:- → 设置一个名为 PAT(工人 → 设置 → 构建 →变量和秘密的构建变量)。- →设置一个加密的 env var,并以 scope 命名为你的 PAT(.do/app.yaml 已经声明了)。 两个目标都运行MCP服务器。

概述(AI 翻译)

一款用于与 NinjaOne 交互的模型上下文协议(MCP)服务器,采用决策树架构以实现高效的工具加载。

一键部署

[!重要] 点击前: 此服务器依赖于 @wyre-ai/node-ninjaone, 托管在 GitHub Packages npm 注册表上。GitHub Packages 没有 匿名访问——即使包是公开的,每个npm install都必须有 标记。云构建器会帮你运行npm install,所以你必须给它一个,或者 构建失败时npm error 401 Unauthorized ... npm.pkg.github.com。

1.创建一个 GitHub 个人访问令牌,范围为 read:packages (经典代币)。 任何GitHub账户都可以使用——你不需要成为 wyre-ai 组织读取其公开包。 2.在部署流程提示时,将其作为构建变量添加:

  • Cloudflare Workers →将一个名为 NODE_AUTH_TOKEN 的构建变量设置为你的 PAT。 (工人→设置→构建→变量和秘密)。
  • DigitalOcean 应用平台 →设置一个名为**GITHUB_TOKEN的加密env var 带范围的构建时间**到你的PAT(.do/app.yaml已经声明了)。

[!注]

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

NinjaOne MCP Server

A Model Context Protocol (MCP) server for interacting with NinjaOne, featuring a decision tree architecture for efficient tool loading.

One-Click Deployment

[!IMPORTANT] Before you click: this server depends on @wyre-ai/node-ninjaone, which is hosted on the GitHub Packages npm registry. GitHub Packages has no anonymous access — even though the package is public, every npm install needs a token. The cloud builder runs npm install for you, so you must give it one, or the build fails with npm error 401 Unauthorized ... npm.pkg.github.com.

  1. Create a GitHub Personal Access Token with the read:packages scope (classic token). Any GitHub account works — you do not need to be a member of the wyre-ai org to read its public packages.
  2. Add it as a build variable when prompted by the deploy flow:
    • Cloudflare Workers → set a build variable named NODE_AUTH_TOKEN to your PAT (Workers → Settings → Build → Variables and Secrets).
    • DigitalOcean App Platform → set an encrypted env var named GITHUB_TOKEN with scope Build Time to your PAT (the .do/app.yaml already declares it).

[!NOTE] Both targets run the full MCP server. DigitalOcean builds the Docker image and serves it over HTTP; Cloudflare Workers serves the same server via the SDK’s Web Standard Streamable HTTP transport (src/worker.ts). After deploying, set your NinjaOne credentials as secrets — NINJAONE_CLIENT_ID, NINJAONE_CLIENT_SECRET, and optionally NINJAONE_REGION — or set AUTH_MODE=gateway to take credentials per-request from X-Ninja-* headers. HTTP also requires CONDUIT_S2S_SECRET and a valid X-Gateway-S2S signature on /mcp (see HTTP authentication). The MCP endpoint is /mcp; /health is an unauthenticated liveness probe.

Architecture

This MCP server uses a hierarchical tool loading approach instead of exposing all tools upfront:

  1. Navigation Phase: Initially exposes only a navigation tool (ninjaone_navigate)
  2. Domain Selection: User selects a domain (devices, organizations, alerts, tickets)
  3. Domain Tools: Server exposes domain-specific tools after selection
  4. 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

Installation

在 GitHub 查看完整 README

安装

npx @wyre-ai/ninjaone-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ninjaone": { "command": "npx", "args": ["@wyre-ai/ninjaone-mcp"], "env": { "NINJAONE_CLIENT_ID": "your-client-id", "NINJAONE_CLIENT_SECRET": "your-client-secret", "NINJAONE_REGION": "us" } } } }