cmux-mcp
MCP server wrapping the cmux CLI to let agents control terminal panes, workspaces, input, and browser.
README
<p align="center"> <img src="assets/logo-blue.svg" alt="cmux-mcp" width="480"> </p>
MCP server wrapping the cmux CLI. Lets an MCP client (Claude Code, etc.) drive cmux panes, workspaces, terminal input, and the embedded browser.
It shells out to the cmux binary — cmux handles socket auth and ref parsing,
so this stays a thin, robust layer rather than re-speaking the Unix-socket RPC.
Tools
| Tool | What it does |
|---|---|
cmux_identify |
Current + focused window/workspace/pane/surface refs (JSON) |
cmux_tree |
window > workspace > pane > surface hierarchy |
cmux_list |
List windows / workspaces / panes |
cmux_capture |
Read a terminal surface's screen / scrollback |
cmux_new_pane |
Split a new terminal or browser pane |
cmux_new_workspace |
Create a workspace (name, cwd, startup command) |
cmux_rename_workspace |
Retitle a workspace (via workspace-action) |
cmux_focus_pane |
Focus a pane |
cmux_close |
Close a surface or workspace (explicit ref) |
cmux_close_current_workspace |
Safely close the calling pane's workspace (confirm-guarded) |
cmux_send |
Type literal text into a pane (no Enter) |
cmux_send_key |
Send a named key (Enter, C-c, …) |
cmux_notify |
Post a cmux notification |
cmux_browser |
Passthrough for any cmux browser subcommand (args array) |
cmux_raw |
Escape hatch — run any cmux subcommand |
The browser and raw passthroughs cover cmux's full surface without exploding the tool list into ~90 entries. The typed tools just save the agent from hand-assembling argv for the common verbs.
Workspace targeting
cmux defaults pane/workspace-spawning commands to the focused workspace,
which drifts as the user clicks around. When a tool call omits workspace, the
server falls back to CMUX_WORKSPACE_ID from its own environment — i.e. the
workspace the MCP client (and this server) was launched in — so new panes land
where the user is actually working. Pass workspace explicitly to override.
"Close this workspace" safety
cmux identify returns two refs: caller (the pane the calling process actually
runs in) and focused (the workspace with UI focus right now). These differ — an
agent runs in workspace A while the user clicks into workspace B, so B is focused.
cmux_close_current_workspace always resolves the target from
identify.caller.workspace_ref, never focused. If caller is null (invoked
outside a cmux terminal) it refuses and asks for an explicit ref rather than
guessing from focus. The first call only previews the resolved target
(About to close workspace:5 — user-roles-3. Confirm?); you must call again with
confirm=true to actually close — so a wrong target is caught before it's
destructive.
Do not use
identify --no-caller(or readfocused.workspace_ref) when the intent is "act on my own workspace" — it dropscallerand can close whatever the user last clicked.--no-calleris only for queries about UI focus.
Install
Requires Node ≥ 18 and the cmux app (the cmux binary).
Without cloning (recommended)
npx installs and builds straight from GitHub — no clone, no manual build:
claude mcp add cmux -- npx -y github:puchkoff/cmux-mcp
The first run compiles the TypeScript (via the package's prepare step) and caches it; later runs start instantly.
From a clone
git clone https://github.com/puchkoff/cmux-mcp.git
cd cmux-mcp
npm install
npm run build # compiles to dist/
Register with Claude Code
If you cloned, register with the absolute path to the built entrypoint:
claude mcp add cmux -- node /absolute/path/to/cmux-mcp/dist/index.js
--scope userregisters it for every project (default is the current project).- After adding, restart Claude Code (or reconnect via
/mcp) — MCP tools load at session start. - Verify:
claude mcp get cmuxshould report✓ Connected. Thecmux_*tools then appear.
Or register by hand in .mcp.json / settings:
{
"mcpServers": {
"cmux": {
"command": "node",
"args": ["/absolute/path/to/cmux-mcp/dist/index.js"]
}
}
}
Works with any MCP client (Cursor, etc.) — point it at node dist/index.js.
Env
CMUX_BIN— path to thecmuxbinary if it isn't onPATH(bundled at/Applications/cmux.app/Contents/Resources/bin/cmuxon macOS).CMUX_WORKSPACE_ID— default workspace ref (auto-set inside a cmux pane).
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。