Skip to content
/

claude-teams (cs50victor)

claude-teams-mcp · cs50victor/claude-code-teams-mcp · ★ 271 · last commit 2026-02-21

Primitive shape 12 total
MCP tools 12
00

Summary

claude-teams (cs50victor) — Summary

An MCP server that reimplements Claude Code's internal "agent teams" protocol as a standalone, portable MCP tool set. Claude Code has a built-in agent teams feature (shared task lists, inter-agent messaging, tmux-based spawning), but the protocol is internal and tightly coupled to Claude Code's own tooling. This server makes that same protocol available to any MCP client — Claude Code, OpenCode, or anything that speaks MCP.

The server provides 12 MCP tools for team lifecycle management: creating teams, spawning teammates in tmux panes/windows, sending/receiving messages between agents, managing a shared task list, and handling graceful shutdown coordination. State is persisted to ~/.claude/teams/ and ~/.claude/tasks/ as JSON files with atomic writes.

Built by cs50victor (GitHub), based on a deep dive into Claude Code's internals. The implementation is Python (FastMCP framework), requires Python 3.12+, tmux, and at least one coding agent (claude or opencode) on PATH. With 271 stars, this is the highest-starred framework in this batch. Compared to seeds: closest to claude-flow (Archetype 3 — MCP server for multi-agent orchestration) but claude-flow uses its own hive-mind protocol while claude-teams reimplements Claude Code's existing native teams protocol for portability.

01

Overview

claude-teams (cs50victor) — Overview

Origin

Created by cs50victor (GitHub), version 0.1.1 (pinned in README). Based on a "deep dive into Claude Code's internals" (linked gist: https://gist.github.com/cs50victor/0a7081e6824c135b4bdc28b566e1c719). The stated goal: make Claude Code's agent teams feature available to any MCP client, not just Claude Code itself.

Philosophy

"Claude Code has a built-in agent teams feature (shared task lists, inter-agent messaging, tmux-based spawning), but the protocol is internal and tightly coupled to its own tooling. This MCP server reimplements that protocol as a standalone MCP server, making it available to any MCP client."

The philosophy is "open protocol, closed platform" — Claude Code has powerful multi-agent coordination built in, but it's not accessible from OpenCode, Cursor, or other agents. This server standardizes it.

Architecture Style (from README)

  • Spawning: Teammates launch in tmux panes (default) or windows (USE_TMUX_WINDOWS)
  • Messaging: JSON inboxes at ~/.claude/teams/<team>/inboxes/
  • Tasks: JSON files at ~/.claude/tasks/<team>/
  • Concurrency: Atomic writes via tempfile + os.replace, cross-platform file locks via filelock

State Filesystem Layout

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

Supported Backends

  • claude (Claude Code CLI)
  • opencode (OpenCode agent)
02

Architecture

claude-teams — Architecture

Distribution

mcp-server — Python package installable via uvx (recommended) or pip.

Install

Claude Code (.mcp.json):

{
  "mcpServers": {
    "claude-teams": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/cs50victor/claude-code-teams-mcp@v0.1.1", "claude-teams"]
    }
  }
}

OpenCode (~/.config/opencode/opencode.json):

{
  "mcp": {
    "claude-teams": {
      "type": "local",
      "command": ["uvx", "--from", "git+https://...", "claude-teams"],
      "enabled": true
    }
  }
}

Source Tree

src/claude_teams/
├── __init__.py
├── _filelock.py          # Cross-platform file locking
├── messaging.py          # Inbox read/write operations
├── models.py             # Pydantic data models
├── opencode_client.py    # OpenCode HTTP API client
├── server.py             # FastMCP server (tool definitions)
├── spawner.py            # tmux pane/window spawning
├── tasks.py              # Task CRUD operations
├── teams.py              # Team lifecycle management
└── tmux_introspection.py # Read tmux pane content

State Storage

~/.claude/teams/<team>/
  ├── config.json          # Team config + member list
  └── inboxes/
      ├── <agent-id>.json  # Per-agent message queue
      └── .lock            # filelock
~/.claude/tasks/<team>/
  ├── <task-id>.json       # Task with status/owner/deps
  └── .lock

