Safe Ssh MCP
Read-only SSH diagnostics for AI agents: disk, processes, logs, Docker and Kubernetes
Safe Ssh MCP is an open-source MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- macOS, Linux, CLI
- Runs
- Locally
- What it can do
- Read-only
- Version
- 0.3.4
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add safe-ssh-mcp -- uvx safe-ssh-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"safe-ssh-mcp": {
"command": "uvx",
"args": [
"safe-ssh-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"safe-ssh-mcp": {
"command": "uvx",
"args": [
"safe-ssh-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"safe-ssh-mcp": {
"command": "uvx",
"args": [
"safe-ssh-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"safe-ssh-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"safe-ssh-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add safe-ssh-mcp -- uvx safe-ssh-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.safe-ssh-mcp]
command = "uvx"
args = ["safe-ssh-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"safe-ssh-mcp": {
"command": "uvx",
"args": [
"safe-ssh-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Or run: gemini mcp add -s user safe-ssh-mcp uvx -- safe-ssh-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "safe-ssh-mcp": { "command": "uvx", "args": [ "safe-ssh-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Safe Ssh MCP
The design choice here is what is left out. Instead of handing an agent a shell, the server exposes only curated commands, each mapped to a fixed read-only command line with validated parameters, such as df -h, journalctl, ss -tulpn or docker logs. The README is careful about meaning: safe refers to host safety, preventing modification of the remote system, and does not guarantee that command output can't be misused by an agent.
Tools are grouped by area. Disk and filesystems, CPU and memory, systemd and logs, network checks including DNS lookup and TCP connect tests, Docker, Kubernetes with kubectl and crictl, and system information such as OS version, installed packages, failed logins and core dumps. The README gives only a partial list, with the full list in tools.md.
Authentication supports an account password, an unprotected key by path, a passphrase-protected key via the SSH_KEY_PASSPHRASE variable, or ssh-agent through the macOS Keychain, the recommended option for Cursor launched from the Dock. The package is on PyPI, tested manually on macOS against Ubuntu and automatically on Python 3.11 to 3.14, and licensed under AGPLv3, which the README says does not restrict connecting proprietary clients.
Tools this server provides (24)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, all 24 tools only read data.
From the server's own tool labels and tool names; not verified by us.
- get_disk_freeName suggests: reads
- Runs df -h.
- get_disk_usageName suggests: reads
- Lists the largest items in a directory.
- get_mountsName suggests: reads
- Lists mounts.
- get_topName suggests: reads
- Shows a top snapshot.
- get_vmstatName suggests: reads
- Shows vmstat output.
- get_pressureName suggests: reads
- Reads pressure stall information.
- get_systemd_list_failedName suggests: reads
- Lists failed systemd units.
- get_systemd_statusName suggests: reads
- Shows the status of a daemon.
- get_journal_errorsName suggests: reads
- Shows recent journal warnings and errors.
- get_dmesgName suggests: reads
- Shows kernel messages.
- get_listening_socketsName suggests: reads
- Lists listening sockets.
- get_ip_routeName suggests: reads
- Shows IPv4 and IPv6 routes.
- get_dns_lookupName suggests: reads
- Resolves a name.
- check_tcp_connectName suggests: reads
- Tests a TCP connection to a host and port.
- get_docker_ps_allName suggests: reads
- Lists all Docker containers.
- get_docker_logsName suggests: reads
- Shows recent container logs.
- get_docker_statsName suggests: reads
- Shows a Docker stats snapshot.
- get_kubectl_eventsName suggests: reads
- Lists Kubernetes events.
- get_kubectl_logsName suggests: reads
- Shows pod logs.
- get_crictl_psName suggests: reads
- Lists containers via crictl.
- get_distroname_versionName suggests: reads
- Reads the OS release.
- get_installed_packagesName suggests: reads
- Lists installed packages.
- get_failed_loginsName suggests: reads
- Lists failed logins.
- get_coredumpsName suggests: reads
- Lists core dumps.
What it does
- Curated read-only commands
- Each tool maps to a fixed command with validated parameters.
- Systemd and journal checks
- Lists failed units, service status and recent warnings.
- Container diagnostics
- Reads Docker and Kubernetes logs, events and container state.
- Network probes
- Shows listening sockets, routes, DNS lookups and TCP reachability.
- Flexible SSH auth
- Works with password, key file, passphrase variable or ssh-agent.
- Login and crash checks
- Shows failed logins and core dump lists.
Good for
- Ask an assistant why disk space is running low on a server
- Check failed systemd services after a deploy
- Read recent container logs without giving shell access
- Test whether a host can reach another port
- Review warnings in the journal
Pricing
Open source
AGPLv3
Safe Ssh MCP FAQ
Can an agent change the remote server?
The design allows only read-only diagnostic commands, though the README says safe refers to host safety, not output misuse.
How does authentication work?
It supports an SSH password, a key by path, a passphrase from SSH_KEY_PASSPHRASE or ssh-agent via the macOS Keychain.
What licence is Safe Ssh MCP under?
GNU AGPLv3. The README says this does not restrict connecting closed-source MCP clients.
What Python versions are tested?
Python 3.11, 3.12, 3.13 and 3.14 automatically, and 3.11 on macOS manually.
Is Safe Ssh MCP free?
Yes. Safe Ssh MCP is open source, so you can use and self-host it for free.
How do I add Safe Ssh MCP to Claude Code?
Run this command in your terminal: claude mcp add safe-ssh-mcp -- uvx safe-ssh-mcp
What are the best alternatives to Safe Ssh MCP?
The closest alternatives to Safe Ssh MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


