Skip to main content
Glama
tmux-mcp

tmux-mcp

by vn-lazyming
README.md
# tmux-mcp

A small MCP server that lets an your agent run commands interactively, not in one-shot mode, in a live tmux pane that you can watch and type in too.

It is not limited to one session: the agent can list every tmux session, window and pane on the machine, create sessions with any name, and send keys to or read from any pane, including your own.

## Tools

- `tmux_send`: type or paste text and keys into any pane
- `tmux_read`: read what's on any pane
- `tmux_list_panes`: list all sessions, windows and panes
- `tmux_new`: open a session, window or pane with a name you choose
- `tmux_move`: move a pane the agent opened next to another one, e.g. yours
- `tmux_kill`: close one that the agent opened

## Setup

Needs [uv](https://docs.astral.sh/uv/) and tmux.

```sh
git clone https://github.com/vn-lazyming/tmux-mcp
cd tmux-mcp && uv sync
claude mcp add tmux -- uv run --directory "$PWD" server.py
```

Watch what the agent does:

```sh
tmux attach -t agent
```

The session name defaults to `agent`. Change it with the `TMUX_MCP_SESSION` env var.

## Develop

```sh
make dev    # install dev tools
make lint   # ruff format --check, ruff check, ty
make test   # self-check on a private tmux server
```

## License

MIT

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation4/5

The tools have mostly distinct purposes: send writes to a pane, read inspects one, list enumerates panes, new creates one, move relocates one, and kill closes one. There is some conceptual overlap between tmux_send and tmux_read because both can return pane output and tmux_send may wait for completion, but the descriptions make the intended usage boundaries clear.

Naming Consistency5/5

All six tools use the same tmux_ prefix followed by a concise verb or verb-noun style: tmux_send, tmux_read, tmux_new, tmux_move, tmux_kill, tmux_list_panes. The naming is predictable and consistent throughout.

Tool Count5/5

Six tools is a well-scoped surface for controlling and inspecting tmux panes without excessive granularity. Each tool covers a distinct operation and there are no obvious redundant tools.

Completeness4/5

The set covers the core tmux lifecycle agents need: discovery, creation, interaction, reading output, moving panes, and cleanup. Minor gaps exist around session/window management details and things like renaming or resizing, but these are not essential for the stated interactive-pane workflow.