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’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.- MCP request method
tools/callSendlist_serversas the tool name, with the arguments below.
Arguments#
-
extra_socket_paths? =null(Array<string> | null) #Additional filesystem paths to probe alongside the
$TMUX_TMPDIRscan. Each path is checked for liveness (UNIXconnect()) and queried for server metadata. Paths that do not exist, are not sockets, or have no listener are silently skipped.
No other arguments are accepted.
Result#
Returns object
Annotations#
destructiveHinttrueidempotentHintfalseopenWorldHinttruereadOnlyHintfalse
Protocol data#
Use the complete advertised contract for validation and client integration.
Input schema
{"additionalProperties": false,"properties": {"extra_socket_paths": {"anyOf": [{"items": {"type": "string"},"type": "array"},{"type": "null"}],"default": null,"description": "Additional filesystem paths to probe alongside the\n``$TMUX_TMPDIR`` scan. Each path is checked for liveness (UNIX\n``connect()``) and queried for server metadata. Paths that do\nnot exist, are not sockets, or have no listener are silently\nskipped."}},"type": "object"}Output schema
{"properties": {"result": {"items": {"description": "Serialized tmux server info.","properties": {"is_alive": {"description": "Whether the server is running","type": "boolean"},"session_count": {"description": "Number of sessions","type": "integer"},"socket_name": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Socket name"},"socket_path": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "Socket path"},"version": {"anyOf": [{"type": "string"},{"type": "null"}],"default": null,"description": "tmux version"}},"required": ["is_alive","session_count"],"type": "object"},"type": "array"}},"required": ["result"],"type": "object","x-fastmcp-wrap-result": true}