Skip to main content
Glama

@audibleblink/tmux-mcp-server

An MCP (Model Context Protocol) server for managing local tmux sessions. Enables AI assistants to interact with tmux for terminal multiplexing, session management, and command execution.

Installation

npm install -g @audibleblink/tmux-mcp-server

Or run directly with npx:

npx @audibleblink/tmux-mcp-server

Related MCP server: Post-Exploitation tmux MCP Server

Requirements

  • Node.js >= 18

  • tmux installed and available in PATH

Usage

With Claude Desktop

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):

{
  "mcpServers": {
    "tmux": {
      "command": "npx",
      "args": ["-y", "@audibleblink/tmux-mcp-server"]
    }
  }
}

With OpenCode

Add to your OpenCode config (~/.config/opencode/config.json):

{
  "mcp": {
    "servers": {
      "tmux": {
        "type": "local",
        "command": ["npx", "-y", "@audibleblink/tmux-mcp-server"]
      }
    }
  }
}

Standalone

tmux-mcp-server

Available Tools

Session Management

  • tmux_list_sessions - List all active tmux sessions

  • tmux_create_session - Create a new tmux session

  • tmux_kill_session - Kill a tmux session

  • tmux_rename_session - Rename an existing session

Window Management

  • tmux_list_windows - List windows in a session

  • tmux_create_window - Create a new window

  • tmux_kill_window - Kill a window

  • tmux_select_window - Switch to a window

  • tmux_rename_window - Rename a window

Pane Management

  • tmux_list_panes - List panes in a window

  • tmux_split_window - Split window into panes

  • tmux_kill_pane - Kill a pane

  • tmux_select_pane - Switch to a pane

  • tmux_resize_pane - Resize a pane

Interaction

  • tmux_send_keys - Send keys/commands to a pane

  • tmux_capture_pane - Capture pane content/output

License

WTFPL

Available Tools

16 tools
tmux_capture_paneCapture tmux Pane ContentA
Read-onlyIdempotent

Capture the visible content or history of a tmux pane.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • pane (number, optional): Pane index

  • start_line (number, optional): Start line (negative = history, 0 = top of visible)

  • end_line (number, optional): End line (use - for bottom of visible pane)

  • escape_sequences (boolean, optional): Include escape sequences (default: false)

This tool is useful for reading command output or checking the state of a pane.

Inputs: session (required), window, pane, start_line, +2 more.

tmux_create_sessionCreate tmux SessionA

Create a new tmux session.

Args:

  • name (string, required): Name for the new session

  • window_name (string, optional): Name for the initial window

  • start_directory (string, optional): Starting directory for the session

The session is created in detached mode. Use this to start new working environments.

Inputs: name (required), window_name, start_directory.

tmux_create_windowCreate tmux WindowB

Create a new window in a tmux session.

Args:

  • session (string, required): Name of the session

  • name (string, optional): Name for the new window

  • start_directory (string, optional): Starting directory for the window

Inputs: session (required), name, start_directory.

tmux_kill_paneKill tmux PaneA
DestructiveIdempotent

Kill (close) a pane in a tmux window.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • pane (number, required): Pane index

WARNING: This will terminate the process running in the pane.

Inputs: session (required), pane (required), window.

tmux_kill_sessionKill tmux SessionA
DestructiveIdempotent

Kill (terminate) a tmux session and all its windows/panes.

Args:

  • name (string, required): Name of the session to kill

WARNING: This will terminate all processes running in the session.

Inputs: name (required).

tmux_kill_windowKill tmux WindowA
DestructiveIdempotent

Kill (close) a window in a tmux session.

Args:

  • session (string, required): Name of the session

  • window (string or number, required): Window index or name

WARNING: This will terminate all processes running in the window.

Inputs: session (required), window (required).

tmux_list_panesList tmux PanesA
Read-onlyIdempotent

List all panes in a tmux window.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name (defaults to current/active window)

Returns information about each pane including index, dimensions, and current command.

Inputs: session (required), window.

