Skip to main content
Glama

Ops Guard MCP

面向 AI/Hermes 日常运维排障的安全 MCP:只读诊断尽量自动化,高风险变更必须由真实人工审批;模型没有 SSH 私钥、没有任意 shell、没有 approve 工具。

当前版本:0.2.2(2026-08-26)

v0.2.0 的重点:Hermes + 钉钉同会话审批

推荐使用方式:

你(钉钉单聊/群聊)
        ↕
      Hermes
        │ MCP:只能申请操作/查状态
        ▼
   Ops Guard MCP
        │
        ├─ LOW / 已知只读 → 自动执行
        │
        └─ HIGH / 修改操作
               │
               ├─ 创建不可变 request + digest
               └─ DingTalk REST 投放互动卡片到原聊天窗口
                         │
                         ▼
              [批准一次] [拒绝]
                         │
                  真实用户点击
                         │ DingTalk Stream callback
                         ▼
            Hermes DingTalk 平台适配器
              (确定性代码,不进入 LLM)
                         │ HMAC + timestamp + nonce
                         ▼
       /integrations/dingtalk/decision
                         │
                         ▼
              Ops Guard Approval
                         │
                  PENDING → APPROVED
                         │
                         ▼
                Remote Executor

这里 Hermes 的 LLM 不能批准请求

  • MCP 工具中不存在 approve() / reject()

  • MCP 返回值不包含审批 token/URL;

  • 审批路由不由模型控制;

  • 真正的决定来自钉钉卡片回调里的 userId

  • Hermes 平台适配器只做确定性转发,并用独立 HMAC 桥接;

  • Ops Guard 再做审批人白名单、请求摘要、TTL、nonce 和状态机检查;

  • 已经批准/拒绝的决定不能反向改写。

安全边界说明:普通“LLM 幻觉”或 MCP prompt injection 无法凭自然语言把状态改成 APPROVED。若攻击者已经能在 Hermes Python 进程内部执行任意代码/读取进程内存,则 Hermes 平台进程本身已被攻陷,需通过 OS/容器隔离或独立审批接入进一步加固。详见 docs/SECURITY_MODEL.md

Related MCP server: server-ops-mcp

为什么不是普通 SSH MCP

普通 SSH MCP 常见接口:

ssh_exec(command: "任意 shell 字符串")

这种接口很难可靠拦截,模型可以利用:

  • bash -c / sh -c

  • Python/Perl/Node 等解释器;

  • find -execxargsawk system()

  • 重定向、command substitution;

  • 下载后执行;

  • 先上传脚本,再绕过命令关键字检查。

Ops Guard 改成:

AI / MCP Client
      │ structured argv / immutable script
      ▼
Security Gateway
  ├─ default-deny policy
  ├─ exact request digest
  ├─ SQLite approval state machine
  ├─ DingTalk interactive approval
  └─ hash-chained audit
      │ signed JSON envelope over fixed SSH command
      ▼
Remote Agent
  ├─ HMAC verification
  ├─ one-use nonce
  ├─ policy re-evaluation
  ├─ script SHA256 re-check
  └─ subprocess argv, shell=False
      ▼
Dedicated unprivileged OS account

已实现

MCP / 策略

  • MCP Python SDK v2 stdio server。

  • argv: list[str],不接收任意 shell 字符串。

  • 未知命令默认拒绝。

  • 模型不能指定 executable 路径,只能使用裸命令名。

  • 拒绝通用 shell/解释器/wrapper/隧道/下载执行入口。

  • find -exec/-execdir 等直接拒绝;写入型参数进入修改审批。

  • Docker/Kubernetes/systemd/进程/文件操作按参数语义判级。

  • MCP schema 不暴露审批路由参数,模型不能决定把卡片发给谁。

脚本

  • 脚本先保存在 Gateway 的内容寻址仓库。

  • 审批绑定完整 SHA256(content)

  • 批准后只传输被批准的同一字节内容。

  • Agent 执行前重新计算 SHA256。

  • 不存在“先批准 /tmp/fix.sh,再覆盖同名脚本”的 TOCTOU 窗口。

  • 生产 allow_scripts=false 默认关闭。

