Shared SSH PTY runtime for MCP clients with viewer, input lock, async tracking, and policy rules.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by SSH Session MCP.
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
δΈζ | English
Persistent shared-terminal runtime for MCP clients over SSH.
ssh-session-mcp gives the user and the AI the same SSH PTY session, adds a browser viewer, tracks who typed what, and makes long-running remote work manageable instead of stateless.

git clone this repository.npx -y ssh-session-mcp --viewerPort=autonpm install -g ssh-session-mcpdocker.io/zwawa/ssh-session-mcpgit clone is only for contributors, source builds, and local development.npx or a global npm install is still the lowest-friction path. Docker is mainly useful when you want a pinned runtime, container-based deployment, or registry-backed distribution.Most SSH-oriented MCP servers can execute commands, but they do not manage terminal state well enough for real collaboration.
ssh-session-mcp focuses on the missing runtime layer:
Key directories and files:
| Path | Purpose |
|---|---|
src/ | Core TypeScript implementation for the MCP server, SSH session runtime, viewer, tools, and config CLIs |
src/viewer-html/ | HTML page generators and browser-side scripts for the terminal viewer |
test/ | Vitest coverage for runtime behavior, viewer contracts, config loading, and repository validation |
docs/ | Supporting documentation such as contracts, failure taxonomy, platform notes, and Docker usage |
docs/examples/ | Example config files for normal and Docker-oriented setups |
scripts/ | Build, version sync, and local operator helper scripts |
deploy/helm/ | Helm chart for Kubernetes deployment in single-node or distributed v0 mode |
site/ | GitHub Pages landing page source |
dist/ | Generated static site output from npm run build:site |
build/ | Generated JavaScript output from npm run build |
Dockerfile | Container image build definition |
docker-compose.yml | Profile-based Docker Compose example |
docker-compose.env.yml | Legacy .env-style Docker Compose example |
server.json | MCP server metadata for marketplace-style distribution |
AGENT.md | Primary agent/operator playbook |
llms-install.md | Agent-focused installation and environment checklist |
.env.example | Legacy single-target environment variable template |
If the goal is to let Claude Code, Codex, or OpenCode install the server automatically, prefer npx -y ssh-session-mcp in the MCP command instead of a prior global install.
For Cline Marketplace and other agent installers, see llms-install.md. This repo is structured to be one-click installable through an npx -y ssh-session-mcp --viewerPort=auto command.
Windows note from the Claude Code docs: native Windows users should wrap npx with cmd /c for stdio MCP servers.
OpenCode's opencode mcp add flow is interactive. Choose a local MCP server and use this command:
If you prefer config instead of the interactive flow:
This is the closest thing to "automatic installation" for stdio MCP servers today: the MCP client stores the command, and npx -y downloads the package automatically the first time it runs.
This starts a local shell instead of SSH and opens the browser terminal, which is the easiest way to test the MCP runtime before touching a real server.
Use the MCP server binary directly when wiring a client:
If you prefer npx instead of a global install:
Create .env from .env.example:
Then launch:
For multiple boards or named targets, create ssh-session-mcp.config.json:
Discovery order:
--config=/path/to/config.jsonssh-session-mcp.config.json.env fallbackImportant:
auth.password is intentionally unsupported. Use auth.passwordEnv or auth.keyPath..env or the parent environment, not in repo-tracked JSON.Public Docker images should be distributed through Docker Hub, with GitHub Container Registry as an optional secondary registry:
Recommended container launch for a real SSH target:
Export the password in your shell first instead of placing it directly on the command line.
Recommended launch for profile-based config:
Equivalent Compose example:
See docker-compose.yml for a ready-to-run example that mounts ssh-session-mcp.config.json, publishes the viewer on 8793, and uses SSH_KEY_DIR when set or falls back to a dedicated ./keys directory.
For the full Docker guide, including the legacy .env compose variant and MCP client config snippets, see docs/docker.md.
For a container-oriented profile example, see docs/examples/ssh-session-mcp.config.docker.example.json.
Container-specific notes:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ssh-session-mcp)<a href="https://allmcps.com/mcp/ssh-session-mcp"><img src="https://allmcps.com/api/badge/ssh-session-mcp?style=directory" alt="SSH Session MCP on AllMCPs" /></a>