Labsco
MCP SERVER

Cmux Terminal Control

by daegweon

Run a command in a cmux tab and read its scrollback back, split and rearrange panes and workspaces by id, and post progress bars, status entries and log lines into the sidebar while a job runs.

Editors, Terminals & Local Dev EnvironmentVerified
Summary
A long-running job can report on itself in the sidebar instead of in the chat log.

Running a command and reading the output is the part every terminal server has; this one also owns the furniture around it. set_progress, set_status and log put the state of a job where a person glancing at the window will see it, and new_workspace, new_split and rename_tab let a task build the layout it needs and close it afterwards. The reach ends at cmux — nothing here drives another terminal emulator, and the built-in browser arrives as a single tool taking a subcommand string rather than as typed tools per action.

What it is

A control surface for the cmux terminal — its windows, workspaces, panes and surfaces, the sidebar beside them, and cmux's built-in browser — spread across 72 tools.

What you get
  • Command and output: write_to_terminal runs text in the active surface, read_terminal_output reads it back a chosen number of lines at a time, send_control_character sends Control-C and telnet-style escapes, capture_pane captures pane content in a tmux-compatible form, and pipe_pane sends pane output into a shell command.
  • Tabs, panes and windows addressed by id: list_surfaces, new_surface, close_surface, focus_surface, move_surface, reorder_surface, rename_tab, new_split and drag_surface_to_split for tabs; list_panes, new_pane, focus_pane, resize_pane, swap_pane, break_pane, join_pane and last_pane for panes; list_windows, new_window, close_window, focus_window, rename_window, next_window, previous_window, last_window and find_window for windows.
  • Workspaces as units of work: new_workspace opens one with a command and a working directory, select_workspace, rename_workspace, reorder_workspace, close_workspace and move_workspace_to_window move it around, and tree prints the whole windows-to-surfaces structure at once.
  • A sidebar the model can write to: set_progress takes a value from 0.0 to 1.0, set_status writes a keyed entry with a colour and icon, log writes levelled entries read back by list_log, and notify, display_message and trigger_flash raise something a person will notice.
  • Text handed between places: set_buffer stores named text, list_buffers lists it, paste_buffer pastes it into a terminal, and clear_history clears scrollback.
  • Event plumbing: set_hook sets or lists event hooks, wait_for blocks on a named signal with a timeout, respawn_pane restarts the shell in place, and surface_health checks surfaces in a workspace.
  • Viewers beside the terminal: browser drives cmux's built-in browser through a subcommand argument, and markdown_open opens a markdown file in a formatted panel with live reload.
Requirements

Cmux itself, running and reachable — ping answers on its socket and version reports the build. No account and no environment variables; every tool addresses a window, workspace, pane or surface that already exists on the machine.

Setup effort

One command — npx -y cmux-mcp