Mcp Ssh Tmux

security MCP Server

Persistent SSH sessions for AI agents via tmux - No regex, no complexity, just visual snapshots

Verified
securitysecurity
4 views2 stars1 forksMIT

Why This Matters

Discovered via github-topic:model-context-protocol and last synced 3mo ago.

Verified
Source
github-topic:model-context-protocol
Stars
2
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
9
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (9)

send_keys(session_id, keys)

Sends raw keystrokes without Enter. Use for Ctrl+C, Ctrl+D, interactive input, etc.

write_remote_file(session_id, remote_path, content, append)

Writes content to a remote file.

list_sessions()

Lists all active SSH windows.

open_session(host, username, port)

Opens a new SSH connection in a unique tmux window.

read_remote_file(session_id, remote_path)

Efficiently reads a remote file.

send_command(session_id, command, lines, timeout)

Sends a command and polls for a prompt/output. Returns only the last `lines` of terminal output/scrollback. `timeout` (default 2.0s) controls how long to wait — increase for slower commands like package installs.

close_session(session_id)

Kills the window and cleans up. **WARNING**: This terminates any running processes in the session. For long-running tasks, leave the session open and monitor with `get_snapshot()`.

read_remote_file(session_id, remote_path, fallback_lines)

Reads a remote text file. Prefer this over `cat` via `send_command()` when you need the full file contents. `fallback_lines` controls bounded tmux-history capture if direct SSH read is unavailable.

get_snapshot(session_id, lines)

Captures the current screen state. Returns only the last `lines` of terminal output/scrollback.