Skip to main content
Glama

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 via send-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

Tools

MCP-A: claude-teams-bridge

Tool

Description

spawn_external_agent

Spawn an external agent in tmux with inbox watcher

check_external_agent

Check agent status: alive/dead, watcher state, terminal output

shutdown_external_agent

Kill tmux pane, stop watcher, unregister, reset tasks

MCP-B: claude-teams-external

Tool

Description

send_message

Send a message to any team member (writes to inbox)

task_create

Create a new task

task_list

List all tasks

task_get

Get task details

task_update

Update task status, owner, dependencies

Configuration

Variable

Description

Default

USE_TMUX_WINDOWS

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 usage

File Layout

~/.claude/
├── teams/<team>/
│   ├── config.json
│   └── inboxes/
│       ├── team-lead.json
│       ├── codex-worker.json
│       └── .lock
└── tasks/<team>/
    ├── 1.json
    └── .lock

Package Structure

src/claude_teams/
  common/          # Shared: models, messaging, tasks, teams, _filelock
  claude_side/     # MCP-A: server, spawner, registry, watcher, injector
  external_side/   # MCP-B: server

Backends

Currently supported: Codex CLI (codex), Gemini CLI (gemini).

Backend

Spawn flags

Notes

Codex

--dangerously-bypass-approvals-and-sandbox --no-alt-screen

Prompt as positional arg

Gemini

--yolo --screen-reader --prompt-interactive

--screen-reader disables TUI for clean tmux output

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 check

License

MIT

Available Tools

3 tools
check_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

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    All three names follow the same verb_noun pattern with a consistent resource suffix (_external_agent). Fully predictable naming.

    Tool Count4/5

    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.

    Completeness3/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers