MCP CoCo
Bridges OpenClaw and Hermes Agent to enable messaging, multi-turn conversations, and health checks via MCP tools.
README
MCP CoCo
Universal Agent Communication Hub — Connect any MCP agent to any other.
MCP CoCo is a message bus for AI agents. Any agent that speaks MCP (Model Context Protocol) can connect and talk to any other — OpenClaw, Hermes, Claude Desktop, Cursor, OpenCode, and more.
┌──────────────────────────────────┐
OpenClaw ─▶ │◀── Hermes Agent
│ MCP CoCo (Agent Bus) │
Claude ───▶ 16 MCP tools + CLI wrapper │◀── Cursor
│ │
OpenCode ─▶ coco-cli.js (file-based) │◀── Claude Code CLI
└──────────────────────────────────┘
Features
- 🔌 MCP Server — 16 tools for any MCP-compatible agent
- 📁 CLI Wrapper —
coco-cli.jsfor terminal agents (no MCP daemon needed) - 🤖 Agent Registry — agents register themselves, discover each other
- ✉️ Direct Messages — send/receive/wait (long-poll) between agents
- 📢 Channels — multi-agent group chat rooms
- 📡 Broadcast — send a message to every agent on the bus
- ⚕️ Hermes Bridge — talk to Hermes Agent, send to Telegram/Discord
Quick Start
# MCP mode (for OpenClaw, Claude Desktop, Cursor)
node index.js
# CLI mode (for OpenCode, shell scripts)
node coco-cli.js agents
node coco-cli.js send andul "Hello!"
For MCP agents (OpenClaw, Claude Desktop, Cursor)
Add to your MCP config:
{
"mcpServers": {
"coco": {
"command": "node",
"args": ["E:\\_system\\.openclaw\\workspace\\repos\\mcp-coco\\index.js"]
}
}
}
Then call tools:
mcporter call coco.agent_register name="my-agent"
mcporter call coco.agent_list
mcporter call coco.message_send from="my-agent" to="andul" message="Hello!"
mcporter call coco.message_fetch agent_name="my-agent"
mcporter call coco.channel_send channel_id="dev" from="my-agent" message="Hey team!"
For CLI agents (OpenCode, Claude Code, shell)
export COCO_AGENT=opencode
node coco-cli.js agents # List agents
node coco-cli.js inbox # Check messages
node coco-cli.js send andul "Hey!" # Send DM
node coco-cli.js watch # Poll for new messages
MCP Tools (16 total)
Hermes Bridge (4)
| Tool | Description |
|---|---|
ask_hermes(prompt, session_key?) |
Send prompt to Hermes Agent (multi-turn) |
hermes_send(target, message) |
Send message through Hermes to chat (Telegram, Discord) |
hermes_channels(platform?) |
List Hermes messaging channels |
coco_health() |
Health check (Hermes CLI + gateway) |
Agent Registry (3)
| Tool | Description |
|---|---|
agent_register(name, description?, metadata?) |
Register your agent on the bus |
agent_list(online_only?) |
List all registered agents |
agent_heartbeat(name) |
Ping to show online status |
Messaging (4)
| Tool | Description |
|---|---|
message_send(from, to, message, metadata?) |
Send DM to another agent |
message_broadcast(from, message) |
Send to ALL agents |
message_fetch(agent_name, limit?) |
Read inbox |
message_wait(agent_name, timeout_ms?) |
Long-poll for new messages (up to 60s) |
Channels (4)
| Tool | Description |
|---|---|
channel_create(channel_id, topic?, created_by?) |
Create a shared channel |
channel_join(channel_id, agent_name) |
Join a channel |
channel_send(channel_id, from, message) |
Send to all channel members |
channel_history(channel_id, limit?) |
Read channel log |
Architecture
.bus/ # Shared filesystem — all agents read/write here
├── agents.json # Agent registry
├── messages/<agent_name>/ # Per-agent inbox
├── channels/<id>.json # Channel metadata
└── channels/<id>/log/ # Channel messages
index.js # MCP stdio server (readline → JSON-RPC → AgentBus)
coco-cli.js # CLI wrapper (file read/write, no MCP needed)
lib/mcp.js # MCP protocol handler + 16 tool definitions
lib/hermes.js # Hermes Agent subprocess integration
lib/bus.js # AgentBus core (register, messaging, channels)
lib/daemon.js # Background daemon manager
Windows Notes
- Uses
cmd.exe /cto avoid prompt_toolkit TTY crash - All Hermes subprocess calls wrap stderr (
2>&1) - ANSI output stripped, timeouts generous (180s)
.bus/data is persistent JSON — survives restarts
Requirements
- Node.js >= 18
- Hermes Agent (
pip install hermes-agent) — only needed forask_hermes/hermes_send - mcporter (OpenClaw) — for MCP agent connections
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。