ssh_stat

MCP tool from Ssh MCP by YawLabs

Get metadata for a file or directory (size, mode in octal, uid/gid, mtime/atime, isFile/isDirectory/isSymbolicLink). Use instead of parsing ls -la.

How to use it

Project documentation lists ssh_stat for the Ssh MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.

Install Ssh MCP

$npx -y @yawlabs/ssh-mcp@latest
FULL SSH MCP LISTING

Other tools in Ssh MCP (21)

Auto-diagnostics

When any remote operation fails, ssh-mcp automatically runs diagnostics and includes the results in the error response. Your agent doesn't need to call sshdiagnose separately — it gets told what's wrong and how to fix it right in the error message.

ssh_agent_ensure

Ensure ssh-agent is running. Starts one if needed and sets env vars for the session.

ssh_config_lookup

Resolve the effective SSH config for a host (hostname, user, port, proxy, identity files).

ssh_delete

Delete a file or empty directory via SFTP. Auto-dispatches unlink vs rmdir based on the path's own type (lstat), so a symlink is always unlinked — never followed — including a dangling one or one pointing at a directory. Recursive directory delete is intentionally NOT supported -- use sshexec rm -rf

ssh_diagnose

Full SSH environment diagnostic. Checks agent, keys, config, knownhosts, and connectivity. Returns exact fix commands for every failure.

ssh_download

Download a file from a remote host to local filesystem.

ssh_exec

Execute a command on a remote host. Returns stdout, stderr, and exit code (or [signal: NAME] and code: -1 when the channel closed signal-only). Optional env param sets per-call environment variables (POSIX-safe prefix, works regardless of sshd's AcceptEnv). Subject to command policy if configured.

ssh_find

Search for files remotely with structured parameters (name, type, size, depth, newer — match files modified more recently than a reference path).

ssh_git_check

Test Git-over-SSH auth to GitHub, GitLab, Bitbucket, etc.

ssh_key_list

List all SSH keys in ~/.ssh/ with type, fingerprint, and agent status.

ssh_key_load

Load a key into the running agent. Ensures the agent is started first.

ssh_known_hosts_fix

Remove a stale host key and re-scan. Fixes "host key verification failed" errors.

ssh_ls

List files in a directory on a remote host.

ssh_mkdir

Create a directory via SFTP. Set recursive: true for mkdir -p behavior. Unlike the other SFTP tools, the path may be relative — it resolves against the SFTP working directory (normally the remote user's home). ~ is not expanded; SFTP has no shell.

ssh_multi_exec

Run a command on multiple hosts in parallel. Returns results per host. Optional env param sets per-call environment variables (same POSIX-safe prefix as sshexec, applied once and sent to every host). Subject to command policy if configured (policy is checked once, against the env-prefixed command, b

ssh_read_file

Read a file from a remote host via SFTP.

ssh_service_status

Check systemd service status (active, PID, uptime, description). Flags isError only when the unit could not be found / queried, not when an existing unit is intentionally stopped.

ssh_tail

Read the last N lines of a file, optionally filtered by a grep pattern.

ssh_test

Quick connectivity test with timing and actionable error details.

ssh_upload

Upload a local file to a remote host via SFTP.

ssh_write_file

Write content to a file on a remote host via SFTP.