审批

  • SQLite 原子状态机:pending_approval -> approved/rejected -> executing -> succeeded/failed

  • APPROVED 与 REJECTED 是不可翻转的决定。

  • request digest 绑定 host、argv、cwd、风险、原因、申请人、TTL、nonce、脚本 hash 等。

  • 互动卡片同会话审批。

  • 钉钉 userId 白名单。

  • 可要求“点击用户必须等于原会话用户/默认审批用户”。

  • Hermes bridge:HMAC-SHA256 + 时间窗 + 一次性 nonce。

  • 旧版自定义机器人 + 外部双确认页仍作为 webhook / hybrid fallback 保留。

远端执行

  • SSH 固定管理员配置的远端 Agent 命令。

  • StrictHostKeyChecking、known_hosts、无 PTY、无 forwarding、无密码认证。

  • Agent 独立验证 HMAC、host、digest、approval、expiry、nonce。

  • Agent 独立重新判级,拒绝 Gateway 风险降级。

  • executable 仅从管理员可信且 Agent 用户不可写目录解析。

  • subprocess 结构化 argv,shell=False

  • 最小环境、timeout、output cap、进程组清理。

审计

  • JSONL 哈希链。

  • 不保存原始 stdout/stderr 到审计链,只保存长度和 SHA256。

  • 记录 DingTalk 用户、桥接来源、拒绝原因、request digest。

风险默认值

能力

默认行为

uptime/free/df/ps/ss/journalctl 等已知诊断

自动执行

敏感只读

按主机策略自动或审批

systemctl restart/stop

审批

kill/rm/chmod/chown

审批

kubectl apply/delete/scale

审批

Kubernetes Secret 读取

高风险审批

shell / Python / Perl / Node 通用入口

拒绝

docker exec/run/build 通用入口

拒绝

kubectl exec/debug/cp/port-forward

拒绝

curl/wget 通用下载

拒绝

未知命令

拒绝

生产脚本

默认关闭

快速安装

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
cp config/ops-guard.example.toml config/ops-guard.toml

export OPS_GUARD_CONFIG="$PWD/config/ops-guard.toml"
export OPS_GUARD_APPROVAL_SECRET="$(openssl rand -hex 32)"
export OPS_GUARD_AGENT_SECRET_LOCAL="$(openssl rand -hex 32)"

开发测试:

ops-guard-daemon --config "$OPS_GUARD_CONFIG"
ops-guard-mcp

Hermes + DingTalk 同窗口审批配置

详细步骤见:docs/HERMES_DINGTALK.md

独立审批机器人 / 独立 Stream 生产部署见:docs/DINGTALK_STANDALONE_STREAM.md

Docker / Docker Compose 独立 Stream 部署见:docs/DOCKER_COMPOSE_STANDALONE.md

Docker 快速入口:

cp docker/.env.example docker/.env
cp docker/ops-guard.toml.example docker/ops-guard.toml
chmod 600 docker/.env
docker compose build --pull
docker compose up -d ops-guard

Docker 版默认只容器化 Gateway/Daemon/DingTalk Stream。生产 Remote Agent 仍建议以最小权限宿主机服务部署;不要为了“全容器化”给 Agent 或 Hermes 挂 Docker Socket / privileged。

最小配置示例:

[dingtalk]
enabled = true
mode = "interactive"
client_id_env = "OPS_GUARD_DINGTALK_CLIENT_ID"
client_secret_env = "OPS_GUARD_DINGTALK_CLIENT_SECRET"
card_template_id = "YOUR_CARD_TEMPLATE_ID"

# Hermes 已经持有 DingTalk Stream 连接,所以推荐这个模式。
callback_owner = "hermes"
bridge_secret_env = "OPS_GUARD_HERMES_BRIDGE_SECRET"
bridge_max_age_seconds = 60

