Utilizes git worktrees to provide automated workers with isolated branches and dedicated working directories, enabling parallel development and conflict-free commits.
Interfaces with the iTerm2 Python API to programmatically spawn, layout, and monitor terminal panes and windows for a visible and manageable team of AI sessions.
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 Team MCP Serverspawn two workers to refactor the API and update the documentation in parallel"
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 Team MCP Server
An MCP server that allows one Claude Code session to spawn and manage a team of other Claude Code sessions via iTerm2.
Introduction
claude-team is an MCP server and a set of slash commands for allowing Claude Code to orchestrate a "team" of other Claude Code sessions. It uses the iTerm2 API to spawn new terminal sessions and run Claude Code within them.
Why?
Parallelism: Many development tasks can be logically parallelized, but managing that parallelism is difficult for humans with limited attention spans. Claude, meanwhile, is very effective at it.
Context management: Offloading implementation to a worker gives the implementing agent a fresh context window (smarter), and keeps the manager's context free of implementation details.
Background work: Sometimes you want to have Claude Code go research something or answer a question without blocking the main thread of work.
Visibility:
claude-teamspawns real Claude Code sessions. You can watch them, interrupt and take control, or close them out.
But, why not just use Claude Code sub-agents, you ask? They're opaque -- they go off and do things and you, the user, cannot effectively monitor their work, interject, or continue a conversation with them. Using a full Claude Code session obviates this problem.
Git Worktrees: Isolated Branches per Worker
A key feature of claude-team is git worktree support. When spawning workers with use_worktrees: true, each worker gets:
Its own working directory - A dedicated git worktree at
~/.claude-team/worktrees/{repo-hash}/{worker-name}/Its own branch - Automatically created branch named
{WorkerName}-{hash}(e.g.,Groucho-a1b2c3)Shared repository history - All worktrees share the same
.gitdatabase, so commits are immediately visible across workers
This means workers can make commits, run tests, and modify files without conflicting with each other or the main working directory. When work is complete, branches can be merged or submitted as PRs.
Features
Spawn Workers: Create new Claude Code sessions in iTerm2 with multi-pane layouts
Git Worktrees: Isolate each worker in its own branch and working directory
Send Messages: Inject prompts into managed workers (single or broadcast)
Read Logs: Retrieve conversation history from worker JSONL files
Monitor Status: Check if workers are idle, processing, or waiting for input
Idle Detection: Wait for workers to complete using stop-hook markers
Visual Identity: Each worker gets a unique tab color and themed name (Marx Brothers, Beatles, etc.)
Session Recovery: Discover and adopt orphaned Claude Code sessions
Requirements
macOS with iTerm2 installed
iTerm2 Python API enabled (Preferences → General → Magic → Enable Python API)
Python 3.11+
uv package manager
Installation
As Claude Code Plugin (recommended)
This automatically configures the MCP server - no manual setup needed.
From PyPI
Once published, install via:
From Source
Configuration for Claude Code
Add to your Claude Code MCP settings. You can configure this at:
Global:
~/.claude/settings.jsonProject:
.claude/settings.jsonin your project directory
Using PyPI package
Using local clone
After adding the configuration, restart Claude Code for it to take effect.
Environment Variables
Variable | Default | Description |
|
| Override the command used to start Claude Code in worker sessions. Useful for running alternative CLI implementations like |
|
| Override the command used to start Codex in worker sessions. Useful for running wrapped Codex (e.g., |
| (none) | When set, allows using |
Example using an alternative CLI:
MCP Tools
Worker Management
Tool | Description |
| Create workers in a new window with multi-pane layout (single, vertical, horizontal, quad, triple_vertical) |
| List all managed workers with status |
| Get detailed worker status including conversation stats and last response preview |
| Gracefully terminate one or more workers |
| Find existing Claude Code sessions running in iTerm2 |
| Import a discovered iTerm2 session into the managed registry |
Communication
Tool | Description |
| Send a message to one or more workers (supports wait modes: none, any, all) |
| Get paginated conversation history from a worker's JSONL file |
| Add a coordinator note to a worker (visible in list_workers output) |
Idle Detection
Tool | Description |
| Quick non-blocking check if workers are idle |
| Block until workers are idle (supports "any" or "all" modes) |
Utilities
Tool | Description |
| List git worktrees created by claude-team for a repository |
| Get a quick reference guide for using Beads issue tracking |
Worker Identification
Workers can be referenced by any of three identifiers:
Internal ID: Short hex string (e.g.,
3962c5c4)Terminal ID: Prefixed iTerm UUID (e.g.,
iterm:6D2074A3-2D5B-4823-B257-18721A7F5A04)Worker name: Human-friendly name (e.g.,
Groucho,Aragorn)
All tools accept any of these formats.
Tool Details
spawn_workers
Layout pane names:
single:["main"]vertical:["left", "right"]horizontal:["top", "bottom"]quad:["top_left", "top_right", "bottom_left", "bottom_right"]triple_vertical:["left", "middle", "right"]
message_workers
wait_idle_workers
Slash Commands
The following slash commands are available for common workflows. Install them with:
Command | Description |
| Analyze tasks, create worktrees, and spawn workers with appropriate prompts |
| Generate a status report for all active workers |
| Directly merge a worker's branch back to parent (for internal changes) |
| Create a pull request from a worker's branch |
| Generate end-of-session summary of all worker activity |
| Remove worktrees for merged branches |
Usage Patterns
Basic: Spawn and Message
From your Claude Code session, spawn workers and send them tasks:
Parallel Work with Worktrees
Spawn workers in isolated branches for parallel development:
Coordinated Workflow
Use the manager to coordinate between workers:
Architecture
The manager maintains:
Session Registry: Maps worker IDs/names to iTerm2 sessions
iTerm2 Connection: Persistent connection for terminal control
JSONL Monitoring: Reads Claude's session files for conversation state and idle detection
Worktree Tracking: Manages git worktrees for isolated worker branches
Development
Troubleshooting
"Could not connect to iTerm2"
Make sure iTerm2 is running
Enable: iTerm2 → Preferences → General → Magic → Enable Python API
"Session not found"
The worker may have been closed externally
Use
list_workersto see active workersWorkers can be referenced by ID, terminal ID, or name
"No JSONL session file found"
Claude Code may still be starting up
Wait a few seconds and try again
Check that Claude Code is actually running in the worker pane
Worktree issues
Use
list_worktreesto see worktrees for a repositoryOrphaned worktrees can be cleaned up with
list_worktrees+remove_orphans=trueWorktrees are stored at
~/.claude-team/worktrees/{repo-hash}/
License
MIT
Upgrading to New Versions
After a new version is published to PyPI, you may need to force-refresh the cached version:
This is necessary because uvx aggressively caches tool environments.