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: API Reference

mcp.server.serverFromEnvironment

function serverFromEnvironment( environment: Readonly< Record<string, string | undefined> > = process.env, ): Server

The tmux server this process was pointed at.

Description#

An MCP client launches this with an environment and a command line, and nothing else, so the environment is the only place a socket can come from. The library reads LIBTMUX_SOCKET_PATH, else LIBTMUX_SOCKET, from it; with neither set no socket is passed and tmux picks the server, which inside tmux is the one TMUX names. What the library chose is checked here, at the edge that has a process to answer for it.

Parameters

Guides#

Pages that discuss serverFromEnvironment.

Esc

Type to search.

Reference previewOpen reference