Skip to content

Commit d08261d

Browse files
committed
mcp(feat[server]): Add version and expand instructions
why: The MCP lifecycle spec shows `serverInfo` with `name`, `title`, and `version` fields. The server was missing `version`. The instructions string also lacked the tmux hierarchy model and env var configuration that help LLMs use tools effectively. what: - Add `version` from `libtmux.__about__.__version__` - Add tmux hierarchy description (Server > Session > Window > Pane) - Document LIBTMUX_SOCKET env var default for socket_name
1 parent 6088e7f commit d08261d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libtmux/mcp/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77

88
from fastmcp import FastMCP
99

10+
from libtmux.__about__ import __version__
11+
1012
mcp = FastMCP(
1113
name="libtmux",
14+
version=__version__,
1215
instructions=(
1316
"libtmux MCP server for programmatic tmux control. "
17+
"tmux hierarchy: Server > Session > Window > Pane. "
1418
"Use pane_id (e.g. '%1') as the preferred targeting method - "
1519
"it is globally unique within a tmux server. "
1620
"Use send_keys to execute commands and capture_pane to read output. "
17-
"All tools accept an optional socket_name parameter for multi-server support."
21+
"All tools accept an optional socket_name parameter for multi-server "
22+
"support (defaults to LIBTMUX_SOCKET env var)."
1823
),
1924
)
2025

0 commit comments

Comments
 (0)