Why it matters
Many MCP SSH integrations can execute commands, but they still lose the terminal as a shared runtime. This project keeps that runtime alive and inspectable.
`ssh-session-mcp` gives MCP clients a persistent SSH runtime instead of a stateless shell wrapper. The user keeps the browser terminal open, the AI works through MCP tools, and both sides see the same session state.
Many MCP SSH integrations can execute commands, but they still lose the terminal as a shared runtime. This project keeps that runtime alive and inspectable.
State-aware command handling, safe/full modes, async polling, viewer diagnostics, session history, and local debug mode for demos without SSH.
Operators who want the AI to help with a real remote terminal, but still need visibility, manual intervention, and guardrails when the shell gets weird.
Use the operator helper when a human wants the easiest local experience. Use the server binary directly when an MCP client needs a stdio command.
npm install -g ssh-session-mcp
ssh-session-mcp-ctl launch --local --viewerPort=auto
ssh-session-mcp --viewerPort=auto
For agents, the normal loop should stay short and explicit: `ssh-device-list`, `ssh-quick-connect`, `ssh-run`, `ssh-status`, `ssh-command-status`, and `ssh-retry`. Drop to lower-level tools only when you need raw terminal control.