Model Context Protocol server that enables Claude Desktop to interact with and view tmux session content. This integration allows AI assistants to read from, control, and observe your terminal sessions.
- List and search tmux sessions
- View and navigate tmux windows and panes
- Capture and expose terminal content from any pane
- Execute commands in tmux panes and retrieve results (use it at your own risk
⚠️ ) - Create new tmux sessions and windows
- Split panes horizontally or vertically with customizable sizes
- Kill tmux sessions, windows, and panes
Check out this short video to get excited!
- Node.js
- tmux installed and running
Add this MCP server to your Claude Desktop configuration:
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp"]
}
}You can optionally specify the command line shell you are using, if unspecified it defaults to bash
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp", "--shell-type=fish"]
}
}The MCP server needs to know the shell only when executing commands, to properly read its exit status.
tmux://sessions- List all tmux sessionstmux://pane/{paneId}- View content of a specific tmux panetmux://command/{commandId}/result- Results from executed commands
list-sessions- List all active tmux sessionsfind-session- Find a tmux session by namelist-windows- List windows in a tmux sessionlist-panes- List panes in a tmux windowcapture-pane- Capture content from a tmux panecreate-session- Create a new tmux sessioncreate-window- Create a new window in a tmux sessionsplit-pane- Split a tmux pane horizontally or vertically with optional sizekill-session- Kill a tmux session by IDkill-window- Kill a tmux window by IDkill-pane- Kill a tmux pane by IDexecute-command- Execute a command in a tmux paneget-command-result- Get the result of an executed commandrole-list- List known roles and role→session mappingrole-add- Add/update role definition (name + md/mdPath + optional model flags)role-get- Get role definitionrole-remove- Remove role definitionrole-enable- Enable a rolerole-disable- Disable a rolerole-start- Start/reuse a registered role session and launch Codex workflowrole-send- Send keys/text to a role panerole-capture- Capture output from a role panerole-wait- Wait for text/pattern in a role panerole-stop- Stop a role sessioninit-get- Get INIT rulesinit-set- Set INIT rulessession-list- List persisted sessions registrysession-add- Add a session entry to registrysession-update- Update a session entrysession-remove- Remove a session entrysession-clear- Clear all registry entries
Role defs file: roles.json (override TMUX_MCP_ROLES_PATH).
INIT rules file: INIT.md (override TMUX_MCP_INIT_PATH).
Role markdown directory: roles/ next to roles.json (override TMUX_MCP_ROLE_MD_DIR).
Roles default to: planner, planner_ai, coder, reviewer, qa.
Role sessions default to role-<role>.
Registry path: sessions.json (override with TMUX_MCP_REGISTRY_PATH).
Note: role-start only accepts registered roles from roles.json (no implicit role creation).
Note: If role-start is called without command, it runs Codex with a prompt that enforces this order: INIT.md -> <role>.md -> task.
Note: role-start is Codex-focused; non-Codex commands are rejected.
Model defaults and overrides:
- Built-in defaults include
planner -> --model gpt-5.3-codex-spark --skip-git-repo-check. coder,reviewer,qadefault to--skip-git-repo-check.- You can set per-role defaults via
role-add(model,skipGitRepoCheck,mdPath). - You can override per-run via
role-start(model,skipGitRepoCheck,task). --skip-git-repo-checkis applied only if the local Codex CLI supports that flag.
Examples:
role-start role=planner task="analiz et"-> runs Codex with planner defaults.role-start role=planner model="gpt-5.3-codex-spark" skipGitRepoCheck=true task="analiz et"-> per-run override.role-add name=planner mdPath="/opt/roles/planner.md" model="gpt-5.3-codex-spark" skipGitRepoCheck=true-> persist per-role defaults.
