tmux-mcp-tools logo

tmux-mcp-tools

by PsychArch

tmux-mcp-tools provides MCP (Message Passing Communication) tools for interacting with tmux sessions. It allows you to capture pane content, send commands, and write files within tmux panes.

View on GitHub

Last updated: N/A

tmux-mcp-tools

Provide MCP tools for interacting with tmux sessions.

Tmux Configuration

Add the following to your .tmux.conf file to create a keybinding that opens the client in a new pane:

bind-key M-k split-window -h -p 33 "uvx --from tmux-mcp-tools tmux-agent --target $(tmux display-message -p '#{pane_index}');"

This will bind Alt+K to open a new pane with the client, targeting the current pane.

Features

  • tmux_capture_pane: Capture the content of a tmux pane
  • tmux_send_command: Send commands to a tmux pane with automatic Enter key
  • tmux_write_file: Write content to a file using heredoc pattern in a tmux pane

Usage

{
  "mcpServers": {
   "tmux-mcp-tools": {
      "command": "uvx",
      "args": ["tmux-mcp-tools"]
    }
  }
}