SSH Session MCP Server

Shared SSH PTY runtime for MCP clients with viewer, input lock, async tracking, and policy rules.

Local serverstdioTypeScript

What is the SSH Session MCP MCP server?

SSH Session MCP MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Shared SSH PTY runtime for MCP clients with viewer, input lock, async tracking, and policy rules.

What you get

Persistent shared-terminal runtime for MCP clients over SSH.

  • One shared PTY for both the human and the AI
  • Browser terminal for live inspection and manual intervention
  • Input lock so the AI does not type over the user
  • Safe/full execution modes for risky commands
  • Configurable default policy rules plus session-level custom rule overrides
  • Async command tracking for long-running remote work

What the assistant can call

Once SSH Session MCP is connected, these are the calls the assistant has available:

  • ssh-quick-connect — Connect or reuse the default target and optionally open the viewer
  • ssh-run — Execute a command with completion detection and exit-code capture
  • ssh-status — Inspect sessions, viewer state, and operation mode
  • ssh-command-status — Poll async command progress
  • ssh-retry — Retry flaky commands with backoff
  • ssh-session-policy-list — Inspect inherited defaults and current session custom policy rules
  • ssh-session-policy-upsert — Add or update a session-level custom policy rule
  • ssh-session-policy-remove — Remove a session-level custom policy rule
  • ssh-session-policy-reset — Reset session custom rules back to inherited defaults
  • Codex — The Codex tool exposed by this server
  • OpenCode — OpenCode's opencode mcp add flow is interactive. Choose a local MCP server and use this command:

Configuration and credentials

You will need 7 environment variables: YOUR_DEVICE_HOST, DEVICE_A_ID, DEVICE_A_HOST, VIEWER_HOST, SSH_MCP_REDIS_URL, SSH_MCP_NODE_ID, SSH_MCP_PUBLIC_BASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Setting it up

Installation goes through your MCP client rather than a global install: point it at ssh-session-mcp 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.

Choosing this one

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. SSH Session MCP's toolset — ssh-quick-connect, ssh-run, ssh-status and 8 more — is a fair guide to whether it matches your workflow. It is maintained by Zw-awa; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against SSH Session MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Before you rely on it

  • 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.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch SSH Session MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the ssh session mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
ssh-quick-connectConnect or reuse the default target and optionally open the viewer
ssh-runExecute a command with completion detection and exit-code capture
ssh-statusInspect sessions, viewer state, and operation mode
ssh-command-statusPoll async command progress
ssh-retryRetry flaky commands with backoff
ssh-session-policy-listInspect inherited defaults and current session custom policy rules
ssh-session-policy-upsertAdd or update a session-level custom policy rule
ssh-session-policy-removeRemove a session-level custom policy rule
ssh-session-policy-resetReset session custom rules back to inherited defaults
CodexThe Codex tool exposed by this server.
OpenCodeOpenCode's opencode mcp add flow is interactive. Choose a local MCP server and use this command:

How to install the SSH Session MCP MCP server

{
  "mcpServers": {
    "ssh-session": {
      "command": "npx",
      "args": ["-y", "ssh-session-mcp"],
      "env": {
        "YOUR_DEVICE_HOST": "your-value",
        "DEVICE_A_ID": "your-value",
        "DEVICE_A_HOST": "your-value",
        "VIEWER_HOST": "your-value",
        "SSH_MCP_REDIS_URL": "your-value",
        "SSH_MCP_NODE_ID": "your-value",
        "SSH_MCP_PUBLIC_BASE_URL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
YOUR_DEVICE_HOSTEndpoint or connection string the server talks to.Optional
DEVICE_A_IDConfiguration value read at startup.Optional
DEVICE_A_HOSTEndpoint or connection string the server talks to.Optional
VIEWER_HOSTEndpoint or connection string the server talks to.Optional
SSH_MCP_REDIS_URLEndpoint or connection string the server talks to.Yes
SSH_MCP_NODE_IDConfiguration value read at startup.Optional
SSH_MCP_PUBLIC_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use SSH Session MCP to ssh-quick-connect.
  • Use SSH Session MCP to ssh-run.
  • Use SSH Session MCP to ssh-status.

Frequently asked questions

It connects SSH Session MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (ssh-quick-connect, ssh-run, ssh-status, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with SSH Session MCP directly.