@yawlabs/ssh-mcp
MCP server for SSH operations with built-in diagnostics
Versions
0.12.0latest0.11.50.11.40.11.30.11.2+ show 14 moreshow less
0.11.10.11.00.10.00.9.30.9.20.9.10.9.00.8.00.7.00.6.00.5.00.4.00.3.00.1.0Tools 21
ssh_read_file Read a file from a remote host via SFTP.
ssh_exec Execute a command on a remote host via SSH. The command is interpreted by the remote login shell — pipes, redirects, globs, and other shell metacharacters work as expected. Returns stdout, stderr, and exit code. Use `env` to set environment variables for this call without modifying the command string. Subject to SSH_MCP_COMMAND_WHITELIST / SSH_MCP_COMMAND_BLACKLIST if configured (policy is checked against the env-prefixed command).
ssh_write_file Write content to a file on a remote host via SFTP. Creates or overwrites the file.
ssh_upload Upload a local file to a remote host via SFTP.
ssh_download Download a file from a remote host to local filesystem via SFTP.
ssh_ls List files in a directory on a remote host via SFTP.
ssh_stat Get metadata for a file or directory on a remote host via SFTP. Returns size, permissions (octal), uid/gid, mtime/atime, and type flags (isFile, isDirectory, isSymbolicLink). Use this instead of parsing `ls -la` output.
ssh_mkdir Create a directory on a remote host via SFTP. Set `recursive: true` to create parent directories as needed (like `mkdir -p`). Existing intermediate dirs are tolerated; an existing leaf path is still an error.
ssh_delete Delete a file or empty directory on a remote host via SFTP. Auto-detects the path type and calls the right SFTP op (unlink for files/symlinks, rmdir for empty dirs). Recursive directory delete is intentionally NOT supported -- for that, use ssh_exec with `rm -rf` explicitly so the destructive intent is visible in the tool trace.
ssh_diagnose Diagnose SSH connectivity issues. Checks ssh-agent status, loaded keys, known_hosts, SSH config, and attempts a test connection. Use this BEFORE attempting SSH operations if you suspect connectivity issues, or AFTER a failed SSH operation to understand why it failed.
ssh_agent_ensure Ensure ssh-agent is running and reachable. Starts a new agent if needed and sets environment variables so subsequent SSH operations work. Use this FIRST when SSH operations fail with agent-related errors.
ssh_key_list List all SSH private keys in ~/.ssh/ with their type, fingerprint, and whether they are loaded in the agent. Use this to find which keys are available and which ones need to be loaded.
ssh_key_load Load an SSH private key into the running agent. Ensures the agent is running first. Use this after ssh_key_list shows a key that is not loaded.
ssh_config_lookup Resolve the effective SSH configuration for a host. Shows hostname, user, port, identity files, proxy settings, and all other options from ~/.ssh/config. Use this to understand how SSH will connect to a host.
ssh_known_hosts_fix Remove a stale host key from known_hosts and re-scan the host to add the current key. Use this when you see
ssh_test Quick connectivity test to an SSH host. Reports success/failure with timing and actionable error details. Lighter and faster than ssh_diagnose — use this for a quick check before running operations.
ssh_git_check Test Git-over-SSH authentication to a hosting provider (GitHub, GitLab, Bitbucket, etc). Verifies your SSH key is registered and working. Use this when git clone/pull/push fails with SSH errors.
ssh_multi_exec Execute a command on multiple remote hosts in parallel. Returns results per host. Use this instead of calling ssh_exec multiple times — it
ssh_find Search for files on a remote host. Wraps the find command with structured parameters so you don
ssh_tail Read the last N lines of a file on a remote host, optionally filtering by a grep pattern. Use this for reading log files instead of ssh_exec with manual tail/grep commands.
ssh_service_status Check the status of a systemd service on a remote host. Returns whether it
Permissions 3
filesystem low shell high env_vars low