socket-for-pathLABSCO SUMMARY
The policy file is the part to read before you connect a client you don't fully trust.
Out of the box every allow_* gate is true, the command filter is off, and no socket, session or pane allowlist is set — convenient locally, but that is not a sandbox. The practical hardening is an isolated socket plus a config.toml that sets allowed_sockets and denies the @raw-input group, so shell input has to go through execute-command where the regex command filter and tracking apply; TMUX_MCP_TOOLS=deny:@raw-input does the same for one process without a file.
What it is
An MCP server for tmux, written in Rust. Every tmux operation is a named tool with typed parameters and stable IDs, so a client never has to infer a pane ID from captured text or guess whether a command has finished. Long-running work runs as a tracked command that returns a commandId and a resource URI; completion arrives through a private tmux exit buffer and wait-for signal rather than scraped scrollback. Because the session is a normal tmux session, a human can attach to it mid-task.
What you get
- Sessions, windows and panes created, renamed, split, resized, zoomed, joined, broken out and killed —
create-session,create-window,split-pane,rename-session,rename-window,rename-pane,select-layout,resize-pane,zoom-pane,join-pane,break-pane,swap-pane,kill-session,kill-window,kill-pane - Shell commands run with tracking: a command ID, a status of
queued,running,completed,failedortracking_error, and the output between markers —execute-command,get-command-result - Live pane text for progress checks, plus listings of sessions, windows, panes and clients —
capture-pane,list-sessions,find-session,list-windows,list-panes,list-clients,get-current-session - Tmux buffers used as an external search space: read a slice, search literal or regex with byte offsets and resume cursors, then write or file the result —
list-buffers,show-buffer,search-buffer,subsearch-buffer,set-buffer,append-buffer,save-buffer,load-buffer,delete-buffer,rename-buffer - Raw keystrokes for prompts, REPLs, pagers and TUIs, including the special keys —
send-keys,paste-text,send-hex,send-cancel,send-eof,send-escape,send-enter,send-tab,send-backspace,send-up,send-down,send-left,send-right,send-page-up,send-page-down,send-home,send-end - A deterministic per-project socket path, and read-only resources for server info, pane tails, window and session trees and tracked command results —
socket-for-path,tmux://server/info,tmux://pane/{paneId}/tail/{lines},tmux://session/{sessionId}/tree,tmux://command/{commandId}/result
Requirements
Tmux 3.0 or newer on PATH, and a shell the command tracker supports — bash, zsh or fish. The server runs tmux -V on startup and exits if it finds tmux 2.x, whose output formats and split flags differ. Install with cargo install tmux-mcp-rs, brew install bnomei/tmux-mcp/tmux-mcp-rs, npx @bnomei/tmux-mcp-rs, or the container image ghcr.io/bnomei/tmux-mcp:0.6.0; building from source needs Rust 1.70 or newer. It speaks stdio. --socket or TMUX_MCP_SOCKET pins it to one tmux server, --ssh routes tmux commands to a remote host over a non-interactive SSH login, and --config loads a TOML policy file — nothing is auto-loaded.
Setup effort
One command — cargo install tmux-mcp-rs
USE CASES
Running a build that outlives one tool call
Start it as a tracked command and take back a command ID immediately, then subscribe to the result resource or poll with a wait, instead of holding a call open or parsing scrollback for a prompt.
Watching an agent work, in your own terminal
Pre-create a session on a dedicated socket, point the server at it, and attach from a shell — you and the agent are looking at the same panes.
Driving something that will not accept piped input
Use raw keystrokes for an interactive prompt, REPL or editor, and the interrupt keys when it hangs — on a pane where no tracked command is running.
Searching a huge log without loading it into context
Put the text in a tmux buffer and search it with bounded results and a resume cursor, pulling back only the slices that matched.
57 tools
Listed in project docs. Your client may show a different list.
list-sessionsfind-sessioncreate-sessionkill-sessionget-current-sessionrename-sessionlist-windowscreate-windowkill-windowrename-windowmove-windowselect-windowselect-layoutset-synchronize-paneslist-panessplit-panekill-panerename-panecapture-paneselect-paneresize-panezoom-panejoin-panebreak-paneswap-paneexecute-commandget-command-resultlist-clientsdetach-clientlist-buffersshow-buffersearch-buffersubsearch-buffersave-bufferload-bufferdelete-bufferset-bufferappend-bufferrename-buffersend-keyssend-hexpaste-textsend-cancelsend-eofsend-escapesend-entersend-tabsend-backspacesend-upsend-downsend-leftsend-rightsend-page-upsend-page-downsend-homesend-endBEFORE YOU INSTALL
What to know first
Tools you get
57 tools named in the project's documentation.
Requires
- tmux 3.0 or newer on PATH
- A shell the command tracker supports: bash, zsh or fish
- tmux-mcp-rs on PATH
- Rust 1.70 or later, to build it with cargo
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
cargo install tmux-mcp-rsMCP Clients
Codex
codex mcp add tmux -- tmux-mcp-rsClaude Code
claude mcp add --transport stdio tmux -- tmux-mcp-rsAny MCP client
{
"mcpServers": {
"tmux": {
"command": "tmux-mcp-rs"
}
}
}