libtmux-mcp server

공식

libtmux 기반의 tmux MCP 서버

Libtmux MCP(으)로 무엇을 할 수 있나요?

  • tmux 상태 검사 — 세션 목록 요청, 팬 출력 캡처, 또는 특정 텍스트에 대한 팬 검색.
  • tmux 구조 관리 — 세션 이름 변경, 팬 크기 조정, 레이아웃 선택, 또는 세션 간 창 이동.
  • 팬에서 명령 실행 — 세션/창 생성, 팬 분할, 키 입력 전송, 또는 셸 명령 실행.
  • 팬 프로세스 제어 — 텍스트 또는 버퍼 붙여넣기, 팬 출력 파이프, 또는 환경 변수 및 옵션 설정.
  • tmux 객체 정리 — 팬 스크롤백 지우기, 세션/창/팬 종료, 또는 버퍼 삭제.
  • 셸 기록 억제 — 디스크 기록 제어 없이 세션 또는 창을 생성하여 테스트 실행을 더 깔끔하게.

문서

Terminal control for AI agents, built on libtmux and FastMCP.

This server maps tmux’s object hierarchy — sessions, windows, panes — into MCP tools grouped by the operation they request. The server enforces the selected groups at the MCP tool boundary.

[!warning] Warning Pre-alpha. APIs may change. Feedback welcome.

With uvx installed:

$ claude mcp add tmux -- uvx libtmux-mcp

Quickstart

Quickstart

Tools

Tools

Prompts

Prompts

Resources

Resources

Trust model

Trust model

Client setup

MCP Clients


What you can do

Inspect inspect

Request tmux state and terminal output.

list_sessions · capture_pane · capture_since · snapshot_pane · get_pane_info · find_pane_by_position · search_panes · wait_for_text · display_message · call_read_tools_batch

Manage manage

Change tmux structure or presentation.

rename_session · resize_pane · select_layout · select_pane · move_window · enter_copy_mode · load_buffer · wait_for_channel

Execute execute

Start or drive pane processes, or store state that can control later execution.

create_session · create_window · split_window · respawn_pane · send_keys · send_keys_batch · run_command · paste_text · paste_buffer · pipe_pane · set_option · set_environment

Teardown teardown

Delete tmux objects or retained scrollback. Not reversible.

clear_pane · kill_session · kill_window · kill_pane · kill_server · delete_buffer

Example: keep test runs out of persistent history

libtmux-mcp provides best-effort history suppression for Bash, Zsh, and Fish. MCP calls to run_command use lightweight command suppression by default. When you create a new shell, opt into stronger no-disk controls with suppress_persistent_history=true.

[!note] Prompt Create a tmux session called “checks” with best-effort no-disk shell-history controls, run pytest -q in its initial pane, and show me the result.

The agent calls create_session with suppress_persistent_history=true, reuses active_pane_id from the returned SessionInfo, and calls run_command without an override. The same spawn option on create_window, split_window, or respawn_pane applies only to the process that call starts.

These controls reduce history noise; they do not make commands secret. See History suppression for shell-specific behavior, Configuration for the server default, and Trust model for other observation surfaces.

Browse all tools →


Mental model

  • Object hierarchy — sessions contain windows, windows contain panes (Concepts)
  • Toolsets — inspect, manage, execute, teardown; what each groups (Trust model)
  • tmux is the source of truth — the server reads from it and writes to it, never caches or abstracts