MCPconceptExamples

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

Edit this page on GitHub

Go MCP examples

github.com/libtmux/libtmux-go/mcp · Source

Each program includes its dependencies, entry point, private tmux server, client transport, deadlines, and cleanup. The MCP executable is installed inside the example directory. No pre-existing tmux session is required.

List sessions

The session inspector calls list_sessions and verifies the returned session ID against the session it created. It reads metadata without sending input or capturing terminal content through MCP.

Internals

Applications can also embed the server and use an in-memory client transport. The upstream agent-workflow program demonstrates caller context, pane creation, command completion, and topology inspection. The language API reference documents the types used to embed the server.

Run the agent workflow

The upstream example instructions describe its repository setup and socket selection. For a standalone program with all setup on one page, use Run a command.

Clean up

The standalone programs close the MCP connection before stopping their owned tmux server. They use a fresh cleanup deadline even when a request times out, and retain the temporary directory if server cleanup fails. They never select your default tmux socket.

For workspace configuration without MCP, see Workspace builder examples.

Esc

Type to search.

Reference previewOpen reference