npm @nl4ever/sshmcpstdioupdated 3mo ago
Let AI manage your remote servers. A Model Context Protocol (MCP) server that gives AI assistants full SSH access β execute commands, transfer files, manage multiple servers simultaneously, all through natural conversation.
What can you do with sshmcp?
@nl4ever/sshmcp
Let AI manage your remote servers. A Model Context Protocol (MCP) server that gives AI assistants full SSH access β execute commands, transfer files, manage multiple servers simultaneously, all through natural conversation.
You: "Deploy the latest build to production server"
AI: connects β uploads build β restarts service β verifies status
Features
- 21 Tools β Connect, execute, upload, download, write files, and more
- Connection Pool β Operate multiple servers simultaneously, each command tagged with
server_id - Zero-Token File Transfer β SFTP path-based transfer, file content never enters AI context
- Directory Upload β Auto tar.gz compress β upload β remote decompress (fast for many small files)
- Async Transfer + Progress β Background transfer for large files with real-time progress tracking
- Quick Connect β Temporary connections without saving config, returns
host:portas temp ID - SOCKS4/5 Proxy β Per-connection proxy support
- Jump Host β SSH ProxyJump for bastion/gateway access
- Multi-Auth β Password, private key, ssh-agent, keyboard-interactive (OTP/2FA)
Quick Start
Install globally
npm install -g @nl4ever/sshmcp
Add to Claude Code
claude mcp add sshmcp sshmcp
Add to Claude Desktop
Edit claude_desktop_config.json:
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": ["-y", "@nl4ever/sshmcp"]
}
}
}
Add to Cursor
Go to Settings β MCP Servers β Add:
{
"sshmcp": {
"command": "npx",
"args": ["-y", "@nl4ever/sshmcp"]
}
}
Tools Overview
Connection Management
| Tool | Description |
|---|---|
list_servers |
List all configured servers and active connections |
get_server |
View server config details |
add_server |
Add/update server config (password, key, agent, OTP) |
update_server |
Modify server config (only pass fields you want to change) |
delete_server |
Remove a server |
rename_server |
Rename a server ID |
connect |
Manually connect (usually not needed, tools auto-connect) |
quick_connect |
Temporary connection, returns host:port as ID |
disconnect |
Disconnect specific server or all connections |
test_connection |
Test connectivity without affecting existing connections |
Command Execution
| Tool | Description |
|---|---|
execute |
Run shell commands on remote server (with configurable timeout) |
File Operations
| Tool | Description |
|---|---|
read_file |
Read remote file content (with optional line range) |
write_file |
Write text content to remote file |
upload_file |
Upload local file to remote (supports async mode) |
upload_directory |
Upload directory with auto compress β transfer β decompress |
download_file |
Download remote file to local (supports async mode) |
download_directory |
Download directory with remote compress β transfer β local decompress |
transfer_status |
Check progress of async transfers (size/speed/ETA) |
Proxy Management
| Tool | Description |
|---|---|
list_proxies |
List all SOCKS proxy presets |
add_proxy |
Add SOCKS4/5 proxy preset |
delete_proxy |
Remove a proxy preset |
Connection Pool: Multi-Server Operations
All operation tools take a server_id parameter. The connection pool auto-manages connections β no manual connect/disconnect needed:
AI: execute(server_id="prod", command="nginx -s reload") β auto-connects to prod
AI: execute(server_id="dev", command="tail -f /var/log/app.log") β auto-connects to dev, prod stays
AI: execute(server_id="prod", command="curl localhost") β reuses prod connection
For temporary servers, use quick_connect which returns host:port as the ID:
AI: quick_connect(host="1.2.3.4", username="root", password="***")
β "Connected: root@1.2.3.4:22, use server_id="1.2.3.4:22""
AI: execute(server_id="1.2.3.4:22", command="df -h")
AI: disconnect(server_id="1.2.3.4:22")
Async Transfer (Large Files)
For large files, enable background transfer mode to avoid blocking:
AI: upload_file(server_id="prod", local_path="big.tar.gz", remote_path="/data/", async_transfer=true)
β "Background upload started: tf_1"
AI: transfer_status("tf_1")
β "π Uploading: 638.2 MB / 1.2 GB (53.2%) β 12.4 MB/s, ETA 46s"
AI: transfer_status("tf_1")
β "β
Upload complete: 1.2 GB, 98s, 12.3 MB/s"
Small files use synchronous mode by default β no config needed.
Connection Examples
Password authentication
AI: add_server(server_id="prod", name="Production", host="10.0.0.1", username="deploy", password="***")
AI: execute(server_id="prod", command="systemctl status nginx")
Private key authentication
AI: add_server(server_id="aws", name="AWS EC2", host="ec2-xx.compute.amazonaws.com", username="ubuntu", private_key="~/.ssh/id_rsa")
Quick connect (no config saved)
AI: quick_connect(host="192.168.1.100", username="root", password="***")
β server_id="192.168.1.100:22"
AI: execute(server_id="192.168.1.100:22", command="df -h")
AI: disconnect(server_id="192.168.1.100:22")
Via SOCKS5 proxy
AI: add_proxy(proxy_id="tunnel", name="SSH Tunnel", host="127.0.0.1", port=1080, type="5")
AI: add_server(server_id="internal", ..., proxy="tunnel")
Via jump host
AI: add_server(server_id="bastion", name="Bastion", host="bastion.example.com", username="admin", private_key="~/.ssh/id_rsa")
AI: add_server(server_id="internal", name="Internal DB", host="10.0.0.5", username="dbadmin", password="***", jump_host="bastion")
Config Location
Server and proxy configurations are stored in:
~/.ssh-mcp/config.json
Passwords are stored in plaintext. For production use, prefer private key authentication.
Requirements
- Node.js >= 18
- An MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.)
- Remote server with SSH access
License
MIT
Install
Add sshmcp to your client. Pick the one you use.
claude mcp add sshmcp -- npx -y @nl4ever/sshmcpcodex mcp add sshmcp -- npx -y @nl4ever/sshmcpamp mcp add sshmcp -- npx -y @nl4ever/sshmcp{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"sshmcp","command":"npx","args":["-y","@nl4ever/sshmcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"sshmcp": {
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"sshmcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"sshmcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@nl4ever/sshmcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @nl4ever/sshmcpRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance13/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 97 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 1.2.1Latest | Mar 27, 2026 |