MCP Clients¶
Copy-pasteable configuration for every supported MCP client. If your client isn’t listed, any tool supporting MCP stdio transport will work with the JSON config pattern.
See Migration notes for the recommended tmux registration slug
(existing libtmux registrations keep working).
Claude Code¶
With uv installed:
$ claude mcp add tmux -- uvx libtmux-mcp
With pipx installed:
$ claude mcp add tmux -- pipx run libtmux-mcp
Install the packages first:
$ pip install --user --upgrade libtmux libtmux-mcp
Then register:
$ claude mcp add tmux -- libtmux-mcp
Config file: .mcp.json (project) or ~/.claude.json (global).
Claude Desktop¶
Add to claude_desktop_config.json:
With uv installed:
{
"mcpServers": {
"tmux": {
"command": "uvx",
"args": ["libtmux-mcp"]
}
}
}
With pipx installed:
{
"mcpServers": {
"tmux": {
"command": "pipx",
"args": ["run", "libtmux-mcp"]
}
}
}
Install the packages first:
$ pip install --user --upgrade libtmux libtmux-mcp
Then use this config:
{
"mcpServers": {
"tmux": {
"command": "libtmux-mcp"
}
}
}
Codex CLI¶
With uv installed:
$ codex mcp add tmux -- uvx libtmux-mcp
With pipx installed:
$ codex mcp add tmux -- pipx run libtmux-mcp
Install the packages first:
$ pip install --user --upgrade libtmux libtmux-mcp
Then register:
$ codex mcp add tmux -- libtmux-mcp
config.toml format
Add to ~/.codex/config.toml:
[mcp_servers.tmux]
command = "uvx"
args = ["libtmux-mcp"]
Gemini CLI¶
With uv installed:
$ gemini mcp add tmux uvx -- libtmux-mcp
With pipx installed:
$ gemini mcp add tmux pipx -- run libtmux-mcp
Install the packages first:
$ pip install --user --upgrade libtmux libtmux-mcp
Then register:
$ gemini mcp add tmux libtmux-mcp
Config file: ~/.gemini/settings.json (JSON format, same schema as Claude Desktop).
Cursor¶
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
With uv installed:
{
"mcpServers": {
"tmux": {
"command": "uvx",
"args": ["libtmux-mcp"]
}
}
}
With pipx installed:
{
"mcpServers": {
"tmux": {
"command": "pipx",
"args": ["run", "libtmux-mcp"]
}
}
}
Install the packages first:
$ pip install --user --upgrade libtmux libtmux-mcp
Then use this config:
{
"mcpServers": {
"tmux": {
"command": "libtmux-mcp"
}
}
}
MCP Inspector¶
For testing and debugging:
$ npx @modelcontextprotocol/inspector
Config file locations¶
Client |
Config file |
Format |
|---|---|---|
Claude Code |
|
JSON |
Claude Desktop |
|
JSON |
Codex CLI |
|
TOML |
Gemini CLI |
|
JSON |
Cursor |
|
JSON |
Local checkout (development)¶
For live development, point your client at a local checkout via uv --directory:
Claude Code:
$ claude mcp add \
--scope user \
tmux -- \
uv --directory ~/work/python/libtmux-mcp \
run libtmux-mcp
Codex CLI / Gemini CLI / Cursor
Codex CLI:
$ codex mcp add tmux -- \
uv --directory ~/work/python/libtmux-mcp \
run libtmux-mcp
Gemini CLI:
$ gemini mcp add \
--scope user \
tmux uv -- \
--directory ~/work/python/libtmux-mcp \
run libtmux-mcp
Cursor — add to ~/.cursor/mcp.json:
{
"mcpServers": {
"tmux": {
"command": "uv",
"args": [
"--directory", "~/work/python/libtmux-mcp",
"run", "libtmux-mcp"
]
}
}
}
Common pitfalls¶
Absolute paths: Some clients require absolute paths in config. Use
$HOME/...or the full path instead of~/....Virtual environments: If using pip install, ensure the venv is activated or the
libtmux-mcpbinary is on your PATH.Socket isolation: Set
LIBTMUX_SOCKETin theenvblock to isolate the MCP server from your default tmux. See Configuration.