MCP server for tmux, powered by libtmux
Project description
libtmux-mcp
A Model Context Protocol server for tmux, built on libtmux.
[!WARNING] Pre-alpha. APIs may change. Contributions and feedback welcome.
Give your AI agent hands inside the terminal — create sessions, run commands, read output, orchestrate panes.
Tools
| Module | Tools |
|---|---|
| Server | list_sessions, create_session, kill_server, get_server_info |
| Session | list_windows, get_session_info, create_window, rename_session, select_window, kill_session |
| Window | list_panes, get_window_info, split_window, rename_window, select_layout, resize_window, move_window, kill_window |
| Pane | send_keys, paste_text, capture_pane, snapshot_pane, search_panes, get_pane_info, wait_for_text, wait_for_content_change, display_message, select_pane, swap_pane, resize_pane, set_pane_title, clear_pane, pipe_pane, enter_copy_mode, exit_copy_mode, respawn_pane, kill_pane |
| Options | show_option, set_option |
| Environment | show_environment, set_environment |
Quickstart
Requirements: Python 3.10+, tmux on $PATH.
Install and run:
uvx libtmux-mcp
Claude Code
claude mcp add tmux -- uvx libtmux-mcp
Codex CLI
codex mcp add tmux -- uvx libtmux-mcp
Gemini CLI
gemini mcp add tmux uvx -- libtmux-mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"tmux": {
"command": "uvx",
"args": ["libtmux-mcp"]
}
}
}
More clients and JSON config: client setup docs
What it feels like
You: Create a session called "api" and run
pytest tests/api/ -xin it.Agent: Created session
apiwith windowtests. Running pytest now. Here's the output — 14 passed, 2 failed. The failures are intest_auth.py::test_token_refreshandtest_auth.py::test_expired_session. Want me to open those files?
The agent manages tmux directly. No copy-pasting terminal output. No switching windows to check on long-running processes.
Documentation
Full docs, guides, and tool reference: libtmux-mcp.git-pull.com
Development
Clone and install:
git clone https://github.com/tmux-python/libtmux-mcp.git
cd libtmux-mcp
uv sync --dev
Run the server locally:
uv run libtmux-mcp
Run tests:
uv run pytest
Related projects
- libtmux — Python API for tmux
- tmuxp — tmux session manager
- The Tao of tmux — the book
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file libtmux_mcp-0.1.0a4.tar.gz.
File metadata
- Download URL: libtmux_mcp-0.1.0a4.tar.gz
- Upload date:
- Size: 505.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b40a20fe9e5cc483f6abed96e41e262b7f088d6211dbbe5d37cb19539b851003
|
|
| MD5 |
16cc70f66e7a3b36360c89e20a86aae6
|
|
| BLAKE2b-256 |
d4d88b2d0a727d6f8a5b03434628a2659b8d1152fa2dd5b11b29ebea8d5698d1
|
Provenance
The following attestation bundles were made for libtmux_mcp-0.1.0a4.tar.gz:
Publisher:
tests.yml on tmux-python/libtmux-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libtmux_mcp-0.1.0a4.tar.gz -
Subject digest:
b40a20fe9e5cc483f6abed96e41e262b7f088d6211dbbe5d37cb19539b851003 - Sigstore transparency entry: 1429602578
- Sigstore integration time:
-
Permalink:
tmux-python/libtmux-mcp@431393153d7a4a1d8d26c359d620d555f232d400 -
Branch / Tag:
refs/tags/v0.1.0a4 - Owner: https://github.com/tmux-python
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@431393153d7a4a1d8d26c359d620d555f232d400 -
Trigger Event:
push
-
Statement type:
File details
Details for the file libtmux_mcp-0.1.0a4-py3-none-any.whl.
File metadata
- Download URL: libtmux_mcp-0.1.0a4-py3-none-any.whl
- Upload date:
- Size: 82.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
154c4c4d3de4a7740ba5b99cba4817eca1afadad8a0b72c55f1b5bad70aab394
|
|
| MD5 |
361a1b7d0bcc4279e88b2778beb5f8f3
|
|
| BLAKE2b-256 |
6bed8c817ca2c6ba17a66e1c5836c7d3fbc057dc76bc0349ecec93c556f3e31f
|
Provenance
The following attestation bundles were made for libtmux_mcp-0.1.0a4-py3-none-any.whl:
Publisher:
tests.yml on tmux-python/libtmux-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
libtmux_mcp-0.1.0a4-py3-none-any.whl -
Subject digest:
154c4c4d3de4a7740ba5b99cba4817eca1afadad8a0b72c55f1b5bad70aab394 - Sigstore transparency entry: 1429602582
- Sigstore integration time:
-
Permalink:
tmux-python/libtmux-mcp@431393153d7a4a1d8d26c359d620d555f232d400 -
Branch / Tag:
refs/tags/v0.1.0a4 - Owner: https://github.com/tmux-python
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@431393153d7a4a1d8d26c359d620d555f232d400 -
Trigger Event:
push
-
Statement type: