home / mcp / tmux mcp server

Tmux MCP Server

A server that lets AI agents interact with tmux sessions via MCP using stdio

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "lox-tmux-mcp-server": {
      "command": "go",
      "args": [
        "run",
        "./cmd/tmux-mcp-server"
      ]
    }
  }
}

You can run a dedicated MCP server that lets AI agents control and interact with tmux terminal sessions. This server communicates over standard input/output, exposing a set of tools to start, control, view, and close tmux sessions in a programmable way. It is useful when you want automated agents to manage terminal workflows, run commands, and capture screen content from any tmux session.

How to use

You will run the MCP server locally and connect to it from an MCP client. The server exposes a set of actions to manage tmux sessions: create a new session, send commands and keystrokes, capture the current screen, list all active sessions, join an existing session, and close a session. Use these actions in sequence to automate terminal tasks such as editing files, running commands, or performing interactive workflows inside tmux.

How to install

Prerequisites: Node, Python, or other runtime environments are not required for this server itself, but you must have Go installed to run it.

Install Go (1.22+ is sufficient for most environments). If you do not have Go installed, install it from the official source for your platform.

Install tmux on your system since the server relies on tmux to create and manage terminal sessions.

Run the MCP server locally using Go. Use the exact command shown to start the server.

Additional notes and examples

To start the server, run:

go run ./cmd/tmux-mcp-server

Available tools

start_session

Create a new tmux session with a given name and optional initial command.

send_commands

Send a sequence of commands and keystrokes to a specified tmux session, enabling interactive workflows.

view_session

Capture the current screen content of a tmux session for display or analysis.

list_sessions

List all active tmux sessions currently managed by the server.

join_session

Attach to or join an existing tmux session by name.

close_session

Terminate a tmux session and clean up resources.