Rootpilot Ssh Diagnose

io.github.Easton-OU由 GitHub 帳號 Easton-OU 發布v0.1.2更新於 Oct 24, 2026

Read-only SSH server diagnostics via a fixed 38-command whitelist; secrets redacted, no write path.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理透過 SSH 從固定的 38 條指令白名單中蒐集唯讀的 Linux 伺服器診斷資訊,並自動遮蔽機密。

可以做什麼
列出已設定的主機,可選擇探測 SSH 連線狀態,並顯示完整的 38 條指令白名單以便稽核可執行的內容。在指定主機上執行選定的白名單唯讀指令,回傳遮蔽並截斷的輸出。蒐集基礎概覽(docker ps、磁碟與 inode 使用量、記憶體、運作時間、OOM 訊息、docker 守護程序狀態)。針對單一容器深入排查,取得日誌、遮蔽後的 inspect、狀態與統計。使用內建的 diagnose-host 與 health-check 提示進行以證據為先的排障。
適用情境
當 Linux 伺服器出現異常,希望助理透過 SSH 取得常見診斷證據(磁碟、記憶體、Docker、核心 OOM)並推斷原因,同時不授予 shell 權限、不允許其變更任何內容時使用。
執行需求
透過 npx 在本機執行(需要 Node.js)。需要設定 RP_HOSTS 環境變數,指向包含主機、連接埠、使用者及金鑰路徑或密碼驗證的 hosts.json 檔案。需要能透過 SSH 連線至這些主機。可選 RP_PROBE_URL 用於連線探測,RP_NO_PROMO 用於關閉產品提示。
安裝前請注意
hosts.json 可能以明文保存 SSH 密碼,需妥善保護該檔案。伺服器會透過 SSH 連線你的主機,並將指令輸出傳送給 MCP 客戶端的模型。設計上為唯讀,但仍應使用最小權限的 SSH 帳號而非 root。README 中指向付費的完整產品。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Rootpilot Ssh Diagnose,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

rootpilot-ssh-diagnose

This is the open-source, bring-your-own-LLM taste of RootPilot. The full product adds calibrated diagnosis (89.7% across 29 standard failure scenarios, zero false alarms on healthy hosts), alert-triggered auto-diagnosis, history, and multi-host management → rootpilotx.com · deployment repo: rootpilot-release

An MCP server that lets any MCP client — Claude Desktop, Claude Code, or your own — safely collect read-only diagnostics from your servers over SSH. It gathers evidence from a fixed whitelist of read-only commands; your model does the reasoning. The server never runs anything outside the whitelist, and never makes a change to your hosts.

Why

When a server misbehaves, you end up SSH-ing in and running the same twenty commands — df -h, docker ps, dmesg | grep -i oom, free -m — then eyeballing the output. This server turns that into a conversation: your LLM asks for exactly the evidence it needs, gets structured, secret-redacted output back, and reasons about the root cause. You stay in control; nothing leaves your machine except SSH to your own hosts.

Security model (read this first)

  • Read-only whitelist. There are exactly 38 built-in commands (get_whitelist lists them all). There is no tool that runs an arbitrary command — not even with a confirmation prompt. Every command only inspects state.
  • The only injectable value is a container name, validated against ^[a-zA-Z0-9_.-]+$ before it is ever placed in a command. web; rm -rf / is rejected, not escaped.
  • Secrets are redacted from output before it reaches your model: KEY=value secrets, Bearer/Basic tokens, sk-/ghp_/AKIA… key shapes, PEM private-key blocks, and credentials embedded in URLs. docker inspect env values are scrubbed.
  • Per-command timeout (15s) and output truncation guard against hangs and floods.
  • Credentials stay local. Host definitions live in a file you control; passwords are never logged.

30-second setup

Add the server to your MCP client. For Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "rootpilot-ssh-diagnose": {      "command": "npx",      "args": ["-y", "@rootpilot/mcp-ssh-diagnose"],      "env": {        "RP_HOSTS": "/Users/me/.rootpilot-mcp/hosts.json"      }    }  }}

Then create hosts.json (see hosts.example.json):

json
[  { "name": "prod-1", "host": "1.2.3.4", "port": 22, "user": "rootpilot",    "auth": { "type": "key", "keyPath": "~/.ssh/rootpilot_key" } },  { "name": "prod-2", "host": "10.0.0.5", "user": "ops",    "auth": { "type": "password", "password": "..." } }]

Restart your client. Ask it: "Diagnose prod-1" (or run the diagnose-host prompt).

Use a least-privilege account. Create a dedicated read-only SSH user for diagnostics rather than reusing root. The commands only read state, but the account should reflect that.

Tools

toolargumentswhat it does
list_hostsprobe?List configured hosts; with probe, also test SSH reachability
get_whitelist—Return all 38 commands (key, purpose, template) so you and the model can audit exactly what can run
collecthost, keys[] (≤8), container?Run specific whitelisted commands and return redacted, truncated output
collect_basehostShortcut: the base overview (docker_ps, df, df_inode, free, uptime, dmesg_oom, docker_daemon)
container_deep_divehost, containerShortcut: docker_logs, docker_inspect (redacted), container_state, docker_stats for one container

Two prompts ship built-in: diagnose-host (evidence-first root-cause walkthrough) and health-check (a light sweep).

Configuration

env vardefaultpurpose
RP_HOSTS—Path to your hosts.json (required)
RP_PROBE_URLhttps://cloudflare.comTarget for the outbound-connectivity / DNS probes
RP_NO_PROMO—Set to 1 to silence the one-line pointer to the full product

How it works

  your MCP client (the LLM)        │  "collect df, docker_ps, dmesg_oom from prod-1"        ▼  rootpilot-ssh-diagnose  ──ssh──▶  your server        │  renders a whitelisted template, runs it read-only,        │  redacts secrets, truncates, returns structured output        ▼  the LLM reasons about root cause from the evidence

The server deliberately does no analysis of its own — no built-in LLM call, no multi-round orchestration. That boundary is the point: it's a clean, auditable evidence collector. Calibrated diagnosis (deciding which evidence to pull for which symptom, across follow-up rounds, scored against a failure-scenario library) is what the full RootPilot product does.

FAQ

Does it ever change my server? No. Every command is read-only, and there is no arbitrary-command tool. The full whitelist is visible via get_whitelist.

Where does my data go? Nowhere except SSH between this server (running on your machine) and your hosts. Command output goes to your MCP client's model. No telemetry.

Which LLM does it use? None of its own — it's bring-your-own. Whatever model your MCP client runs does the reasoning.

Can it manage Windows servers or jump hosts? Not in v1. It targets Linux hosts over direct SSH.

How is this different from RootPilot? This collects evidence; you (or your model) interpret it ad hoc. RootPilot adds calibrated diagnosis, alert-triggered auto-diagnosis, a per-host history ("medical record"), and multi-host management. See rootpilotx.com.

Development

bash
npm installnpm run build      # compile to dist/npm test           # whitelist / injection / redaction / timeout testsnpm run typecheck

License

MIT — see LICENSE.

來源:README.md,提交 3b11b1e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分