mcp-tmux
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TMUX_BIN | No | Path to the tmux binary (defaults to 'tmux'). | |
| MCP_TMUX_HOST | No | Preferred ssh host alias when no explicit host is provided. | |
| MCP_TMUX_LOG_DIR | No | Logging directory (defaults to ~/.config/mcp-tmux/logs). | |
| MCP_TMUX_SESSION | No | Prefer this session when no explicit target is provided. | |
| MCP_TMUX_HOSTS_FILE | No | Optional path to a JSON file with host profiles. | |
| MCP_TMUX_TIMEOUT_MS | No | Timeout in ms for tmux/ssh invocations (default 15000). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tasks | {
"requests": {
"tools": {
"call": {}
}
}
} |
| tools | {
"listChanged": true
} |
| logging | {} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tmux_set_defaultA | Persist defaults for later tool calls. Omit fields you do not want to change. |
| tmux_get_defaultB | Display the current remembered defaults. |
| tmux_open_sessionA | Given an ssh host alias and session name, ensure the remote tmux session exists (create if missing) and set it as default for subsequent commands. |
| tmux_default_contextA | Returns the default session (if any) and a quick layout snapshot. |
| tmux_stateB | Return sessions, windows, panes, and the last lines of the active/default pane. |
| tmux_readonly_stateA | Readonly variant of tmux_state to retrieve sessions, windows, panes, and recent capture without modifying defaults. |
| tmux_context_historyA | Capture recent scrollback from a pane or session to infer context; also extracts recent commands heuristically. |
| tmux_quickstartA | Returns a concise how-to for using the tmux MCP tools safely. |
| tmux_server_infoA | Return the running server version and package identifier for verification. |
| tmux_set_audit_loggingA | Enable or disable verbose audit logging for a host/session (logs commands and outputs). |
| tmux_capture_layoutA | Return window layouts for a session so they can be restored later. |
| tmux_restore_layoutB | Apply a saved layout string to a target window. |
| tmux_tail_paneB | Poll a pane multiple times to watch output without reissuing commands. |
| tmux_tail_taskB | Create a task to poll pane output over time. Client can poll for incremental results. |
| tmux_multi_runA | Send the same keys to multiple targets (across hosts) and optionally capture results. |
| tmux_watch_dir_taskA | Poll a directory (local or via SSH) and complete when new files appear or after max iterations. |
| tmux_wait_for_pattern_taskA | Poll a pane for a regex pattern and complete when matched or after iterations. |
| tmux_select_windowB | Select a window so subsequent commands target it. |
| tmux_select_paneA | Select a pane so subsequent commands target it. |
| tmux_set_sync_panesB | Enable or disable synchronize-panes for a window. |
| tmux_save_layout_profileB | Capture layouts for all windows in a session and store them under a profile name. |
| tmux_apply_layout_profileA | Apply a previously saved layout profile to a session. Windows are matched by index; pane counts must be compatible. |
| tmux_healthC | Check tmux availability, PATH/bin resolution, and session listing for a host. |
| tmux_list_sessionsA | Enumerate sessions with attachment counts and window totals. |
| tmux_list_windowsA | List windows within a session (or all sessions if no target provided). |
| tmux_list_panesA | List panes across windows or inside a specific target. |
| tmux_capture_paneA | Read the scrollback of a pane to observe command results. |
| tmux_batch_captureA | Capture scrollback from multiple panes in parallel (readonly). |
| tmux_send_keysB | Send keystrokes to a tmux target, optionally appending Enter. |
| tmux_run_batchA | Execute multiple shell commands sequentially in one tmux pane and capture the output. Uses "&&" by default (fail fast) or ";" when failFast=false. Automatically captures output (paged) and can clean the prompt before writing. |
| tmux_new_sessionB | Create a detached tmux session to collaborate in. |
| tmux_new_windowB | Create a window in a target session, useful for side-by-side collaboration. |
| tmux_split_paneA | Split a pane horizontally or vertically, optionally running a command. |
| tmux_kill_sessionB | Terminate a tmux session. Use with care. |
| tmux_kill_windowC | Close a tmux window. Use with care. |
| tmux_kill_paneB | Close a tmux pane. Use with care. |
| tmux_rename_sessionB | Rename a tmux session. |
| tmux_rename_windowB | Rename a tmux window. |
| tmux_commandA | Execute any tmux subcommand with raw args. Use this when helpers do not cover your use case. You are responsible for correctness and safety. |
| tmux_debug_rawA | Run a tmux command and return raw stdout/stderr for debugging remote formatting/quoting issues. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| tmux_state_resource | On read, captures current default host/session state and recent output. |
TDQS
Scored across 40 tools
Many tools have overlapping purposes, such as tmux_state vs tmux_readonly_state, tmux_capture_pane vs tmux_context_history, and tmux_tail_pane vs tmux_tail_task. Descriptions help somewhat, but an agent could easily misselect among capture, state, and layout variants.
All tools consistently use the tmux_ prefix and lowercase snake_case, with most following a verb_noun pattern (list_sessions, send_keys, kill_pane). However, a few are noun phrases or less conventional (tmux_state, tmux_server_info, tmux_context_history), creating minor inconsistency.
40 tools is excessive for a tmux wrapper; many are near-duplicates or variations (e.g., capture vs state, layout vs profile, tail vs wait). The surface could be reduced to roughly 15-20 distinct tools without losing core functionality.
The tool set thoroughly covers tmux lifecycle (sessions, windows, panes), inspection, capture, layout management, and task-based polling. The inclusion of tmux_command as a generic escape hatch ensures any missing subcommand can still be executed, leaving no obvious gaps.