Skip to main content
Glama
Easton-OU

rootpilot-ssh-diagnose

by Easton-OU

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.

Related MCP server: Linux MCP Server

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):

{
  "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):

[
  { "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

tool

arguments

what it does

list_hosts

probe?

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

collect

host, keys[] (≤8), container?

Run specific whitelisted commands and return redacted, truncated output

collect_base

host

Shortcut: the base overview (docker_ps, df, df_inode, free, uptime, dmesg_oom, docker_daemon)

container_deep_dive

host, container

Shortcut: 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 var

default

purpose

RP_HOSTS

Path to your hosts.json (required)

RP_PROBE_URL

https://cloudflare.com

Target 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

npm install
npm run build      # compile to dist/
npm test           # whitelist / injection / redaction / timeout tests
npm run typecheck

License

MIT — see LICENSE.

Available Tools

5 tools
collectCollect diagnostics by keyA

Run up to 8 whitelisted commands on a host and return their (redacted, truncated) output. Use get_whitelist to see valid keys. Keys outside the whitelist are rejected.

ParametersJSON Schema
NameRequiredDescriptionDefault
hostYeshost name from list_hosts
keysYeswhitelisted command keys
containerNocontainer name, required by container-scoped keys

TDQS

A4.3/5.0
Behavior4/5

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

In the absence of annotations, the description discloses key behaviors: commands are whitelisted (limited to up to 8), output is redacted and truncated, and invalid keys are rejected. No contradictions; it provides a clear safety profile for a read-like diagnostic tool.

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?

The description is two concise sentences, front-loading the core action and constraints. Every sentence adds information without redundancy.

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?

Given no annotations or output schema, the description covers core behavior and constraints but lacks details on output format or structure. For a tool with multiple parameters, more clarity on return values would improve completeness.

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 schema has 100% coverage with descriptions for all three parameters. The description adds value by linking keys to the whitelist and explaining the maxItems constraint (up to 8), which enhances schema meaning.

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

Purpose5/5

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

The title 'Collect diagnostics by key' and description explicitly state it runs up to 8 whitelisted commands on a host and returns redacted/truncated output. It distinguishes itself from siblings like get_whitelist and collect_base by focusing on running commands vs listing keys or base collection.

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

Usage Guidelines4/5

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

The description mentions using get_whitelist to see valid keys and states that invalid keys are rejected, guiding proper use. However, it does not explicitly state when not to use this tool or provide alternatives for related tasks.

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

collect_baseCollect the base overviewA

Shortcut: run the base group (docker_ps, df, df_inode, free, uptime, dmesg_oom, docker_daemon) — a cheap first look at a host.

ParametersJSON Schema
NameRequiredDescriptionDefault
hostYeshost name from list_hosts

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It only lists sub-commands run, but does not mention side effects (likely read-only), permissions, or failure modes. The 'cheap' hint suggests low overhead but is vague.

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?

The description is a single, well-structured sentence that front-loads the tool's purpose and lists included commands. No extraneous words.

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?

Given a single parameter, comprehensive schema coverage, and sibling tools providing context, the description adequately covers the tool's purpose. Lacks mention of output format or side effects, but is sufficient for a simple 'collect' action.

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

Parameters3/5

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

The parameter 'host' is fully described in the schema with coverage 100%, and the description adds no extra detail such as format or constraints. Baseline score of 3 is appropriate as no further value is added.

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

Purpose5/5

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

The description clearly states the tool collects a group of specific commands (docker_ps, df, etc.) as a 'first look' at a host. It distinguishes from siblings like 'collect' and 'container_deep_dive' by specifying the scope and purpose.

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 implies it's for initial assessment ('cheap first look'), but does not explicitly state when to use versus alternatives like 'collect' or 'container_deep_dive'. No when-not-to-use guidance provided.

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

container_deep_diveDeep dive into one containerA

Shortcut: for one container, run docker_logs, docker_inspect (redacted), container_state and docker_stats.

ParametersJSON Schema
NameRequiredDescriptionDefault
hostYeshost name from list_hosts
containerYescontainer name

TDQS

A3.9/5.0
Behavior4/5

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

Without annotations, the description carries full burden and discloses that it runs docker_logs, docker_inspect (with redaction noted), container_state, and docker_stats. The explicit mention of '(redacted)' for docker_inspect adds transparency about data handling. However, it does not state whether the tool is read-only or has side effects (likely safe, but not stated).

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 sentence that is front-loaded with 'Shortcut:' and conveys the essential behavior efficiently. There is no wasted text.

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 is adequate for a shortcut tool but lacks details on the return format/combined output since no output schema is provided. It does not explain what the agent should expect as a response or how the outputs from the subcommands are merged.

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

Parameters3/5

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

Schema coverage is 100% with clear descriptions for both required parameters ('host' from list_hosts, 'container' name). The description adds no extra meaning beyond what the schema provides, so baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states it is a shortcut to run multiple Docker commands (docker_logs, docker_inspect, container_state, docker_stats) on a single container. It distinguishes from sibling tools like 'collect', 'collect_base', 'get_whitelist', and 'list_hosts' which serve different purposes (e.g., collecting data across hosts, listing hosts).

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 implies usage for one container as a shortcut, but does not specify when not to use it or provide explicit alternatives. No guidance on prerequisites or when to prefer individual commands over this composite tool.

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

get_whitelistList the read-only command whitelistA

Return every command this server can run: key, purpose, shell template, and whether it needs a container argument. This is the complete set — nothing outside it can be executed.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

The description discloses that it returns a complete set and lists the fields, indicating a read-only operation without side effects. Since no annotations are provided, the description adequately conveys the behavior, though it doesn't mention authentication or 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.

Conciseness5/5

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

The description is two sentences, no redundancy, and immediately states the action and what is returned. It is well-structured and front-loaded.

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

Completeness5/5

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

Given the lack of parameters and output schema, the description provides sufficient information: it lists the fields returned and emphasizes completeness. This fully meets the needs for a simple listing 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 input schema has no parameters, but the description adds value by detailing the return fields (key, purpose, shell template, container argument flag), which is not specified in the schema or output schema.

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

Purpose5/5

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

The description explicitly states it returns every command the server can run with specific details (key, purpose, shell template, container argument requirement). It distinguishes from sibling tools which involve collecting or listing hosts, clearly indicating this is for listing the command whitelist.

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

Usage Guidelines4/5

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

The description makes it clear that this tool is for retrieving the complete set of executable commands. While it doesn't explicitly state when not to use it or provide alternatives, the context and sibling tool names imply its standalone role for whitelist inspection.

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

list_hostsList configured hostsA

List the hosts defined in your hosts.json, with an optional reachability probe (TCP + SSH banner). Returns names to use with the other tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
probeNoalso test SSH reachability

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description conveys that the tool is read-only and optionally performs a TCP and SSH banner probe. This provides sufficient behavioral insight given the tool's simplicity.

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 sentences, no unnecessary words. The first sentence covers purpose and optional behavior, the second explains output. Efficient and front-loaded.

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 mentions the output is 'names to use with the other tools', but does not specify the exact format (e.g., list of strings). It also omits prerequisites (e.g., presence of hosts.json). For a simple tool, it is adequate but not fully detailed.

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

Parameters3/5

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

Schema coverage is 100% and the schema already describes the parameter 'probe'. The description adds 'TCP + SSH banner' nuance but does not significantly expand beyond the schema, so baseline 3 is appropriate.

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 clearly states the tool lists hosts from hosts.json and can optionally probe reachability. It mentions that it returns names for other tools, which distinguishes its role from siblings like collect or container_deep_dive, but does not explicitly differentiate.

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 implies usage context by stating that the returned names are to be used with other tools, but it does not provide explicit guidance on when to use this tool versus alternatives or any exclusions.

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. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedcollect
    • First observedcollect_base
    • First observedcontainer_deep_dive
    • First observedget_whitelist
    • First observedlist_hosts

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: collect runs arbitrary whitelisted commands, collect_base and container_deep_dive are shortcuts for predefined command groups, get_whitelist lists available commands, and list_hosts manages host selection. No ambiguity.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with clear verb_noun structure (collect, collect_base, container_deep_dive, get_whitelist, list_hosts). No mixed conventions.

Tool Count5/5

Five tools is well-scoped for an SSH diagnostic server: one generic runner, two shortcuts, one informational, and one for host management. Not too few or too many.

Completeness5/5

The toolset covers the full diagnostic workflow: listing hosts, checking connectivity, running custom or predefined command sets, and exploring available commands. No obvious dead ends or gaps for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables read-only Linux system diagnostics and troubleshooting on local and remote RHEL-based systems via SSH, including services, processes, logs, network, and storage analysis.
    20
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    Enables read-only Linux system diagnostics and troubleshooting on RHEL-based systems, including system info, services, processes, logs, network, and storage analysis. Supports both local and remote SSH execution across multiple hosts.
    20
    MIT

Latest Blog Posts

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/Easton-OU/rootpilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server