About termmux
termmux is a CLI and stdio MCP server for operating local tmux sessions, windows, and panes. It exposes tmux management and pane input/output without routing arguments through a shell.
Key features
- 01List and manage sessions
- 02Create, rename, and close windows
- 03List and manage panes
- 04Send keys to panes
- 05Capture visible pane output
- 06Run as CLI or stdio MCP server
Use cases
- 01Inspect active tmux sessions
- 02Create or remove sessions and windows
- 03Send commands to a pane
- 04Read text currently visible in a pane
MCP support
As an MCP server over stdio, termmux exposes tools for listing and managing tmux sessions, windows, and panes, as well as sending keys and capturing output. It requires a tmux binary on the host.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
12Saved tool list · updated 2w ago
This tool takes no parameters.
Details
From the project READMEtermmux
Drive local tmux from the command line or as a stdio MCP server. List, create, rename and kill sessions; manage windows and panes; send keys to a pane and capture its visible output.
Every operation runs the real tmux binary with an argument array
(execFile, never a shell string) behind an injectable executor, so
session names and key text are never reinterpreted as shell syntax.
Name a session that does not exist and you get tmux's own error
back. When no tmux server is running, list calls return empty
lists — the same empty world tmux reports.
Install
npx -y @reneturcios/termmux mcp
Requires a tmux binary on the host (the container image bundles
none, so containerised runs report tmux unavailable).
CLI
termmux mcp
termmux list-sessions
termmux create-session <name> [window] [start-dir]
termmux kill-session <name>
termmux list-windows <session>
termmux capture <session> [pane]
termmux send <session> <keys...>
termmux --version
Exit codes: 0 success, 1 tmux error, 2 usage error.
MCP tools
| Tool | Purpose |
|---|---|
list_sessions | List all tmux sessions |
create_session | Create a new tmux session |
kill_session | Kill a tmux session by name |
list_windows | List the windows of a tmux session |
create_window | Create a new window in a tmux session |
kill_window | Kill a window in a tmux session |
list_panes | List the panes of a tmux session, optionally of one window |
send_keys | Send keys (a command line or key names) to a tmux pane |
capture_pane | Capture the visible contents of a tmux pane as text |
rename_session | Rename a tmux session |
select_window | Select (activate) a window in a tmux session |
get_session_info | Get details of one tmux session |
MCP client config:
{
"mcpServers": {
"termmux": {
"command": "npx",
"args": ["-y", "@reneturcios/termmux", "mcp"]
}
}
}
Docker
docker run -i ghcr.io/cloudcorprecords/termmux # MCP server (tmux unavailable in-image)
docker run --rm ghcr.io/cloudcorprecords/termmux --version
Development
npm install
npm run build
npm test
MIT license.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.