Skip to main content
Glama
the-nine-nation

Remote SSH MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SSH_MCP_CONFIGNoConfiguration file path
SSH_MCP_SSH_PATHNoOpenSSH executable
SSH_MCP_AUDIT_LOGNoJSONL audit-log path
SSH_MCP_SSH_CONFIGNoSSH config path
SSH_MCP_MAX_SESSIONSNoMaximum live sessions
SSH_MCP_ALLOWED_HOSTSNoComma-separated additional Host aliases
SSH_MCP_MAX_TIMEOUT_SECNoHard command-timeout limit
SSH_MCP_IDLE_TIMEOUT_SECNoIdle session lifetime
SSH_MCP_OPEN_TIMEOUT_SECNoConnection and handshake timeout
SSH_MCP_OUTPUT_MAX_BYTESNoPer-stream retained output limit
SSH_MCP_OUTPUT_HEAD_BYTESNoRetained head bytes when truncating
SSH_MCP_DEFAULT_TIMEOUT_SECNoDefault command timeout
SSH_MCP_INTERRUPT_GRACE_SECNoMarker recovery grace period after Ctrl-C

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
}

Tools

Functions exposed to the LLM to take actions

NameDescription
ssh_hostsA

List allowed OpenSSH Host aliases discovered from the local ssh_config (and explicit allowlist). Returns only safe connection metadata: alias, hostname, user, port, proxy_jump. Never returns private keys, IdentityFile paths, agent sockets, or ProxyCommand. Pass reload=true after editing ~/.ssh/config to re-parse without restarting the MCP server. Use an alias from this list with ssh_open.

ssh_openA

Open a new persistent remote bash shell for an allowed ssh_config Host alias from ssh_hosts. Each call creates a clean session with a new id. Credentials come only from local OpenSSH configuration/agent; passwords and private keys are never accepted as arguments and must not be read from disk by the model.

ssh_runA

Start a non-interactive command in the same persistent shell identified by id. cwd and environment changes persist. The call waits at most wait_sec (default 10 seconds); if the command is still active it returns status=running without stopping it. Commands have no automatic execution timeout by default. Only an explicitly provided timeout_sec sends Ctrl-C at that deadline. Never retry a running command: poll with ssh_peek(wait_sec=...) so the MCP call blocks until idle or the wait expires; do not spam peeks with wait_sec=0. Call ssh_interrupt to stop it, or open another session for concurrent work. Only one foreground command may run per id. Do not use vim, top, password prompts, or other interactive TUI/input flows.

ssh_peekA

Observe the current foreground command and its latest output without starting another command. When status=running, optional wait_sec (default 0) long-polls this MCP call until the command finishes or the wait expires—prefer a positive wait_sec over busy-looping. wait_sec never stops the remote command. Returns the newest lines in chronological order, limited independently for stdout and stderr; lines defaults to 50 and is capped to protect model context. Use after ssh_run returns status=running. When idle, returns immediately with cwd, last exit code, and the latest lines from the completed command.

ssh_interruptA

Send Ctrl-C to the current foreground process group and wait for the shell protocol to recover. The session is kept only when recovery is confirmed. Returns nothing_to_interrupt when idle.

ssh_listA

List all live sessions with host, cwd, state, last exit code, idle time, idle-reap countdown, and connection capacity. Use this to recover valid ids; never invent one.

ssh_closeA

Close the remote shell and SSH connection, clean its private temporary directory, and invalidate the id. Close a dirty session and call ssh_open for a clean environment.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/the-nine-nation/remote-ssh-mcp'

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