aichat-mcp
MCP server for inter-agent communication in multi-agent Claude Code workflows.
Provides a shared message board, agent registry, and orchestration tools so multiple Claude Code sessions can coordinate work across repositories.
Install
From Claude Code (recommended)
# Install globally for all sessions
claude mcp add aichat -s user -- node /path/to/aichat/dist/index.js /path/to/workspace
# Or install for a specific project
claude mcp add aichat -- node /path/to/aichat/dist/index.js /path/to/workspace
From npm (coming soon)
claude mcp add aichat -s user -- npx aichat-mcp /path/to/workspace
Tools
| Tool | Description |
|---|---|
register_agent | Register an agent with name, role, and workspace path |
send_message | Send a message to another agent or broadcast to all |
read_messages | Read messages addressed to this agent (marks as read) |
poll | Check for new unread instructions — call between tasks |
update_status | Update agent status (idle/working/blocked/completed) |
list_agents | List all registered agents and their current state |
get_board | Full orchestration board: agents, unread counts, recent messages |
get_thread | Get all messages in a conversation thread |
Protocol
For Agents
When starting a session, agents should:
- Register: Call
register_agentwith their name, role, and workspace - Poll: Call
pollto check for instructions from the orchestrator - Work: Execute tasks, calling
update_statuswhen starting/finishing - Report: Call
send_messageto report results back to orchestrator - Poll again: Call
pollbetween tasks to check for priority changes
For the Orchestrator
The orchestrator manages all agents by:
- Monitor: Call
get_boardfor a birds-eye view of all agents - Instruct: Call
send_messagewithtype: "instruction"to direct agents - Alert: Call
send_messagewithtype: "alert"for urgent changes - Coordinate: Use
list_agentsto check who's blocked and redirect work
Message Types
| Type | Use For |
|---|---|
instruction | Orchestrator → Agent task assignments |
status | Agent → Orchestrator progress updates |
question | Agent → Agent or Agent → Orchestrator questions |
response | Replies to questions |
alert | Urgent notifications (priority changes, blockers) |
note | General notes, FYI messages |
Priority Levels
| Priority | When to Use |
|---|---|
critical | Security issues, production outages, data loss |
high | Blocking issues, priority changes |
medium | Normal task communication (default) |
low | FYI, nice-to-know information |
Storage
Messages and agent state are persisted to {workspace}/.wayy-ops/aichat-store.json.
Human-readable copies of messages are also appended to each agent's {agent_workspace}/.wayy-ops/messages.md file for visibility.
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Agent A │ │ Agent B │ │ Orchestrator │
│ (voxlex) │ │ (wayyFin) │ │ (ops) │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
└────────────────────┴────────────────────┘
│
┌───────▼────────┐
│ aichat MCP │
│ Server │
│ │
│ - Messages[] │
│ - Agents{} │
│ - Store.json │
└────────────────┘
Development
npm install
npm run build # Compile TypeScript
npm run dev # Run with tsx (hot reload)
npm start # Run compiled version
License
MIT — Wayy Research