Minimal MCP server for running commands through native OpenSSH. Docker has no special integration; run Docker commands through ssh_execute when needed.
- Node.js 22+
- OpenSSH client available as
sshinPATH - A working SSH alias or
user@hosttarget - Host key verified once with ordinary OpenSSH before MCP use
Example SSH config:
Host my-vps
HostName 203.0.113.10
User deploy
IdentityFile ~/.ssh/id_ed25519Verify manually:
ssh my-vps "whoami; hostname; pwd"npm ci
npm test
npm run buildCodex configuration:
[mcp_servers.ssh-vps-connector]
command = "node"
args = ["dist/index.js"]
cwd = 'E:\mcp\ssh-vps-connector'
enabled = true
startup_timeout_sec = 30.0
tool_timeout_sec = 330.0
env = { SSH_TARGET = "deploy@192.0.2.10" }Restart Codex after changing MCP configuration.
ssh_statusruns harmless identity/system checks.ssh_executeruns one command with an optional timeout from 1 to 300 seconds.
Results contain exitCode, stdout, stderr, timedOut, and truncated. Nonzero exit codes and timeouts are MCP errors. Each output stream is capped at 64 KiB.
- Host, user, key, and password are never accepted in MCP tool arguments.
- Authentication and
known_hostsverification stay in native OpenSSH. BatchMode=yesprevents password prompts from hanging the MCP process.ssh_executeis intentionally unrestricted. Use a dedicated VPS account and server-sidesudopolicy for authorization.