# libtmux.Server.clients

- **Module:** libtmux.Server
- **Package:** libtmux
- **Language:** Python
- **Kind:** property
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/server.py#L2464
- **Page:** https://libtmux.org/reference/py/libtmux-server-clients/

```
libtmux.Server.clients(self) -> QueryList[Client]
```

Clients attached to this tmux server.

Each attached terminal is a separate :class:`Client`. ``server.clients``
returns the typed view; ``client.client_readonly``, ``client.client_termtype``,
``client.client_session`` etc. read tmux's ``client_*`` format tokens.

Returns an empty :class:`~libtmux._internal.query_list.QueryList` when
tmux's ``list-clients`` fails for any reason — no running daemon, a
missing socket, a permission error, or a subprocess failure. To
distinguish "no clients attached" from "tmux unreachable", call
:meth:`Server.is_alive` or :meth:`Server.raise_if_dead`.

## Returns

:class:`~libtmux._internal.query_list.QueryList` of :class:`Client`

## Example

```python
>>> with control_mode() as ctl:
...     names = [c.client_name for c in server.clients]
...     ctl.client_name in names
True
```