Runtime Requirements

  • Python 3.12+
  • tmux (for spawning subagents)
  • claude CLI on PATH (for Claude Code teammates)
  • opencode CLI on PATH (for OpenCode teammates)
  • OPENCODE_SERVER_URL env var (for OpenCode HTTP API integration)

Environment Variables

Variable Description Default
CLAUDE_TEAMS_BACKENDS Comma-separated enabled backends Auto-detect
OPENCODE_SERVER_URL OpenCode HTTP API URL unset
USE_TMUX_WINDOWS Use windows instead of panes unset
03

Components

claude-teams — Components

MCP Tools (12)

Tool Description
team_create Create a new agent team (one per session)
team_delete Delete team and all data (fails if teammates active)
spawn_teammate Spawn a teammate in a tmux pane or window
send_message Send DMs, broadcasts (lead only), shutdown/plan responses
read_inbox Read messages from an agent's inbox
read_config Read team config and member list
task_create Create a task (auto-incrementing ID)
task_update Update task status, owner, dependencies, or metadata
task_list List all tasks
task_get Get full task details
force_kill_teammate Kill a teammate's tmux pane/window and clean up
process_shutdown_approved Remove teammate after graceful shutdown

Message Types (send_message)

  • DM: Direct message to a specific teammate
  • Broadcast: Lead-only; sent to all teammates
  • Shutdown: Request graceful shutdown
  • Plan response: Teammate responds to a plan from lead

Task Status Values

Tasks have status tracking, ownership, and dependency management. Status values not enumerated in surface README but task_update supports status, owner, dependencies, and metadata updates.

Scripts (0)

None.

Skills (0)

None.

Hooks (0)

None.

Configuration (0 config files)

No framework config files — all configuration is via environment variables and .mcp.json.

05

Prompts

claude-teams — Prompts

Note on Prompts

claude-teams is an MCP server that implements a coordination protocol. It ships no skill files, no CLAUDE.md, no agent instruction documents. The tool descriptions in tools/list responses are the only natural language instruction content.

Tool Descriptions (from server.py)

The spawn_teammate tool has a dynamically-generated description based on detected backends (verbatim from server.py):

_SPAWN_TOOL_BASE_DESCRIPTION = (
    "Spawn a new teammate in a tmux {target}. The teammate receives its initial "
    "prompt via inbox and begins working autonomously. Names must be unique "
    "within the team. cwd must be an absolute path to the teammate's working directory."
)

The description is augmented at runtime with available backends:

"Spawn a new teammate in a tmux pane. ... Available backends: 'claude' (default, models: sonnet, opus, haiku)"

Agent Communication Protocol (implicit prompt structure)

The messaging tools define an implicit prompt structure for agent coordination:

spawn_teammate(
  name="worker-1",
  prompt="You are worker-1 in team my-team. Your task: [task description]. 
          When complete, send_message to team-lead with your results."
)

The initial prompt field in spawn_teammate becomes the first message in the spawned agent's inbox — effectively the system prompt for that agent's session.

Prompting Technique Classification

  • Protocol-embedded instructions: Agent instructions are embedded in the prompt field of spawn_teammate, not in separate files
  • Dynamic tool description: spawn_teammate description changes based on detected available backends
  • No skill/hook layer: Purely protocol-based — no activation triggers, no session hooks
09

Uniqueness

claude-teams — Uniqueness

differs_from_seeds

Closest seed is claude-flow (Archetype 3 — MCP-based multi-agent orchestration with hive-mind protocol). Key difference: claude-flow invents its own multi-agent coordination protocol with RAFT-like consensus; claude-teams reverse-engineers and reimplements Claude Code's existing native protocol to make it available to other agents. superpowers also does multi-agent (via task-tool spawning) but as skills, not MCP tools. None of the 11 seeds use tmux-pane isolation combined with file-based messaging.

Positioning

claude-teams occupies a unique niche: it is the only framework that aims to be protocol-compatible with Claude Code's native agent teams feature rather than inventing a parallel system. A team created with claude-teams should be observable/manageable with Claude Code's native teams UI (if such a UI existed).