tmux_list_sessionsList tmux SessionsA
Read-onlyIdempotent

List all active tmux sessions.

Returns information about each session including:

  • Session name

  • Number of windows

  • Creation time

  • Whether the session is currently attached

Use this tool to discover available sessions before operating on them.

Inputs: no named parameters.

tmux_list_windowsList tmux WindowsA
Read-onlyIdempotent

List all windows in a tmux session.

Args:

  • session (string, required): Name of the session

Returns information about each window including index, name, active status, and pane count.

Inputs: session (required).

tmux_rename_sessionRename tmux SessionA
Idempotent

Rename an existing tmux session.

Args:

  • old_name (string, required): Current session name

  • new_name (string, required): New session name

Inputs: old_name (required), new_name (required).

tmux_rename_windowRename tmux WindowB
Idempotent

Rename a window in a tmux session.

Args:

  • session (string, required): Name of the session

  • window (string or number, required): Window index or current name

  • new_name (string, required): New window name

Inputs: session (required), window (required), new_name (required).

tmux_resize_paneResize tmux PaneB

Resize a pane in a tmux window.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • pane (number, optional): Pane index

  • direction (string, required): Direction to resize: up, down, left, right

  • amount (number, optional): Number of cells to resize by (default: 5)

Inputs: session (required), direction (required), window, pane, +1 more.

tmux_select_paneSelect tmux PaneB
Idempotent

Switch to a specific pane in a tmux window.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • pane (number, required): Pane index

Inputs: session (required), pane (required), window.

tmux_select_windowSelect tmux WindowB
Idempotent

Switch to a specific window in a tmux session.

Args:

  • session (string, required): Name of the session

  • window (string or number, required): Window index or name

Inputs: session (required), window (required).

tmux_send_keysSend Keys to tmux PaneA

Send keys or commands to a tmux pane.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • pane (number, optional): Pane index

  • keys (string, required): Keys or command to send

  • enter (boolean, optional): Press Enter after sending keys (default: true)

Examples:

  • Send a command: keys="ls -la", enter=true

  • Send text without executing: keys="echo hello", enter=false

  • Send special keys: keys="C-c" (Ctrl+C), keys="C-d" (Ctrl+D)

Inputs: session (required), keys (required), window, pane, +1 more.

tmux_split_windowSplit tmux WindowA

Split a window into panes.

Args:

  • session (string, required): Name of the session

  • window (string or number, optional): Window index or name

  • horizontal (boolean, optional): Split horizontally (default: false = vertical split)

  • start_directory (string, optional): Starting directory for the new pane

  • percentage (number, optional): Size of new pane as percentage (1-99)

Inputs: session (required), window, horizontal, start_directory, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 16 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific tmux operations with no overlap. For example, tmux_capture_pane reads content, tmux_send_keys inputs commands, and tmux_kill_pane/ tmux_kill_window/ tmux_kill_session handle different termination scopes, making misselection unlikely.

    Naming Consistency5/5

    All tools follow a consistent tmux_verb_noun pattern with snake_case throughout. The naming is predictable and readable, such as tmux_list_sessions, tmux_create_window, and tmux_rename_session, without any deviations in style.

    Tool Count4/5

    With 16 tools, the count is slightly high but reasonable for comprehensive tmux management, covering sessions, windows, panes, and interactions. It's well-scoped for the domain, though it borders on the heavier side without being excessive.

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for tmux operations, including creation, listing, modification, interaction, and termination of sessions, windows, and panes. No obvious gaps exist, enabling agents to perform full workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables programmatic control over tmux terminal sessions for SSH access, command execution, and terminal automation. Supports creating sessions, sending commands, capturing output, and managing multiple panes for interactive debugging and monitoring.
      8
      10 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Exposes tmux features to AI agents for managing sessions, windows, and panes with built-in command execution. It includes comprehensive guardrails to prevent destructive system operations, file deletions, and unauthorized network changes.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Allows AI assistants to create, manage, and interact with tmux sessions, windows, and panes programmatically.
      19
      19 PyPI
      MIT