SSH MCP Server · hypnosis — Claude Code MCP server: what it does, how to install
Connects AI agents to remote VPS hosts and routers via system OpenSSH. It cuts token consumption and blocks dangerous commands.
claude mcp add --env SSH_PROFILES_FILE=<SSH_PROFILES_FILE> --env SSH_MCP_LOG_LEVEL=<SSH_MCP_LOG_LEVEL> --transport stdio hypnosis-ssh-mcp-server -- npx -y @hypnosis/ssh-mcp-serverWhat SSH MCP Server does
This server routes agent actions through the existing ssh binary on your machine. It picks up your ~/.ssh/config and private keys without bundled SSH clients. It requires no binary compilation. Multiplexing keeps a single connection alive so you authenticate once.
Raw shell sessions flood context windows with noisy text dumps. This tool returns structured responses instead. It truncates large payloads to keep the assistant focused on actionable diagnostics. Destructive commands are blocked automatically.
Running it requires Node.js 18+ alongside an OpenSSH executable in your system PATH. Host profiles live in a JSON file mapped by SSH_PROFILES_FILE. Windows setups cannot use password or passphrase authentication, so private keys remain mandatory on that operating system.
What it helps with
- inspect remote service logs and process states via SSH
- transfer configuration files to cloud instances and hardware routers
- cut context window token usage with structured output
- prevent AI execution of destructive system commands
Example prompts for the agent
- Check memory usage and recent nginx error logs on the production host
- Transfer the local
app.confto/etc/on the router profile - Audit disk space across mount points on the remote box
How to install SSH MCP Server
Platform CLI
claude mcp add --env SSH_PROFILES_FILE=<SSH_PROFILES_FILE> --env SSH_MCP_LOG_LEVEL=<SSH_MCP_LOG_LEVEL> --transport stdio hypnosis-ssh-mcp-server -- npx -y @hypnosis/ssh-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add hypnosis-ssh-mcp-server --env SSH_PROFILES_FILE=<SSH_PROFILES_FILE> --env SSH_MCP_LOG_LEVEL=<SSH_MCP_LOG_LEVEL> -- npx -y @hypnosis/ssh-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"hypnosis-ssh-mcp-server": {
"command": "npx",
"args": [
"-y",
"@hypnosis/ssh-mcp-server"
],
"env": {
"SSH_PROFILES_FILE": "<SSH_PROFILES_FILE>",
"SSH_MCP_LOG_LEVEL": "<SSH_MCP_LOG_LEVEL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"hypnosis-ssh-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@hypnosis/ssh-mcp-server"
],
"env": {
"SSH_PROFILES_FILE": "<SSH_PROFILES_FILE>",
"SSH_MCP_LOG_LEVEL": "<SSH_MCP_LOG_LEVEL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SSH_PROFILES_FILE=<SSH_PROFILES_FILE> -e SSH_MCP_LOG_LEVEL=<SSH_MCP_LOG_LEVEL> hypnosis-ssh-mcp-server npx -y @hypnosis/ssh-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about SSH MCP Server
What does SSH MCP Server do?
It gives your AI agent structured tools to inspect remote hosts, read log files, and upload configurations over SSH. It relies on the system OpenSSH client and prevents destructive shell commands.
How to install SSH MCP Server in Claude Code?
Run claude mcp add ssh-mcp-server -e SSH_PROFILES_FILE=<SSH_PROFILES_FILE> -- npx -y @hypnosis/ssh-mcp-server. Replace <SSH_PROFILES_FILE> with the path to your ssh-profiles.json.
Does SSH MCP Server work on Windows?
Yes, but only with key-based authentication. Passwords and passphrases are not supported on Windows, and Node.js 18+ with system ssh in PATH is required.
Similar MCP servers
All MCP servers for DevOps and infrastructure →SSH MCP Server by other authors comes first.