allowed_approver_user_ids = ["your_dingtalk_user_id"]
require_context_sender_match = true

# 单用户 Hermes 私聊:固定投放回当前机器人私聊。
default_conversation_type = "1"
default_sender_staff_id = "your_dingtalk_user_id"
default_sender_nick = "运维管理员"

环境变量:

export OPS_GUARD_DINGTALK_CLIENT_ID='dingxxxxxxxx'
export OPS_GUARD_DINGTALK_CLIENT_SECRET='xxxxxxxx'
export OPS_GUARD_HERMES_BRIDGE_SECRET="$(openssl rand -hex 32)"

然后把:

integrations/hermes/ops_guard_bridge.py

复制进 Hermes DingTalk plugin,并按:

integrations/hermes/HERMES_PATCH.md

注册卡片回调 handler。

不要让 Ops Guard 再启动同一个 DingTalk Client ID 的第二条 Stream。 callback_owner="hermes" 就是为这个场景准备的。

钉钉互动卡片模板

模板字段、按钮 action 配置见:

integrations/dingtalk/CARD_TEMPLATE.md

两个按钮必须分别回传:

ops_guard_approve
ops_guard_reject

Ops Guard 从回调 cardPrivateData.params.action 获取动作,从 DingTalk 回调对象获取真实 userId

MCP 工具

  • ops_list_hosts

  • ops_run_command

  • ops_stage_script

  • ops_request_status

  • ops_pending_approvals

  • ops_execute_approved

  • ops_audit_tail

高风险示例:

{
  "host_id": "prod-web-01",
  "argv": ["systemctl", "restart", "nginx"],
  "reason": "nginx 配置检查正常但 worker 无响应,需要重启",
  "requester": "hermes"
}

返回类似:

{
  "status": "pending_approval",
  "approval_request": {
    "required": true,
    "notification_sent": true
  }
}

不会返回 approve_urlapproval_tokenapprove() 能力。

即使 Hermes 再调用:

ops_execute_approved(request_id)

只要 SQLite 仍是 pending_approval,执行器就不会执行。

两种互动回调所有权

推荐:Hermes 模式

callback_owner = "hermes"

Hermes 的现有 DingTalk Stream 收卡片 callback,确定性 adapter 转发给 Ops Guard。

优点:

  • 同一个 DingTalk 应用只有一个 Stream consumer;

  • 卡片仍然出现在 Hermes 原对话窗口;

  • 不需要 Ops Guard 争抢 Hermes 的 Stream 连接。

独立模式

callback_owner = "ops_guard"

生产推荐让 Ops Guard 使用独立 DingTalk 企业应用、独立 Client ID / Secret、独立审批群。不要与 Hermes 共用同一套 Stream 凭据。

pip install -e '.[dingtalk]'

完整从 0 部署、获取 userId/conversationId、卡片模板、systemd、审批-only smoke test、安全测试、故障排查见:

docs/DINGTALK_STANDALONE_STREAM.md

辅助发现审批群/审批人 ID:

python scripts/dingtalk-discover-context.py

v0.2.1 在独立 Stream 模式增加 fail-fast preflight;SDK/Client ID/Secret 缺失时 daemon 不再以“审批 Stream 已死但主进程仍正常”的状态继续运行。

旧版外部审批页

仍支持:

mode = "webhook"

流程是自定义机器人 ActionCard -> 签名 URL -> GET 预览 -> POST 确认。它适合作为 fallback,但同会话互动卡片的用户身份更清晰。

远端服务器生产要求

  • 专用 ops-guard OS 用户,不用 root。

  • 无通用 sudo。

  • SSH authorized_keys 建议 restrict,command=...

  • 每台/每组主机独立 Agent HMAC secret。

  • known_hosts 固定。

  • trusted_executable_dirs 必须是管理员控制且 Agent 用户不可写。

  • 生产默认关闭脚本。

  • 高权限动作逐步改造成 typed privileged helper。

  • Gateway/Hermes/Agent 最好使用不同 OS 用户或容器隔离。

