Loading...
Set up CmuxLayer — Terminal Agent Lifecycle MCP
Clone the repository and build the TypeScript source. Requires Node.js 20+.
git clone https://github.com/EtanHey/cmuxlayer.git
cd cmuxlayer && npm install && npm run build*The build compiles TypeScript to dist/index.js — the MCP server entry point.
Add cmuxlayer to your Claude Code MCP configuration. The server exposes all 20 tools automatically.
// ~/.claude/settings.json
{
"mcpServers": {
"cmux": {
"command": "node",
"args": ["/path/to/cmuxlayer/dist/index.js"]
}
}
}Use the spawn_agent tool to launch a Claude instance in a new terminal pane. The agent goes through spawning → booting → ready states automatically.
spawn_agent(cli: "claude", repo: "my-project")*Supported CLIs: claude, codex, cursor, gemini, kiro. Each spawns in its own pane with state tracking.
The V2 interact tool consolidates 8 agent operations into a single tool with action types: send, interrupt, model, resume, skill, usage, mcp.
interact(agent: "agent-claude-my-project-x7k2", action: "send", message: "Run tests")259 test assertions across 15 test files verify tool registration, agent lifecycle, V2 semantics, hierarchy, and quality tracking.
npm test*Uses Vitest. All tests run locally with mocked cmux client.