claude-mux.mcp
Gives Claude Code terminal control and multi-agent coordination through tmux sessions.
README
claude-mux.mcp
MCP server for tmux. Gives Claude Code terminal control and multi-agent coordination through tmux sessions.
Install
claude plugin add claude-mux@rtd
Then run /install inside Claude Code to verify dependencies and register the MCP server. It checks for bun and tmux, installs packages, and smoke-tests the server.
To update:
claude plugin update claude-mux@rtd
Then run /install again to verify everything is current.
Requirements
- tmux —
brew install tmuxon macOS,apt install tmuxon Linux - Bun —
curl -fsSL https://bun.sh/install | bash
Manual install (development)
If you're working on the server itself, add to ~/.claude.json:
{
"mcpServers": {
"tmux": {
"command": "bun",
"args": ["/path/to/claude-mux.mcp/server.js"]
}
}
}
Actions
Observe
| Action | What it does |
|---|---|
list |
All sessions. Named ones show windows; numbered ones get a one-line summary. |
session |
One session in detail, previewing each pane's last visible line. |
read |
Capture pane output. lines sets history depth (default 100). |
tail |
Last N lines, no pagination. Quick look at what just happened. |
watch |
Delta since last read. Only new lines come back. |
transcript |
Read a pane's prior Claude Code sessions from the on-disk JSONL — not scrollback. No name: lists the cwd's sessions newest-first with a title preview. With name (list index or session id): the flattened conversation, tool calls reduced to one-line breadcrumbs. |
layout |
Every pane across all sessions with dimensions and running process. |
meta |
Authoritative machine-parseable metadata for dashboards (no params). Tab-delimited rows, row-type letter in column 0 — one S row per session (named and numbered, no collapsing) and one W row per window. S\t<session_name>\t<session_activity>\t<session_attached>\t<session_created>; W\t<session_name>\t<window_index>\t<window_name>\t<window_activity>\t<window_active 0|1>. Epochs are raw seconds; session_attached is the raw client count (>0 = attached). TAB is the sole delimiter (window names may contain spaces and :). |
Act
| Action | What it does |
|---|---|
type |
Literal text, spaces preserved. No Enter appended. |
typewait |
Type literal text + Enter, then wait. One call for "run this and show me what happened." |
keys |
Space-separated key tokens: Escape :q! Enter, C-c, Down Down Enter. |
keyswait |
Send keys, poll until prompt appears or output settles. Returns the delta. |
exec |
Wrap a command in start/done markers, return a commandId. Non-blocking. |
result |
Check a tracked command's status, exit code, and output by commandId. |
Manage
| Action | What it does |
|---|---|
new-session |
Create a session. |
kill-session |
Kill a session. |
new-window |
Create a window in a session. Returns the target for subsequent calls. |
kill-window |
Kill a window. |
split |
Split a pane. Returns the new pane target. text: "horizontal" or "vertical" (default). |
kill-pane |
Kill a pane. |
rename |
Rename a window. |
Coordinate
Cross-session agent messaging and task ownership. All state lives in tmux global environment and named buffers.
| Action | What it does |
|---|---|
register |
Identify yourself by name. Stored globally so other agents can find you. |
unregister |
Remove your registration. |
who |
List all registered agents across all sessions. |
post |
Message an agent by name, or "all" for broadcast. |
inbox |
Check for new messages. |
claim |
Take a task. Atomic file lock prevents two agents from claiming the same one. |
complete |
Mark a task done, release the lock. |
tasks |
List all tasks with owner and status. |
Workers
Spawn Claude Code instances as coordinating agents. Each worker gets a name, a team roster, and auto-injected inbox hooks so messages arrive without polling.
| Action | What it does |
|---|---|
spawn |
One-shot claude -p. Auto-closes when done, captures output to a tmux buffer. |
spawn-persist |
Same, but the window stays open for inspection. |
teammate |
Interactive claude session. Stays alive for ongoing coordination. |
despawn |
Kill a worker, clean up registration and temp files. |
worker-result |
Read a completed worker's captured output. |
Design notes
Plain text responses. list returns indented text, not nested JSON. Fewer tokens, easier for the model to parse.
Self-awareness. The server reads $TMUX_PANE on startup and reports you are here: main:0.1 in listings so the model knows which pane is itself.
type vs keys. keys splits on spaces — each token is a tmux key name. Good for Escape :q! Enter, destroys prose. type sends literal text with spaces intact.
exec/result for long commands. typewait blocks up to 30 seconds. exec drops start/done markers, returns a commandId immediately, and result checks on it later. Auto-detects zsh, bash, or fish.
Completion detection. keyswait and typewait poll every 500ms. Shell prompt means done. Output unchanged for 2s means settled. 30s timeout ceiling.
Atomic task claiming. claim uses O_EXCL file creation so two agents racing for the same task can't both win.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。