loading…
Search for a command to run...
loading…
A local MCP server that enables direct, persistent communication between multiple Claude Code agent sessions through a secure messaging channel. It includes bui
A local MCP server that enables direct, persistent communication between multiple Claude Code agent sessions through a secure messaging channel. It includes built-in guardrails to manage message exchanges and supports optional human monitoring via Telegram.
A local MCP channel server that enables direct agent-to-agent communication between Claude Code sessions. Built for multi-agent systems where persistent Claude Code instances need to coordinate.
Each agent runs its own instance of this server. The server exposes:
send_message tool — sends a message to another agent by name<channel> notificationsWhen Agent A calls send_message(to: "agent-b", message: "..."):
localhost:<port>)notifications/claude/channel event<channel source="agent-hq" from="agent-a" to="agent-b" ts="...">message</channel>send_message, then the exchange is lockedgit clone https://github.com/aj-dev-smith/claude-channel-agenthq.git
cd claude-channel-agenthq
bun install
.mcp.json in each agent's project rootEach agent needs its own entry with a unique name and port:
{
"mcpServers": {
"agent-hq": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/claude-channel-agenthq", "--shell=bun", "--silent", "start"],
"env": {
"AGENT_HQ_NAME": "nova",
"AGENT_HQ_PORT": "7001"
}
}
}
}
server.tsEdit the AGENTS object to match your agent setup:
const AGENTS: Record<string, { port: number; botUsername: string }> = {
nova: { port: 7001, botUsername: 'your_nova_bot' },
summit: { port: 7002, botUsername: 'your_summit_bot' },
// ... add your agents
}
The botUsername is only used for Telegram group posting (optional). If you're not using Telegram, set it to any identifier.
| Variable | Required | Description |
|---|---|---|
AGENT_HQ_NAME |
Yes | This agent's name (must match a key in the AGENTS registry) |
AGENT_HQ_PORT |
Yes | Port this agent listens on for inbound messages |
AGENT_HQ_GROUP_ID |
No | Telegram group chat_id for human visibility (default: none) |
TELEGRAM_BOT_TOKEN |
No | Bot token for posting to the Telegram group |
During the channel research preview, custom channels require:
claude --dangerously-load-development-channels server:agent-hq --channels plugin:telegram@claude-plugins-official
This triggers a one-time confirmation prompt ("I am using this for local development"). For unattended operation, you can auto-accept it by sending Enter to the terminal after startup:
# In a start script:
claude --dangerously-load-development-channels server:agent-hq ... &
sleep 8
tmux send-keys -t your-session Enter 2>/dev/null
The server enforces strict loop prevention:
server.ts via COOLDOWN_MS).If an agent needs more than one round-trip of coordination, it should message a human operator instead.
Inbound messages arrive as channel notifications:
<channel source="agent-hq" from="nova" to="summit" ts="2026-03-24T00:34:43.376Z">
Hey Summit, Nova here. AJ mentioned he's traveling next week -- adjust his training plan for limited equipment.
</channel>
The from field identifies the sender. Respond using the send_message tool:
send_message(to: "nova", message: "Got it, I'll write a bodyweight-only plan for next week.")
If TELEGRAM_BOT_TOKEN and AGENT_HQ_GROUP_ID are set, all messages are also posted to a Telegram group so humans can observe agent cross-talk. The format is:
[nova → @aj_summit_bot]
Hey Summit, AJ mentioned he's traveling next week...
Note: Telegram bots cannot see messages from other bots in groups. The Telegram posting is purely for human visibility — the actual message delivery uses the HTTP localhost mechanism.
Agent A (port 7001) Agent B (port 7002)
┌──────────────────┐ ┌──────────────────┐
│ Claude Session │ │ Claude Session │
│ │ │ │
│ send_message( │ HTTP POST │ ← channel │
│ to: "agent-b", ├─────────────────►│ notification │
│ message: "..." │ localhost:7002 │ pushed to │
│ ) │ │ Claude session │
│ │ │ │
│ MCP Server │ │ MCP Server │
│ (stdio to Claude)│ │ (stdio to Claude)│
│ + HTTP listener │ │ + HTTP listener │
└──────────────────┘ └──────────────────┘
│ │
└──────── Telegram Group (optional) ───┘
(human visibility)
Agent 1 — assistant/.mcp.json:
{
"mcpServers": {
"agent-hq": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/claude-channel-agenthq", "--shell=bun", "--silent", "start"],
"env": {
"AGENT_HQ_NAME": "assistant",
"AGENT_HQ_PORT": "7001"
}
}
}
}
Agent 2 — researcher/.mcp.json:
{
"mcpServers": {
"agent-hq": {
"command": "bun",
"args": ["run", "--cwd", "/path/to/claude-channel-agenthq", "--shell=bun", "--silent", "start"],
"env": {
"AGENT_HQ_NAME": "researcher",
"AGENT_HQ_PORT": "7002"
}
}
}
}
Update server.ts registry:
const AGENTS: Record<string, { port: number; botUsername: string }> = {
assistant: { port: 7001, botUsername: 'assistant' },
researcher: { port: 7002, botUsername: 'researcher' },
}
Start both:
cd assistant && claude --dangerously-load-development-channels server:agent-hq
cd researcher && claude --dangerously-load-development-channels server:agent-hq
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"agent-hq": {
"command": "npx",
"args": []
}
}
}