# tmux MCP for Python

Source: https://libtmux.org/en/py/latest/mcp/

> Expose tmux tools, resources, and prompts through Python's libtmux-mcp server.

`libtmux-mcp` lets an MCP client inspect tmux, create sessions and panes,
run commands, and wait for their results. The distribution and executable are
`libtmux-mcp`; Python imports use [`libtmux_mcp`](<https://libtmux.org/en/py/latest/reference/#libtmux_mcp>).

The server runs over standard input and output. It requires Python 3.10 or
newer and tmux 3.2a or newer. Its default toolsets are [`inspect`](<https://docs.python.org/3/library/inspect.html#module-inspect>), `manage`,
and `execute`; deletion tools require an explicit selection.

## Start here

- [Install](https://libtmux.org/en/py/latest/mcp/#install) points an MCP client at this server.
- [Tools](https://libtmux.org/en/py/latest/mcp/tools/) lists the MCP operations, arguments, and results.
- [Guides](https://libtmux.org/en/py/latest/mcp/guides/) connect a client and select a tmux socket.
- [Topics](https://libtmux.org/en/py/latest/mcp/topics/) explain toolsets, trust, waiting, and caller context.
- [Examples](https://libtmux.org/en/py/latest/mcp/examples/) call a tool, then explore server internals.
- [Language API](https://libtmux.org/en/py/latest/mcp/reference/) documents embedding and implementation types.

For declarative session configuration, use the
[Workspace Manager](https://libtmux.org/en/py/latest/workspace/), provided by the separate `tmuxp`
project. The MCP server does not provide a tmuxp file loader.

The [upstream Python documentation](https://libtmux-mcp.git-pull.com/)
covers client integrations and the complete tool reference.
These pages follow the [Python implementation](https://github.com/tmux-python/libtmux-mcp/tree/v0.1.0a22).
