safe-ssh-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_disk_freeC | Collects disk usage (df -h) from a remote Linux host via SSH. |
| get_inode_usageC | Collects inode usage (df -i) from a remote Linux host via SSH. |
| get_disk_usageA | Collects disk usage for a specific abs path from a remote Linux host via SSH. Returns the top 20 largest files/folders in the specified directory. |
| get_list_of_filesB | Collects list of files for a specific abs path from a remote Linux host via SSH. Returns with -lah option |
| get_list_of_files_with_filterA | Collects list of files for a specific abs path with filter (grep) applied from a remote Linux host via SSH. -lah option is applied. |
| get_lockfilesA | Finds dependency lockfiles under the given absolute app paths on a remote Linux host via SSH: composer.lock (PHP), package-lock.json, yarn.lock, pnpm-lock.yaml (Node.js), requirements*.txt, poetry.lock, uv.lock, Pipfile.lock (Python), Gemfile.lock (Ruby), go.sum (Go) and Cargo.lock (Rust). Skips node_modules, vendor, .git, venv and .venv directories. Lists the files found with size and mtime (ls -l). With include_contents=True prints the files instead (the first 20 found), each after a '===== ( bytes) =====' line. A file is always printed WHOLE or not at all, never cut: a file over 5 MB, or one that would take the output over 10 MB in total, gets a '===== (skipped: ...) =====' line instead. The output can be several MB - call without include_contents first to see the sizes, then narrow abs_paths to the application you need. |
| get_is_installedC | Checks whether a binary/command is installed and callable on a remote Linux host via SSH. |
| get_installed_packagesB | Lists installed packages with versions on a remote Linux host via SSH, using the first available package manager. The FIRST output line starts with '#' and names the package manager and the columns; the rest is one package per line: dpkg (Debian/Ubuntu), tab-separated: package, version, architecture, status ('ii' installed, 'hi' installed and held), source_package, source_version. Security advisories for Debian/Ubuntu are keyed by SOURCE package (openssh, not openssh-server). Removed packages whose config files are left behind (state 'rc') are not listed. rpm (RHEL/Fedora/SUSE): name-version-release.arch, as printed by rpm -qa. apk (Alpine), tab-separated: package, version, architecture, origin. Security advisories for Alpine are keyed by ORIGIN (openssl, not libcrypto3); it has the same version as the package. |
| get_dmesgA | Collects dmesg log from a remote Linux host via SSH. Reading the kernel log usually requires root: when the login user is not root, the command is run through passwordless sudo or doas (sudo -n / doas -n). Optional since limits it to recent messages: '30 min ago', '2 hours ago', 'today', 'yesterday' or 'YYYY-MM-DD HH:MM:SS'. It requires util-linux 2.37+ on the remote host; on older hosts dmesg fails with an unrecognized option error - then call without since. |
| get_uptimeA | Collects uptime from a remote Linux host via SSH |
| get_current_datetimeB | Collects current datetime from a remote Linux host via SSH |
| get_hostnameB | Collects the hostname of a remote Linux host via SSH, as the host itself reports it. Output: "hostname: " (the kernel hostname, uname -n), then "fqdn: " (hostname -f) when the host can resolve its fully qualified name; that line is absent otherwise. |
| get_distroname_versionC | Collects distr details from os-release from a remote Linux host via SSH |
| get_kernel_versionB | Collects kernel name, release, build version and architecture (uname -srvm) from a remote Linux host via SSH |
| get_libc_versionB | Collects C library implementation and version (glibc or musl) from a remote Linux host via SSH. Uses ldd --version; musl is detected by the presence of /lib/ld-musl-* loader. The last line, "package: ", is the distro package version (e.g. 2.39-0ubuntu8.9, 2.34-289.el9, 1.2.6-r3) that security data is keyed by; it is taken from dpkg, rpm or apk and is absent on other distros. |
| get_sshd_effective_configA | Collects the effective sshd configuration (sshd -T) from a remote Linux host via SSH. Shows the final values after defaults, includes and Match blocks are applied. Requires root, since sshd -T reads the host keys: when the login user is not root, the command is run through passwordless sudo or doas (sudo -n / doas -n). |
| get_php_infoA | Collects PHP details from a remote Linux host via SSH: CLI version and SAPI, installed CGI (php-cgi) and FPM (php-fpm) binaries with their versions/SAPIs, whether php-fpm or php-cgi processes are currently running, and, if Apache is installed, whether mod_php is enabled in its config and loaded. |
| get_systemd_list_allC | Lists all systemd units. USE THIS TOOL to check for running, stopped, or FAILED daemon/service/unit. |
| get_systemd_list_failedA | Lists failed systemd units. USE THIS TOOL to check for FAILED daemons/services/units. |
| get_systemd_list_timersC | Lists all systemd timers. USE THIS TOOL to check for timers. |
| get_systemd_statusC | Gets the detailed status, logs, and error messages for a SPECIFIC systemd daemon/service/unit. daemon is a unit name such as nginx, sshd.service or user@1000.service: ASCII letters, digits and . - _ @ : only, starting with a letter or digit, at most 255 characters. |
| get_ps_aux_top_cpu_consumersB | Lists top 10 cpu consumers, CPU desc (ps aux --sort=-%cpu).
On BusyBox hosts (Alpine), where ps cannot sort, the output comes from |
| get_ps_aux_top_mem_consumersB | Lists top 10 mem consumers, MEM desc (ps aux --sort=-%mem).
On BusyBox hosts (Alpine), where ps cannot sort and has no %MEM, the output is
|
| get_free_memoryC | Returns free memory, swap (total/free), page cache, HugePages and so on |
| get_memory_pressureA | DEPRECATED: use get_pressure, which returns CPU, I/O and memory pressure in one call. Returns memory pressure if supported |
| get_mountsA | Lists mounted filesystems with their mount point, source device, filesystem type and mount options (findmnt, as a tree; /proc/mounts if findmnt is not installed). USE THIS TOOL to find a filesystem that was remounted read-only after an error ('ro' in the options), to check options like noexec/nosuid, and to see network (nfs, cifs), overlay and tmpfs mounts. For free space use get_disk_free instead. |
| get_pressureA | Returns Linux pressure stall information (PSI) for CPU, I/O and memory in one call. USE THIS TOOL to tell which resource the host is short of: unlike load average, it shows how much time tasks actually spent waiting for each resource. 'some' = share of time at least one task was stalled, 'full' = all non-idle tasks were stalled at once; avg10/avg60/avg300 are percentages over the last 10, 60 and 300 seconds, total is the cumulative stall time in microseconds. Prints 'PSI not supported' for a resource if the kernel is older than 4.20 or PSI is disabled. |
| get_vmstatA | Samples system activity for 4 seconds with vmstat (5 reports, 1 second apart): run queue and blocked processes (r, b), memory, swap-in/out (si, so), block I/O (bi, bo), interrupts and context switches (in, cs) and the CPU split (us, sy, id, wa, st). USE THIS TOOL to see what the host is doing right now: swapping, I/O wait, CPU saturation. The FIRST report line is the average since boot - judge the current state by the other four. |
| get_topB | Collects top's snapshot from a remote Linux host via SSH (top -b -n 1 -c).
On BusyBox hosts (Alpine), where top has no -c, the output is plain |
| get_lsblkC | Collects lsblk output from a remote Linux host via SSH |
| get_docker_ps_allB | Collects docker ps --all output from a remote Linux host via SSH When the login user cannot reach the docker daemon (not root, not in the docker group), the command is run through passwordless sudo or doas (sudo -n / doas -n). |
| get_docker_imagesA | Collects docker images --digests output (repository, tag, digest, image ID, age, size) from a remote Linux host via SSH When the login user cannot reach the docker daemon (not root, not in the docker group), the command is run through passwordless sudo or doas (sudo -n / doas -n). |
| get_docker_logsA | Gets the last |
| get_docker_statsA | Collects a one-shot docker stats snapshot from a remote Linux host via SSH: CPU %, memory usage/limit, network and block I/O, PIDs for every RUNNING container. When the login user cannot reach the docker daemon (not root, not in the docker group), the command is run through passwordless sudo or doas (sudo -n / doas -n). |
| get_docker_inspectA | Inspects a SPECIFIC docker container, given by name or ID, on a remote Linux host via SSH. Returns a curated subset of docker inspect: image, entrypoint/cmd, state (status, exit code, OOMKilled, start/finish time, health check log), restart count and policy, memory/CPU limits, networks, ports, mounts and log driver. Environment variables are NOT returned. When the login user cannot reach the docker daemon (not root, not in the docker group), the command is run through passwordless sudo or doas (sudo -n / doas -n). |
| get_kubectl_logsA | Gets the last |
| get_kubectl_describeA | Describes a SPECIFIC kubernetes resource (kubectl describe) by running kubectl on a remote Linux host via SSH: status, conditions, containers and its recent events. kubectl must be configured for the SSH user there. resource_type is one of: pod, node, namespace, deployment, statefulset, daemonset, replicaset, job, cronjob, service, endpoints, ingress, networkpolicy, persistentvolumeclaim, persistentvolume, storageclass, horizontalpodautoscaler, poddisruptionbudget (plural and short names like 'po', 'deploy', 'svc' work too). Secrets and configmaps are NOT available. namespace is ignored for cluster-scoped resources (node, namespace, persistentvolume, storageclass). |
| get_kubectl_eventsA | Gets the most recent |
| get_crictl_psB | Collects crictl ps --all output (all CRI containers on a kubernetes node, including exited ones: container ID, image, state, name, attempt, pod) from a remote Linux host via SSH. Usually requires root. |
| get_crictl_imagesB | Collects crictl images output (image, tag, image ID, size of images present in the CRI runtime of a kubernetes node) from a remote Linux host via SSH. Usually requires root. |
| get_crictl_imagefsinfoB | Collects crictl imagefsinfo output (mountpoint, used bytes and inodes of the CRI image filesystem of a kubernetes node) from a remote Linux host via SSH. USE THIS TOOL to investigate image garbage collection and DiskPressure. Usually requires root. |
| get_crictl_logsA | Gets the last |
| get_crictl_inspectA | Inspects a SPECIFIC CRI container (crictl inspect, JSON) on a kubernetes node from a remote Linux host via SSH: state, exit code and reason, timestamps, image, mounts, log path, pid and the runtime spec. Use get_crictl_ps first to find the container ID. Usually requires root. Values of environment variables are replaced by ''; their names are kept. |
| get_crictl_inspect_imageA | Inspects a SPECIFIC image (crictl inspecti, JSON) in the CRI runtime of a kubernetes node from a remote Linux host via SSH: repo tags and digests, size, user, entrypoint/cmd, layers. image is an image name ('registry.k8s.io/pause:3.9') or an image ID from get_crictl_images. Usually requires root. Values of environment variables are replaced by ''; their names are kept. |
| get_crontab_tasksC | Collects crontab -l (crontab list) output from a remote Linux host via SSH |
| get_listening_socketsA | Collects ss -tulpn output (open ports and sockets) from a remote Linux host via SSH. If ss is not installed (e.g. Alpine), falls back to netstat -tulnp; the output then starts with a "# ss is not installed: netstat -tulnp" line and has netstat's columns. If the login user is not root, runs through sudo -n / doas -n to get the process names of all sockets; if that is not allowed, runs as the login user and says so in a "# not run as root" line (process names are then shown only for its own sockets). |
| get_ip_addrC | Collects ip addr show output (network interfaces, their state, MAC, IPv4 and IPv6 addresses) from a remote Linux host via SSH |
| get_ip_routeA | Collects the IPv4 and IPv6 routing tables (ip route show, ip -6 route show: default gateway, per-interface routes) from a remote Linux host via SSH |
| get_dns_lookupA | Resolves a hostname (or reverse-resolves an IP address) ON a remote Linux host via SSH, and prints its /etc/resolv.conf. USE THIS TOOL to check what a name resolves to from that host. By default uses getent, which resolves exactly like applications on the host do (/etc/hosts, nsswitch.conf, then DNS). A name that does not resolve gives exit code 2. use_dig=True queries the DNS servers directly with dig (bypassing /etc/hosts) and returns the full answer: status (NOERROR, NXDOMAIN, SERVFAIL), CNAME chain, TTLs, the server that answered and query time. It fails with exit code 127 if dig is not installed - then use use_dig=False. The next two parameters require use_dig=True: record_type is one of A (default), AAAA, CNAME, MX, NS, TXT, SOA, PTR, SRV, CAA. server (IP address or hostname, e.g. '8.8.8.8') asks that DNS server instead of the ones in /etc/resolv.conf - compare both answers to tell a broken resolver from a broken record. |
| check_tcp_connectA | Checks FROM a remote Linux host (reached via SSH) whether a TCP connection to target_host:target_port can be opened (nc -vz). USE THIS TOOL to tell whether a service (database, API, another server) is reachable from that host. target_host is a hostname or an IPv4/IPv6 address, target_port is 1-65535. Do not confuse them with host/port, which are the SSH connection to the machine the check runs on. Only the connection is opened and closed, no data is sent. One port per call. ok=True means the port accepted the connection. Otherwise nc's message tells why: 'Connection refused' - the target is reachable but nothing listens on the port; 'timed out' - no answer in 3 seconds, usually a firewall or a routing problem; a name resolution error - check the name with get_dns_lookup. Fails with exit code 127 if nc is not installed on the host. |
| get_service_logs_from_journalctlC | Gets recent journald logs for a specific systemd service.
Optional since limits them to a time window: '30 min ago', '2 hours ago', 'today',
'yesterday' or 'YYYY-MM-DD HH:MM:SS' (the last |
| get_journal_errorsA | Gets recent journald entries of priority warning and above (warning, err, crit, alert, emerg)
from ALL units and the kernel. USE THIS TOOL FIRST when you don't know which service is at fault.
With current_boot_only=True only entries since the last boot are returned.
Optional since limits them to a time window: '30 min ago', '2 hours ago', 'today',
'yesterday' or 'YYYY-MM-DD HH:MM:SS' (the last |
| get_last_loginsA | Lists recent SUCCESSFUL logins (last, from wtmp) to a remote Linux host via SSH, newest first:
user, terminal, source address, login/logout time. Also shows reboots.
For failed login attempts use get_failed_logins.
On BusyBox hosts (Alpine), where last takes no options, the output is plain |
| get_failed_loginsA | Lists recent FAILED login attempts (lastb, from btmp) on a remote Linux host via SSH, newest first: attempted user, terminal, source address, time. USE THIS TOOL to check for brute-force attempts. Requires root, since btmp is not world-readable: when the login user is not root, the command is run through passwordless sudo or doas (sudo -n / doas -n). Optional since limits them to a time window: '30 min ago', '2 hours ago', 'today', 'yesterday' or 'YYYY-MM-DD HH:MM:SS'. |
| get_coredumpsA | Inspects crashes (core dumps) recorded by systemd-coredump on a remote Linux host via SSH.
command='list' lists the last |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 55 tools
Most tools target a clearly distinct resource plus action, and descriptions actively disambiguate similar ones (e.g. get_disk_free vs get_disk_usage, get_pressure vs deprecated get_memory_pressure). A few pairs still require reading the description carefully (get_list_of_files vs get_list_of_files_with_filter, get_top vs get_ps_aux_top_cpu_consumers vs get_vmstat, the three disk tools), but no true duplicates.
Nearly everything follows a snake_case get_<resource> pattern (get_systemd_status, get_docker_inspect, get_crictl_ps, get_kubectl_logs), which is highly predictable. Minor deviations like check_tcp_connect and verbose names such as get_service_logs_from_journalctl or get_ps_aux_top_cpu_consumers are readable and still consistent in style.
55 tools is very heavy for a read-only SSH diagnostics server, with dense clusters of near-sibling commands (four crictl tools, four docker tools, four systemd list/status tools, three kubectl tools). Each is individually useful, but the surface is large enough that selection cost is high and some granularity could be consolidated.
Coverage of read-only Linux host diagnostics is broad and coherent: systemd, journald, docker, kubernetes/CRI, network reachability and routing, disk/inode/memory, package inventory, and login auditing. Gaps exist (no file-content read beyond lockfiles, no firewall/SELinux/certificate checks, no user/group inspection), but they are not fatal for the stated diagnostic purpose and the server is clearly read-only by design.