Distinctive Opinion

"Claude Code has a built-in agent teams feature... but the protocol is internal and tightly coupled to its own tooling."

The framework argues that AI agent coordination protocols should be open and portable, not vendor-locked. By reimplementing the protocol as a standalone MCP server, it enables cross-agent team management.

Observable Failure Modes

  1. tmux dependency: No tmux = no agent spawning. This is a hard requirement unusual in the ecosystem
  2. Inbox message accumulation: Messages persist until manually cleared; long-running teams accumulate large inbox files
  3. Asymmetric messaging: Workers cannot coordinate peer-to-peer — all communication goes through the lead, creating a single point of coordination overhead
  4. "Pin to release tag" warning: README explicitly warns against using main branch: "There are breaking changes between releases" — indicates instability
  5. OPENCODE_SERVER_URL required for OpenCode: OpenCode teammates require a running OpenCode HTTP server, adding setup complexity
  6. Concurrency risk: The _lifespan_state dict comment in server.py notes: "Safe under stdio (single session). Racy under SSE/streamable HTTP" — concurrent sessions are not fully supported

What Makes It Novel vs. the 11 Seeds

  • Only framework that reverse-engineers and reimplements an existing agent protocol (Claude Code's teams)
  • Only MCP server using tmux-pane isolation for agent spawning
  • Only framework supporting cross-agent coordination between Claude Code and OpenCode teammates
  • Only multi-agent framework where workers are explicitly restricted from peer-to-peer messaging
  • Highest stars (271) in this batch
04

Workflow

claude-teams — Workflow

Team Lifecycle

1. team_create(name="my-team")
     → creates ~/.claude/teams/my-team/config.json
     → creates inbox for "team-lead"
     
2. spawn_teammate(name="worker-1", cwd="/path/to/project", prompt="...")
     → spawns claude or opencode in a new tmux pane
     → teammate reads initial prompt from inbox
     → teammate begins working autonomously

3. send_message(to="worker-1", content="Here's your task: ...")
     → writes to ~/.claude/teams/my-team/inboxes/worker-1.json

4. read_inbox(agent="team-lead")
     → reads messages from team-lead's inbox
     → workers send results back to lead

5. task_create(title="Implement auth", description="...")
     → creates ~/.claude/tasks/my-team/1.json

6. task_update(id=1, status="in-progress", owner="worker-1")

7. force_kill_teammate(name="worker-1") or
   send_message(to="worker-1", type="shutdown")
   + process_shutdown_approved(name="worker-1")

8. team_delete(name="my-team")

Messaging Model

  • Lead can DM any teammate
  • Lead can broadcast to all teammates
  • Teammates can only message the lead (not each other)
  • Graceful shutdown: lead sends shutdown message → teammate completes → process_shutdown_approved
  • Force shutdown: force_kill_teammate kills the tmux pane immediately

Phase/Artifact Table

Phase Artifact
team_create ~/.claude/teams/<team>/config.json
spawn_teammate tmux pane (live process)
task_create ~/.claude/tasks/<team>/<id>.json
message exchange ~/.claude/teams/<team>/inboxes/<agent>.json

Approval Gates

None in the protocol itself. The spawned agents operate autonomously.

06

Memory Context

claude-teams — Memory & Context

State Storage

All state persists to the filesystem under ~/.claude/:

Path Content
~/.claude/teams/<team>/config.json Team config, member list, agent IDs
~/.claude/teams/<team>/inboxes/<agent>.json Per-agent message queue
~/.claude/tasks/<team>/<id>.json Task records with status, owner, dependencies

Concurrency Safety

  • Atomic writes: tempfile + os.replace pattern
  • Cross-platform file locks: filelock library
  • Lock files: .lock sibling to each inbox directory

Cross-Session Handoff

Yes. State persists on disk between sessions. A team can be created in one session and continued in another.

Message Persistence

Messages in inboxes persist until explicitly consumed. The read_inbox tool returns all pending messages; the protocol does not auto-delete them (agent must manage its inbox state).

Context Window Impact

The 12 MCP tool schemas are always loaded into the MCP client's context. No progressive disclosure. Tool schemas are moderately sized (task/message data models), estimated 3k-8k tokens total.

Memory Compaction

No compaction. Inboxes accumulate messages until the team is deleted.

Cross-Agent State

The task list (~/.claude/tasks/<team>/) is the shared blackboard. All agents in the team can read and update tasks, enabling implicit coordination without direct messaging.

07

Orchestration

claude-teams — Orchestration

Multi-Agent Pattern

Hierarchical — one "team-lead" agent and N worker agents. Lead spawns workers, broadcasts plans, receives results. Workers can only communicate with the lead.

Spawning Mechanism

tmux-based: each worker is spawned as a tmux pane or window (configurable). The spawner:

  1. Generates a unique agent ID and color
  2. Opens a new tmux pane
  3. Starts the agent CLI (claude or opencode) in the pane
  4. Injects the initial prompt via the inbox

Execution Mode

continuous-ralph — teammates run as persistent processes in tmux panes. The coordination server runs as a background MCP daemon.

Isolation Mechanism

tmux-pane — each agent runs in a separate tmux pane with its own terminal context. No container isolation.

Multi-Model

Yes, in the sense that different teammates can be different backend agents:

  • Backend claude: runs Claude Code CLI
  • Backend opencode: runs OpenCode CLI

The same team can mix Claude Code and OpenCode teammates.

Consensus Mechanism

None. The lead decides; workers execute. No formal consensus.

Messaging Model

Asymmetric:

  • Lead → Worker: DM, broadcast, shutdown
  • Worker → Lead: DM, plan response, results
  • Worker → Worker: Blocked (no direct peer messaging)

Max Concurrent Agents

Not hard-limited. Constrained by system resources and tmux session limits.

Prompt Chaining

Yes — the lead sends a task/plan to a worker; the worker's completion message becomes input to the lead's next decision. Explicit prompt chaining via the inbox protocol.

Crash Recovery

Partial. tmux panes can be inspected with tmux_introspection.peek_pane. Dead panes can be force-killed with force_kill_teammate. No automatic restart on crash.

08

Ui Cli Surface

claude-teams — UI & CLI Surface

Dedicated CLI Binary

No dedicated binary for end users. The MCP server is invoked via uvx (Python package runner).

tmux as UI

tmux panes serve as the visual "dashboard" for teams:

  • Each teammate is a visible tmux pane with a colored label
  • The lead can inspect pane content via tmux commands
  • tmux_introspection.peek_pane allows the MCP server to read pane output

Local Web Dashboard

None.

IDE Integration

Any MCP-capable IDE or agent by adding to .mcp.json or equivalent config.

Observability

  • Inbox messages persist as JSON files under ~/.claude/teams/
  • Task state persists as JSON files under ~/.claude/tasks/
  • tmux pane content is inspectable via standard tmux commands
  • Server uses Python logging (via logging.getLogger)

Supported Clients

Client Config Location
Claude Code .mcp.json in project root
OpenCode ~/.config/opencode/opencode.json
Any other MCP client Depends on client

Cross-Tool Portability

High — any MCP client can use the server. The README explicitly documents both Claude Code and OpenCode configuration.

Related frameworks

same archetype · same primary tool · same memory type

Taskmaster AI ★ 27k

Converts a PRD into a dependency-ordered JSON task graph that AI coding agents execute one task at a time, eliminating context…

ccmemory ★ 1

Accumulates decisions, corrections, and failed approaches from Claude Code sessions into a queryable Neo4j graph so each new…

Pimzino spec-workflow-mcp ★ 4.2k

MCP server providing spec-driven development workflow with dashboard-backed approval gates, implementation logging, and VSCode…

MCP Shrimp Task Manager ★ 2.1k

Convert natural language requests into structured AI development tasks with chain-of-thought enforcement, reflection gates, and…

Bernstein ★ 460

Govern parallel CLI coding agents with a deterministic Python scheduler, HMAC-chained audit trail, and compliance-ready signed…

LeanSpec ★ 252

Provides a unified spec CLI and MCP server over any existing spec backend (markdown, GitHub Issues, ADO), making spec-driven…