# fast-mcp-ssh [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/klNuno/fast-mcp-ssh  
**GitHub Stars:** 5  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/fast-mcp-ssh

## Description
SSH, SFTP and persistent PTY shells for AI agents. One Rust binary, no runtime.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/klNuno/fast-mcp-ssh), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cargo install fast-mcp-ssh
```

2. Install:

```sh
cargo install --path .        # build and install from a clone
```

## Documentation

## What fast-mcp-ssh MCP server does

The fast-mcp-ssh MCP server exposes remote administration functions to MCP-compatible AI clients through a single Rust executable. It connects to hosts over SSH and provides command execution, SFTP file operations, persistent PTY shells, remote desktop screenshots, host inspection, systemd service queries, and local TCP forwarding.

Commands can run once, in batches, or inside a named PTY session. PTYs retain state between calls, including changes made with `cd` and `export`. File operations include listing, metadata inspection, upload, download, copy, writing, directory creation, removal, and bounded or following tails. The `cp` operation can transfer files between two configured hosts without placing the content on the local disk or sending it to the model.

## How it works

The server maintains one SSH connection per host and opens channels for individual calls. A default host can be configured, making the `host` argument optional for tools.

Remote screenshots use an available utility such as `grim`, `gnome-screenshot`, `spectacle`, ImageMagick `import`, or `scrot`. The image is downscaled locally before being returned to the model. Host profiles, parsed process, disk, memory, and network information, and systemd unit data are available through the operations tools.

MCP protocol revisions from `2024-11-05` through `2026-07-28` are supported and selected per peer. Long-running calls can return task handles for polling when the client supports the relevant extension. Tool metadata includes read-only, destructive, idempotent, and open-world annotations.

## Setup and configuration

Install the fast-mcp-ssh MCP server with Cargo or use a release binary. The documented platforms are Linux, macOS, and Windows; release binaries include Linux and macOS x86_64 and aarch64 builds, plus Windows x86_64.

Copy `hosts.example.toml` to `~/.fast-mcp-ssh/hosts.toml` and define the hosts. Keys are stored under `~/.fast-mcp-ssh/keys/<name>`. Authentication can use a key, an SSH agent, or a password. Add the executable as an MCP stdio server in `.mcp.json` or an equivalent client configuration:

```json
{
  "mcpServers": {
    "ssh": {
      "type": "stdio",
      "command": "fast-mcp-ssh"
    }
  }
}
```

## Tools and capabilities

- Run commands with `exec`, parallel work with `exec_batch`, persistent shells with `sh`, and interruption with `interrupt`.
- Manage remote files with SFTP-backed tools such as `ls`, `stat`, `up`, `dn`, `wr`, `mkdir`, `rm`, and `tail`.
- Inspect hosts with `facts`, parsed system data with `sys`, and systemd units with `svc`.
- Manage configured hosts and sessions with `hosts`, `ping`, `disconnect`, `disconnect_all`, `reload`, and `shells`.
- Create, inspect, and remove local TCP forwards over an existing SSH connection using `forward`, `forwards`, and `unforward`.
- Capture a remote desktop with `shot`.

## Limitations and notes

The fast-mcp-ssh MCP server applies deny patterns, confirmation patterns, and optional read-only mode before sending SSH traffic. Path checks cover sensitive remote reads and local writes, run for path-taking tools, and are repeated after path resolution. Host keys use TOFU by default, with strict checking and per-host fingerprints available. Calls are recorded as credential-scrubbed NDJSON in `~/.fast-mcp-ssh/audit.log`.

These controls are intended to prevent accidents rather than protect against a model that is actively controlled by an attacker. The README recommends limiting the remote account accordingly. Clients that cannot answer a confirmation request are denied the operation. The server must keep stdout reserved for MCP transport; diagnostic tracing should go to stderr.

_Full upstream README: https://allmcps.com/mcp/fast-mcp-ssh/readme_

