Home / MCP / Tmux MCP Server

Tmux MCP Server

A MCP server for our beloved terminal multiplexer tmux.

JavaScript
Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

Configure Claude Desktop

"mcpServers": {
  "tmux": {
    "command": "npx",
    "args": ["-y", "tmux-mcp"]
  }
}

Optional shell type for commands

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"]
  }
}

Available tools

list-sessions

List all active tmux sessions.

find-session

Find a tmux session by name.

list-windows

List windows within a tmux session.

list-panes

List panes within a tmux window.

capture-pane

Capture and expose content from a tmux pane.

create-session

Create a new tmux session.

create-window

Create a new window in a tmux session.

split-pane

Split a pane horizontally or vertically with optional size.

kill-session

Terminate a tmux session by ID.

kill-window

Terminate a tmux window by ID.

kill-pane

Terminate a tmux pane by ID.

execute-command

Execute a command inside a tmux pane.

get-command-result

Retrieve the result of a previously executed command.