trmm-exec-mcp
trmm-exec-mcp
一个用于 Tactical RMM 的 MCP 服务器:Entra 门控读取 + 只读 PowerShell 运行器。只有被分配的 Entra 安全组成员才能连接。它读取平台上的所有内容,并在任何代理上运行信息收集 PowerShell — 并拒绝任何改变状态的操作。基于 FastMCP 3.x 和 Microsoft Entra 认证构建(与 odoo-ticket-mcp 相同的技术栈)。
v2(简化版)。 早期设计添加了一个 Roam 一次性令牌审批中继,用于真正的 写入/执行。那比实际需求更复杂,所以 v2 移除了中继、提案存储、审批者列表和代理允许列表。现在安全性来自两个方面:Entra 组(谁能连接)和只读守卫(脚本可以做什么)。旧流程存在于
simplify/readonly-entra分支之前的 git 历史中。
什么让它保持只读
任意 PowerShell 无法证明是只读的,因此 guard.py 是一个严格的、纵深防御的后备机制,宁可拒绝。两层:
Cmdlet 动词白名单 — PowerShell cmdlet 是
Verb-Noun;只有读取动词(Get、Test、Measure、Select等)通过,因此任何Set-*、New-*、Remove-*、Stop-*、Restart-*都会被构造性地拒绝。危险令牌黑名单 — 捕获不是
Verb-Nouncmdlet 的状态更改构造(原生del/reg delete/schtasks、.NET::Delete、重定向到磁盘)以及会绕过第一层的混淆(iex、-EncodedCommand、Base64 解码、Invoke-Command)。
拒绝时会指明违规令牌。这不是沙箱 — 仍然将 TRMM_API_KEY 指向一个你接受其爆炸半径的账户。
Related MCP server: EndpointRead-MCP
认证:Microsoft Entra(资源服务器模式)
FastMCP 的 AzureJWTVerifier + RemoteAuthProvider:服务器验证绑定受众的 Entra 令牌并发布受保护资源元数据;它从不颁发令牌。claude.ai 对 Entra 进行 OAuth 并连接。前面的 nginx 仅执行 TLS + Anthropic IP 白名单。通过 Entra 应用的组分配(需要分配 = 是)限制为高级工程师。
工具
工具 | 类型 | 用途 |
| 读取 | 查找机器(按主机名/类型/平台/状态过滤)。 |
| 读取 | 单个代理的完整详细信息(硬件、操作系统、IP、检查、重启状态)。 |
| 读取 | 主机名 → agent_id(如果为 0/>1 则报错)。 |
| 读取 | TRMM 自己的审计跟踪(谁在 TRMM 中做了什么)。 |
| 读取 | 运行信息收集 PowerShell(事件日志、服务、软件、配置)。拒绝变更脚本。 |
配置(仅环境变量)
变量 | 必需 | 描述 |
| ✅ | TRMM API 基础 URL。 |
| ✅ | 具有读取 + 运行/发送命令权限的 TRMM 账户密钥。 |
| — |
|
| ✅† | 租户 + API 应用注册客户端 ID。 |
| ✅† | 公共根 URL(不含 |
| ✅† | 必须等于在 Entra 中设置的应用 ID URI(例如 |
| — | 作用域配置(默认 |
| — | 容器绑定(默认 |
† 当 MCP_AUTH_ENABLED=true 时必需。
TRMM 账户
使用 claude TRMM 用户,配置了读取 + 发送命令(SendCMDPerms)。将其密钥放入 TRMM_API_KEY(通过 Portainer 堆栈环境变量,切勿放入 git)。只读守卫限制了脚本可以执行的操作;保持账户范围仅限于工具所需。将 DC 视为额外敏感。
运行 / 部署
python -m venv .venv && .venv\Scripts\activate
pip install -r requirements.txt
# local (auth off): set TRMM_API_URL, TRMM_API_KEY, MCP_AUTH_ENABLED=false, then:
python -m trmm_exec_mcp生产环境:PORTAINER_DEPLOY.md(Git 堆栈 + webhook、Entra 环境变量、主机端口)+ deploy/nginx-trmm-exec-mcp.conf。
验证
python -m py_compile trmm_exec_mcp/*.py — 干净。只读守卫有一个用例套件(允许读取脚本;拒绝变更/混淆/原生破坏性脚本)。部署后:/healthz 正常,未认证的 /mcp → 401,发现文档宣传 https://…/mcp/access_as_user 作用域(不是 api://…)。
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 Servers
- AlicenseAqualityBmaintenanceProvides read-only access to TacticalRMM remote monitoring and management instances via the MCP protocol. It enables querying agents, clients, alerts, checks, and other RMM data through natural language.2215AGPL 3.0
- AlicenseBqualityBmaintenanceA read-only MCP server for Microsoft Intune and Entra ID that enables list, get, search, and reporting operations for tenant visibility, audits, troubleshooting, and health reporting without write actions. It includes authentication helpers, report exports, and metadata discovery tools.36MIT
- FlicenseNot gradedqualityCmaintenanceRead-only MCP server for Microsoft Entra ID (Azure AD) that enables querying user sign-in logs, group memberships, and assigned Microsoft 365 licenses via Microsoft Graph API. Provides security and audit visibility without any write operations.
- AlicenseAqualityCmaintenanceRead-only MCP server for the Action1 RMM REST API, enabling access to endpoints, missing updates, vulnerabilities, installed software, policies, automations, and reports.21Apache 2.0
Related MCP Connectors
Read-only access to your VortexIQ store data: audits, KPIs, alerts, Brand DNA, reports, Ask VIQ.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
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/JohnGilligan2/tactical-rmm-exec-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server