# mcp.server.serverFromEnvironment

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

```
mcp.server.serverFromEnvironment(environment: : Readonly<Record<string, string | undefined>> = process.env) -> Server
```

The tmux server this process was pointed at.

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 itself never reads these — a library that picks up ambient
configuration is a library that surprises its caller — which is why the
reading happens out here, at the edge that has a process to belong to.
