mcp-tmux is a comprehensive general-purpose MCP server for driving tmux, supporting operation on the local machine or on remote hosts via SSH. Its core positioning is to let AI agents drive real tmux sessions, rather than a private sandbox environment. When you attach to a session being used by the agent, you can see its keystrokes and command output in real time, and can type in the same pane. This means the agent's actions are fully visible to humans, a characteristic that is explicitly treated as a design purpose rather than an exception, making tmux a natural medium for pair programming with AI: open a shared session, observe the work process, take over the keyboard at any time, and hand it back. Since writing to an attached session is visible and real, users need to be careful with destructive commands, because both parties are driving the same terminal.
In terms of capability coverage, mcp-tmux provides curated tools for common operations and includes a native tmux_command passthrough tool that can run any tmux subcommand, so as long as the underlying tmux supports a feature, the server supports it. In terms of compatibility, it works with tmux 1.8+ (around 2013), covering almost all active distributions; the server detects the tmux version on the target and uses only the flags and format variables that version understands. In terms of how it runs, any tool can run against local tmux or a remote host via SSH (an ad-hoc user@host or a named profile in a configuration file). Old or minimal hosts only need tmux and ssh; the server itself runs on a modern host with Python 3.10+.
Runtime requirements: the host running the server needs Python 3.10+, as well as the tmux binary (remote targets also need ssh).
Installation and registration are separate steps: installing the package only puts the mcp-tmux executable on PATH, and does not notify any MCP client. Because a Python wheel cannot run code after installation, registration is always a separate step. If the client "cannot find" the server after installation, it is usually just that it has not been registered yet. The package can register itself, without manually editing configuration files. mcp-tmux register uses --scope user by default, making the server visible to every directory/session; the ordinary claude mcp add tmux -- mcp-tmux uses local (project) scope by default, which is usually where the server is in anotherThe reason for "not showing" in a session — it is only added to the directory from which the command is run. After registration, you can confirm with claude mcp list (you should see tmux: mcp-tmux - ✓ Connected). Already-running client sessions need to be restarted to recognize the newly registered server.
Tools are grouped by toolset so that a session only pays the schema cost for what it needs. core is always loaded, and the rest are optional. By default a session loads core + automation (about 19 tools); ["all"] loads the full toolset (61). Each tool accepts an optional target (omitted / "local", a named profile, or user@host). For any operation not covered by a dedicated tool — including operations excluded by the currently active toolset — you can use tmux_command(args=[...]), which belongs to core and can reach every tmux subcommand. Toolsets can be selected via the toolsets configuration key or the MCP_TMUX_TOOLSETS environment variable (comma-separated; the environment variable takes precedence over the configuration). core is always included. The special value all loads all toolsets. Unknown names cause a startup error and list the valid toolsets. With no settings, the default is ["core", "automation"]. Merged-style tools use a kind discriminator instead of one tool per entity, for example tmux_kill(kind="window", id="dev:2").
Live streaming is an optional feature. The one-shot CLI is the general-purpose default. To observe while a pane produces output (such as builds, tail, long tasks), tmux_stream_* opens a persistent control mode (tmux -C) connection, allowing long-polling of its event stream instead of repeatedly calling tmux_capture_pane. tmux_stream_read automatically advances the cursor, so you only need to call it again to get the next batch; it can be filtered by pane and/or type ("output", "window-add", "layout-change", etc.). Each (target, session) shares one connection, and tmux_stream_start is idempotent. Read-only state is also exposed as MCP resources: tmux://sessions, tmux://{session}/windows, tmux://{window}/panes (local), as well as target-aware variants such as tmux://{target}/sessions.
Regarding where text in send_keys is evaluated: tmux_send_keys types its text into the pane — it is not a local shell command. Therefore any shell syntax in it ($(...), backticks, $VAR, ~, wildcards, etc.) is expanded by the shell running in that pane when the keys are executed, not on the machine running this MCP server. For SSH targets, this means the remote pane's shell performs the expansion; the server only transmits literal text (the SSH layer shell-quotes the tmux argv so that it crosses the hop intact). If you need a server-side value, interpolate it yourself before calling send_keys.
An optional TOML configuration is located at ~/.config/mcp-tmux/config.toml (can be overridden with MCP_TMUX_CONFIG). With no configuration file, the server can still work against local tmux and any ad-hoc user@host target (SSH options come from ~/.ssh/config). By default, each tmux command is a separate tmux process (for remote targets, ssh host tmux ...): about 2 ms per command locally, about 20 ms for a LAN host. transport = "control" (tmux 3.2+, in the [defaults] or [targets.<name>] table) instead maintains one control mode client per target (tmux -C attach -f no-output,ignore-size) and sends commands through it: about 0.1 ms locally, about 1 ms for a LAN host. When using it, tmux_wait_for_text / tmux_wait_for_idle are woken by pane output rather than polling. The cost is that this client attaches to one session on the target: the session appears as attached (to you as well), attaching makes it the tmux most recently used session (a plain tmux attach or a command without -t will select it), commands sent without -t go to it by default, and list-clients will show this client. While waiting, the wait tools attach a read-only guest to the session containing the pane being waited onclient side. Commands that block or act on the client itself (wait-for, run-shell, if-shell, attach/detach/switch, kill-server, new-session, etc.) still run in one shot, as does everything when the target has no session. The tmux_transport tool reports the transport method and can switch before a server restart; its description requires the AI to ask you first.
SSH connections are multiplexed: each remote call adds -o ControlMaster=auto -o ControlPersist=10m -o ControlPath=<private dir>/ssh-%C, so only the first call to a given host bears the SSH handshake overhead. The private directory is $XDG_RUNTIME_DIR/mcp-tmux-<uid> (or the same name under the temporary directory), with permissions 0700. The ssh_options in the configuration file can override these three items; ssh_options = ["-o", "ControlMaster=no"] can disable multiplexing for that target.
Regarding contributions, contributors should read CONTRIBUTING.md for the full checklist (ruff, mypy, pytest) and guidelines. Bug reports, feature requests, and pull requests are welcome on GitHub. The project uses the MIT license, with copyright held by László Pere.