claude-teams-bridge
Spawns and manages external agent sessions in tmux panes or windows, injects inbox messages into those sessions via send-keys, and shuts down their panes.
Click on "Deploy 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-teams-bridge spawn a Codex CLI agent named codex-worker to fix the login bug"
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.
cc-teams-mcp
Hybrid bridge that lets non-Claude agents (e.g., Codex CLI) participate in Claude Code's native agent teams.
Forked from cs50victor/claude-code-teams-mcp — thanks to cs50victor for the original work!
What is this?
Claude Code has a built-in agent teams feature with event-driven messaging — messages are automatically injected into agent context as new conversation turns. This project provides two MCP servers that bridge non-Claude agents into this native system:
MCP-A (
claude-teams-bridge): Used by Claude Code team-lead to spawn, monitor, and shut down external agents. Watches inbox files and injects messages into external agent tmux panes viasend-keys.MCP-B (
claude-teams-external): Used by non-Claude agents (e.g., Codex CLI) to send messages and manage tasks. Messages written to inbox files are automatically picked up by Claude Code's native runtime.
Communication Paths
From → To | Mechanism | Latency |
Claude → Claude | Native message injection (built-in) | ~instant |
Claude → Non-Claude | Claude writes to inbox → MCP-A watcher → tmux send-keys | ~seconds |
Non-Claude → Claude | MCP-B writes to inbox → Claude runtime auto-injects | ~instant |
Non-Claude → Non-Claude | MCP-B writes to inbox → MCP-A watcher → tmux send-keys | ~seconds |
No polling required for any agent type.
Related MCP server: wezterm-agent-mcp
Install
MCP-A: For Claude Code team-lead
Add to .mcp.json (project scope) or ~/.claude.json (user scope):
{
"mcpServers": {
"claude-teams-bridge": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/kouui/cc-teams-mcp",
"claude-teams-bridge"
],
"allowedTools": ["*"]
}
}
}MCP-B: For Codex CLI teammates
Add to ~/.codex/config.toml:
[mcp_servers.claude-teams-external]
command = "uvx"
args = ["--from", "git+https://github.com/kouui/cc-teams-mcp", "claude-teams-external"]MCP-B is automatically configured when Codex teammates are spawned via MCP-A.
Requirements
Python 3.12+
At least one external agent CLI on PATH: Codex CLI (
codex), Gemini CLI (gemini)
Tools
MCP-A: claude-teams-bridge
Tool | Description |
| Spawn an external agent in tmux with inbox watcher |
| Check agent status: alive/dead, watcher state, terminal output |
| Kill tmux pane, stop watcher, unregister, reset tasks |
MCP-B: claude-teams-external
Tool | Description |
| Send a message to any team member (writes to inbox) |
| Create a new task |
| List all tasks |
| Get task details |
| Update task status, owner, dependencies |
Configuration
Variable | Description | Default |
| Spawn in tmux windows instead of panes | (unset) |
Architecture
Claude Code (team-lead)
├── Native: TeamCreate / SendMessage / Task tools
│ └── Event-driven message delivery (auto-injected turns)
│
├── MCP-A (claude-teams-bridge)
│ ├── Tools: spawn, check, shutdown
│ └── Inbox watcher → tmux send-keys injection
│
└── Claude teammates (native communication, no MCP needed)
Non-Claude instance (e.g., Codex in tmux pane)
├── MCP-B (claude-teams-external)
│ ├── Tools: send_message, task_*
│ └── Writes to inbox files (read: false)
└── Initial prompt: team info + MCP-B tool usageFile Layout
~/.claude/
├── teams/<team>/
│ ├── config.json
│ └── inboxes/
│ ├── team-lead.json
│ ├── codex-worker.json
│ └── .lock
└── tasks/<team>/
├── 1.json
└── .lockPackage Structure
src/claude_teams/
common/ # Shared: models, messaging, tasks, teams, _filelock
claude_side/ # MCP-A: server, spawner, registry, watcher, injector
external_side/ # MCP-B: serverBackends
Currently supported: Codex CLI (codex), Gemini CLI (gemini).
Backend | Spawn flags | Notes |
Codex |
| Prompt as positional arg |
Gemini |
|
|
All teammates receive a prompt wrapper with team context (members list, MCP-B tool usage, communication rules).
Adding a new backend requires extending BackendType and adding elif branches in build_spawn_command, wrap_prompt, and discover_backend_binaries in spawner.py.
Development
uv sync # install dependencies
uv run pytest tests/ -x # run tests
uv run ruff check src/ # lint
uv run pyright src/ # type checkLicense
Available Tools
3 toolscheck_external_agentA
Check an external agent's status: alive/dead and optionally terminal output.
Always non-blocking. Use parallel calls to check multiple agents.
Inputs: team_name (required), agent_name (required), output_lines, include_output. Returns: object
shutdown_external_agentA
Shut down an external agent by killing its tmux pane/window, stopping its inbox watcher, removing it from team config, and resetting its tasks.
Inputs: team_name (required), agent_name (required). Returns: object
spawn_external_agentB
Spawn a new external (non-Claude) agent in a tmux pane.
The agent is registered in the team config and begins working autonomously. An inbox watcher is started to deliver messages to the agent via tmux injection.
Args: backend_type: CLI backend to use. Currently supported: "codex". subagent_type: Role description for the agent (e.g., "code-reviewer"). cwd: Working directory (must be an absolute path).
Names must be unique within the team.
Inputs: cwd (required), name (required), prompt (required), team_name (required), +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool maps to a distinct lifecycle action on one resource type (external agent): spawn, check, shutdown. There is no plausible confusion between killing a pane, spawning one, and reading status.
All three names follow the same verb_noun pattern with a consistent resource suffix (_external_agent). Fully predictable naming.
Three tools is on the thin side but each earns its place as a coherent spawn/check/shutdown lifecycle. A listing or messaging tool would round it out, but nothing is redundant.
Spawn/check/shutdown covers the agent lifecycle, but the surface is a dead end for interaction: there is no tool to send a message to an agent or list current agents, despite the description referencing an inbox watcher and team config. Agents cannot actually use the 'bridge' to communicate.
Maintenance
Related MCP Connectors
Agents message each other and partners' agents: files, skills, rooms, key vault. Claude Code proven.
Lets Claude, ChatGPT and other AI chats work on your Linux computers: terminal, files and browser.
Sync coding-agent sessions and resume them in any other agent: Claude Code, Codex, Cursor, more.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceGives Claude Code terminal control and multi-agent coordination through tmux sessions.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables orchestration of multiple AI coding agents (Claude Code, Gemini CLI, etc.) in isolated Wezterm panes, allowing one agent to spawn, monitor, and communicate with others across projects.1-
- AlicenseNot gradedqualityDmaintenanceCreates and manages multi-agent teams of AI coding assistants (Claude Code, Codex CLI) that collaborate in tmux terminal sessions. Enables a leader agent to assign sub-tasks to team members for coordinated development.1ISC
- AlicenseAqualityBmaintenanceEnables Claude Code to launch and supervise multiple concurrent Claude Code sessions in tmux, sending them briefs, reading their progress, answering their prompts, and managing isolated git worktrees.201MIT