MCPconceptHome

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Edit this page on GitHub

tmux MCP for Go

Install

Choose your client and configuration scope, then run the command or paste the configuration.

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.claude.json (this project)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux --scope user -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.claude.json (all projects)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux --scope project -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .mcp.json (in repo, version-controlled)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: claude_desktop_config.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ codex mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.codex/config.toml

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.

[mcp_servers.tmux]
command = "libtmux-mcp"

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .codex/config.toml (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ gemini mcp add --scope user tmux libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.gemini/settings.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ gemini mcp add --scope project tmux libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .gemini/settings.json (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .cursor/mcp.json (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.cursor/mcp.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ grok mcp add --scope user tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.grok/config.toml

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ grok mcp add --scope project tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ./.grok/config.toml (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.gemini/config/mcp_config.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ opencode mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.config/opencode/opencode.jsonc

github.com/libtmux/libtmux-go/mcp is a separate Go module that exposes tmux through MCP. Its executable is libtmux-mcp. Installing the core tmux module does not install this server or its protocol dependencies.

The server requires Go 1.26 or newer to build and tmux 3.3a or newer to run. The MCP client launches libtmux-mcp and exchanges messages over stdin and stdout. The server selects one tmux endpoint and its offered tools at startup. Reconnect after changing that configuration.

Start here

  • Install points an MCP client at this server.
  • Tools lists the MCP operations, arguments, and results.
  • Guides install the command and diagnose its connection.
  • Topics explain toolsets, command waits, and capability discovery.
  • Examples include complete client programs and their setup.
  • Language API documents embedding and implementation types.

Read tmux://capabilities for the effective startup selection. The Workspace Manager is a separate module; the current MCP catalog does not include a workspace-file operation.

Module contract.

Esc

Type to search.

Reference preview Open reference