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

Edit this page on GitHub

LibTmuxMCP 0.1.0-alpha.5 · Source

For MCP client requests, use the tool reference. This page covers language APIs for embedding or extending the server.

LibTmuxMCP is a SwiftPM library product. libtmux-mcp wraps it in a stdio executable. Public Swift types and MCP wire operations have separate names and responsibilities.

Swift embedding APILink to section

TmuxTools(server:) constructs a readonly tool surface. ToolAuthority selects Toolset groups and named tool inclusions or exclusions. visibleDefinitions reports the selection; call(ToolCall) invokes an operation and returns structured data or throws ToolError.

MCPRequestHandler and MCPService provide protocol composition. ServerConfiguration parses the executable’s environment and builds its libtmux endpoint.

Embedding contract and configuration source.

MCP contractLink to section

The tool reference describes the wire catalog and schemas. Follow-up calls use opaque references returned by hierarchy discovery.

The static tmux://capabilities resource reports the startup-frozen surface. Live state comes from inspect tools. The current surface has no workflow prompts or dynamic resource templates.

The Workspace builder API owns workspace decoding and construction; those operations are separate from the MCP catalog.

API declarations

Follow a declaration for its signature, members, documentation, and source.

Exports

CallerIdentity
Where this MCP server is itself running, when that is inside tmux.
InputSink
The interpreter boundary reached by one caller-controlled input.
JSONValue
Just enough JSON to carry ids, arguments and results through without knowing their shape.
MCPRequestHandler
Answers MCP requests, one line at a time, without touching a file descriptor.
MCPService
Serves MCP over a stream of request lines.
OutputClass
Classes of data a successful call can return.
ProcessReach
Whether caller-controlled data can reach a workload process.
ProgressReporter
Says that a call is still running, to a client that asked to be told.
ServerConfiguration
How the executable is configured, read from the environment.
ServerProvenance
TmuxEffect
Direct effects on tmux state. This is a set, not an ordered safety level.
TmuxFormatControl
The manifest-owned control applied before a value reaches tmux format expansion.
TmuxTools
The tmux tools an MCP client can call.
ToolAnnotations
All four MCP hints are owned explicitly by each registry row.
ToolArgument
One argument of a tool, in enough detail to generate its schema.
ToolAuthority
The immutable selection applied to the authoritative registry.
ToolCall
One tool call, as it arrives.
ToolDefinition
One MCP tool as a client sees it: what to call it, and what it is for.
ToolError
Why a call could not produce its normal result.
ToolOperation
The stable protocol name of one of the 45 public MCP tools.
ToolOutcome
What a tool answers with.
Toolset
The independently selectable public tool groups.
Esc

Type to search.