Skip to main content
Glama
Pothome

SSH MCP Server

by Pothome

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
keyNoQuick start: Path to private key.
hostNoQuick start: SSH host (creates single-profile config).
portNoQuick start: SSH port.22
userNoQuick start: SSH username.
groupNoQuick start: Policy tier — prod, staging or dev.prod
configNoPath to TOML config file. Defaults to the platform config directory.
opaUrlNoOPA sidecar URL for external policy.
timeoutNoCommand timeout in ms.60000
workdirNoQuick start: Working directory for commands and sessions.
httpHostNoHTTP bind address.127.0.0.1
httpPortNoHTTP transport port.3000
maxCharsNoMax command length. Use 'none' or '0' to disable the limit.5000
rateLimitNoMax authenticated requests per minute, per client (0 = unlimited).0
transportNoTransport type: stdio or http.stdio
sessionMaxNoMax concurrent sessions per connection.5
sessionTtlNoIdle timeout of an SSH session in ms.600000
trustProxyNoRead the client address from X-Forwarded-For, but only when the peer is the proxy.false
SSH_MCP_KEYNoPath to private key for SSH authentication.
bearerTokenNoBearer token for HTTP transport auth (required for --transport=http).
hostKeyModeNoHost key verification mode: tofu | strict | insecure.tofu
allowedHostsNoComma-separated Host headers accepted by the DNS-rebinding guard. Defaults to bind address + localhost.
commandQuotaNoMax commands per rolling 24h per profile (0 = off).0
opaTimeoutMsNoHow long to wait for the OPA sidecar.10000
otelEndpointNoOTLP/HTTP endpoint for OpenTelemetry traces.
SSH_AUTH_SOCKNoSSH agent socket (recommended for authentication).
opaFailClosedNoRefuse every command while OPA is unreachable, instead of falling back to local policy.false
dumpToolHashesNoPrint SHA-256 hashes of the tool descriptions and exit.
httpSessionTtlNoIdle timeout of an MCP client session over HTTP, in ms.1800000
trustedProxiesNoComma-separated peer addresses allowed to send X-Forwarded-For. Empty means loopback only.
XDG_CONFIG_HOMENoBase directory for the ssh-mcp config file (Linux/macOS).
disableApprovalNoSkip the approval gate (quick start profile only).false
insecureHostKeyNoDisable host key verification for hosts with no trustedHostKey (test only!).false
otelServiceNameNoService name reported on trace spans.ssh-mcp
strictConfigAclNoWindows: refuse on every ACL finding, including a read-only over-grant.false
SSH_MCP_PASSWORDNoPassword for SSH authentication (if using auth=password).
approvalGrantTtlNoAuto-approve an identical command for this many ms after approval (0 = off).0
auditEntropyScanNoEnable entropy-based secret scanning in audit.false
authFailureLimitNoFailed bearer-auth attempts allowed per client per minute (0 = off).10
auditTamperEvidentNoEnable hash-chained tamper-evident audit log.false
SSH_MCP_SUDO_PASSWORDNoPassword for sudo elevation.
allowUncheckedConfigAclNoWindows: report every ACL finding and refuse none.false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list-connectionsA

List all configured SSH profiles and their connection status. Use this to discover available hosts before running commands.

list-sessionsB

List active sessions for a given SSH profile.

open-sessionA

Open a named session on a remote host. Use type="interactive" for stateful shell (CWD/env persists between commands) or type="background" for long-running processes.

close-sessionA

Close a named session. A background session's command is signalled on the host (INT, then TERM, then KILL) before its channel is dropped; an interactive session's shell is ended. The response says so if the command could not be signalled or had not stopped in time.

read-session-outputA

Read recent output from a background session (e.g., tail -f logs).

read-commandA

Execute a READ-ONLY command from an allowlist (ls, cat, grep, find, stat, df, etc.). This tool does NOT modify the system. Prefer this tool for all read operations. Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

run-commandA

Execute an arbitrary shell command on the remote server. May modify the system. Commands classified destructive or privileged go through the approval gate; approvalPolicy on the profile decides whether that is a prompt, an automatic allow, or a refusal. Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

privileged-commandA

Execute a command with sudo elevation. Goes through the approval gate; approvalPolicy on the profile decides whether that is a prompt, an automatic allow, or a refusal. The sudo password is piped via stdin (never visible in process list). Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

signal-processA

Send a signal (INT, TERM, KILL) to a remote process by PID.

sftp-uploadA

Upload a file to the remote server via SFTP (secure file transfer, not shell-based). Replaces an existing file at that path unconditionally — there is no overwrite flag and no way to require a new destination.

sftp-downloadB

Download a file from the remote server via SFTP.

sftp-listA

List a remote directory over SFTP, with a bounded number of entries and a bounded response size. Read-only.

sftp-upload-fileA

Upload a local file to the remote host over SFTP, streaming it without passing the contents through model context. The local file must be inside the transferRoot directory the operator configured; without that setting this tool refuses. Use this for binary or large files; use sftp-upload for short text you already have.

sftp-download-fileA

Download a remote file to local disk over SFTP, streaming it without passing the contents through model context. The destination must be inside the transferRoot directory the operator configured; without that setting this tool refuses. Use this for binary or large files; use sftp-download when you need to read the contents.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
connectionsList all SSH profiles and their connection status

TDQS

A3.9/5.0

Scored across 14 tools

Disambiguation4/5

read-command/run-command/privileged-command are well-differentiated by scope and approval behavior, and sessions vs. commands are clearly separated. The one weak spot is the sftp-upload vs. sftp-upload-file (and sftp-download vs. sftp-download-file) pairs, where the naming implies the non-suffixed tool is not a file upload; the descriptions do resolve this, but it's a real risk of misselection.

Naming Consistency4/5

Names consistently use kebab-case verb_noun (list-connections, open-session, run-command, sftp-upload). The sftp-upload/sftp-upload-file pattern is a minor deviation that introduces confusing semantics rather than a clean distinct verb.

Tool Count5/5

14 tools is well within the sweet spot and each tool earns its place: discovery, session lifecycle, command execution tiers, process signalling, and bidirectional SFTP. Nothing feels padded or redundant.

Completeness4/5

Strong lifecycle coverage: connect, open/close sessions, read output, read/run/privileged commands, signal, and both content-based and streamed file transfer. Minor gaps remain — no SFTP delete, mkdir, rename, or remote file-mutation operations, which an agent may need for full remote file management.

Maintenance

ActivityActive
ResponsivenessNo issues