# LibTmux.Mcp.TmuxConnectionAccessor

- **Module:** LibTmux.Mcp
- **Package:** LibTmux.Mcp
- **Language:** .NET
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux.Mcp/Connection/TmuxConnectionAccessor.cs#L23
- **Page:** https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-tmuxconnectionaccessor/

Holds the tmux servers this process talks to, one per socket.

A conversation outlives any single tool call, so connecting once and keeping
the handle costs one process launch instead of one per call. Sockets are
cached separately because a machine runs several tmux servers at once — a
user's own, a test rig's, a sandbox's — and they are different servers with
the same commands, not one server addressed two ways.

When no template is supplied, the tmux binary comes from
<c>LIBTMUX_TMUX</c>. An explicit template is already a pinned route and wins
over later process-environment changes.

## Members

- `TmuxConnectionAccessor` (method): Initializes the accessor.
- `DefaultSocketName` (property): Gets the socket used when a call names none.
- `Dispose` (method)
- `GetAsync` (method): Answers a server, connecting on the first ask for that socket.
- `Invalidate` (method): Forgets a cached server so the next call reconnects.
