Tmux MCP logo

Tmux MCP

Manage local tmux sessions, inspect terminal output, run commands, and organize panes through MCP.

Install Tmux MCP

Run the project’s own setup commands, in order.

Setup steps from the project

tmux-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npm install -g @fr1sk/tmux-mcp
    

Overview

The tmux-mcp MCP server connects an MCP-compatible assistant to local tmux sessions, windows, and panes. It discovers terminal state, captures scrollback, sends shell commands or key sequences, and creates, renames, splits, or removes tmux objects. Install it with Node.js 18+ and a tmux executable on PATH, then configure the client to launch the local command. Reach for it when an agent needs to inspect long-running processes, operate inside a persistent terminal, or make its shell activity visible in tmux.

Use cases

  • Inspect a running development server in a tmux pane
  • Run tests in a persistent tmux session and read their output
  • Send interrupt keys to a stuck process
  • Create a development session with a working directory and startup command
  • Organize panes and windows for an agent-managed workflow

Key features

  • List tmux sessions, windows, and panes
  • Capture up to 5,000 lines of pane scrollback
  • Send shell commands and tmux key sequences
  • Create, split, rename, and terminate tmux objects
  • Route shell commands through a configured tmux session

Tools13

What Tmux MCP lets your agent do. Expand a tool for its parameters.

Self-reported~169 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 73d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit6mo agoMost recent push to the default branch.
Tools exposed13Callable tools this server registers over MCP.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How Tmux MCP works

What the tmux-mcp MCP server does

tmux-mcp MCP server exposes local tmux control through MCP. An assistant can inspect active sessions, identify their windows and panes, read visible terminal output and scrollback, then send commands or key sequences to a selected pane. It can also create detached sessions, add windows, split panes, rename sessions or windows, and terminate sessions, windows, or panes.

The server is suited to development workflows involving persistent processes such as test runs, development servers, log viewers, or interactive shells. It lets an agent check output after starting a command instead of relying only on a direct shell invocation. The destructive termination tools should be treated as explicit cleanup operations: killing a session removes its windows and panes, while killing a pane also stops its running process.

How it works

The tmux-mcp MCP server uses tmux's standard target notation. A session can be addressed by name, a window by session:window, and a pane by session:window.pane. A typical discovery sequence is list_sessions, followed by list_windows, then list_panes; the resulting target can be passed to capture_pane or send_keys.

capture_pane returns raw terminal text and accepts a requested scrollback length, with a maximum of 5,000 lines. send_keys can submit a shell command or tmux key notation such as C-c, Escape, or Up. It can optionally press Enter, wait before reading the pane, and return captured output. The wait setting is useful for commands that need time to produce results.

With TMUX_MCP_ALWAYS_USE set to true, the server can provide instructions for routing shell commands through a configured tmux session rather than direct Bash. TMUX_MCP_DEFAULT_SESSION identifies that session when this behavior is enabled.

Setup and configuration

Install the package globally with:

Terminal
npm install -g @fr1sk/tmux-mcp

The runtime requires Node.js 18 or newer and tmux available on $PATH. Configure an MCP client to launch the tmux-mcp executable as a local server. The supplied examples cover OpenCode, Claude Code, Cursor, and Windsurf. For clients using JSON MCP configuration, the command is generally represented as tmux-mcp; the exact configuration file depends on the client.

Optional environment settings can be placed in the client's server configuration:

  • TMUX_MCP_ALWAYS_USE: set to true to route shell commands through tmux.
  • TMUX_MCP_DEFAULT_SESSION: names the session used for that routing behavior.

Both settings are optional for ordinary tool use. When both are present, the server's configuration information includes instructions for using send_keys with the selected session.

Tools and capabilities

The tool set includes:

  • list_sessions, list_windows, and list_panes for discovering tmux state.
  • capture_pane for reading terminal output.
  • send_keys for commands and raw key sequences.
  • new_session, new_window, and split_pane for creating terminal layout.
  • rename_session and rename_window for stable labels.
  • kill_session, kill_window, and kill_pane for cleanup.

Creation tools accept working directories, and session, window, or pane creation can start an initial command. Pane splits support horizontal or vertical direction and an optional percentage size.

Limitations and notes

The tmux-mcp MCP server provides unrestricted local shell access through tmux. Commands sent to panes run with the user's shell permissions, and command parameters used during creation are passed to tmux without validation or sandboxing. Do not expose it to network-accessible MCP hosts or untrusted assistants.

Captured output may include secrets printed by terminal programs, including environment values, tokens, passwords, or private keys. Use the server only in trusted local development environments. Invalid targets and a missing tmux server are reported as readable errors rather than causing the server to crash, but those responses do not remove the need to verify targets before sending commands or using destructive tools.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Tmux MCP

tmux-mcp is an MCP server that connects AI assistants to local tmux sessions and exposes tools to list sessions, windows, and panes, capture pane output, send commands or key sequences, create and rename tmux objects, split panes, and terminate sessions, windows, or panes.

Install it globally with `npm install -g @fr1sk/tmux-mcp`. The machine also needs Node.js 18 or newer and the `tmux` executable available on `$PATH`, after which an MCP client can launch the `tmux-mcp` command.

Add a local MCP server named `tmux` whose command is `tmux-mcp` to the client's `mcp.json`. The provided configuration uses `{"mcpServers":{"tmux":{"command":"tmux-mcp"}}}`.

Yes. Call `send_keys` with the target pane and `C-c` as the key sequence. The tool can press Enter by default and capture output after a configurable wait, allowing the assistant to inspect the pane after interrupting the process.

No. It provides unrestricted local shell access, and captured output can contain credentials or other secrets. Commands run with the user's permissions, so the server should be limited to trusted local development environments and not exposed to network-accessible MCP hosts or untrusted assistants.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTmux MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/tmux-mcp?style=directory)](https://allmcps.com/mcp/tmux-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/tmux-mcp"><img src="https://allmcps.com/api/badge/tmux-mcp?style=directory" alt="Tmux MCP on AllMCPs" /></a>