Ssh MCP Server

An MCP server for SSH connections and file operations.

Local serverstdioPython

What is the Ssh MCP server?

An MCP server for SSH connections and file operations. The ssh mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 9 defined tools rather than through you.

What it actually does

The SSH connection parameters can be configured using environment variables in the MCP settings:

Its toolset

Everything the assistant can do here goes through one of these:

  • connect — Connect to an SSH server
  • disconnect — Disconnect from the SSH server
  • execute — Execute a command on the SSH server
  • upload — Upload a file to the SSH server
  • download — Download a file from the SSH server
  • list_files — List files in a directory on the SSH server
  • Tools — The Tools tool exposed by this server
  • Testing — A test script is provided in the tests directory to verify that the SSH MCP server is working correctly:
  • Debugging — Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the [MCP

Adding it to your client

@modelcontextprotocol/inspector on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need 7 environment variables: SSH_HOST, SSH_PORT, SSH_USERNAME, SSH_PASSWORD, SSH_KEY_PATH, SSH_KEY_PASSPHRASE, UV_PUBLISH_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

When to reach for it

This sits in the file and storage access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Ssh's toolset — connect, disconnect, execute and 6 more — is a fair guide to whether it matches your workflow. It is maintained by t-suganuma; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Ssh.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the ssh mcp server does with a few real requests.

Available tools

ToolWhat it does
connectConnect to an SSH server
disconnectDisconnect from the SSH server
executeExecute a command on the SSH server
uploadUpload a file to the SSH server
downloadDownload a file from the SSH server
list_filesList files in a directory on the SSH server
ToolsThe Tools tool exposed by this server.
TestingA test script is provided in the tests directory to verify that the SSH MCP server is working correctly:
DebuggingSince MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).

How to install the Ssh MCP server

{
  "mcpServers": {
    "ssh-connect": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/ssh-connect",
        "run",
        "ssh-connect"
      ],
      "env": {
        "SSH_HOST": "example.com",
        "SSH_PORT": "22",
        "SSH_USERNAME": "username",
        "SSH_PASSWORD": "password",
        "SSH_KEY_PATH": "/path/to/private_key",
        "SSH_KEY_PASSPHRASE": "key_passphrase"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
SSH_HOSTEndpoint or connection string the server talks to.Optional
SSH_PORTConfiguration value read at startup.Optional
SSH_USERNAMEConfiguration value read at startup.Optional
SSH_PASSWORDConfiguration value read at startup.Optional
SSH_KEY_PATHCredential the server authenticates with.Yes
SSH_KEY_PASSPHRASECredential the server authenticates with.Yes
UV_PUBLISH_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Ssh to connect.
  • Use Ssh to disconnect.
  • Use Ssh to execute.

Frequently asked questions

It supports password authentication via `SSH_PASSWORD` and private key authentication via `SSH_KEY_PATH` (with optional `SSH_KEY_PASSPHRASE`). You must provide at least one of these.