Skip to main content
Glama
klNuno

fast-mcp-ssh

by klNuno

An MCP server that gives a model real SSH access: one connection per host kept alive across calls, a PTY shell that remembers cd and export, SFTP instead of cat > file, host-to-host copies that never touch your disk, a screenshot of the remote desktop, regex guards before anything leaves your machine, and an append-only audit log. Answers come back as TOON, roughly 40 percent fewer tokens than JSON on tabular data.

Install

cargo install fast-mcp-ssh

Or take a prebuilt binary from the latest release and check it against the matching .sha256. Linux and macOS ship x86_64 and aarch64, Windows ships x86_64.

Copy hosts.example.toml to ~/.fast-mcp-ssh/hosts.toml and fill in your hosts. Keys go in ~/.fast-mcp-ssh/keys/<name>; auth is key, agent or password.

Related MCP server: Shuttle

Wire it up

.mcp.json, or claude_desktop_config.json for Claude Desktop:

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

In the MCP registry it is mcp-name: io.github.klNuno/fast-mcp-ssh.

Tools

host is optional on every tool once [defaults] default_host is set.

Group

Tools

Run

exec exec_batch sh interrupt

One-shot, parallel fan-out, persistent PTY, Ctrl-C

Files

ls stat dn up cp wr mkdir rm tail

SFTP, plus tail -n / tail -F in a bounded window

Visual

shot

Screenshots the remote desktop, downscaled before it reaches the model

Ops

facts sys svc

Cached host profile, parsed ps/df/mem/net, systemd units

Session

hosts ping disconnect disconnect_all reload

Discovery and lifecycle; reload swaps config without a restart

Network

forward unforward forwards

Local TCP forwards over the same connection

Every tool carries MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so a client can gate destructive calls.

Security

  • Guards run before any SSH packet. deny_patterns refuse outright, confirm_patterns trigger an MCP elicitation, and a client that cannot elicit is denied. read_only = true blocks anything that looks like a write.

  • Paths are checked on both sides. Remote reads of keys, shadow files and cloud credentials are refused, and so are local writes that would land in your ~/.bashrc or an autostart folder. Paths are re-checked after the server resolves them, so a symlink cannot launder a blocked target.

  • Host keys are pinned (TOFU by default, strict and per-host fingerprints available). Every call is appended to ~/.fast-mcp-ssh/audit.log as NDJSON, with credentials scrubbed.

Guards are a speed bump against accidents, not a boundary against an adversary who controls the model. Scope the remote account accordingly: full threat model in SECURITY.md.

Benchmark

50 iterations per scenario against the same Linux host over the same LAN, same SSH key, bench client on Windows 11. Medians, lower is better. Reproduce with benchmark/; raw runs in benchmark/results/.

fast-mcp-ssh

mcp-ssh-manager

ssh-mcp-server

Cold start

41 ms

289 ms

279 ms

exec echo ok

1.5 ms

89.9 ms

45.1 ms

exec uname -a; whoami; pwd

2.4 ms

89.0 ms

46.1 ms

exec seq 1 5000 (~29 KB)

18.7 ms

90.5 ms 1

46.3 ms

Write a 1 KB file

1.4 ms

90.9 ms

45.7 ms

Read a 1 KB file

2.1 ms

90.8 ms

45.8 ms

Tool surface, sent every session

23 tools, 17.6 KB

37 tools, 39.9 KB

4 tools, 1.7 KB

Both alternatives are Node processes, so ~250 ms of their cold start is the runtime booting. The steady-state gap is the connection: fast-mcp-ssh keeps one SSH session per host and spawns a channel per call, while the other two reconnect. Writes go over SFTP here and through a cat > file heredoc there.

returning the same output. ssh-mcp-server returns raw stdout with no exit code, which is why its replies are the shortest and why a failed command looks like a successful one.

Development

cargo install --path .        # build and install from a clone
cargo test                    # unit tests
cargo clippy --all-targets    # no warnings allowed in CI
./scripts/test-sh.ps1         # end-to-end against a real host (Windows)

Never write to stdout outside the MCP transport: a stray println! corrupts the JSON-RPC stream and the client disconnects without an error. tracing macros go to stderr and are safe.

License

MIT.

  1. mcp-ssh-manager truncates that response to 12 KB, so it is not

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to securely execute remote SSH commands, perform file transfers, and monitor system status through a standardized interface. It features robust security controls including command whitelisting, blacklisting, and credential isolation to prevent unauthorized operations.
    Last updated
    10
    44
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables AI assistants to securely execute SSH commands on remote servers with connection pooling, session isolation, and a web audit panel.
    Last updated
    3
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Enables AI assistants to securely execute commands, transfer files, and manage port forwarding on remote servers via SSH.
    Last updated
    135
    36
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.

  • Operate your own Linux servers from your LLM. Requires the SentinelX agent installed per host.

  • Build, validate, and deploy multi-agent AI solutions from any AI environment.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/klNuno/fast-mcp-ssh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server