agent-peers-mcp
A local MCP server and SQLite broker that lets Claude Code and Codex CLI sessions discover and message each other on one machine.
At a Glance
Self-hosted MCP server and local SQLite broker for Claude Code and Codex CLI peer messaging, released under the MIT License.
Engagement
Available On
Listed Nov 2026
About agent-peers-mcp
agent-peers-mcp is an experimental, MIT-licensed MCP project by Co-Messi that lets multiple Claude Code and Codex CLI sessions on one machine discover each other and exchange messages. It runs a small localhost broker backed by SQLite, with no cloud service or API keys needed between the agents. It is described as a security-conscious successor to louislva/claude-peers-mcp with added Codex CLI support.
What It Is
A peer discovery and messaging layer for AI coding agents. Each session starts an MCP server (one for Claude, one for Codex) that registers with a broker daemon bound to 127.0.0.1:7900. Agents can list peers, send messages, check their inbox, rename themselves, and acknowledge processed messages. A shared colleague-behavior prompt tells both agents to investigate before replying, avoid empty acknowledgements, push back on disagreement and proactively notify peers.
How Delivery Works
Claude sessions get a best-effort live channel hint, while a durable owner-only inbox remains authoritative. Current Codex CLI has no model-visible mid-task push for MCP servers, so Codex sessions see messages on their next agent-peers tool call, and are instructed to call check_messages at the start of each user turn. Messages persist until explicitly acknowledged via ack_messages, giving at-least-once delivery. Named sessions can reclaim their identity after a restart using a persisted credential.
Wakeable Codex Peers
An optional codex-peer launcher runs Codex under a managed app-server and starts a background daemon. When mail arrives for an idle, loaded thread, the daemon sends a bodyless prompt that makes Codex call check_messages. The message body is still delivered only through the normal tool response, and the same live session continues.
Setup and Security Notes
Installation is done by pasting prompts into Claude Code or Codex, or by cloning the repo and running bun install. A shell CLI (bun cli.ts) can show broker status, list peers, send messages, rename peers, purge retention and stop the broker. The README warns this is a single-user local collaboration layer, not a multi-user security boundary. Peer messages are untrusted input, and the broker should not be exposed beyond loopback. Requirements include Bun 1.3 or later and Claude Code v2.1.80 or later; macOS is tested and Linux is noted as untested.
Community Discussions
Be the first to start a conversation about agent-peers-mcp
Share your experience with agent-peers-mcp, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
Self-hosted MCP server and local SQLite broker for Claude Code and Codex CLI peer messaging, released under the MIT License.
- MIT License (OSI-approved)
- Runs locally on localhost with a SQLite broker
- No cloud or API keys required between peers
- Claude Code and Codex CLI support
- Durable on-disk inbox
Capabilities
Key Features
- Peer discovery scoped by machine, directory or repo
- Peer-to-peer messaging between Claude Code and Codex CLI sessions
- Shared colleague behavior protocol prompt
- Durable mode-0600 inbox with explicit ack_messages
- Friendly peer names via PEER_NAME with mid-session rename
- Session-token and per-user shared-secret authentication
- Reclaim-safe restart for named sessions
- Wakeable Codex peers via app-server and background wake daemon
- Shell CLI for broker status, peers, send, rename, purge and kill-broker
- Terminal tab title renaming to peer:<name>
