
SSH Session MCP
Let your coding agent share persistent SSH shell sessions on remote servers with a browser viewer, input locking, and safety policies instead of one-off terminal commands.
Overview
SSH Session MCP is a MCP server for the Operate phase that gives agents a shared, policy-aware SSH PTY runtime with optional browser viewing and input locking.
What is this MCP server?
- Shared SSH PTY runtime for multiple MCP clients with optional instance isolation via SSH_MCP_INSTANCE
- Browser viewer with configurable VIEWER_PORT, VIEWER_HOST, and AUTO_OPEN_TERMINAL for live session inspection
- Input lock and async command tracking so agents do not stomp concurrent shell input
- Policy rules and ssh-session-mcp.config.json for governed remote access
- stdio npm package ssh-session-mcp at version 2.7.1
- Server version 2.7.1 on npm identifier ssh-session-mcp
- stdio transport with optional VIEWER_PORT auto allocation or 0 to disable viewer
- Environment knobs include SSH_MCP_CONFIG, SSH_MCP_INSTANCE, VIEWER_HOST, AUTO_OPEN_TERMINAL
Community signal: 2 GitHub stars.
What problem does it solve?
One-shot SSH commands from agents drop context, collide on input, and are hard to audit when you are debugging production hosts.
Who is it for?
Indie builders who already SSH into VPS, bare metal, or staging boxes and want Claude Code or Cursor to operate inside a real session safely.
Skip if: Teams that only deploy via managed PaaS with no shell access, or anyone who needs a full remote-desktop or multi-user bastion product out of the box.
What do I get? / Deliverables
After install, your agent can open durable remote shells, track async work, optionally watch sessions in a viewer, and follow config-driven access rules.
- Persistent MCP-managed SSH PTY sessions on configured hosts
- Optional local HTTP viewer for session output
- Policy-governed remote command execution from your agent
Recommended MCP Servers
Journey fit
Remote PTY sessions, deployment debugging, and server administration land in Operate once you are running real infrastructure outside local dev. Infra is the canonical shelf for SSH runtimes, host access, and production-side command execution wired into MCP clients.
How it compares
MCP infrastructure bridge for live SSH sessions, not a hosted cloud shell SaaS or a generic file-sync plugin.
Common Questions / FAQ
Who is SSH Session MCP for?
Solo and small-team builders who run MCP-enabled coding agents against real SSH hosts and want persistent PTY sessions with optional local browser viewing.
When should I use SSH Session MCP?
Use it during Operate when you need the agent to run multi-step remote commands, debug deploys, or coordinate shell access without losing session state between MCP turns.
How do I add SSH Session MCP to my agent?
Install the npm package ssh-session-mcp, point your MCP client at stdio transport, set SSH_MCP_CONFIG if needed, and configure viewer or instance env vars per the server schema.