Agent Collaboration MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add agent-collaboration -- npx agent-collaboration-mcp
README.md

Orchestrate a team of sub-agents through tmux sessions for complex tasks.

Agent Collaboration MCP Server

English version is here

複数のAIエージェントが協調して作業できるようにする完全自己完結型MCPサーバーです。このツールをClaude Codeなどのエージェントに使わせることで、エージェントが他のエージェントを起動・制御し、チームとして複雑なタスクを実行できます。

✨ 特徴

  • シンプルなアーキテクチャ: ペイン番号を直接指定する直感的な操作
  • 複数エージェント対応: Claude CodeとGeminiの同時制御
  • 柔軟なセッション管理: 複数プロジェクトの並行作業に対応
  • 高度な状態管理: エージェントの実行状態をリアルタイムで監視

🎯 エージェント同士の協調作業

⚠️ 自動認証機能について
新しいエージェントの認証を自動化したい場合は、Playwright MCPが必要です。Playwright MCPがインストールされていない場合、認証は手動で行う必要があります。詳細は自動認証代行機能をご覧ください。

このMCPサーバーの主な用途は、エージェントが他のエージェントを管理することです。例えば:

  • ボスエージェントがタスクを分割し、複数のワーカーエージェントに割り振る
  • 各エージェントが得意分野で作業(Claude Codeはコーディング、Geminiは画像生成)
  • エージェント間でメッセージを送り合い、進捗を共有
  • 一つのエージェントが他のエージェントの作業結果を確認・統合
  • 自動認証代行: 新しいエージェントが認証を要求された場合、既存の認証済みエージェントが自動で認証を代行

🛠️ 提供ツール

エージェントが使用できる6つのツール:

1. `start_agent` - エージェントの起動

start_agent(target="multiagent:0.2", agentType="claude")
start_agent(target="multiagent:0.3", agentType="gemini")

指定したtmuxターゲットでAIエージェントを起動します。

  • target: tmuxターゲット形式("session:window.pane"、例:"multiagent:0.5")
  • agentType: claude(一般的なコード開発)または gemini(画像生成タスク)
  • additionalArgs: 追加の引数(オプション)

2. `get_agent_status` - ステータス確認

get_agent_status()                          // 全エージェントの状態を確認
get_agent_status(target="multiagent:0.2")  // 特定ペインの詳細状態を確認
get_agent_status(target="multiagent:*")    // セッション内全ペインの状態確認
取得可能なステータス
ステータス アイコン 説明
running_claude Claude Codeが実行中で入力待機状態
running_gemini 💎 Geminiが実行中で入力待機状態
auth_claude 🔐 Claude Codeが認証プロセス中
auth_gemini 🔑 Geminiが認証プロセス中
executing_claude Claude実行中(ESC to interrupt表示)
stopped エージェントが停止中またはシェル状態

3. `send_message` - メッセージ送信

send_message(target="multiagent:0.2", message="こんにちは")
send_message(target="multiagent:0.3", message="C-c", sendEnter=false) // Ctrl+C送信

指定したペインにメッセージや制御文字を送信します。高度なメッセージ送信機能付き。

4. `capture_screen` - 画面キャプチャ

capture_screen(target="multiagent:0.2")        // 全履歴キャプチャ
capture_screen(target="multiagent:0.3", lines=50) // 最後の50行

ペインの画面内容を取得します。

5. `parallel_implement` - 並列実装

parallel_implement(prompt="ユーザー認証機能を実装してください")
parallel_implement(prompt="リファクタリングを実行", workerCount=5, complexity="complex")

複数のワーカーエージェントが同じタスクを並列で実装し、ボスエージェントが最良の成果物を選択・統合します。

重要: この機能はGitリポジトリ内で実行する必要があります。各ワーカーは独自のGit worktreeで作業を行います。

  • prompt: 実装指示(必須)
  • workerCount: ワーカー数(デフォルト: 3)
  • complexity: タスクの複雑度(simple, medium, complex)
  • agentType: 使用するエージェント(claude, gemini)
  • autoMerge: 完了後の自動マージ(デフォルト: false)

6. `get_parallel_status` - 並列実装状態確認

get_parallel_status()                    // 全セッションの一覧を取得
get_parallel_status(sessionId="parallel_20240105_123456")  // 特定セッションの詳細

