tmux
Runs shell commands inside tmux sessions and panes on the local machine or on any SSH host, returning each command's output, exit code, and elapsed time. Provides tools to start sessions, run one-line commands or scripts, wait for a run to finish or for a pattern to appear, read pane contents, send text and keys to interactive programs, list panes, and kill sessions — while refusing to type into panes that are busy with an interactive program.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
$ exec { "host": "win-box", "command": "Get-Item \"C:\\Users\\me\"; \"中文 'ok'\"; exit 7" }
{"data": {"os": "windows", "exit_code": 7, "stdout": "C:\\Users\\me\n中文 'ok'\n", "stderr": ""}}
$ exec { "host": "build-box", "command": "uname -s; ls /nope" }
{"data": {"os": "posix", "exit_code": 2, "stdout": "Linux\n", "stderr": "ls: cannot access '/nope': ..."}}A command sent with ssh host '...' passes through 2 to 4 parsers on its way: your shell, ssh, then bash, or cmd, PowerShell and maybe WSL on Windows. Each one eats quotes, backslashes or semicolons in its own way, and a Windows machine answers in its own code page. An agent ends up rewriting the same command until it survives. stick sends every command on stdin instead, so no parser in between ever sees it, and every answer comes back as UTF-8 with an exit code.
Features
Same call on every OS:
exectakes a host and a script. Write bash for a posix host and PowerShell for a Windows host. The tool picks the transport.Nothing to escape: quotes, backslashes, semicolons and non-ASCII text arrive unchanged, and scripts are not limited by cmd's 8191 characters.
Long jobs in tmux:
tmux_runtypes a command at a shell prompt, waits, and returns only its output and exit code. A person cantmux attachand watch.A Windows desktop as text:
desktopreads windows as a text tree, clicks, types and takes small screenshots that land on this machine.Knows each host: the OS is detected on first contact and remembered.
Related MCP server: bravoric-ssh-mcp
Quick start
claude plugin marketplace add zyx1121/marketplace
claude plugin install stick@zyx1121Codex: codex plugin marketplace add zyx1121/marketplace, then codex plugin add stick@zyx1121.
The plugin needs Bun on this machine and key-based ssh to each host. tmux tools need tmux on the host. For the desktop tools, call desktop_install once per Windows host. Then ask "What is using disk space on my Windows box?".
Usage
Tool | Does | OS |
| lists | any |
| runs a script, returns stdout, stderr and exit code | any |
| starts a detached session and waits for its prompt | posix |
| runs a command in a pane, returns its output and exit code | posix |
| waits for an earlier run, or for a line on screen | posix |
| reads a pane, or types text and keys such as | posix |
| lists panes, ends a session | posix |
| runs desktop commands: | Windows |
| builds and starts the desktop daemon on a host | Windows |
Every tool takes
host. Omit it for this machine.Every result is an envelope:
dataon success, orerrorwith acodeand ahint.On Windows the exit code is the last native program's code, or 1 when PowerShell wrote an error. Each Windows call costs about 1 s more than a posix one.
execstops the local ssh attimeout_s. On Windows it then kills the remote program by its recorded PID with a second ssh call, so a timed out job stops. If that call fails too, the program can keep running; use a scheduled task or WSL tmux for long jobs there.
Configuration
Variable | Sets | Default |
| a tmux socket name ( | the default socket |
SSH settings come from ~/.ssh/config. Turn on connection sharing there (ControlMaster auto, ControlPersist) and each call costs about 10 ms of ssh instead of a new handshake.
How it works
posix:
ssh host -- sh -c '...'saves the script from stdin to a temp file, then runs it with bash and stdin on/dev/null. The file lives in a privatestick-<uid>folder (mode 0700) underTMPDIRor/tmp. The runner checks that folder once and then uses its path, so keepTMPDIRout of a world-writable folder without the sticky bit: there another user could swap the folder between the check and the use. A sticky/tmpor a per-userTMPDIRis safe. A normal exit removes the file. When a timeout kills the runner, the file stays until a later call sweeps files older than one day.Windows:
ssh host -- powershell -EncodedCommand <wrapper>. The fixed wrapper reads the script from stdin as base64 lines (Windows OpenSSH never signals end of input, so a line holding.ends it), then runs it in a child PowerShell with UTF-8 output and an empty stdin, so programs such as git never wait for input. The script is saved in%TEMP%\stick, removed on normal exit and swept after one day when a timeout kills the runner.tmux: each tmux call goes through ssh with every word quoted.
tmux_runpastes the command between 2 printf markers and pollscapture-paneuntil the end marker shows.desktop: a daemon (
windows/fwd.cs, built with the C# compiler that ships with Windows) runs in the logged-in session and listens on127.0.0.1only, behind a token readable by its owner. stick reaches it through an ssh tunnel.
Limits
The tool does not translate between bash and PowerShell.
hostsand theosfield tell you which one to write.A host whose ssh login needs a password or a touch fails with
unreachable.tmux tools need a POSIX shell prompt (bash, zsh, sh, dash, ksh). Windows hosts have no tmux; reach WSL through its own ssh host.
The desktop daemon needs someone logged in at the console.
For AI agents
Facts for coding agents and LLM tools. The rules for changing the code are in AGENTS.md.
Summary: Claude Code and Codex plugin with 11 MCP tools that run commands on Linux and Windows hosts over ssh, drive tmux and use a Windows desktop.
Type: plugin
Interfaces: MCP
stick(stdio,dist/server.js)Install:
claude plugin install stick@zyx1121, afterclaude plugin marketplace add zyx1121/marketplaceRun: the host starts the MCP server
Verify:
hostswith a host, thenexecwithecho ok; expectexit_code0Config:
STICK_TMUX_SOCKET, plus the user's~/.ssh/configSecrets: none of its own. ssh keys stay with ssh; the desktop token stays on the Windows host and in memory.
Limits: no bash to PowerShell translation; tmux on posix only; desktop on Windows only.
Development
bun install --frozen-lockfile
bun run checkThe tests run bash and a private tmux server. Windows paths are checked by hand against a real host. The marketplace pins each release commit.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
SSH client, server management and one remote MCP URL for your machines, with human approvals.
Manage servers through SSH.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables programmatic control over tmux terminal sessions for SSH access, command execution, and terminal automation. Supports creating sessions, sending commands, capturing output, and managing multiple panes for interactive debugging and monitoring.8MIT
- AlicenseCqualityBmaintenanceExposes the SSH + tmux client over stdio so agents can drive hosts, tmux sessions, commands, broadcasts, tunnels and audit logs programmatically. It offers 47 grouped tools covering host and session management, connectivity checks, and background port forwarding.47MIT
- AlicenseAqualityBmaintenanceEnables AI models to run interactive tmux terminal sessions that a human can watch and type into, with all output logged and split into searchable per-command regions so only needed lines enter context. Also guides models through unfamiliar tools by returning exit statuses and key output alongside advice on the tool being used.151MIT
- AlicenseNot gradedqualityBmaintenanceEnables managing local tmux sessions, windows, and panes over stdio, including listing, creating, renaming, killing, sending keys, and capturing pane output.41 npmMIT