tmux-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TMUX_MCP_LANG | No | Locale for host commands. | C.UTF-8 |
| TMUX_MCP_SHELL | No | Shell for created sessions. | /usr/bin/bash |
| TMUX_MCP_SOCKET | No | Socket path passed as `-S`. | /tmp/tmux-<uid>/default |
| TMUX_MCP_PREVIEW | No | Include the one-line preview in listings. | 1 |
| TMUX_MCP_TMUX_BIN | No | tmux binary (host path). | detected, else /usr/bin/tmux |
| TMUX_MCP_HOST_EXEC | No | Host executor; set to an empty string to force direct mode. | auto (`host-spawn` when tmux is absent, otherwise direct) |
| TMUX_MCP_HOST_HOME | No | `HOME` for host commands. | /home/<user> in host mode |
| TMUX_MCP_HOST_PATH | No | `PATH` for host commands. | /usr/local/bin:/usr/bin:/bin |
| TMUX_MCP_MAX_BYTES | No | Output byte cap. | 65536 |
| TMUX_MCP_MAX_LINES | No | Output line cap. | 1000 |
| TMUX_MCP_PROTECTED | No | Extra foreground commands never written to. | opencode,claude,codex,cursor-agent,aider |
| TMUX_MCP_AUDIT_FILE | No | Audit trail path. | ~/.local/state/tmux-mcp/audit.log |
| TMUX_MCP_TIMEOUT_MS | No | Default `exec` timeout (100–300000). | 30000 |
| TMUX_MCP_DEFAULT_SESSION | No | Owned session used when none is named. | mcp |
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 |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_sessionsA | List every tmux/byobu session on the configured socket with its working directory, foreground command, attached clients, last activity, and a one-line preview. Read-only. |
| new_sessionA | Create a detached session owned by tmux-mcp, with an optional working directory, shell, and initial command. If an owned session with that name exists it is returned unchanged; a foreign session with that name is never modified. |
| kill_sessionA | Kill a session. Only sessions owned by tmux-mcp can be killed without force; the pane hosting this container and agent panes are always protected. |
| execA | Type a command into a session, wait for it to finish (bounded by timeout_ms), and return the exit code and cleaned output. Defaults to the owned session "mcp". Foreign, attached, or non-shell targets require force: true. The default timeout is 30 seconds; on timeout the command is left running and the partial output is returned. |
| send_keysA | Send named tmux keys (C-c, Escape, Up, ...) or literal text to a session without shell interpretation. Enter is only pressed for literal text when enter is true. Defaults to the owned session "mcp"; other targets require force: true. |
| captureB | Return the last lines of a session pane, with optional ANSI escapes. Read-only. Defaults to the owned session "mcp" if it exists. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
The session lifecycle tools (list_sessions, new_session, kill_session) are clearly distinct, and capture is a read-only pane operation. exec and send_keys both send input, but their descriptions distinguish shell-command execution with waiting from raw key/literal input without shell interpretation.
The names are all lowercase snake_case and readable, but they mix full verb_noun session operations (list_sessions, new_session, kill_session) with bare verbs (exec, capture) and a different verb phrase (send_keys). The convention is understandable but not fully predictable across the set.
Six tools is well within a practical range for a tmux control server, and each tool maps to a necessary capability: session discovery, creation, termination, command execution, raw input, and output capture. No tool appears redundant or filler-like.
The core tmux workflow is covered: list/create/kill sessions, run commands, send keys, and capture output. Some secondary operations are absent, such as renaming sessions or explicit window/pane management, but agents can work around many of these via exec and send_keys.