Skip to main content
Glama
Zw-awa

ssh-session-mcp

by Zw-awa

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SSH_KEYNoLocal private key path
SSH_HOSTNoLegacy single-target SSH host
SSH_PORTNoLegacy single-target SSH port22
SSH_USERNoLegacy single-target SSH user
VIEWER_HOSTNoViewer bind host127.0.0.1
VIEWER_PORTNoViewer port or 'auto'0
SSH_MCP_MODENosafe or fullsafe
SSH_PASSWORDNoPassword auth
SSH_MCP_DEBUGNoEnable debug browser actionsfalse
SSH_MCP_LOCALNoLaunch a local shell instead of SSHfalse
SSH_MCP_CONFIGNoExplicit config file pathauto-discovery
SSH_MCP_INSTANCENoRuntime isolation keyproc-<pid>
SSH_MCP_LOG_MODENo'off' or 'meta' JSONL loggingoff
AUTO_OPEN_TERMINALNoAuto-open browser terminalfalse

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
ssh-session-openB

Open a persistent interactive SSH PTY session with automatic idle cleanup and a terminal-style dashboard view.

ssh-session-sendA

Send raw input to an interactive SSH PTY session. Actor is shown inline in the dashboard transcript.

ssh-device-listA

List configured SSH device profiles discovered from ssh-session-mcp.config.json.

ssh-session-readA

Read raw buffered terminal output from an SSH PTY session. Supports optional long-polling for new terminal output.

ssh-session-watchA

Long-poll an SSH PTY session and render a terminal-style dashboard with inline actor markers.

ssh-session-historyA

Read line-numbered session history built from terminal output and user/agent actions.

ssh-session-controlB

Send a control key to an interactive SSH PTY session. Actor is shown inline in the dashboard transcript.

ssh-session-resizeA

Resize the PTY window of an interactive SSH session.

ssh-session-listA

List tracked SSH PTY sessions. Closed sessions are kept briefly for inspection, then automatically pruned.

ssh-session-diagnosticsA

Inspect session health, buffer trim state, viewer attachment state, input lock state, and tracked command metadata.

ssh-session-policy-listB

List the inherited and session-level custom policy rules currently active for an SSH session.

ssh-session-policy-upsertA

Add or update a session-level custom policy rule. Session rules are applied after immutable built-in hard blocks and before the built-in safe/full warning set.

ssh-session-policy-removeB

Remove a session-level custom policy rule by id.

ssh-session-policy-resetA

Reset the current session custom policy rules back to the inherited defaults loaded from configuration.

ssh-session-set-activeB

Set or clear the active session used by tools when the session argument is omitted.

ssh-viewer-ensureA

Ensure that a viewer exists for a session. Terminal mode is singleton-scoped and will reuse a running viewer instead of opening duplicates.

ssh-viewer-listB

List persisted local viewer processes and their current binding state.

ssh-session-closeA

Close an interactive SSH PTY session immediately and remove it from the MCP server.

ssh-quick-connectA

One-step: open SSH session using configured device profiles when available, otherwise fall back to legacy .env defaults. Reuse an existing session when possible and return viewer details when enabled.

ssh-runA

Execute a command in the SSH session and return the output. Uses intelligent completion detection (prompt matching + idle timeout). In safe mode, dangerous/interactive commands are blocked. Long-running commands automatically transition to async mode.

ssh-statusA

Quick status check: list active sessions, viewer URL, connection state. Use this to check if a session is already running.

ssh-command-statusA

Check the status of a long-running async command. Returns current output if completed, or partial output if still running.

ssh-retryA

Execute a command with automatic retry and backoff on failure. Useful for flaky network commands or services that need time to start.

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/Zw-awa/ssh-session-mcp'

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