sshmcp — Claude Code MCP server: what it does, how to install
Gives AI coding agents direct SSH terminal and SFTP access to manage remote machines, run shell jobs, and transfer files without consuming context tokens.
claude mcp add sshmcp -- npx -y @nl4ever/sshmcpWhat sshmcp does
The server equips your assistant with 21 remote administration tools. Connection pooling organizes multiple machines under custom IDs, letting the model switch between hosts without repeating the handshake. SFTP handles file transfers purely on disk, ensuring file payloads stay out of the prompt window. Folders are bundled into tar.gz archives automatically before transfer.
Supported authentication includes private keys, passwords, ssh-agent, and interactive OTP prompts. It also handles bastions via jump host parameters as well as SOCKS4 and SOCKS5 proxies. Background transfers report size and speed for larger payloads.
Configuration is written directly to ~/.ssh-mcp/config.json. Passwords stay unencrypted on disk, making private keys the safer option on production infrastructure. Running this package requires Node.js 18 or newer.
What it helps with
- Run terminal commands on remote infrastructure from conversation
- Upload source directories with automatic compression and remote extraction
- Reach private subnets via SSH jump hosts and SOCKS tunnels
- Sync large files in the background without loading contents into token context
Example prompts for the agent
- Check nginx systemd service status on prod server
- Upload the ./dist folder to dev server at /var/www/site
- Connect to 192.168.1.50 as root via quick connect and inspect disk space
How to install sshmcp
Platform CLI
claude mcp add sshmcp -- npx -y @nl4ever/sshmcpPlatform CLI
codex mcp add sshmcp -- npx -y @nl4ever/sshmcpConfig file
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Config file
{
"servers": {
"sshmcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Platform CLI
gemini mcp add sshmcp npx -y @nl4ever/sshmcpStep 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 sshmcp
How to install sshmcp in Claude Code?
Run claude mcp add sshmcp -- npx -y @nl4ever/sshmcp. The CLI registers the server and provisions tools immediately.
How does zero-token file transfer work?
Transfers rely on local and remote SFTP paths. The raw file data streams over network sockets rather than entering the LLM conversation window.
Where does sshmcp keep server credentials?
Host configurations and proxy definitions are stored locally inside ~/.ssh-mcp/config.json.