agent-intercom
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., "@agent-intercom send a message to my claude-code session saying the refactor is done"
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.
agent-intercom
Let your coding agents talk to each other. agent-intercom is a small MCP server that lets pi, Claude Code, Codex, and other MCP clients exchange 1:1 async messages on the same machine — like typing into each other's chat.
Messages are stored as plain JSON files under ~/.local/share/agent-intercom/.
There is no daemon, no database, and no network traffic; everything stays on
your machine.
This repository is vibe-coded: most of its code and docs are written by AI coding agents under human direction.
Requirements
Node.js >= 22
At least one MCP-capable coding agent (pi, Claude Code, Codex, ...)
Related MCP server: Agent Wire
Install
One command per tool:
# pi
pi mcp add agent-intercom -- npx --yes github:ryul99/agent-intercom
# Claude Code
claude mcp add --scope user agent-intercom -- npx --yes github:ryul99/agent-intercom
# Codex
codex mcp add agent-intercom -- npx --yes github:ryul99/agent-intercomVerify with pi mcp list, claude mcp list, or codex mcp list; each should
show agent-intercom as connected.
Use
Once registered, the agent can see the messages other sessions sent it. Try:
"Send a message to my claude-code session saying the refactor is done and the API shape changed."
In the receiving session:
"Check my agent-intercom inbox."
The agent calls the inbox tool to view unread messages and mark_read to
acknowledge them. Useful things to know:
Address a specific session by label, id, or a unique prefix of either, or by tool name (
pi,claude-code,codex) when exactly one such session is running.A session can rename itself with
set_label— for example "frontend" — and other sessions can thensendtofrontend.unread_count/inboxnever consume messages; onlymark_readmarks them read. Unread messages never expire.Your own queued messages are visible in both directions via
history.
How sessions find each other
Each agent that starts the MCP server registers a session (tool, label, cwd,
pid). tool is auto-detected from the MCP handshake; the label defaults to
<tool>-<pid> and can be changed anytime with set_label. The receiving side
usually sees messages on its next turn; nothing is pushed into a session that
is not running.
How agents notice messages
The server publishes usage instructions to every connecting client (via the MCP
instructions field), so any MCP client knows when and how to check its inbox.
There is nothing to install per tool.
pi users can install the companion plugin from ryul99/ai-tools, which registers this MCP server automatically and injects unread messages into every prompt. Claude Code and Codex users get the same one-install setup from the same package.
Notes on trust and storage
Anyone with local file access can read or spoof messages. This is a same-machine, same-user trust model; do not pipe secrets through it.
Message bodies enter the receiving model's context. Treat them as data from another agent, not as instructions.
Read messages are deleted after 30 days (
--read-ttl-days 0keeps them forever). Unread messages are never auto-deleted.
Tools
Tool | Purpose |
| Show this session's registration |
| List live sessions (pass |
| Rename this session |
| Send a 1:1 message ( |
| Peek at unread (or all) messages; does not consume |
| Both directions of a conversation with a counterpart |
| Mark messages as read |
| Count unread messages, optionally by sender |
| Block until a new unread arrives (default 30s, max 600s) |
INTERCOM_HOME overrides the storage directory; INTERCOM_LABEL sets a
session's initial label; INTERCOM_TOOL overrides auto-detection.
Development
git clone https://github.com/ryul99/agent-intercom.git
cd agent-intercom
npm install
npm test # unit tests
npm run build # bundle to dist/server.mjsReleases are consumed directly from GitHub (github:ryul99/agent-intercom#v0.1.0);
tag releases as needed.
License
MIT
Available Tools
9 toolshistoryConversation historyA
Show both directions of the conversation between this session and another session, sorted oldest to newest.
Inputs: with (required), limit.
inboxList inbox messagesA
List messages addressed to this session. Unread by default. Does not mark messages as read; call mark_read after you have acted on them.
Inputs: with, limit, unread_only.
mark_readMark messages as readA
Mark inbox messages as read. Unread messages are never deleted; read messages expire after the configured TTL.
Inputs: ids (required).
sendSend a messageA
Send a 1:1 message to another agent session on this machine. to accepts a session id, a label, a unique prefix of either, or a tool name when it resolves to exactly one session.
Inputs: to (required), body (required), reply_to.
set_labelRename this sessionA
Set this session's label (1-64 chars, no control characters). Only this session is renamed. The label is the name other agents use to address you with send.
Inputs: label (required).
unread_countCount unread messagesB
Count unread messages addressed to this session, optionally filtered by sender.
Inputs: with.
waitWait for a messageA
Block until a new unread message arrives (polling), or the timeout elapses. Default 30 seconds, maximum 600. Use only when you need to wait for a reply mid-task.
Inputs: with, timeout_seconds.
whoList sessionsA
List agent sessions on this machine. By default only currently live sessions are shown; pass all=true to include ended or crashed ones.
Inputs: all, tool.
whoamiWho am IA
Show this agent-intercom session registration (id, tool, label, home directory).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct operation, and descriptions clarify the trickier pairs (whoami = self vs who = all sessions; inbox = list vs unread_count = count vs history = two-way thread). Only minor overlap remains between inbox/unread_count/wait, but the descriptions make the intended selection clear.
The names are readable and thematically coherent, but conventions are mixed: bare verbs (send, wait, whoami, who), nouns (inbox, history), and verb_noun forms (set_label, mark_read) plus a noun_count form (unread_count). It works, but there is no single predictable pattern an agent could rely on when guessing a name.
Nine tools is well within the sweet spot and each one earns its place in a messaging workflow (identity, discovery, addressing, send, receive, read-state, wait). No tool feels redundant or bloated for a local agent-intercom server.
The core lifecycle — discover peers, label yourself, send, read inbox/history, mark read, count, and block for replies — is fully covered. Gaps are minor: no broadcast/multi-recipient send, no way to list sent-only messages, and no message/session cleanup, though none blocks typical workflows.
Maintenance
Related MCP Connectors
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Agent communication platform for agent to agent messaging via MCP. Messages, channels, skills.
A chat app for AI agents that works like email: agents message each other over MCP.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables durable message passing between Codex project agents with MCP tools and automatic wake-up delivery, storing messages as JSON on disk.32138 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents such as Codex and Claude Code to exchange durable, locally stored messages through shared MCP tools for listing enrolled recipients, sending and replying to messages, reading pending inbox items, acknowledging receipt, and checking message status. Delivery uses each runtime's native session interface, so messages persist across broker restarts without resuming or launching conversations.AGPL 3.0
- AlicenseAqualityBmaintenanceLocal agent-to-agent messaging and coordination for coding sessions on one machine, through MCP and a CLI. Includes threaded mail, full-text search, per-repository agent rosters, advisory file reservations, and optional notifications. Integrations cover Claude Code, Codex, Cursor, Devin, Grok, OpenCode, and Antigravity. Standalone agents and T3 Code sessions can share the same local server.232MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding-agent sessions to post and collect durable letters through a fully local, SQLite-backed post office, with delivery retried across restarts until the recipient acknowledges. Any MCP client or shell-capable agent can use it to send, read, acknowledge, and review the history of messages between sessions.199 npmAGPL 3.0