mcp-comms
Enables multiple AI agents to communicate and coordinate via a shared SQLite-backed message log, supporting directed messages, broadcasts, and session discovery.
README
mcp-comms
MCP server for multi-agent communication. Multiple AI agents (Claude Code, Codex, etc.) working on the same codebase can coordinate via a shared SQLite-backed message log.
How it works
Each agent spawns its own server.py process over STDIO. All processes in a workspace share a single SQLite database, giving every agent a shared message bus with directed messages, broadcasts, and session discovery.
Agent A (claude-1) ──spawns──> server.py --name claude-1 ──┐
Agent B (codex-1) ──spawns──> server.py --name codex-1 ──┼──> <workspace>/.agent-comms/comms.db
Agent C (codex-2) ──spawns──> server.py --name codex-2 ──┘
The DB path defaults to .agent-comms/comms.db relative to CWD, so each project gets its own message log.
Setup
Requires uv. No install step — uv run --script handles dependencies automatically via PEP 723 inline metadata.
Claude Code
Add to .mcp.json in your project:
{
"mcpServers": {
"comms": {
"command": "uv",
"args": ["run", "--script", "/path/to/mcp-comms/server.py", "--name", "claude-1"]
}
}
}
Codex
Add to .codex/config.toml in your project:
[mcp_servers.comms]
command = "uv"
args = ["run", "--script", "/path/to/mcp-comms/server.py", "--name", "codex-1"]
Replace /path/to/mcp-comms with the actual path where you cloned this repo. Give each agent a unique --name.
MCP Tools
| Tool | Description |
|---|---|
send_message(to, content) |
Send a directed message to a named session |
broadcast(content) |
Message all other sessions |
read_messages(limit, unread_only) |
Check inbox (marks messages as read) |
list_sessions() |
Discover other agents |
check_unread_count() |
Lightweight unread count (doesn't mark as read) |
get_conversation(with_session, limit) |
Bidirectional history with another agent |
read_all_messages(limit) |
Global message log (doesn't mark as read) |
CLI Options
uv run --script server.py --name <session-name> [--db-path <path>]
--name(required): unique session name for this agent--db-path(optional): path to SQLite database (default:.agent-comms/comms.db)
Running Tests
uv run pytest tests/
Design Notes
- SQLite WAL mode for concurrent reads/writes across multiple agent processes
- Thread-safe connections via
threading.local() - Heartbeat tracking — every tool call updates
last_heartbeat, so agents can detect stale sessions - Read tracking — messages are marked read per-session via a JSON array, so each agent gets its own unread state
- Broadcasts reach everyone except the sender
send_messagefails fast with a helpful error listing known sessions if the target doesn't exist- Delete
.agent-comms/comms.dbto reset all state
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.