libtmux_mcp.tools.server_tools.list_servers
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- libtmux_mcp.tools.server_tools.list_servers ( extra_socket_paths : list[str] | None = None ) list[ServerInfo]
-
Discover live tmux servers under the current user's
$TMUX_TMPDIR.Scans
${TMUX_TMPDIR:-/tmp}/tmux-<uid>/for socket files — the canonical location where tmux creates per-server sockets (see tmux.c'sexpand_paths+TMUX_SOCKtemplate). Only sockets with a live listener are reported; stale inodes (a common case on long-running systems where$TMUX_TMPDIRcan carry thousands of orphans) are silently filtered.Scope caveat: custom
tmux -S /some/path/...servers that live OUTSIDE$TMUX_TMPDIRare not returned by the scan alone — there is no canonical registry for arbitrary socket paths. Supply known paths viaextra_socket_pathsto include them in the result, or pass the path to other tools via theirsocket_name/socket_pathparameters once known.- Parameters
- Returns
-
list[ServerInfo] One entry per live tmux server found. Canonical-directory results come first, followed by successful
extra_socket_pathsprobes in the supplied order. Empty when nothing lives under$TMUX_TMPDIRand no extras are supplied or reachable.