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

Install

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ claude mcp add tmux -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ claude mcp add tmux --scope user -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ claude mcp add tmux --scope project -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "/absolute/path/to/.build/debug/libtmux-mcp"
        }
    }
}

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

Config file: claude_desktop_config.json

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ codex mcp add tmux -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

Config file: ~/.codex/config.toml

Build or install the server first:

$ swift build --product libtmux-mcp

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 = "/absolute/path/to/.build/debug/libtmux-mcp"

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ gemini mcp add --scope user tmux /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

Config file: ~/.gemini/settings.json

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ gemini mcp add --scope project tmux /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "/absolute/path/to/.build/debug/libtmux-mcp"
        }
    }
}

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "/absolute/path/to/.build/debug/libtmux-mcp"
        }
    }
}

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

Config file: ~/.cursor/mcp.json

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ grok mcp add --scope user tmux -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

Config file: ~/.grok/config.toml

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ grok mcp add --scope project tmux -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "/absolute/path/to/.build/debug/libtmux-mcp"
        }
    }
}

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

Build or install the server first:

$ swift build --product libtmux-mcp

Then register:

$ opencode mcp add tmux -- /absolute/path/to/.build/debug/libtmux-mcp

Nothing publishes this server as a binary yet. The server takes no flags — which tmux it talks to is environment, so the client config is where you say so.

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

libtmux-mcp is the Swift stdio executable. LibTmuxMCP is the SwiftPM library product for embedding the same tools. They expose tmux discovery, captures, waits, input, configuration, and process control.

The package requires Swift 6.2 or newer and supports Linux and macOS. The documented Darwin dependency build uses Xcode’s Swift 6.3 toolchain. tmux is required at runtime.

Start here

  • Install points an MCP client at this server.
  • Tools lists the MCP operations, arguments, and results.
  • Guides build the executable and configure its environment.
  • Topics explain toolsets, command waits, and capability discovery.
  • Examples call a tool, then explore server internals.
  • Language API documents embedding and implementation types.

The executable defaults to inspection, management, and execution; a verified dedicated daemon can also receive teardown tools. The embedding initializer defaults to inspection alone. Read tmux://capabilities for the startup selection.

Workspace Manager is a separate library product. The current MCP catalog does not include a workspace-file operation.

Library contract and platform requirements.

Esc

Type to search.

Reference preview Open reference