Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

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

API reference · Markdown

libtmux_mcp.tools.server_tools.list_servers ( extra_socket_paths : list[str] | None = None ) → list[ServerInfo]
function [source]
function [source]
libtmux_mcp.tools.server_tools.list_servers

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's expand_paths + TMUX_SOCK template). Only sockets with a live listener are reported; stale inodes (a common case on long-running systems where $TMUX_TMPDIR can carry thousands of orphans) are silently filtered.

Scope caveat: custom tmux -S /some/path/... servers that live OUTSIDE $TMUX_TMPDIR are not returned by the scan alone — there is no canonical registry for arbitrary socket paths. Supply known paths via extra_socket_paths to include them in the result, or pass the path to other tools via their socket_name / socket_path parameters once known.

Parameters
  • extra_socket_paths ( list[str] | None ) – Additional filesystem paths to probe alongside the $TMUX_TMPDIR scan. Each path is checked for liveness (UNIX connect()) and queried for server metadata. Paths that do not exist, are not sockets, or have no listener are silently skipped.

Returns

list[ServerInfo] One entry per live tmux server found. Canonical-directory results come first, followed by successful extra_socket_paths probes in the supplied order. Empty when nothing lives under $TMUX_TMPDIR and no extras are supplied or reachable.

Esc

Type to search.