MCPconceptAPI Reference

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.

mcp.Instance

struct mcp.Instance

Instance owns the SDK server, all connected client sessions, and every resource allocated on their behalf. The SDK server is composed so Connect and Run cannot bypass lifecycle tracking.

Guides#

Pages that discuss Instance.

Members4#

Common operations1#

  • Connect method Connect starts and tracks one client session. It requires tmux 3.3a or newer and rejects an opaque transport unless AssumeResponseCommit marks its response-write contract. Incoming messages remain gated until the SDK session has an installed scope.

Other members3#

  • Run method Run serves one tracked session until the client, context, or instance ends. Its transport requirements are the same as Instance.Connect.
  • Close method Close starts shutdown and waits on a bounded internal context.
  • CloseContext method CloseContext starts shutdown unconditionally. ctx bounds only this call's wait; a later call can resume waiting for the same shutdown.
Esc

Type to search.

Reference previewOpen reference