SSH MCP Server
Runs commands and moves files on remote Linux and Windows hosts over SSH, behind roles, approvals and audit
Diagnose and troubleshoot Linux hosts, local or over SSH, with read-only system inspection tools
Official · RHEL Lightspeed Python Local · stdio DevOps and monitoring
63 popularity score ★ 318 ↓ 2.8k/mo
Opens the app, which asks before it adds the server.
uv tool install linux-mcp-serverclaude mcp add linux -- linux-mcp-server{
"mcpServers": {
"linux": {
"command": "linux-mcp-server",
"args": []
}
}
}{
"mcpServers": {
"linux": {
"command": "linux-mcp-server",
"args": []
}
}
}{
"servers": {
"linux": {
"type": "stdio",
"command": "linux-mcp-server",
"args": []
}
}
}[mcp_servers.linux]
command = "linux-mcp-server"
args = []gemini mcp add --scope user linux linux-mcp-serverOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
mkdir -p ~/.local/share/linux-mcp-server/{logs,ssh}
cp ~/.ssh/config ~/.ssh/id_ed25519 ~/.local/share/linux-mcp-server/ssh/
sudo chown -R 1001:1001 ~/.local/share/linux-mcp-server/claude mcp add linux -- docker run --rm --interactive -e LINUX_MCP_USER -v '<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro' -v '<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw' quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest{
"mcpServers": {
"linux": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"-e",
"LINUX_MCP_USER",
"-v",
"<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro",
"-v",
"<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw",
"quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest"
]
}
}
}{
"mcpServers": {
"linux": {
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"-e",
"LINUX_MCP_USER",
"-v",
"<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro",
"-v",
"<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw",
"quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest"
]
}
}
}{
"servers": {
"linux": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"--interactive",
"-e",
"LINUX_MCP_USER",
"-v",
"<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro",
"-v",
"<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw",
"quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest"
]
}
}
}[mcp_servers.linux]
command = "docker"
args = ["run", "--rm", "--interactive", "-e", "LINUX_MCP_USER", "-v", "<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro", "-v", "<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw", "quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latest"]gemini mcp add --scope user linux docker -- run --rm --interactive -e LINUX_MCP_USER -v '<ABSOLUTE_PATH_TO_SSH_DIR>:/var/lib/mcp/.ssh:ro' -v '<ABSOLUTE_PATH_TO_LOG_DIR>:/var/lib/mcp/.local/share/linux-mcp-server/logs:rw' quay.io/redhat-services-prod/rhel-lightspeed-tenant/linux-mcp-server:latestLINUX_MCP_USER |
Optional: Default SSH user name for remote hosts. |
|---|---|
LINUX_MCP_ALLOWED_LOG_PATHS |
Optional: Comma-separated log files read_log_file may open; none by default. |
LINUX_MCP_SSH_KEY_PATH |
Optional: Path to the SSH private key. |
LINUX_MCP_KEY_PASSPHRASE |
Optional: Passphrase for an encrypted SSH key. |
LINUX_MCP_HOST_MODE |
Optional: any, local-only or remote-only; any on Linux, remote-only in a container. |
LINUX_MCP_TOOLSET |
Optional: fixed (default), run_script or both; the latter two enable script execution. |
LINUX_MCP_GATEKEEPER__PROVIDER |
Optional: Gatekeeper model provider; needed for run_script/both, with a matching key such as OPENAI_API_KEY or ANTHROPIC_API_KEY. |
LINUX_MCP_GATEKEEPER__MODEL |
Optional: Gatekeeper model ID; needed for run_script/both. |
LINUX_MCP_MAX_FILE_READ_BYTES |
Optional: Largest file read_file returns; 1048576 by default. |
LINUX_MCP_COMMAND_TIMEOUT |
Optional: Command timeout in seconds; 30 by default. |
LINUX_MCP_VERIFY_HOST_KEYS |
Optional: Check known_hosts for remote hosts; True by default. |
LINUX_MCP_TRANSPORT |
Optional: stdio (default) or http. |
In a container, a setting goes in with -e NAME=value after docker run.
Linux MCP Server is Red Hat's diagnostics server for Linux machines, built around RHEL, Fedora, CentOS Stream and other systemd distributions. It gives an assistant tools to inspect a system: OS and hardware details, CPU, memory and disk usage, systemd services and their logs, the journal, processes, listening ports and connections, block devices, directory listings, file contents, and historical Performance Co-Pilot (PCP) metrics. Each tool takes a host argument: localhost runs the underlying command on the machine the server runs on, any other name runs it on that machine over SSH, so one session can move between several servers.
By default it starts the fixed toolset of 23 read-only tools. An experimental mode, Guarded Command Execution (LINUX_MCP_TOOLSET=run_script or both), adds four tools that let the assistant write a bash or Python script and run it on the target. Each script is first checked by a separate gatekeeper model you configure with your own provider key, and scripts that change the system are sent for human approval. In both mode the server has 27 tools.
It also forms the basis of Red Hat's MCP Server for RHEL. Besides stdio it can serve over HTTP, with optional TLS, OAuth sign-in (Google, GitHub, JWT or token introspection) and a YAML policy that decides who may run which tools on which hosts.
One point the overview pages leave out: read_log_file only opens paths on the LINUX_MCP_ALLOWED_LOG_PATHS allowlist, but read_file has no such list. In the 1.7.0 code it reads any absolute path the local or SSH user can read, refusing files over LINUX_MCP_MAX_FILE_READ_BYTES (1 MiB by default).
| Runtime | PythonorDocker |
|---|
Python with uv (the docs install it with uv tool install linux-mcp-server), or Podman/Docker for the quay.io container image. Local inspection works only when the server runs on Linux. Remote hosts need key-based, passwordless SSH from the machine running the server. PCP tools need PCP installed and running on the target. Kerberos SSH needs the [gssapi] extra. Guarded Command Execution needs an API key for a gatekeeper model (OpenAI, Anthropic, Gemini, OpenRouter or Vertex AI; Vertex needs the [gcp] extra).
read_log_file reads nothing until LINUX_MCP_ALLOWED_LOG_PATHS is set. read_file refuses files over 1 MiB by default (LINUX_MCP_MAX_FILE_READ_BYTES); commands time out after 30 seconds by default. SSH password sign-in is not supported. Local execution is not implemented on macOS or Windows and is off by default in a container (host mode remote-only). Audit logs, all network connections and dmidecode data need root or extra groups on the target. Guarded Command Execution is experimental, with rudimentary sandboxing and a hardcoded policy. The security page says HTTP has no authentication; the configuration reference documents OAuth for it.
A good fit for admins and SREs who want an assistant to look into RHEL, Fedora or other systemd hosts they already reach by SSH key, especially production machines, because the default toolset only reads. It runs on your machine and needs no account. Pick it when you want journal, service, process, network and PCP data as structured tool results rather than giving an assistant a general shell. If you need the assistant to make fixes, the experimental script mode can, but it needs a paid gatekeeper model key and approvals. For non-systemd systems, or hosts you cannot reach by SSH key, look elsewhere.
get_system_informationget_cpu_informationget_memory_informationget_disk_usageget_hardware_informationlist_servicesget_service_statusget_service_logslist_processesget_process_infoget_journal_logsread_log_fileget_listening_portsget_network_connectionsget_network_interfaceslist_block_deviceslist_directorieslist_filesread_filepcp_guidepcp_list_metricspcp_performance_summarypcp_query_metricsvalidate_scriptrun_scriptrun_script_with_confirmationrun_script_interactive