MCP Remote Ssh logo

MCP Remote Ssh

by faizbawa

Provides agent-controlled SSH sessions with command execution, persistent shells, SFTP, port forwarding, transcripts, and secret redaction.

Install MCP Remote Ssh

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "faizbawa-mcp-remote-ssh": {
      "command": "uvx",
      "args": [
        "mcp-remote-ssh"
      ]
    }
  }
}

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

Automated check passed— started and listed 24 tools correctly (1mo ago).

Overview

The faizbawa/mcp-remote-ssh MCP server lets AI agents connect to remote hosts, run commands, use persistent shells, transfer files, and create SSH port forwards. It maintains session IDs and returns structured command results, including standard output, errors, and exit codes. A local environment file can supply remote-session secrets without returning their values to the agent; matching values are redacted from supported tool responses. Reach for it when an agent needs controlled SSH-based administration, remote builds, file operations, or access to services reachable only through a remote host.

Use cases

  • Connect to a test or lab host and run diagnostic commands
  • Open a persistent shell for long builds or screen and tmux workflows
  • Transfer files between the local machine and a remote host
  • Load local deployment secrets without exposing their values to the agent
  • Tunnel a local port to a service reachable from the remote host

Key features

  • Password, key, and SSH-agent authentication
  • Structured command and sudo execution
  • Persistent interactive shells
  • SFTP file operations
  • SSH port forwarding
  • Secret injection with literal-output redaction

Tools24

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

Verified live~3.3k 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 1d ago

Recent health check succeeded.

20/20 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · mcp-remote-ssh (PyPI)

Adoption & maintenance

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

GitHub stars12Stargazers on the source repository.
Last commit2mo 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 exposed24Callable tools this server registers over MCP.
Directory activity12 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Remote Ssh works

What faizbawa/mcp-remote-ssh MCP server does

The faizbawa/mcp-remote-ssh MCP server exposes SSH operations through MCP. An agent can create a connection using password, private-key, or SSH-agent authentication, receive a session ID, and use that ID with later tools. Sessions can be listed or closed, and closing one also releases its shell, SFTP connection, and port forwards.

Command execution returns structured output rather than only a text stream. The server also supports sudo commands, local-to-remote port forwarding, remote file operations through SFTP, and reading text files from the remote host. These capabilities suit remote administration, test machines, CI hosts, lab systems, and development environments where an agent must perform several related operations over SSH.

How it works

The MCP process runs on the local machine and opens SSH connections to the selected remote hosts. Ordinary execution uses an independent channel for each command, so working-directory changes and other shell state do not carry between calls. For stateful work, an agent can open an interactive shell; that shell keeps its current directory, environment, and running processes across send, read, wait, and control-character operations.

Secrets are loaded from a file on the local MCP host with ssh_load_env_file. The file uses common .env syntax, including comments, quoted values, and optional export prefixes. Values are retained in memory, supplied to the remote session, and registered for literal-value redaction. Responses from command execution, shell I/O, and remote text-file reads replace matching values with ***. Clearing the secret registry stops future redaction but does not remove variables already exported in the remote shell.

Setup and configuration

Install the package with uvx mcp-remote-ssh, or install it with pip install mcp-remote-ssh. A stdio MCP client configuration uses uvx as the command and mcp-remote-ssh as its argument:

config.json
{
  "mcpServers": {
    "remote-ssh": {
      "command": "uvx",
      "args": ["mcp-remote-ssh"]
    }
  }
}

Connection credentials are supplied when calling ssh_connect; the material does not specify startup environment variables. The remote host must accept the selected SSH authentication method. Unknown host keys are accepted automatically through Paramiko's AutoAddPolicy, which avoids prompts for new machines but leaves first connections vulnerable to man-in-the-middle attacks.

Tools and capabilities

The faizbawa/mcp-remote-ssh MCP server includes tools for:

  • Creating, listing, and closing SSH sessions.
  • Running regular and sudo commands with structured results.
  • Opening persistent shells, sending input, reading buffered output, waiting for patterns or stable output, and sending control characters.
  • Loading local environment files, registering secret values for redaction, and clearing the redaction registry.
  • Uploading, downloading, reading, writing, and listing remote files through SFTP.
  • Opening, listing, and closing local-to-remote port forwards. A requested local port of zero selects an available port.
  • Recording command and shell activity, retrieving transcripts as text or JSONL, and saving transcripts to a local file.

Transcript recording is disabled by default and can be enabled when connecting or started later. Recorded command and shell output is redacted before it is stored. Transcripts kept in memory are lost when the session closes unless saved or retrieved first.

Limitations and notes

Secret redaction covers literal values. Encoded or otherwise transformed versions of a secret are not detected. ssh_clear_secrets also does not unset variables that have already been exported in a remote shell.

Closing a session terminates running processes associated with that session. Remote file reads return text and can be limited with a maximum byte setting for larger files.

Reviews

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

Frequently Asked Questions about MCP Remote Ssh

Run `uvx mcp-remote-ssh`, or install it with `pip install mcp-remote-ssh`.

It reads environment variables from a local file, injects them into the remote session, and replaces literal secret values with `***` in supported tool responses. Encoded or transformed values are not redacted.

Yes. `ssh_shell_open` creates a persistent shell that preserves the working directory, environment, and running processes across send and read calls.

Yes. It provides tools for uploading, downloading, reading, writing, and listing remote files, as well as creating and managing local-to-remote port forwards.

The material shows a generic MCP configuration using `command: "uvx"` and `args: ["mcp-remote-ssh"]`, but it does not specifically name Claude Desktop.

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 PreviewMCP Remote Ssh AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/faizbawa-mcp-remote-ssh?style=directory)](https://allmcps.com/mcp/faizbawa-mcp-remote-ssh)
HTML Embed
<a href="https://allmcps.com/mcp/faizbawa-mcp-remote-ssh"><img src="https://allmcps.com/api/badge/faizbawa-mcp-remote-ssh?style=directory" alt="MCP Remote Ssh on AllMCPs" /></a>