MCP conceptExamples

Choose documentation 3

Concept and alpha: example support scope and release maturity.

v0.1.0.alpha.2

Current version

v0.1.0.alpha.2
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Edit this page on GitHub

Ruby MCP examples

libtmux-mcp 0.1.0.alpha.2 · Source

Both examples include their complete program, pinned dependencies, run commands, expected results, and cleanup. Each creates its own tmux daemon.

Default read-only catalog

The client guide generates an MCP configuration using the launcher’s absolute path and the current Ruby executable. Its default catalog contains tmux_capabilities and tmux_snapshot. Listing the tools and querying the example session verifies the connection.

The embedded example calls those tools from Ruby inside an Async scope. It creates two sessions and prints their names by following a snapshot cursor.

Add bounded observation

For capture or waits in the client launcher, add "--enable-tool", "tmux_capture" or "--enable-tool", "tmux_wait" to the array passed to LibTmux::MCP::CLI.run in run-mcp.rb. Adding them to the generated client configuration’s arguments has no effect: the launcher does not forward those arguments. Enable creation, input, close, or authored execution only when the client needs those effects. The guides overview explains the tool choices; the source-owned guide gives their lifecycle contracts.

Esc

Type to search.

Reference preview Open reference