测试

PYTHONPATH=src python -m unittest discover -s tests -v

v0.2.1 当前回归集:51 tests

覆盖包括:

  • shell/解释器/wrapper 绕过;

  • executable 路径冒充;

  • SQLite digest/TTL/原子领取;

  • APPROVED/REJECTED 不可翻转;

  • immutable script SHA256;

  • Agent HMAC/nonce/风险二次判级;

  • DingTalk 错误审批用户;

  • Hermes bridge 签名篡改;

  • Hermes bridge nonce 重放;

  • HTTP bridge 真实状态迁移;

  • timeout/output cap;

  • hash-chain audit。

重要文档

  • docs/ARCHITECTURE.md

  • docs/HERMES_DINGTALK.md

  • docs/SECURITY_MODEL.md

  • docs/IMPLEMENTATION_STATUS.md

  • docs/RESEARCH_SUMMARY.md

  • docs/ROADMAP.md

  • integrations/hermes/HERMES_PATCH.md

  • integrations/dingtalk/CARD_TEMPLATE.md

License

Apache-2.0

Available Tools

7 tools
ops_audit_tailB

Read recent redacted, hash-chained audit records.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It does disclose useful traits: records are 'redacted' (privacy masking) and 'hash-chained' (tamper-evident/immutable), and 'Read' implies read-only. It omits auth requirements, ordering, pagination, and what happens at the tail boundary.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero waste. Every word (redacted, hash-chained, recent) carries signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. However, with no annotations and an undocumented parameter, the description is thin for a tool whose 'limit' and tailing semantics are entirely unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single 'limit' parameter has 0% schema description coverage, so the description must compensate and does not. 'Recent' hints that a cap exists but gives no meaning, default, or bounds for 'limit'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Read) and resource (audit records) with distinguishing qualifiers (recent, redacted, hash-chained). This clearly separates it from siblings like ops_list_hosts or ops_run_command, though it does not name an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use, when-not-to-use, or alternative guidance is provided. 'Recent' weakly implies a tailing/monitoring use case, but the agent is left to infer everything about selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_execute_approvedB

Execute a request only if the immutable digest has already been approved.

Calling this tool cannot bypass approval. The SQLite state transition, exact digest, expiration, and remote agent nonce/signature are checked again.

ParametersJSON Schema
NameRequiredDescriptionDefault
request_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden, and it usefully explains that SQLite state transitions, the exact digest, expiration, and remote agent nonce/signature are re-checked. It also states the safety invariant that calling the tool cannot bypass approval. It does not describe failure behavior, side effects, or required permissions, keeping it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded: the first sentence states the action and gating condition. The remaining sentences add safety context without excessive length, though 'cannot bypass approval' slightly overlaps with the list of checks. Overall it is efficient and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the critical approval gate and validation checks, and an output schema exists so return values need not be explained here. But it omits how an agent obtains the required request_id, how to verify approval status beforehand, and what happens on failure. For a safety-critical execution tool, that leaves meaningful gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter, request_id, is not mentioned in the description at all, and schema description coverage is 0%. The parameter name implies a request identifier, but the description adds no meaning about where it comes from, its relation to the approved digest, or any format expectation. This is a clear gap for a one-parameter execution tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: execute a request, gated on prior approval of an immutable digest. It also communicates the core constraint (cannot bypass approval), which helps distinguish it from a generic execution sibling like ops_run_command. It does not explicitly name or compare against sibling tools, so a 4 is appropriate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear condition for use: the immutable digest must already be approved. However, it does not say when not to use it or point to alternatives such as ops_pending_approvals or ops_request_status for checking approval state. Usage is implied rather than fully instructed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_list_hostsB

