# tmux MCP for Java

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

> Run or embed the Java MCP server with typed tmux tools and a static capability resource.

**MCP concept example** A working example of the core library. It can change without notice.

[`io.github.libtmux:libtmux-mcp`](https://github.com/libtmux/libtmux-java/blob/4f057d367a25dee818d70876fa283fc503a3a7eb/libtmux-mcp/README.md)
provides a Java MCP server and a
`libtmux-mcp` application launcher. It discovers tmux objects, captures
terminal output, runs framed shell commands, and applies typed topology
operations.

Use JDK 21 or newer and tmux. The launcher selects its endpoint and
toolsets at startup. It serves MCP over stdin and stdout.

## Start here

- [Install](https://libtmux.org/en/java/latest/mcp/#install) points an MCP client at this server.
- [Tools](https://libtmux.org/en/java/latest/mcp/tools/) lists the MCP operations, arguments, and results.
- [Guides](https://libtmux.org/en/java/latest/mcp/guides/) build the launcher and connect a client.
- [Topics](https://libtmux.org/en/java/latest/mcp/topics/) explain toolsets, input preflight, and wait semantics.
- [Examples](https://libtmux.org/en/java/latest/mcp/examples/) call a tool, then explore server internals.
- [Language API](https://libtmux.org/en/java/latest/mcp/reference/) documents embedding and implementation types.

The only MCP resource is the static [`tmux://capabilities`](<https://libtmux.org/en/java/latest/mcp/resources/tmux-capabilities/>) report.
The server does not register workflow prompts or dynamic resource
subscriptions.

The [Workspace Manager](https://libtmux.org/en/java/latest/workspace/) is a separate Java module.
Application code can parse and build declarative workspaces; MCP clients
compose the exposed topology tools.

[Module documentation](https://github.com/libtmux/libtmux-java/blob/4f057d367a25dee818d70876fa283fc503a3a7eb/libtmux-mcp/README.md).
