claude-tmux-bridge
Manages persistent tmux sessions for Claude Code, allowing real-time observation and automatic session creation per project.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-tmux-bridgeRefactor the utility functions in /Users/me/my-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code MCP — tmux Bridge
An MCP server that connects Claude Desktop to an interactive Claude Code session running in a tmux terminal. Instead of spawning a one-shot process per prompt, it communicates with a persistent, visible session — so you can watch Claude work in real time while Desktop orchestrates the tasks.
How It Works
Claude Desktop → claude_code MCP tool → tmux session → Claude Code (interactive)
(this repo)Claude Desktop holds your project context, design decisions, and task history. It generates prompts and knows what needs to be done next.
Claude Code runs interactively in a tmux terminal you can watch. It has access to all your configured MCP tools and retains full conversation history between calls.
This server is the pipe between them — it delivers Desktop's prompts to Code's session and brings the response back.
Related MCP server: codex-cli-mcp-tool
Requirements
macOS
Node.js v20 or later
tmux —
brew install tmuxClaude Code CLI —
npm install -g @anthropic-ai/claude-code
Setup
1. Install this server
git clone https://github.com/DaRealDaHoodie/claude-tmux-bridge.git
cd claude-tmux-bridge
npm install
npm run build2. Configure Claude Desktop
Add this server to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"claude-tmux-bridge": {
"command": "node",
"args": ["/path/to/claude-tmux-bridge/dist/server.js"]
}
}
}Restart Claude Desktop after saving.
Using the Tool
Once configured, Claude Desktop has access to the claude_code tool. When sending a prompt tell Desktop:
What to do — the task or question for Claude Code
Which project — pass
workFolderas the absolute path to your project directory
Example instruction to Desktop:
Use the claude_code tool with workFolder
/Users/you/my-projectand ask Claude Code to implement the feature we just designed.
Everything else is automatic — the tmux session and Claude Code instance are created on first use.
Session Naming
The tmux session name is derived from your project folder's basename:
workFolder | Session name |
|
|
|
|
(not provided) |
|
Watching Claude Work
Sessions run in the background automatically. Attach any time to watch:
tmux attach -t claude-my-project
# Detach with Ctrl+B DTool Parameters
Parameter | Type | Required | Description |
| string | yes | The prompt to send to Claude Code |
| string | no | Absolute path to project — determines the session |
| number | no | Max seconds to wait for a response (default: 300) |
Behaviour
Session not found — auto-creates the tmux session rooted at
workFolderClaude Code not running — auto-launches
claudein the session and waits up to 30s for it to be readySession busy — rejects with a "still busy" message; does not queue
Timeout — auto-recovers on next call by checking if Claude has since finished
Conversation history — fully preserved between calls (same interactive session)
Environment Variables
Variable | Default | Description |
|
| Set to |
|
| Wait after sending prompt before polling starts |
|
| How often to poll the pane for output changes |
|
| Fallback: ms of no change before declaring done |
|
| Max ms to wait for Claude Code to start up |
Multiple Projects
Each project gets its own named tmux session. You can have multiple sessions open simultaneously — just pass the correct workFolder and Desktop will target the right one.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PiMPStudios/claude-tmux-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server