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@latestThen register:
$ claude mcp add tmux -- libtmux-mcpThat 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@latestThen register:
$ claude mcp add tmux --scope user -- libtmux-mcpThat 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@latestThen register:
$ claude mcp add tmux --scope project -- libtmux-mcpThat 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@latestThen use this config:
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@latestThen register:
$ codex mcp add tmux -- libtmux-mcpThat 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@latestThen register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
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@latestThen register:
$ gemini mcp add --scope user tmux libtmux-mcpThat 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@latestThen register:
$ gemini mcp add --scope project tmux libtmux-mcpThat 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@latestThen use this config:
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@latestThen use this config:
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@latestThen register:
$ grok mcp add --scope user tmux -- libtmux-mcpThat 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@latestThen register:
$ grok mcp add --scope project tmux -- libtmux-mcpThat 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@latestThen use this config:
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@latestThen register:
$ opencode mcp add tmux -- libtmux-mcpThat 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
Connect a client
Install the executable, select a socket, and diagnose startup.
Tool selection
Choose toolsets, individual tools, and exclusions.
List sessions
Run a complete SDK client against its own tmux server.
Run a command
Check command completion, exit status, and captured output.
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.