Quickstart

One happy path from zero to a working tool invocation.

1. Install

Pick your MCP client and install method:

With uvx installed:

$ claude mcp add tmux -- uvx libtmux-mcp

Config file: ~/.claude.json (this project)

See MCP Clients for dev-checkout setup, full config-file locations, and common pitfalls.

2. Verify

Ask your LLM:

Prompt

List all my tmux sessions and show me what’s running in each pane.

The agent will call list_sessions, then list_panes and capture_pane to inspect your workspace. You should see your tmux sessions, windows, and pane contents in the response.

3. Try it

Here are a few things to try:

Prompt

Create a new tmux session called “workspace” with a window named “build”.

Prompt

Send make test to the pane in my build window, then wait for it to finish and capture the output.

Prompt

Search all my panes for the word “error”.

How it works

When you say “run make test and show me the output”, the agent follows a typed command pattern:

  1. run_command mutating — send the authored shell command, wait for completion, and return exit status plus output

  2. Inspect the typed result’s exit_status, timed_out, and output fields

This run → inspect sequence is the default workflow for commands the agent authors. For custom shell composition outside run_command mutating, the lower-level escape hatch is send_keys mutating with tmux wait-for -S <channel> composed into the payload, followed by wait_for_channel mutating. For output the agent does not author (third-party log lines, daemon prompts, interactive supervisors), use wait_for_text readonly or wait_for_content_change readonly.

When you need to keep checking the same pane after that first read, switch to capture_since readonly: the first call returns a cursor, and follow-up calls return only new pane output.

Next steps

  • Concepts — Understand the tmux hierarchy and how tools target panes

  • Configuration — Environment variables and socket isolation

  • Safety tiers — Control which tools are available

  • Tools — Browse all available tools