Tmux logo

Tmux

Drive tmux sessions, windows, panes, commands, terminal output, and pane interactions through MCP.

Install Tmux

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://pkg.go.dev/github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

The tmux MCP server connects an AI agent to a tmux server, covering sessions, windows, panes, and their output. It can run commands in terminal-backed windows, inspect and filter tmux state, type into panes, wait for visible text, and report changes. Reach for it when an agent, test suite, or automation tool needs to operate a real terminal program rather than a process without a TTY. The underlying implementation targets Unix hosts with tmux 3.3a or newer.

Use cases

  • Run interactive terminal commands inside tmux
  • Inspect sessions, windows, and panes
  • Type input into a pane and wait for output
  • Filter tmux state for agent workflows
  • Test terminal programs that require a TTY

Key features

  • Session, window, and pane management
  • Terminal-backed command execution
  • Rendered output and exit-status retrieval
  • Pane input with text polling
  • Snapshot and tmux-format filtering
  • tmux change notifications

Security & health

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

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 40d

Adoption & maintenance

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

Last commitTodayMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Tmux works

What tmux does

tmux provides an MCP-facing way to operate one tmux server and the terminal state managed by it. Its scope includes sessions, windows, panes, and the output rendered by those panes. The accompanying Go library represents these objects as typed values and includes the MCP package alongside the core tmux and workspace packages.

The server is suited to agents that share a terminal, automation that needs an interactive TTY, and tests that must exercise programs inside a real tmux environment. It can also work with a private tmux server, allowing a program to isolate its socket and configuration from an existing user session.

How it works

A caller connects through the MCP server to tmux-managed state. Commands can run in a window with a terminal, returning both the rendered screen content and the command's exit status. This makes it appropriate for terminal programs that behave differently when no TTY is present.

Sessions, windows, and panes can be listed individually. A snapshot reads the server once so callers can apply filters locally, while session searches can pass a tmux format filter for tmux to evaluate during the listing. Pane interaction supports writing input, with a newline representing the Enter key, then polling the visible screen until expected text appears.

Change notifications are available as tmux makes updates. Errors distinguish conditions such as a missing server, an ended pane, an unsupported tmux version, and a canceled or expired context.

Setup and configuration

The Go package is added with:

console
go get github.com/libtmux/libtmux-go/tmux@latest

It requires Go 1.26 or newer, tmux 3.3a or newer, and a Unix host. The tmux executable must be available on PATH for the quick-start configuration. With default server options, operations use the same tmux server as the regular tmux command.

For isolation, configure a distinct socket name and an empty configuration file. A private server can then be created for a run and terminated during cleanup, avoiding interference with an already-running tmux instance. Exact dependency versions should be pinned because the API can change between releases.

Tools and capabilities

  • Run commands in terminal-backed tmux windows.
  • Return rendered output and process exit status.
  • List sessions, windows, and panes.
  • Read a server snapshot and filter panes or other objects in Go.
  • Ask tmux to filter sessions using its format expressions.
  • Write input to panes and wait for text on the visible screen.
  • Observe tmux changes through notifications.

Limitations and notes

The implementation supports Unix hosts and requires tmux 3.3a or newer. If the daemon is older than the supported version, the operation returns a version error without sending a command. A missing tmux server is reported as an error rather than as an empty listing.

The Go API is explicitly unsettled: exported identifiers may change or be removed in a later release. Pin an exact dependency version when repeatable builds depend on a stable API. Pane waiting polls the visible screen and returns the last screen it read when an error occurs; cancellation and deadlines return the context error.

Reviews

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

Frequently Asked Questions about Tmux

tmux is an MCP server that connects AI agents to a tmux server and exposes operations for sessions, windows, and panes. Its main tools run commands in terminal-backed windows, read output, type into panes, wait for text, filter tmux state, and receive change notifications.

Install the Go package with `go get github.com/libtmux/libtmux-go/tmux@latest`. The environment requires Go 1.26 or newer, tmux 3.3a or newer, and a Unix host. Pin an exact dependency version when you need protection from API changes.

It requires Go 1.26 or newer and tmux 3.3a or newer on a Unix host. When connected to an older tmux daemon, an operation returns a version error without sending anything.

Yes. Commands run in a tmux window with a terminal, and the result includes the rendered screen output and exit status. This makes the server suitable for programs that require a TTY instead of a plain process environment.

Yes. Configure a separate socket name and an empty configuration file to create a private tmux server. A program can clean it up afterward without affecting the tmux server used by the regular `tmux` command.

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 AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/tmux?style=directory)](https://allmcps.com/mcp/tmux)
HTML Embed
<a href="https://allmcps.com/mcp/tmux"><img src="https://allmcps.com/api/badge/tmux?style=directory" alt="Tmux on AllMCPs" /></a>