Get the FREE Ultimate OpenClaw Setup Guide →

tmux

A MCP server for our beloved terminal multiplexer tmux.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio nickgnd-tmux-mcp npx -y tmux-mcp

How to use

This MCP server enables Claude Desktop to interact with and observe your tmux sessions. It exposes a set of resources and tools that let you list, view, and manipulate tmux sessions, windows, and panes, as well as capture pane content and execute commands inside panes. With this server, you can browse active tmux sessions, inspect pane output in real time, and run commands directly within a chosen pane, making it ideal for AI-assisted terminal work and automation. The available tools cover session lifecycle (create/kill sessions and windows), pane management (split, list, capture), and command execution with results fed back to Claude.

To use it, configure the MCP server in Claude Desktop to point at the tmux-mcp package via npx as shown in the setup example. You can optionally specify a shell type (for command execution) if your environment uses a non-bash shell; otherwise bash is used by default. The server exposes resources like tmux://sessions, tmux://pane/{paneId}, and tmux://command/{commandId}/result to read sessions, pane content, and command outputs, respectively. The tools list-sessions, find-session, list-windows, list-panes, capture-pane, create-session, create-window, split-pane, kill-session, kill-window, kill-pane, execute-command, and get-command-result provide a comprehensive interface for managing tmux from Claude.

How to install

Prerequisites:

  • Node.js and npm installed
  • tmux installed and running

Installation steps:

  1. Install Node.js if not already installed (visit https://nodejs.org/ for instructions).
  2. Install tmux and ensure it is accessible from your shell.
  3. Install the MCP server package via npx as described in the configuration:
# Install and run the tmux MCP server via npx
# This will install the package once and run it, exposing the MCP endpoints to Claude Desktop
npx -y tmux-mcp
  1. If you want to customize the shell used by the MCP server, you can pass a shell type option (e.g., --shell-type=fish) as shown in the options example:
"mcpServers": {
  "tmux": {
    "command": "npx",
    "args": ["-y", "tmux-mcp", "--shell-type=fish"]
  }
}
  1. Ensure Claude Desktop is configured to reach the MCP server using the same command and arguments as above.

Additional notes

Tips and caveats:

  • Ensure tmux is installed and the server has permission to access your tmux sessions (may require shell user privileges).
  • The server can read and manipulate terminal content, so exercise caution with execute-command to avoid unintended operations.
  • When using shell-type options, the MCP server uses the specified shell to interpret commands and determine exit status; this affects how results are parsed.
  • If you encounter connectivity or responsiveness issues, verify that Node.js is up-to-date and that npx can fetch the tmux-mcp package without network restrictions.
  • The npm_package field indicates the Node.js package name used by Claude Desktop for configuration; in this case it is tmux-mcp.

Related MCP Servers

Sponsor this space

Reach thousands of developers