Claude Code Integration

wmux ships with a built-in MCP (Model Context Protocol) server that lets Claude Code control your terminals. Create workspaces, split panes, run commands, and read output — all through natural language.

Setup

One-click setup from within wmux:

1
Open wmux
2
Press Ctrl+Shift+K to open the command palette
3
Select "Connect to Claude Code"
4
Restart Claude Code — it will automatically discover the wmux MCP server

That's it. Claude Code now has full access to your wmux terminals.

What Claude Code Can Do

  • Create and manage workspaces — organize terminals by project or task
  • Split terminal panes — set up side-by-side layouts
  • Run commands and read output — execute builds, tests, and scripts
  • Send keystrokes — send Ctrl+C to stop processes, navigate with arrow keys, and more

Architecture

The MCP server is bundled with wmux and communicates over stdio with Claude Code, while connecting to wmux via a named pipe:

Claude Code ← stdio → MCP Server (bundled) ← named pipe → wmux

The MCP server translates Claude Code's tool calls into JSON-RPC messages on the \\.\pipe\wmux named pipe — the same Socket API available to any client.

Available MCP Tools

The following 13 tools are exposed to Claude Code:

wmux_ping
wmux_workspace_list
wmux_workspace_create
wmux_workspace_select
wmux_workspace_close
wmux_surface_list
wmux_surface_split
wmux_surface_focus
wmux_surface_close
wmux_surface_send_text
wmux_surface_send_key
wmux_surface_read_output
wmux_run_command

Each tool maps directly to a Socket API method. See the API reference for detailed parameter and response documentation.

Example Prompts

Try these prompts in Claude Code once the integration is set up:

List my wmux workspaces
Split the terminal and run cargo test on the right
Create a workspace called 'dev' and run the server
Read the output from the terminal running my tests
Send Ctrl+C to the process in the left pane