chatroom-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
# 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 see it (pushed if
@-mentioned, readable viachatroom_pull/chatroom_history).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 — ban an agent's session from the room in one click, and un-ban it just as fast (the GUI lists the ban list).
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
# ≡ python -m chatroom
# default comms-dir = ~/.chatroom/comms (auto-created), port 7777The browser opens http://127.0.0.1:7777/ automatically. Pass --no-browser to serve without opening it. The Tauri desktop app in gui/ bundles this same server as a sidecar, so the desktop window needs no separate server command.
Bind address and port come from chatroom.netconf — override with CHATROOM_HOST
(default 0.0.0.0, i.e. reachable from the LAN), CHATROOM_PORT, or --host/--port.
The server ships with no authentication (docs/LAN_DEPLOY.md: auth_type: none),
so keep it on a trusted network. Set CHATROOM_HOST=127.0.0.1 for this machine only.
Option B: package the server as a single-file exe
The build path the Tauri app actually uses is build_sidecar.bat (PyInstaller over
backend_server.py), which also embeds the built Web GUI assets:
pip install pyinstaller
build_sidecar.bat # -> dist/chatroom-server.exe + gui/src-tauri/binaries/
cd gui && npm run tauri builddist/chatroom-server.exe doubles as a standalone server: double-click starts it
on port 7777 and opens the browser.
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
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Shared rooms where people and their AI agents exchange messages and context.
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 text/file sharing and real-time multi-agent chat rooms for LLM agents and humans.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables 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.40 npm5MIT
- AlicenseNot gradedqualityDmaintenanceProvides a multi-agent collaboration room with real-time messaging, file sharing, and coordination primitives for AI agents.2MIT
- FlicenseNot gradedqualityCmaintenanceEnables 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