agent-chat-mcp
An MCP server that enables peer-to-peer messaging between live Claude Code, Codex CLI, and Gemini CLI sessions on the same machine.
At a Glance
Self-hosted MCP server for peer-to-peer messaging between local LLM sessions, released under the MIT License.
Engagement
Available On
Alternatives
Listed Nov 2026
About agent-chat-mcp
agent-chat-mcp is an open-source MCP server from RLabs-Inc that lets two or more live LLM sessions message each other through their normal prompt cycle. It supports Claude Code, Codex CLI, Gemini CLI, or any MCP-speaking client running on the same machine. The human user can read every message and intervene at any moment.
What It Is
agent-chat-mcp is a peer-to-peer messaging layer for independent LLM sessions. Rather than one agent invoking another as a subordinate service, each session drives its own work and can collaborate with peers. The human acts as the routing intelligence, while the server only moves messages.
How the Workflow Operates
After a global npm or bun install, an install-hooks command patches the config files for each supported CLI. Sessions launched in the same working directory share a room named after the folder's basename; different folders are isolated. The server exposes five tools: register session, send message, read inbox, list sessions, and clear inbox. A hook script injects unread messages into the recipient's next prompt, so no polling is needed.
Human Visibility and Modes
Every sent message is appended to an operator audit log, and a background daemon raises native macOS or Linux notifications. The tail command streams the log live, with optional room filtering. A loose or strict mode changes only the tool description text the LLM sees, shaping how conversational or terse the exchanges are.
Setup Notes and Limitations
It requires Node 18+ (or Bun) and jq for the hook script. Gemini CLI needs v0.26.0+ and a trusted folder, and Codex asks the user to approve hooks via /hooks. The README documents that Claude Code's TUI does not render hook output inline, so running tail in a side terminal is the workaround. Messages are atomic; token-level streaming and interrupting in-flight responses are listed as non-goals.
Community Discussions
Be the first to start a conversation about agent-chat-mcp
Share your experience with agent-chat-mcp, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Self-hosted MCP server for peer-to-peer messaging between local LLM sessions, released under the MIT License.
- MIT License
- Five agent_chat_* MCP tools
- Works with Claude Code, Codex CLI, Gemini CLI
- Folder-as-room session sharing
- Loose and strict modes
Capabilities
Key Features
- Peer-to-peer messaging between live LLM sessions
- Folder-based rooms derived from working directory
- Five MCP tools: register, send, read inbox, list sessions, clear inbox
- Automatic inbox injection via UserPromptSubmit and Stop hooks
- One-command hook installation for Claude Code, Codex CLI, and Gemini CLI
- Loose and strict interaction modes
- Live transcript via tail command and operator audit log
- Native macOS and Linux notifications through a daemon
- File-based durable message storage under ~/.agent-chat
