ssh_server_infoLABSCO SUMMARY
The setup cost is the security model.
Pinning host keys by hand and starting with every tier off is slower than pasting a config, and that is the trade being offered: an assistant that can only reach the hosts, paths and commands you named. If you want a single ssh_exec tool the README says so itself — this is built for the case where more than one host is in play.
What it is
An SSH server for MCP built on FastMCP, aimed at operators who want an assistant on their fleet without handing it a shell. Hosts, keys, allowlists and sudo mode are declared per host in hosts.toml; capability is granted by flipping tier flags, and the tools outside the granted tiers are not visible to the client at all.
What you get
- 100 tools across ten groups by the README's count —
host,session,sftp-read,file-ops,exec,sudo,shell,docker,systemctl,pkg— trimmed per assistant withSSH_ENABLED_GROUPS - Read-only probes on the default tier:
ssh_host_ping,ssh_host_info,ssh_sftp_list,ssh_find,ssh_file_hash, disk usage, processes, alerts and known-hosts verification ssh_read_redacted— read a.envor.ymlwith secrets replaced inline by HMAC-SHA256 hash markers, so the model gets the structure and never the plaintext- Low-access file operations — cp, mv, mkdir, delete, edit, patch, upload, deploy, link, transfer — SFTP-first with atomic writes, and a
local_path=streaming mode so large files skip the base64 channel - An exec tier with per-call timeouts, a streaming variant, broadcast across hosts, and a cheatsheet that catches
cat/teeand reroutes to the native tool - A sudo tier where
ssh_sudo_execsits beside five path-bearing tools —ssh_sudo_read,_read_redacted,_write,_edit,_sftp_list— so root-owned files stay inside path policy instead of escaping through rawsudo cat - Within that count, 27 Docker tools, 17 systemctl tools including
ssh_journalctl, and 9 APT tools —ssh_apt_list,ssh_apt_search,ssh_apt_install,ssh_apt_upgrade,ssh_apt_removeandssh_apt_markamong them ssh_server_infoand themcp://ssh-mcp/server-inforesource, so the model can ask which tiers are unlocked instead of guessing- Optional BM25 tool search that swaps
tools/listforsearch_toolspluscall_toolwhen the catalog starts eating context
Requirements
SSH keys already loaded into an agent — the server talks to your running SSH agent and does not take passwords in env, which are hard-rejected at startup. Python 3.11-3.13; run it with uvx --from git+https://github.com/Nightreaver/python-ssh-mcp ssh-mcp. Two files do the real work: hosts.toml for hosts, users, path allowlists and sudo mode, and .env for the tier flags ALLOW_LOW_ACCESS_TOOLS, ALLOW_DANGEROUS_TOOLS and ALLOW_SUDO, all false to start. known_hosts is strict with no auto-accept, so you pin each target's fingerprint out of band before the first connection. Point SSH_CONFIG_FILE at ~/.ssh/config to inherit aliases and ProxyJump. Package python-ssh-mcp at 1.5.2, GPL-3.
Setup effort
One command plus credentials — uvx --from git+https://github.com/Nightreaver/python-ssh-mcp ssh-mcp, then supply credentials
USE CASES
Letting an assistant look but not touch
Leave all three tier flags false and it can still ping hosts, read disk and process state, and list files.
Debugging a config without leaking the credentials in it
Read the file through the redacting tool so the model sees the keys and structure with hash markers where the secrets were.
Investigating a container that keeps restarting
Enable the docker group and walk logs, inspect and stats across the fleet from one conversation.
Patching a root-owned file safely
Use the sudo-tier path-bearing tools so the edit is still checked against the path allowlist, rather than shelling out to sudo cat.
Answering what the assistant actually did
The audit log writes one JSON line per tool call with paths and commands SHA-256-hashed, and calls can be traced end-to-end by correlation id.
100 tools
Listed in project code.
ssh_host_pingssh_host_infossh_host_disk_usagessh_host_networkssh_host_processesssh_host_alertsssh_user_infossh_known_hosts_verifyssh_host_listssh_host_notesssh_host_reloadssh_host_notes_appendssh_host_notes_setssh_session_listssh_sftp_listssh_sftp_statssh_sftp_downloadssh_findssh_file_hashssh_read_redactedssh_docker_psssh_docker_logsssh_docker_inspectssh_docker_statsssh_docker_topssh_docker_eventsssh_docker_volumesssh_docker_system_dfssh_docker_imagesssh_docker_compose_psssh_docker_compose_logsssh_systemctl_statusssh_systemctl_is_activessh_systemctl_is_enabledssh_systemctl_is_failedssh_systemctl_list_unitsssh_systemctl_showssh_systemctl_catssh_journalctlssh_apt_listssh_apt_searchssh_apt_showssh_apt_show_holdsssh_shell_listssh_mkdirssh_deletessh_delete_folderssh_cpssh_mvssh_linkssh_uploadssh_editssh_patchssh_deployssh_transferssh_docker_startssh_docker_compose_startssh_docker_cpssh_shell_closessh_exec_runssh_exec_scriptssh_exec_run_streamingssh_broadcastssh_docker_execssh_docker_runssh_docker_pullssh_docker_rmssh_docker_rmissh_docker_prunessh_docker_compose_upssh_docker_compose_downssh_docker_compose_pullssh_systemctl_startssh_systemctl_stopssh_systemctl_restartssh_systemctl_reloadssh_systemctl_enablessh_systemctl_disablessh_systemctl_maskssh_systemctl_unmaskssh_systemctl_reset_failedssh_apt_installssh_apt_upgradessh_apt_removessh_apt_autoremovessh_apt_markssh_shell_openssh_shell_execssh_sudo_execssh_sudo_run_scriptssh_sudo_readssh_sudo_read_redactedssh_sudo_writessh_sudo_editssh_sudo_sftp_listssh_docker_compose_restartssh_docker_compose_stopssh_docker_restartssh_docker_stopBEFORE YOU INSTALL
What to know first
Tools you get
100 tools registered in the project's code.
Requires
- uvx on PATH
- Python >=3.11,<3.14
INSTALLATION
Connect your client
Server setup
uvx --from git+https://github.com/Nightreaver/python-ssh-mcp ssh-mcpMCP Clients
Claude Code
claude mcp add --transport stdio ssh-mcp -- uvx --from git+https://github.com/Nightreaver/python-ssh-mcp ssh-mcpContinue
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/Nightreaver/python-ssh-mcp",
"ssh-mcp"
]
}
}
]
}
}Zed
{
"context_servers": {
"ssh-mcp": {
"source": "custom",
"command": {
"path": "uvx",
"args": [
"--from",
"git+https://github.com/Nightreaver/python-ssh-mcp",
"ssh-mcp"
],
"env": {}
}
}
}
}