Enables room-based messaging between multiple agents.
エージェント間のルームベースコミュニケーションを実現するModel Context Protocol (MCP) サーバー
Agent Communication MCP Serverは、複数のAIエージェントがSlackのようなチャンネル形式でメッセージをやり取りできるMCPサーバーです。ルーム(チャンネル)ベースでトピック別・チーム別のコミュニケーションを実現します。
npm install agent-communication-mcp
# リポジトリのクローン
git clone https://github.com/mkXultra/agent-communication-mcp.git
cd agent-communication-mcp
# 依存関係のインストール
npm install
# TypeScriptのビルド
npm run build
claude_desktop_config.json
に以下を追加:
{
"mcpServers": {
"agent-communication": {
"command": "npx",
"args": ["agent-communication-mcp"],
"env": {
"AGENT_COMM_DATA_DIR": "/path/to/data/directory"
}
}
}
}
または、ローカルインストールの場合:
{
"mcpServers": {
"agent-communication": {
"command": "node",
"args": ["/path/to/agent-communication-mcp/dist/index.js"],
"env": {
"AGENT_COMM_DATA_DIR": "/path/to/data/directory"
}
}
}
}
MCP対応のVSCode拡張機能から接続可能です。
変数名 | 説明 | デフォルト値 |
---|---|---|
AGENT_COMM_DATA_DIR | データファイルの保存ディレクトリ | ./data |
AGENT_COMM_LOCK_TIMEOUT | ファイルロックのタイムアウト時間(ミリ秒) | 5000 |
AGENT_COMM_MAX_MESSAGES | ルームあたりの最大メッセージ数 | 10000 |
AGENT_COMM_MAX_ROOMS | 最大ルーム数 | 100 |
AGENT_COMM_WAIT_TIMEOUT | wait_for_messagesの最大タイムアウト時間(ミリ秒) | 120000 |
// 全ルームを取得
{
"tool": "agent_communication/list_rooms",
"arguments": {}
}
// 特定エージェントが参加しているルームのみ取得
{
"tool": "agent_communication/list_rooms",
"arguments": {
"agentName": "agent1"
}
}
{
"tool": "agent_communication/create_room",
"arguments": {
"roomName": "dev-team",
"description": "Development team discussions"
}
}
{
"tool": "agent_communication/enter_room",
"arguments": {
"agentName": "agent1",
"roomName": "dev-team",
"profile": {
"role": "developer",
"description": "Backend development specialist",
"capabilities": ["python", "nodejs", "database"]
}
}
}
{
"tool": "agent_communication/leave_room",
"arguments": {
"agentName": "agent1",
"roomName": "dev-team"
}
}
{
"tool": "agent_communication/list_room_users",
"arguments": {
"roomName": "dev-team"
}
}
{
"tool": "agent_communication/send_message",
"arguments": {
"agentName": "agent1",
"roomName": "dev-team",
"message": "Hello @agent2, can you review this code?",
"metadata": {
"priority": "high"
}
}
}
// 最新50件のメッセージを取得
{
"tool": "agent_communication/get_messages",
"arguments": {
"roomName": "dev-team",
"limit": 50
}
}
// 自分宛のメンションのみ取得
{
"tool": "agent_communication/get_messages",
"arguments": {
"roomName": "dev-team",
"agentName": "agent2",
"mentionsOnly": true
}
}
// 新着メッセージが来るまで待機(最大30秒)
{
"tool": "agent_communication/wait_for_messages",
"arguments": {
"agentName": "agent1",
"roomName": "dev-team",
"timeout": 30
}
}
// デフォルトタイムアウト(30秒)で待機
{
"tool": "agent_communication/wait_for_messages",
"arguments": {
"agentName": "agent1",
"roomName": "dev-team"
}
}
このツールを使用すると:
// 全体のステータスを取得
{
"tool": "agent_communication/get_status",
"arguments": {}
}
// 特定ルームのステータスを取得
{
"tool": "agent_communication/get_status",
"arguments": {
"roomName": "dev-team"
}
}
{
"tool": "agent_communication/clear_room_messages",
"arguments": {
"roomName": "dev-team",
"confirm": true
}
}
# TypeScriptのビルド
npm run build
# 開発モード(ウォッチモード)
npm run dev
# テストの実行
npm test
# 特定の機能のテスト
npm run test:messaging
npm run test:rooms
npm run test:management
# 統合テスト
npm run test:integration
# E2Eテスト
npm run test:e2e
# カバレッジレポート
npm run test:coverage
# 型チェック
npm run typecheck
# ESLint
npm run lint
MCPクライアント
↓
MCPサーバー (src/index.ts)
↓
ツールレジストリ (src/server/ToolRegistry.ts)
↓
アダプター層 (src/adapters/)
├── MessagingAdapter
├── RoomsAdapter
└── ManagementAdapter
↓
機能モジュール (src/features/)
├── messaging/
├── rooms/
└── management/
data/
├── rooms.json # ルーム情報
└── rooms/ # ルーム別データ
├── general/
│ ├── messages.jsonl # メッセージ履歴
│ ├── presence.json # プレゼンス情報
│ ├── read_status.json # 既読管理
│ └── waiting_agents.json # 待機中エージェント
└── dev-team/
├── messages.jsonl
├── presence.json
├── read_status.json
└── waiting_agents.json
LOCK_TIMEOUT
エラーが発生した場合、AGENT_COMM_LOCK_TIMEOUT
環境変数を増やしてください.lock
拡張子)が残っている場合は手動で削除してくださいMIT License
プルリクエストを歓迎します。大きな変更の場合は、まずissueを作成して変更内容について議論してください。
問題が発生した場合は、GitHubのissueトラッカーに報告してください。
Connect to any function, any language, across network boundaries using AgentRPC.
Access market data, manage accounts, and execute trades on the Upbit Cryptocurrency Exchange via its OpenAPI.
Manage Twilio resources such as subaccounts, phone numbers, and regulatory bundles using the Twilio API.
A text-to-speech (TTS) server using the VOICEVOX engine. Requires a running VOICEVOX instance and is currently macOS only.
Enhanced MCP server for Twitter/X with OAuth 2.0 support, v2 API media uploads, smart v1.1 fallbacks, and comprehensive rate limiting. Post tweets with text/media, search, and delete tweets programmatically.
Send SMS messages using the Aligo SMS API.
Interact with Mailgun API.
A Text-to-Speech server that integrates with an external VOICEVOX engine.
Create and publish unlimited podcast shows and episodes with ELEMENT.FM
An MCP server for Claude that integrates with the Evolution API for WhatsApp automation.