SSH MCP Server logo

SSH MCP Server

Manage SSH connectivity, remote commands, SFTP files, diagnostics, keys, and parallel execution through MCP.

Install SSH MCP Server

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": {
    "ssh-mcp-server-2": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/ssh-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 21 tools correctly ().

Overview

SSH MCP Server manages local SSH readiness and exposes remote execution and SFTP operations as MCP tools. It can start an ssh-agent, inspect keys and effective configuration, test connectivity, repair stale known-host entries, and diagnose failures. Remote commands run through the login shell, while file operations use SFTP and reuse pooled SSH connections. Reach for it when an AI agent needs to operate on remote hosts, troubleshoot SSH authentication, inspect services, or run the same command across multiple machines.

Use cases

  • Run commands on remote servers
  • Diagnose SSH agent and host-key failures
  • Transfer and inspect remote files
  • Check services and tail logs
  • Execute the same command across multiple hosts

Key features

  • Remote shell execution with structured status, stderr, and stdout
  • SFTP file management and transfers
  • SSH agent, key, config, and known_hosts diagnostics
  • Parallel execution across multiple hosts
  • Connection pooling with configurable capacity
  • Remote file search, log tailing, and systemd status checks

Tools21

What SSH MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~6.1k 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

Recent health check succeeded.

19/19 checks healthy over the last 62d

What it can do

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

Runs commands · 2Can delete or modify data · 3Writes files · 1Handles credentials · 21Makes network requests · 10Read-only tools · 16
Unusual tool instructions. 2 tool descriptions 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 age218 days
Maintainers1

Observed 2026-11-13 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 15d ago via OSV.dev · @yawlabs/ssh-mcp (npm)

Adoption & maintenance

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

GitHub stars6Stargazers on the source repository.
npm downloads2.9kPackage downloads in the last 30 days.
Last commit6d 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 exposed21Callable tools this server registers over MCP.
Directory activity19 viewsConfig copies, upvotes, and views on AllMCPs.

How SSH MCP Server works

What SSH MCP Server does

SSH MCP Server gives an MCP-compatible agent tools for working with remote hosts over SSH and SFTP, while also managing the local SSH environment used to establish those connections. Remote execution supports shell syntax such as pipes, redirects, and globs. SFTP tools cover file reads and writes, uploads and downloads, directory listing and creation, metadata inspection, and deletion.

The server also handles common SSH troubleshooting tasks. It can ensure an ssh-agent is available, list private keys and their agent state, load a key, resolve the effective SSH configuration for a host, test connectivity, check Git-over-SSH authentication, and replace a stale known_hosts entry. Failed remote operations automatically include diagnostic results in their error response.

How it works

Install or run the package as a standard stdio MCP server. A typical client configuration launches npx -y @yawlabs/ssh-mcp@latest; a globally installed package can instead be started with ssh-mcp. On Windows, the configuration uses cmd /c before npx because Node.js cannot directly spawn .cmd files in that setup.

Connections are pooled and reused for repeated operations against the same host. Idle connections remain available for 60 seconds after their last use. The default pool limit is 100 connections, and calls wait for a slot when the pool is occupied. ssh_multi_exec uses the same pool and runs commands across multiple hosts in parallel, with its timeout applying per host rather than to the complete fan-out.

Setup and configuration

Add the server to the MCP client's server configuration with a command such as:

config.json
{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": ["-y", "@yawlabs/ssh-mcp@latest"]
    }
  }
}

Use npm install -g @yawlabs/ssh-mcp when you prefer a globally installed, pinned package, then set the command to ssh-mcp. The optional SSH_MCP_MAX_POOL_SIZE environment variable changes the connection limit. Optional SSH_MCP_COMMAND_WHITELIST and SSH_MCP_COMMAND_BLACKLIST policies apply to ssh_exec and ssh_multi_exec; checks are made against the command including any per-call environment prefix.

Tools and capabilities

  • Execute shell commands on one host with ssh_exec, including per-call environment variables and status, stderr, and stdout blocks.
  • Run a command across multiple hosts with ssh_multi_exec and receive results per host.
  • Read and write remote files, transfer files in either direction, list directories, inspect metadata, create directories, and delete files or empty directories through SFTP.
  • Search remote files with structured parameters, read the end of logs with optional filtering, and inspect systemd service status.
  • Check SSH connectivity, Git hosting authentication, agent state, keys, configuration, and known_hosts entries.
  • Automatically add diagnostic context when remote operations fail.

Limitations and notes

Whole-file reads are limited to 10 MB. Large results can also be truncated by an MCP proxy, so commands should filter or page output remotely; paged file reads use byte offsets and lengths. The SFTP tools wait up to 30 seconds for a pool slot by default.

ssh_delete handles files, symlinks, and empty directories but intentionally does not perform recursive directory deletion. Use ssh_exec with an explicitly destructive command when recursive removal is required. Command allowlists and denylists do not protect SFTP writes, uploads, directory creation, or deletion. In particular, ssh_upload can read any local file accessible to the server process and send it to the remote host. Relative paths are supported by ssh_mkdir; ~ is not expanded by SFTP.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about SSH MCP Server

SSH MCP Server is an MCP server that connects AI agents to remote hosts over SSH and SFTP. Its main tools execute shell commands, transfer and manage files, test connectivity, diagnose SSH configuration, manage keys, inspect services, and run commands across multiple hosts in parallel.

Install it by adding `npx -y @yawlabs/ssh-mcp@latest` as the command and arguments in your MCP client configuration. You can also install `@yawlabs/ssh-mcp` globally with npm and start it using `ssh-mcp`. Windows configurations should invoke npx through `cmd /c`.

Use `ssh_diagnose` for a full check of the agent, loaded keys, known_hosts, SSH configuration, and a test connection. Use `ssh_agent_ensure` for agent-related failures, `ssh_key_list` and `ssh_key_load` for key management, or `ssh_config_lookup` to inspect effective host settings.

Yes, `ssh_multi_exec` runs one command across multiple hosts in parallel and returns a result for each host. Parallelism is limited by `SSH_MCP_MAX_POOL_SIZE`, which defaults to 100, and the `timeout` value applies separately to each host.

Yes, its SFTP tools can read and write remote files, upload local files, download remote files, list directories, inspect metadata, create directories, and delete files or empty directories. Whole-file reads are limited to 10 MB, with offset and length parameters available for paged reads.

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