Ssh MCP Server

MCP server for executing shell commands on remote hosts via SSH.

Local serverstdio

What is the Ssh MCP server?

If you already use Ssh, the ssh mcp server is the piece that lets your assistant work with it directly. MCP server for executing shell commands on remote hosts via SSH.

What the server does

Built on somamcp — a functional MCP framework over FastMCP with telemetry, introspection, and backend abstraction.

  • Single exec tool — — runs a shell command on the remote host, returns stdout. stderr surfaces as a structured error
  • Four auth modes — — password, key file, key from environment variable (e.g. injected by envpkt, Vault, Doppler), or SSH_AUTH_SOCK (system ssh-agent, 1Password, Bitwarden Desktop, KeePassXC)
  • Smart path expansion — — --key supports ~, $VAR, ${VAR}, and relative paths via functype-os. Unresolved variables fail fast with a typed error
  • OS-user fallback — — --user defaults to the current OS username when omitted
  • Fail-fast auth — — the SSH key is loaded and validated at server startup, not on the first exec call
  • Introspection out-of-the-box — — soma_health, soma_capabilities, soma_connections auto-registered by somamcp

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • exec — Execute a shell command on the remote SSH server and return stdout
  • soma_health — Server uptime, status, active session count
  • soma_capabilities — Enumerate registered tools, resources, and prompts
  • soma_connections — Gateway connection status (unused here)

Installation

Installation goes through your MCP client rather than a global install: point it at @modelcontextprotocol/inspector on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Credentials and setup notes

Configuration is passed through the environment: MY_SSH_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Ssh's toolset — exec, soma_health, soma_capabilities and 1 more — is a fair guide to whether it matches your workflow. It is maintained by jordanburke; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • 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.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
execExecute a shell command on the remote SSH server and return stdout.
soma_healthServer uptime, status, active session count.
soma_capabilitiesEnumerate registered tools, resources, and prompts.
soma_connectionsGateway connection status (unused here).

How to install the Ssh MCP server

{
  "mcpServers": {
    "ssh-client": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"],
      "env": {
        "MY_SSH_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
MY_SSH_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Ssh to exec.
  • Use Ssh to soma health.
  • Use Ssh to soma capabilities.

Frequently asked questions

It connects Ssh to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (exec, soma_health, soma_capabilities, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ssh directly.