cmux-mcp

cmux-mcp

MCP server wrapping the cmux CLI to let agents control terminal panes, workspaces, input, and browser.

Category
Visit Server

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 read focused.workspace_ref) when the intent is "act on my own workspace" — it drops caller and can close whatever the user last clicked. --no-caller is 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 user registers 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 cmux should report ✓ Connected. The cmux_* 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 the cmux binary if it isn't on PATH (bundled at /Applications/cmux.app/Contents/Resources/bin/cmux on macOS).
  • CMUX_WORKSPACE_ID — default workspace ref (auto-set inside a cmux pane).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured