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

Edit this page on GitHub

@libtmux/mcp 0.1.0-alpha.10 · Source

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

Import the server factory to embed MCP. Use protocol tool names when communicating through an MCP client.

Embedding APILink to section

createTmuxMcpServer(tmux, options) accepts a libtmux Server and returns the SDK’s McpServer. Options can supply the caller environment, tool-selection environment, resolved policy, and startup provenance. Without supplied provenance, the factory treats the server as unprobed with unknown configuration.

serverFromEnvironment(environment) builds the libtmux endpoint from startup configuration. The executable combines endpoint resolution, startup probing, policy selection, and stdio transport. An embedding application owns its transport and shutdown.

Exported server functions and in-process example describe this boundary.

MCP referenceLink to section

The tool reference covers wire operations. Registered tools publish input schemas, output schemas, structured results, and effect annotations. The startup selection determines which tools are listed and callable.

tmux://capabilities is a static JSON resource containing the frozen surface and its declarations. There are no workflow prompts or dynamic hierarchy-resource subscriptions.

Resource registration.

Workspace parsing and application belong to @libtmux/workspace, not to a workspace MCP tool.

API declarations

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

Exports

mcp.server.createTmuxMcpServer
An MCP server exposing a tmux server through libtmux.
mcp.server.describeStartupFailure
One actionable line for a failure that happened before serving began.
mcp.server.main
Serve over stdio when run directly.
mcp.policy.Policy
mcp.server.serverFromEnvironment
The tmux server this process was pointed at.
mcp.policy.Toolset

Types used in signatures

These types describe returned values or parameters; they are not package entry points.

mcp.startup.ConfigurationProvenance
mcp.startup.ServerStartup
Socket facts observed once, before the MCP surface is exposed.
mcp.startup.ServerState
Esc

Type to search.