並列実装セッションの進捗状況を確認します。各ワーカーの作業状況、完了率、エラー情報などを取得できます。

📦 セットアップ

1. インストール

npm経由(推奨):

npm install -g agent-collaboration-mcp@latest

GitHubから直接:

git clone https://github.com/nishimoto265/Agent_Collaboration_MCP.git
cd Agent_Collaboration_MCP
npm install

2. Claude Codeへの追加(推奨)

簡単な方法(CLIを使用):

claude mcp add agent-collaboration npx agent-collaboration-mcp@latest

自動認証機能を使用する場合は、Playwright MCPも追加:

claude mcp add playwright npx @playwright/mcp@latest

または、JSON設定を使用:

  1. プロジェクトルートに.mcp.jsonを作成:
{
  "mcpServers": {
    "agent-collaboration": {
      "command": "npx",
      "args": ["agent-collaboration-mcp"]
    }
  }
}
  1. ローカルインストールの場合:
{
  "mcpServers": {
    "agent-collaboration": {
      "command": "node",
      "args": ["/absolute/path/to/Agent_Collaboration_MCP/index.js"]
    }
  }
}

3. tmuxセッションの準備

# デフォルトセッション(multiagent)を作成
tmux new-session -d -s multiagent

# 複数プロジェクトの場合
tmux new-session -d -s project1
tmux new-session -d -s project2

💡 使用例

基本的な使い方

// 1. エージェントを起動
start_agent(target="multiagent:0.2", agentType="claude")
start_agent(target="multiagent:0.3", agentType="claude")

// 2. ステータス確認
get_agent_status()

// 3. タスクを指示
send_message(target="multiagent:0.2", message="READMEを確認してください")
send_message(target="multiagent:0.3", message="テストを実行してください")

// 4. 結果を確認
capture_screen(target="multiagent:0.3")

複数セッションでの作業例

// プロジェクト1での作業
start_agent(target="project1:0.0", agentType="claude")
send_message(target="project1:0.0", message="バックエンドAPIを実装してください")

// プロジェクト2での並行作業
start_agent(target="project2:0.0", agentType="gemini")
send_message(target="project2:0.0", message="UIデザインを作成してください")

自動認証代行機能(オプション)

新しいエージェントの認証を自動化したい場合は、Playwright MCPを併用することで、既存の認証済みエージェントが新しいエージェントの認証を自動で代行できます。

// Playwright MCPがインストールされている場合の動作
start_agent(target="multiagent:0.5", agentType="claude")
// 認証が必要な場合、以下が自動実行されます:

Tools (6)

start_agentLaunches an AI agent in a specified tmux target.
get_agent_statusChecks the execution status of agents in tmux sessions.
send_messageSends messages or control characters to a specific agent pane.
capture_screenCaptures the screen content or history of a specific agent pane.
parallel_implementExecutes a task in parallel across multiple worker agents.
get_parallel_statusRetrieves the progress and status of parallel implementation sessions.

Configuration

claude_desktop_config.json
{"mcpServers": {"agent-collaboration": {"command": "npx", "args": ["agent-collaboration-mcp"]}}}

Try it

Start a new Claude agent in the multiagent:0.2 pane and ask it to review the current project README.
Check the status of all running agents to see if any are waiting for input.
Run a parallel implementation task to refactor the codebase using 3 worker agents.
Send a Ctrl+C command to the agent running in multiagent:0.3 to interrupt its current process.
Capture the last 50 lines of output from the agent in multiagent:0.2 to check its progress.

Frequently Asked Questions

What are the key features of Agent Collaboration MCP Server?

Direct control of AI agents via tmux pane management. Support for multiple agent types including Claude Code and Gemini. Real-time monitoring of agent execution states. Parallel task implementation with multiple worker agents. Automated authentication delegation when used with Playwright MCP.

What can I use Agent Collaboration MCP Server for?

Boss agent delegating sub-tasks to specialized worker agents. Running parallel coding tasks across different Git worktrees. Managing multiple project sessions simultaneously in tmux. Automating authentication for new AI agents in a team.

How do I install Agent Collaboration MCP Server?

Install Agent Collaboration MCP Server by running: npm install -g agent-collaboration-mcp@latest

What MCP clients work with Agent Collaboration MCP Server?

Agent Collaboration MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Agent Collaboration MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare