tmux-mcp-server

lox/tmux-mcp-server

3.3

If you are the rightful owner of tmux-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An MCP server that lets AI agents interact with terminal sessions through tmux.

The Tmux MCP Server is a powerful tool designed to facilitate interaction between AI agents and terminal sessions using tmux. It operates by communicating through standard input/output (stdio) and offers a suite of tools for managing tmux sessions effectively. This server is particularly useful for automating tasks within terminal environments, allowing AI agents to create, manage, and interact with tmux sessions seamlessly. By leveraging the capabilities of tmux, the server can handle multiple terminal sessions simultaneously, making it an ideal solution for complex automation tasks. The server is built using Go, ensuring high performance and reliability, and it integrates with Hermit for managing development dependencies, ensuring consistent environments across different machines.

Features

  • Create and manage tmux sessions
  • Send commands and keystrokes to sessions
  • Capture and view current screen content
  • List and join active sessions
  • Close sessions when no longer needed

Usages

usage with stdio

bash
go run ./cmd/tmux-mcp-server

example start session

{
  "name": "start_session",
  "arguments": {
    "session_name": "edit_work",
    "command": "vim README.md"
  }
}

example send commands

{
  "name": "send_commands",
  "arguments": {
    "session_name": "edit_work",
    "commands": [
      "i",
      "Hello world!",
      "<ESC>",
      ":wq",
      "<ENTER>"
    ]
  }
}

Tools

  1. start_session

    Create a new tmux session

  2. send_commands

    Send commands and keystrokes to a session

  3. view_session

    Capture the current screen content

  4. list_sessions

    Show all active sessions

  5. join_session

    Join an existing session

  6. close_session

    End a session