mcp-ssh-remote
Provides ability to pull latest git changes on remote servers via the git_pull_remote tool.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ssh-remotecheck my slurm job status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-ssh-remote
An MCP (Model Context Protocol) server that wraps the system ssh binary to execute commands on remote hosts — with full support for ProxyCommand, bastion hosts, jump hosts, and any configuration in ~/.ssh/config.
Built for workflows where your GPU/HPC server is behind a bastion host, has no internet access, and you want to develop locally with Claude Code while running jobs remotely.
Why this exists
Most SSH-based MCP servers (e.g. @fangjunjie/ssh-mcp-server) use Node's ssh2 library internally, which does not support ProxyCommand. If your remote server is behind a bastion host or requires a custom proxy setup defined in ~/.ssh/config, those servers simply cannot connect.
This server has no SSH implementation of its own — it calls the system ssh binary directly, so it inherits everything your shell SSH already supports: ProxyCommand, ProxyJump, identity files, ControlMaster, port forwarding, and so on.
Related MCP server: SSH MCP Server
Features
Works with any
~/.ssh/configsetup — ProxyCommand, ProxyJump, magic-user auto-forward bastionsOptional SSH ControlMaster multiplexing — opt in with
MCP_SSH_MULTIPLEX=1for hosts where it works (off by default; see SSH multiplexing)Login shell wrapping — commands run via
bash -lso your full environment (conda, Slurm, modules) is always availableSlurm integration — submit, cancel, monitor jobs and read logs directly
rsync support — sync local directories to the remote server through the bastion
Safe file operations — large file writes piped via stdin (no shell arg limits), edit files with find-and-replace
SSH multiplexing
Multiplexing is off by default. Many jump hosts — especially magic-user auto-forward bastions (e.g. user/target_ip/target_user) — permit only one session per TCP connection. Every follow-up call then fails with Session open refused by peer, leaks stderr into the response, and flakes under load.
With multiplexing off, each call opens a fresh SSH connection. Slightly slower per call, but correct and reliable.
For hosts where multiplexing works (plain direct SSH, standard ProxyJump over a jumphost that supports session forwarding), opt in via env var:
{
"mcpServers": {
"ssh-remote": {
"type": "stdio",
"command": "node",
"args": ["/path/to/mcp-ssh-remote/index.js", "--host", "myserver"],
"env": {"MCP_SSH_MULTIPLEX": "1"}
}
}
}Requirements
Node.js >= 14
System
sshandrsyncinstalled (openssh)The target host must be reachable via
ssh <hostname>from your terminal
Installation
Via npx (no install needed):
npx mcp-ssh-remote --host myserverOr clone and run directly:
git clone https://github.com/JasonLinjc/mcp-ssh-remote.git
node mcp-ssh-remote/index.js --host myserverClaude Code Configuration
Add to your ~/.claude.json under mcpServers:
{
"mcpServers": {
"ssh-remote": {
"type": "stdio",
"command": "node",
"args": ["/path/to/mcp-ssh-remote/index.js", "--host", "myserver"],
"env": {}
}
}
}Or with npx:
{
"mcpServers": {
"ssh-remote": {
"type": "stdio",
"command": "npx",
"args": ["mcp-ssh-remote", "--host", "myserver"],
"env": {}
}
}
}You can also add it via the Claude Code CLI:
claude mcp add ssh-remote -- node /path/to/mcp-ssh-remote/index.js --host myserverBastion / ProxyCommand example
If ~/.ssh/config contains:
Host myserver
HostName 10.0.0.5
User alice
ProxyCommand ssh bastion nc %h %pThen just pass --host myserver — the ProxyCommand is followed automatically.
Tools
File Operations
Tool | Description |
| Run any shell command (configurable timeout, up to 10 min) |
| Read a remote file (supports |
| Write content to a remote file (creates parent dirs, handles large files) |
| Find-and-replace a unique string in a remote file |
| List files in a remote directory ( |
| Search file contents with regex (recursive, with file filtering) |
| Find files by glob pattern |
Slurm Job Management
Tool | Description |
| Show job queue (current user or all users) |
| Submit a batch job (from script path or inline script content) |
| Cancel a job by ID |
| Get detailed job info ( |
| Tail stdout/stderr logs of a running or completed job |
| Concise summary of an array job: completed/running/pending/failed counts, failed task IDs |
| Identify failed tasks in an array job and resubmit only those |
Sync & Utilities
Tool | Description |
| Rsync a local directory to the remote host (with exclude patterns, dry-run, delete) |
| Rsync a remote directory to local (pull results back) |
| Pull latest git changes in a remote directory |
| Read the last N lines of a remote file (useful for monitoring logs) |
| Check disk usage of a file or directory (with optional depth) |
Typical Workflow
1. Edit code locally → Claude Code's native Edit/Write tools
2. Sync to remote → rsync_to_remote (quick) or git push + git_pull_remote (committed)
3. Submit a Slurm job → slurm_submit
4. Monitor training → slurm_status + slurm_log
5. Read results → read_file, grep_filesExample conversation:
You: "Change the learning rate to 1e-4 in train.py"
Claude: [edits local file]
You: "Sync and submit on gpu31 with 4 GPUs"
Claude: [rsync_to_remote] → [slurm_submit -p gpu31 --gres=gpu:4]
You: "How's it going?"
Claude: [slurm_status] → [slurm_log]Usage
node index.js --host <hostname><hostname> must match a host you can reach with ssh <hostname> — an IP, a hostname, or a Host alias from ~/.ssh/config.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Run commands and read/write files on your servers over Termalin's keyless tunnels (hosted MCP).
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables remote file operations and command execution across multiple machines via SSH. Supports reading files, listing directories, and running commands on any host configured in your SSH config.-
- AlicenseAqualityAmaintenanceEnables secure remote command execution and file operations over SSH/SFTP with automatic authentication resolution. Features built-in diagnostics that identify connection issues—such as stale host keys, unloaded agents, or permission errors—and provide specific commands to fix them.21192 npm5MIT
- AlicenseAqualityDmaintenanceEnables SSH remote command execution on any host using the system ssh binary, supporting existing configurations like ssh-agent, ProxyCommand, and jump hosts.230 npmMIT
- AlicenseCqualityFmaintenanceEnables SSH remote command execution on remote machines with persistent connections, supporting automatic key discovery and connection pooling.28 npmMIT