tmux-mcp 0.1.0-alpha.13 · Source
For MCP client requests, use the tool reference. This page covers language APIs for embedding or extending the server.
The tmux_mcp crate exports the tool surface for applications that need
a custom policy or transport. Its executable supplies the stdio launcher.
Rust typesLink to section
TmuxTools::builder(server) constructs a tool surface over a libtmux
Server. Pass a Selection through .selection(), then build it. offered() reports
the definitions available under that selection.
The resulting type integrates with rmcp’s server machinery; the
embedding example uses
ServiceExt
and a stdio transport.
The crate API documents the Rust exports.
Protocol contractLink to section
The tool reference describes MCP names and schemas. Registered tools provide structured results and output schemas. Errors distinguish stale objects, retryable failures, and partial effects.
The static tmux://capabilities resource reports the startup-frozen
surface. Inspect tools read live tmux state. The current surface has no
workflow prompts or dynamic resource templates.
Workspace builder API describes the separate workspace parser, builder, and live-session export.
API declarations
Follow a declaration for its signature, members, documentation, and source.
Exports
mcp.views.Branch- One session with everything under it.
mcp.views.BranchPane- One pane inside a described window.
mcp.views.BranchWindow- One window inside a described session.
mcp.policy.Builder- Assembles a TmuxTools with the parts the environment usually supplies.
mcp.caller.CallerIdentity- The tmux pane hosting this process, as its environment describes it.
mcp.resources.capabilities- Serialize the effective capability report.
mcp.resources.CAPABILITIES_URI- The only public resource URI.
mcp.manifest.CapabilityReport- The frozen, effective MCP surface reported at tmux://capabilities.
mcp.views.Capture- What a pane is showing.
mcp.model.CapturePaneArgs- Arguments for reading a pane.
mcp.model.CaptureSinceArgs- Arguments for reading what a pane wrote since last time.
mcp.model.ChannelArgs- Arguments naming a wait-for channel.
mcp.views.ChannelSignal- A channel that was signalled.
mcp.views.ChannelWait- How a wait on a channel finished.
mcp.model.CreateSessionArgs- Arguments for creating a session.
mcp.tail.Cursor- A place in one pane's output.
mcp.views.Environment- A tmux environment, server-wide or for one session.
mcp.policy.ENVIRONMENT_VALUES_ENV- The tmux environment variables whose values tools may return.
mcp.policy.environment_values_from_env- Read ENVIRONMENT_VALUES_ENV before serving MCP.
mcp.views.EnvironmentEntry- One tmux environment entry.
mcp.views.EnvironmentState- What tmux holds under one environment name.
mcp.policy.EXCLUDE_TOOLS_ENV- Individual tools removed after every inclusion path.
mcp.cli.HELP- The help text, which is also the documentation for the flags.
mcp.views.Hook- One tmux hook.
mcp.views.Hooks- The hooks set at one scope.
mcp.views.Killed- An object that was destroyed.
mcp.views.Layout- A window whose layout was set.
mcp.resources.listed- List the static capability report.
mcp.views.Marks- Whether tmux knew where the last command's output began.
mcp.views.Matches- Where a pattern was found.
mcp.views.MatchView- One line of one pane that matched a search.
mcp.model.OptionArgs- Arguments for reading a tmux option.
mcp.cli.Options- What the binary was asked to do.
mcp.views.OptionValue- The value of one tmux option.
mcp.model.PaneArgs- Arguments naming one pane.
mcp.views.PaneChanged- A pane that was cleared, respawned, or retitled.
mcp.views.Panes- Every pane asked for.
mcp.views.PaneView- One pane, as the protocol sees it.
mcp.policy.parse_environment_values- Parse the operator's allowed environment names.
mcp.views.Pasted- Text that was pasted into a pane.
mcp.model.PasteTextArgs- Arguments for putting text into a pane without typing it.
mcp.caller.Relation- How a pane relates to the process answering the request.
mcp.policy.Reporter- Whoever asked to be told how a long call is getting on.
mcp.model.ResizePaneArgs- Arguments for resizing a pane.
mcp.policy.RETIRED_RUST_SAFETY_ENV- The older Rust-specific safety setting, rejected rather than ignored.
mcp.policy.RETIRED_SAFETY_ENV- The retired ordered-safety setting, rejected rather than ignored.
mcp.model.RunCommandArgs- Arguments for running a command and waiting for it.
mcp.exec.RunOutcome- How a run finished.
mcp.exec.RunView- What a command did.
mcp.model.SearchPanesArgs- Arguments for searching what panes are showing.
mcp.policy.Selection- The startup-frozen request for one MCP tool surface.
mcp.model.SelectLayoutArgs- Arguments for arranging a window's panes.
mcp.model.SelectPaneArgs- Arguments for moving focus between panes.
mcp.model.SelectWindowArgs- Arguments for moving focus between windows.
mcp.model.SendKeysArgs- Arguments for sending input to a pane.
mcp.views.Sent- Keys that were sent.
mcp.model.SessionArgs- Arguments naming one session.
mcp.views.Sessions- Every session on the server.
mcp.views.SessionView- One session, as the protocol sees it.
mcp.model.ShowEnvironmentArgs- Arguments for reading a tmux environment.
mcp.model.ShowHooksArgs- Arguments for reading the hooks set at a scope.
mcp.views.Since- What a pane wrote since a cursor.
mcp.views.Size- A pane's size after being resized.
mcp.views.Snapshot- A pane's contents and the state a capture leaves out.
mcp.model.SnapshotArgs- Arguments for reading a pane's whole state.
mcp.policy.SocketProvenance- What startup can honestly claim about the selected tmux daemon.
mcp.cli.Stop- Why the binary is stopping before it serves anything.
mcp.policy.SurfaceError- A startup configuration or manifest error.
mcp.resources.templates- Dynamic resources are outside the shared cross-port contract.
mcp.src.TmuxTools- A tmux server presented as MCP tools.
mcp.policy.TOOLS_ENV- Individual tools added after toolset expansion.
mcp.policy.Toolset- One mechanical group in the advertised MCP tool inventory.
mcp.policy.TOOLSETS_ENV- The unordered toolsets enabled for this process.
mcp.views.Tree- The whole hierarchy, in one answer.
mcp.model.WaitForTextArgs- Arguments for waiting until a pane says something.
mcp.exec.WaitOutcome- How a wait for text finished.
mcp.exec.WaitView- What a pane said while it was watched for a pattern.
mcp.model.WindowArgs- Arguments naming one window.
mcp.views.Windows- Every window asked for.
mcp.views.WindowView- One window, as the protocol sees it.
Types used in signatures
These types describe returned values or parameters; they are not package entry points.
mcp.tools.error.ToolError- A tool-execution failure, reported as isError tool content.
mcp.tools.contract.VariablesArgsmcp.tools.contract.VariablesValue