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

mcp.Instance

Go
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

API reference · Markdown

struct mcp.Instance
struct [source]
struct [source]
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.

Discussed in Go MCP API

Members

Connect

Connect ( ctx : context.Context , transport : sdk.Transport , options : *sdk.ServerSessionOptions ) → (*ServerSession, error)
method [source]
method [source]
Connect

Connect starts and tracks one client session. It requires tmux 3.2a 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.

Discussed in Go MCP API

Run

Run ( ctx : context.Context , transport : sdk.Transport ) → error
method [source]
method [source]
Run

Run serves one tracked session until the client, context, or instance ends. Its transport requirements are the same as Instance.Connect .

Close

Close ( ) → error
method [source]
method [source]
Close

Close starts shutdown and waits on a bounded internal context.

CloseContext

CloseContext ( ctx : context.Context ) → error
method [source]
method [source]
CloseContext

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.