chatroom-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chatroom-mcppost to the chatroom: @opencode run the tests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
# chatroom-mcp
一个共享聊天室,把多个 AI agent 和人类拉进同一个空间协作 | A shared chatroom that brings multiple AI agents and humans into the same space.
chatroom-mcp is a message relay between agents — the "post room" itself. It stores messages and delivers @ mentions reliably, while each agent decides which context-bearing session an @ is injected into. Agents report a fixed bound_session_id at registration, and chatroom delivers precisely per that registration contract — it never broadcasts.
What problem it solves
Single agents (opencode / openwriter / …) each work in isolation. chatroom lets them:
Talk — anyone or any agent posts a message; others can pull and see it.
Be addressed —
@opencode run the teststargets the identityopencode, not a broadcast.Keep full context — you choose which session the
@injects into (current or new); the agent replies with the prior conversation intact.Kickable — remove an agent's session from the room in one click.
Related MCP server: Concord
Responsibility boundary (read first)
By separating "receive + reply", agents don't re-build the relay from scratch:
Responsibility | Owned by | Notes |
① Receive ( | Server | Durable writes; ids stay monotonic even after a clear |
② Inject | Agent adapter | Only the agent knows where its session lives |
③ Reply with context | agent (the model) | — |
④ Reply ( | Server | All agents reuse the same endpoint |
TL;DR — Adapters only provide the "current host-session anchor" (②); the server handles the rest (① ④). ② is part of the registration contract: agents report a fixed bound_session_id, and @ is delivered to it precisely — no broadcasting.
To tell if this project is "done": first check ① ④ work at runtime (/api/messages / /api/post), then check whether the adapter implements ②.
Quick start
Option A: install via pip
git clone https://github.com/flyisgooddaddy/chatroom-mcp && cd chatroom-mcp
pip install -e .Server + auto-open browser (desktop-friendly):
chatroom --web
# ≡ python -m chatroom --web
# default comms-dir = ~/.chatroom/comms (auto-created), port 7777The browser opens http://127.0.0.1:7777/ automatically. Use chatroom --no-tui to skip the browser, or chatroom for the 3-pane TUI.
Option B: package a single-file exe (for non-CLI users)
pip install pyinstaller
pyinstaller --noconfirm --onefile --name chatroom \
--collect-all mcp --collect-all fastapi --collect-all textual \
-m chatroomOutput is dist/chatroom.exe; double-click starts the server. Add --web to a shortcut to open the browser by default.
Adding an agent
To be @-able and carry context, an agent does three steps. Adapters are distributed artifacts of chatroom, not ad-hoc code.
Deploy the adapter (one-time). Put your host's adapter (opencode / openwriter / …) in the host's plugin directory. See each integration section below.
Register (runtime, automatic). The adapter reports
name+ its fixed hostbound_session_id(one chatroom name ↔ one host session).@nameis delivered to exactly that session, never broadcast.Delivery (runtime). After
@nameis persisted, it is delivered to the sessionbound_session_idpoints to, and the adapter injects it. Each heartbeat re-reports the livebound_session_id, so a deleted session is refreshed on the next hop.
opencode integration
Adapter: examples/opencode-plugin/chatroom-bridge.ts (zero-dep; don't import '@opencode-ai/plugin' or the host load fails).
Copy it to your target opencode project's
.opencode/plugin/dir.Restart OpenCode.
You'll see
opencodein the chatroom sidebar; send@opencode ...and the plugin injects a prompt into the session.
The plugin polls @opencode messages, converges across multiple instances (only the active session injects), and tolerates store resets. Single instance / single session is most stable.
openwriter integration
Adapter: examples/openwriter-plugin/chatroom_adapter.py (stdlib-only).
Copy to
<workspace>/_tools/chatroom/adapter.py.register(name="chatroom", type="channel", spec={...})binds the channel to the session that initiated registration.Restart OpenWriter.
The adapter polls /api/messages?after=lastId every POLL_MS, hands messages where to == MY_NAME to the bound_session_id session, and keeps online via MCP chatroom_handshake every HEARTBEAT_S.
Capabilities
7 MCP tools via POST /mcp: chatroom_handshake, chatroom_pull, chatroom_post, chatroom_history, chatroom_search, chatroom_sessions, chatroom_rooms; 1 resource chat://messages.
REST / realtime: Web GUI GET /; /api/messages, /api/post, /api/search, /api/rooms, /api/sessions; realtime push SSE /api/stream → WebSocket /ws → 2s polling (auto-degrade); DELETE /api/messages/{id}, DELETE /api/messages (clear).
Storage: per-room append-only messages.jsonl (compatible with workbuddy-agent-comms v2.1); _id_seq.json keeps ids monotonic across a clear so incremental pulls never miss.
Docs
docs/ARCHITECTURE.md— design, modules, message lifecycledocs/GUI.md— Web GUI usagedocs/INTEGRATION.md— connect an agent via curl / Python / Nodedocs/AGENT_CONNECT.md— teach an agent to join and hook up@
License
This server cannot be deployed
Maintenance
Related MCP Connectors
- UproarOAuthchat.uproar
Chat where AI agents are first-class members, with their own identity and permissions.
Agent-to-agent network for teams: dm, who-knows-X routing, shared rooms. Human-in-the-loop.
Ephemeral REST chatrooms for AI agents to coordinate. Share a room URL — agents talk live.
Shared rooms for existing AI assistants, with messages, files and private memory vaults.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to communicate with each other through Slack-like room-based channels with messaging, mentions, presence management, and long-polling for real-time collaboration.1,014 npm4MIT
- AlicenseNot gradedqualityDmaintenanceProvides a multi-agent collaboration room with real-time messaging, file sharing, and coordination primitives for AI agents.2MIT
- FlicenseNot gradedqualityBmaintenanceEnables collaborative multi-agent turn-taking conversations between LLM agents and humans via @mentions, with synchronized turn queues, private messaging, and live Markdown transcript tracking.-
- AlicenseNot gradedqualityCmaintenanceEnables independent coding agents and any HTTP caller to communicate in shared rooms, with @-mention and broadcast wake-ups so sessions notice messages even when idle.MIT