Remote Ssh MCP logo

Remote Ssh MCP

Maintains stateful remote Bash sessions over OpenSSH, with MCP tools for running, monitoring, interrupting, and discovering SSH hosts.

Install Remote Ssh MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "remote-ssh-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@zyluo/remote-ssh-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 7 tools correctly (6d ago).

Overview

The remote-ssh-mcp MCP server gives AI agents persistent remote Bash sessions through the local OpenSSH client. It keeps the working directory, environment variables, and shell side effects between commands while using session IDs to address connections. Long-running commands can be checked with polling and interrupted when needed. Reach for it when multi-step deployment, debugging, build, or log-inspection workflows would otherwise reconnect over SSH for every command.

Use cases

  • Run multi-step deployments on a configured SSH host
  • Inspect remote logs without reconnecting for every command
  • Build or download artifacts with polling for long-running work
  • Debug a remote environment while preserving shell state

Key features

  • Persistent stateful Bash sessions
  • Native OpenSSH configuration and agent support
  • Polling and interruption for long-running commands
  • Allowlisted SSH host discovery
  • Separated and truncated command output
  • JSONL auditing with hashed commands

Tools7

What Remote Ssh MCP lets your agent do. Expand a tool for its parameters.

Verified live~1.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

7/7 checks healthy over the last 46d

What it can do

From the 7 tools this server returned when we ran it; 7 declare their own safety hints.

Runs commands · 4Can delete or modify data · 3Handles credentials · 7Makes network requests · 5Read-only tools · 3
Unusual tool instructions. 1 tool description contain text aimed at the AI model rather than at you (reaches for local secrets). Read the tool descriptions before connecting.
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age74 days
Maintainers1

Observed 2026-10-18 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · @zyluo/remote-ssh-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads163Package downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed7Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Remote Ssh MCP works

What remote-ssh-mcp MCP server does

The remote-ssh-mcp MCP server exposes stateful SSH access as MCP tools for AI agents. It runs on the machine hosting the MCP client and connects to remote systems through that machine’s OpenSSH installation. Remote hosts do not need Node.js, an MCP process, or a package installation; they need a normal SSH-accessible shell account and the command-line tools required by the session wrapper.

Each opened session represents a long-lived remote Bash process. Later commands use the same session, so changes such as cd, exported variables, and activated virtual environments remain available. Opening another session provides a separate environment when a clean state is needed.

How it works

The MCP process starts the system ssh binary rather than implementing its own SSH protocol. OpenSSH continues to handle the local SSH configuration, known-host checks, agent use, jump hosts, and hardware-key workflows. Connections use host aliases from the local SSH configuration and are restricted to an exact allowlist; wildcard patterns are not accepted.

An agent first discovers permitted aliases with ssh_hosts or opens a connection with ssh_open. The returned session ID is then supplied to ssh_run, ssh_peek, and ssh_interrupt. A command runs for a bounded wait period. If it continues beyond that period, the tool reports that it is still running, allowing the agent to poll output instead of creating a new connection. ssh_close releases a session when it is no longer needed.

Command results separate standard output from standard error. Output is cleaned of terminal control noise and truncated at the head and tail when it exceeds the configured limits, reducing unnecessary MCP result size.

Setup and configuration

Install and run remote-ssh-mcp on the local development machine or other host where the MCP client runs. The project targets Node.js 20 or newer and uses MCP stdio transport, so the client must be configured to launch the server as a local stdio process. The repository also publishes the package as @zyluo/remote-ssh-mcp.

Configure the SSH aliases, users, ports, keys, agent behavior, and ProxyJump routes in the local ~/.ssh/config. The remote-ssh-mcp MCP server uses those OpenSSH settings and does not accept passwords, private-key text, or arbitrary SSH option arguments from the model. It enables batch operation and strict host-key checking.

Tools and capabilities

  • ssh_hosts: list safe metadata for allowed host aliases, with an option to reload configuration.
  • ssh_open: create a persistent session for a required host alias, optionally assigning a label.
  • ssh_run: execute a command in a session, with configurable initial wait and hard timeout values.
  • ssh_peek: retrieve output from a running or recently executed command, with configurable line limits and waiting.
  • ssh_interrupt: send an interrupt to a session when work is stuck or needs to stop.
  • ssh_close: release the shell and SSH connection.

The server supports multiple sessions, idle reaping, session caps, and a JSONL audit log with hashed commands. It also includes a limited denylist for destructive command patterns and closes a session if recovery after an interrupt cannot be confirmed.

Limitations and notes

This is a wrapper around OpenSSH, not a replacement SSH implementation. Access depends on the local client’s SSH configuration, credentials, known-host state, and the remote account’s available shell tools. The built-in command denylist is not a complete authorization policy. Output limits can omit part of a verbose command’s result, although head-and-tail truncation preserves both ends when possible.

The MCP transport is stdio, and the server is intended for MCP hosts that can launch local stdio servers. Remote machines do not run the MCP service; all SSH configuration and auditing described here occur on the machine running the server.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Remote Ssh MCP

remote-ssh-mcp is an MCP server that connects AI agents to remote Bash hosts through the local OpenSSH client. Its main tools open sessions, run commands, inspect output, interrupt running work, discover allowed SSH aliases, and close sessions while preserving shell state between commands.

Install it on the machine running your MCP client, using Node.js 20 or newer and the published @zyluo/remote-ssh-mcp package. Configure the client to launch it over stdio, then make the target hosts available through the local ~/.ssh/config.

Yes, remote-ssh-mcp supports Cursor through MCP stdio transport. Configure Cursor to launch the local server, and ensure that the SSH aliases, authentication setup, known hosts, and any ProxyJump routes are available on the same machine.

Yes, it can leave a command running after the initial wait period and report its status. Use ssh_peek to poll output with an optional wait, or use ssh_interrupt to stop the command when necessary. A hard timeout can also send Ctrl-C.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRemote Ssh MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/remote-ssh-mcp?style=directory)](https://allmcps.com/mcp/remote-ssh-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/remote-ssh-mcp"><img src="https://allmcps.com/api/badge/remote-ssh-mcp?style=directory" alt="Remote Ssh MCP on AllMCPs" /></a>