Ssh MCP Server

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

Local serverstdio

What is the Ssh MCP Server?

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

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).

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

MCP server for executing shell commands on remote hosts via SSH. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.