A MCP server for our beloved terminal multiplexer tmux.
Configuration
View docs{
"mcpServers": {
"tmux": {
"command": "npx",
"args": [
"-y",
"tmux-mcp"
]
}
}
}You can run a dedicated MCP server that lets Claude Desktop read, navigate, and control your tmux sessions. This server exposes sessions, windows, panes, and terminal content, so you can observe or interact with your terminal from your AI assistant in a safe, auditable way.
Connect your MCP client to the tmux MCP server to list sessions, view panes, capture content, and run commands inside tmux panes. You can start with the basic setup and then enable an optional shell type if your environment requires it.
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp"]
}
}If you use a non-default shell, you can specify it to ensure proper command execution and exit status handling.
"mcpServers": {
"tmux": {
"command": "npx",
"args": ["-y", "tmux-mcp", "--shell-type=fish"]
}
}List all active tmux sessions.
Find a tmux session by name.
List windows within a tmux session.
List panes within a tmux window.
Capture and expose content from a tmux pane.
Create a new tmux session.
Create a new window in a tmux session.
Split a pane horizontally or vertically with optional size.
Terminate a tmux session by ID.
Terminate a tmux window by ID.
Terminate a tmux pane by ID.
Execute a command inside a tmux pane.
Retrieve the result of a previously executed command.