List server targets and their non-secret security posture.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It hints that secrets are excluded ("non-secret"), which is useful, but says nothing about permissions required, pagination, cost, or whether results are cached/live. For a zero-annotation tool this is a thin disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, and the most important information (list + resource scope) comes first. It is arguably too terse, but nothing in it is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and with zero parameters the schema side is trivially complete. The description adequately covers what the call returns, though the absence of any usage context leaves a small gap for a discovery-oriented tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate. Baseline 4 applies; no parameter detail is expected or missing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ("List") and resource ("server targets") and adds the scope of what is returned ("non-secret security posture"). This is clearly distinguishable from siblings like ops_run_command or ops_stage_script, though it does not explicitly name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites, and no named alternatives. The description never says whether this is a discovery step before ops_run_command or an independent inventory call, leaving usage entirely to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_pending_approvalsB

List requests waiting for human approval.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it discloses almost nothing: it does not state that this is a read-only operation, whether results are scoped to the caller or approver, or how the list is ordered or paginated. For a zero-annotation tool this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with no filler; the resource and scope come first. It is efficient, though its brevity edges into under-specification rather than pure conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, the single parameter is optional, and an output schema exists so return values need not be described. However, the description says nothing about result scoping, ordering, or the limit parameter, leaving minor but real gaps for an agent deciding how to page through the queue.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description never mentions the single 'limit' parameter or its default of 50, so it fails to compensate for the undocumented schema. The only saving grace is that the parameter is optional with a sensible default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('List') and a well-defined resource ('requests waiting for human approval'), which is easy to distinguish from siblings like ops_run_command or ops_audit_tail. It does not explicitly contrast with the closest sibling, ops_request_status, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'waiting for human approval' implies the use case (checking the approval queue before executing), but there is no explicit when-to-use statement, no mention of alternatives such as ops_execute_approved or ops_request_status, and no exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_request_statusC

Get approval and execution status for a request.

ParametersJSON Schema
NameRequiredDescriptionDefault
request_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, and 'Get' only weakly implies a read-only operation. It does not disclose permission requirements, whether status is cached/live, rate limits, or what happens for an unknown or expired request_id.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with no filler. However, the brevity edges into under-specification rather than tight expression, since nothing substantive follows the verb-resource statement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is not required, and the input surface is a single id. Still, the definition is thin for a status-polling tool sitting among several approval-related siblings that it does not disambiguate from.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single required parameter (request_id) is documented in neither schema nor description. The phrase 'for a request' hints at the identifier but gives no format, origin, or validity constraints, so it fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Get) and a clear compound resource (approval and execution status for a request). This meaningfully distinguishes it from siblings like ops_pending_approvals (a list) and ops_execute_approved (a mutation), though it never names those alternatives explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to call this versus the sibling status/approval tools, no mention of prerequisites (e.g., having a request_id from a prior submission), and no stated exclusions. Usage can only be inferred from the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_run_commandA

Submit a structured argv command.

Known read-only diagnostics may run automatically. Mutations require external approval. Unknown commands, shell/interpreter launchers, pipelines, and escape primitives are denied. Approval routing is not model-controlled. DingTalk delivery targets come from administrator configuration (or a trusted integration path outside the MCP tool schema).

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
argvYes
reasonYes
host_idYes
requesterNoai

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses automatic execution for known read-only diagnostics, the external-approval gate for mutations, outright denial of unknown commands/shell launchers/pipelines/escape primitives, and that approval routing is not model-controlled. It omits whether the call blocks waiting for approval, timeout behavior, and rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first line and the policy statements are terse and information-dense. The closing DingTalk sentence is tangential to invoking this tool and is the one line that does not clearly earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and the behavioral policy for a high-risk command execution tool is covered well. The remaining gap is parameter-level guidance for host_id, cwd, and reason, which an agent needs to populate the required fields correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 5 parameters, so the description must compensate and largely does not. It clarifies that 'argv' is a structured token array, but host_id, cwd, requester, and especially the required 'reason' (presumably the justification driving approval) are never explained. The DingTalk sentence adds an unrelated detail about delivery targets rather than parameter meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource ('Submit a structured argv command') and clarifies that input is a pre-tokenized argv rather than a shell string, which distinguishes it conceptually from a shell-execution tool. It does not explicitly name or contrast with siblings like ops_stage_script or ops_execute_approved, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the agent what will happen for different command classes: read-only diagnostics may run automatically, mutations require external approval, and specific patterns are denied. However it never states when to choose this tool over ops_stage_script or ops_execute_approved, leaving the sibling-selection decision implied rather than guided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ops_stage_scriptA

