# mcp.server.createTmuxMcpServer

- **Module:** mcp.server
- **Package:** @libtmux/mcp
- **Language:** TypeScript
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/mcp/src/server.ts#L52
- **Page:** https://libtmux.org/en/ts/latest/mcp/reference/mcp-server-createtmuxmcpserver/

```
mcp.server.createTmuxMcpServer(tmux: : Server, options: : { /** Complete environment identifying the host process's tmux pane. */ readonly callerEnvironment?: Readonly<Record<string, string | undefined>>; /** Complete environment from which to resolve MCP tool policy. */ readonly environment?: Readonly<Record<string, string | undefined>>; readonly policy?: Policy; /** Socket state and configuration provenance pinned before registration. */ readonly startup?: ServerStartup; } = {}) -> McpServer
```

An MCP server exposing a tmux server through libtmux.

Instructions are built at construction rather than at handshake because they
carry where this process is running, which cannot change while it runs.
