Repository navigation
feat: add cmux MCP server for terminal control #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,111 @@ | ||||||
| # cmux MCP Server Recommendation | ||||||
|
|
||||||
| Last updated: March 7, 2026 | ||||||
|
|
||||||
| ## Recommendation | ||||||
|
|
||||||
| Build a local MCP server for cmux, but keep it as a thin adapter over the existing v2 Unix socket API instead of adding a second control plane inside the app. | ||||||
|
|
||||||
| This is justified because cmux already exposes most of the primitives an MCP host would need: | ||||||
|
|
||||||
| 1. `TerminalController` already implements a JSON v2 socket protocol with stable methods for `window.*`, `workspace.*`, `pane.*`, `surface.*`, and `browser.*` in [TerminalController.swift](/tmp/cmux-mcp-worktree/Sources/TerminalController.swift). | ||||||
|
||||||
| 1. `TerminalController` already implements a JSON v2 socket protocol with stable methods for `window.*`, `workspace.*`, `pane.*`, `surface.*`, and `browser.*` in [TerminalController.swift](/tmp/cmux-mcp-worktree/Sources/TerminalController.swift). | |
| 1. `TerminalController` already implements a JSON v2 socket protocol with stable methods for `window.*`, `workspace.*`, `pane.*`, `surface.*`, and `browser.*` in [TerminalController.swift](Sources/TerminalController.swift). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description mentions the Python server (
python scripts/cmux_mcp_server.py) as a runnable implementation, but the README (lines 110–161) only documents the JavaScript MCP server. The Python server has a different tool set (8 tools using the v2 socket API directly) compared to the JavaScript server (6 tools using the cmux CLI). Neither the README nor the docs explain when to use which server, or that both exist. This creates confusion for users. The README should either document the Python server as an alternative, or explain the relationship/difference between the two implementations.