Stage immutable script content and create an exact-SHA256 approval request.

Scripts are disabled by default on production hosts. When enabled, every script is treated as arbitrary privileged code and never auto-approved.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
argsYes
reasonYes
contentYes
host_idYes
languageYes
requesterNoai

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and delivers real behavioral context: content is staged immutably, an exact-SHA256 approval request is generated, scripts are disabled by default on production, and privileged scripts are never auto-approved. It still omits permission/auth requirements and whether staging is idempotent, so it falls short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded sentences: the action leads, the policy caveat follows. Zero filler, and the most decision-relevant fact (this creates an approval request, not an execution) is stated first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the behavioral posture is well covered. The large gap is the 0% parameter documentation for a 7-parameter tool with 5 required fields, which the description does nothing to close.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters (host_id, language, content, args, reason, cwd, requester), and the description explains none of them. 'Immutable script content' and 'exact-SHA256' hint at content handling but give no guidance on format, arg conventions, or the meaning of requester, leaving required fields undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource: 'Stage immutable script content and create an exact-SHA256 approval request' clearly states what the tool does. It implicitly distinguishes itself from execution-oriented siblings like ops_execute_approved and ops_run_command by framing the action as staging plus approval request, though it never names a sibling directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Scripts are disabled by default on production hosts' and 'never auto-approved' imply this is the prerequisite step before approval/execution, so usage is inferable. However, it never explicitly says when to choose this over ops_run_command or that ops_execute_approved is the follow-up, leaving the workflow to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.2.2
    • First observedops_audit_tail
    • First observedops_execute_approved
    • First observedops_list_hosts
    • First observedops_pending_approvals
    • First observedops_request_status
    • First observedops_run_command
    • First observedops_stage_script

TDQS

B3.4/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct operation: host listing, command submission, script staging, request status lookup, pending approval listing, approved execution, and audit reading. Although command and script submission both initiate approval flows, their artifact types and lifecycle stages are clearly separated.

Naming Consistency4/5

All tools use the ops_ prefix and snake_case, which is highly consistent. Some names are verb_noun (ops_list_hosts, ops_run_command) while others are noun phrases (ops_pending_approvals, ops_audit_tail), but the pattern remains readable.

Tool Count5/5

Seven tools are well-scoped for a guarded remote execution service with approval and audit requirements. Each tool clearly earns its place without redundancy or excessive breadth.

Completeness4/5

The surface covers host discovery, command/script submission, approval status, pending approvals, approved execution, and audit history. Minor gaps exist, such as no explicit cancel or revoke operation for pending requests, but core workflows are supported.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Provides policy-driven, auditable SSH access to server fleets for AI assistants with zero-trust security controls, command whitelisting, and comprehensive audit logging to safely manage infrastructure.
    13
    27
    Apache 2.0
  • A
    license
    B
    quality
    B
    maintenance
    Enables AI tools to perform server operations such as log inspection, system monitoring, code management, Nginx and certificate management, with support for local and remote SSH modes and built-in security controls.
    23
    72 npm
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to safely explore and diagnose remote servers by providing a read-only sandbox with controlled access to files, logs, Docker, and databases. It exposes MCP tools that allow natural-language investigation and direct command execution without write permissions.
    3
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to manage remote servers via SSH, including command execution, multi-host batch operations, SFTP file transfer, background job handling, DevOps diagnostics, port tunneling, and safety guardrails like high-risk command blocking and read-only mode.
    MIT