agent-bus-mcp
This server provides a universal multi-agent communication bus over MCP and SQLite, letting agents exchange messages, manage inboxes, wait for incoming messages, and register identities.
Send messages to other agents (
bus_send) with optional topic, sender, and conversation ID; triggers the recipient's doorbell for immediate wakeup.Fetch inbox messages (
bus_inbox) for a specific agent, with filtering by unread status, marking as read, and configurable limits.Block and wait for incoming messages (
bus_wait_message) using long-polling, eliminating terminal polling.Query dialogue history (
bus_history) between two agents, with a configurable limit of recent messages.List active agents (
bus_list_agents) and their statuses on the bus.Register or update agents (
bus_register) with identity, framework, doorbell mechanism, and target.Persist all messages in SQLite with WAL mode, ACID transactions, and read/delivered status tracking.
Supports heterogeneous agents including Claude Code, OpenAI Codex, Google Antigravity, and DeepSeek Harness, plus a CLI for human or script interaction.
Enables Google Antigravity (Gemini) agents to participate in the multi-agent bus, exchange messages, and receive reactive task wakeups through the Antigravity driver.
Enables OpenAI Codex agents to participate in the multi-agent bus, exchange messages, and receive doorbell wakeups through the Codex integration.
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-bus-mcpSend a message to coordinator asking for a code review"
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-bus-mcp π
Universal Multi-Agent Communication Bus & Doorbell Wakeup System
Connect Claude Code, OpenAI Codex, Google Antigravity, and DeepSeek Harness (DSH) over standard Model Context Protocol (MCP) and SQLite.
π Why agent-bus-mcp?
Modern AI agents often operate in isolated silos:
Claude Code runs in its own CLI or Chat UI;
Google Antigravity operates in terminal raw mode;
OpenAI Codex and DeepSeek Harness have separate runtimes.
Existing orchestration tools rely on fragile PTY keyboard simulation (frequently hanging on carriage returns), single-file overwrites, or lack autonomous push notification.
agent-bus-mcp solves this with a three-layer architecture:
Universal Addressing & Identity: Every agent registers a unique ID (
antigravity-lead,coordinator,deepseek-coder). Multiple instances never collide.Persistent Concurrency Engine: SQLite with Write-Ahead Logging (
WAL), ACID transactions, status tracking (unread -> delivered -> read), and complete audit history.Heterogeneous Doorbell Subsystem: Delivers sub-second (0.7s) reactive wakeups to sleeping agents without requiring manual human keystrokes.
Related MCP server: mcp-comms
π Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Heterogeneous Agents β
β Antigravity β Claude Code β DeepSeek / Codex β
ββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββ¬ββββββββββ
β (Standard MCP Tools or CLI)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β agent-bus-mcp Server (JSON-RPC 2.0) β
β Tools: bus_send / bus_inbox / bus_history / bus_register β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β (ACID Transactions & Status Tracking)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SQLite WAL Database (~/.agent-bus/bus.db) β
β - messages: message_id, from, to, topic, status, timestampsβ
β - agents: agent_id, framework, doorbell_type, last_seen β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β (Targeted Doorbell Wakeup)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Doorbell Drivers β
β - Antigravity Driver (Platform Reactive Task Wakeup) β
β - Claude Code Driver (API Chat Turn Injection) β
β - DSH / Unix Driver (FIFO Named Pipe / Socket Signals) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ Quickstart
1. One-Click Installation
Clone and run the installer:
git clone https://github.com/tulong66/agent-bus-mcp.git
cd agent-bus-mcp
./install.shThe installer automatically:
Sets up
~/.agent-bus/and initializes the SQLite WAL database;Installs the global
agent-busCLI to~/.local/bin/agent-bus;Auto-detects and injects MCP configuration into:
~/.claude.json(Claude Code)~/.gemini/config/mcp_config.json(Antigravity)~/.codex/config.json(Codex)~/.dsh/(DeepSeek Harness)
2. Verify Installation
agent-bus agentsOutput:
AGENT ID FRAMEWORK STATUS DOORBELL TARGET
--------------------------------------------------------------------------------
antigravity-lead antigravity active ~/.agent-bus/doorbells/antigravity-lead.bell
coordinator claude-code active ~/.agent-bus/doorbells/coordinator.bell
deepseek-coder dsh active ~/.agent-bus/doorbells/deepseek-coder.bell
codex-lead codex active ~/.agent-bus/doorbells/codex-lead.bellπ οΈ MCP Tools Reference
When connected via MCP, any agent can call these standard tools:
Tool | Description | Key Arguments |
| Send a message to an agent & ring its doorbell |
|
| Fetch unread messages from SQLite |
|
| Query dialogue history between two agents |
|
| List all active agents on the bus | (none) |
| Register identity & doorbell configuration |
|
π» CLI Usage
Humans, background scripts, or agents using bash can interact via agent-bus:
# Send a message to an agent
agent-bus send --to coordinator --from antigravity-lead --topic review "Please inspect PR #12"
# View inbox for an agent
agent-bus inbox --agent coordinator
# View conversation history
agent-bus history antigravity-lead coordinator
# Block and listen for incoming doorbell
agent-bus listen --agent antigravity-lead --timeout 300π Guides for Specific Frameworks
π§ͺ Testing
Install the test runner once, then run the suite:
uv pip install --python .venv/bin/python -e ".[dev]"
.venv/bin/python -m pytest tests/ -vπ License
MIT License. Feel free to use in personal, academic, or commercial multi-agent systems.
Available Tools
6 toolsbus_historyA
Query chronological dialogue history between two agents from SQLite storage.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of recent dialogue messages to return | |
| agent_a | Yes | First agent ID | |
| agent_b | Yes | Second agent ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. 'Query' strongly implies a read-only operation and 'chronological' adds ordering context, but the description does not explicitly state non-mutation, ordering direction, or how 'limit' interacts with chronological order.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with no filler or repetition. Every word contributes: 'Query' indicates the action, 'chronological dialogue history' the resource, 'between two agents' the key parameters, and 'SQLite storage' the backend.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and the schema documents all parameters, but with no annotations and no output schema, the description should clarify return format and the ordering/limit behavior. The current text supports selection but leaves some operational detail for the agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description loosely maps to the required parameters with 'between two agents', but it adds no meaning beyond the schema for agent_a, agent_b, or limit.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the verb ('Query') and the resource ('chronological dialogue history between two agents'), with useful storage context ('SQLite storage'). This distinguishes it from siblings like bus_send or bus_inbox, though it does not name alternatives explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'dialogue history' implies when the tool should be usedβwhen past messages between a specific pair are needed. However, there is no explicit when-to-use/when-not-to-use guidance or comparison with alternatives like bus_inbox or bus_wait_message.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bus_inboxA
Fetch incoming messages for a specific agent from the persistent SQLite inbox. Supports optional blocking wait.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Whether to block waiting until at least one message arrives | |
| limit | No | Maximum number of messages to return | |
| timeout | No | Maximum wait time in seconds if wait is true (default 60) | |
| mark_read | No | Whether to mark returned messages as read | |
| agent_name | Yes | Your agent ID / mailbox name | |
| unread_only | No | Whether to return unread messages only |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the full responsibility for disclosing behavioral traits. It mentions the persistent SQLite inbox and optional blocking wait, but does not disclose that messages may be marked as read (via the mark_read parameter) or that fetching could have side effects. It also does not mention potential errors or timeouts beyond the parameter defaults.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, comprising two sentences that front-load the verb and resource. It efficiently conveys the core functionality and the optional blocking wait feature without unnecessary detail. Every word contributes to understanding the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is brief and lacks details about the return value, such as the format of the messages or whether they are returned in a particular order. Given that there is no output schema, a bit more context on what the agent can expect as a result would improve completeness. However, the tool is relatively simple and the name and parameters provide significant context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides descriptions for all six parameters (100% coverage), so the baseline is 3. The tool description does not add extra meaning beyond the schema; it merely restates the concept of fetching messages and supporting blocking wait, which is already captured in the parameter descriptions. No additional semantic richness is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches incoming messages for a specific agent from the persistent SQLite inbox, using the verb 'fetch' and specifying the resource. It also mentions optional blocking wait, which adds to the clarity of purpose. This distinguishes it from other bus tools like bus_send or bus_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives such as bus_wait_message or bus_history. It mentions 'optional blocking wait' but does not contrast it with bus_wait_message, leaving the agent to infer the appropriate use case. More direct guidance on when to choose bus_inbox over siblings would improve this dimension.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bus_list_agentsA
List all active registered agents and their statuses on the universal communication bus.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It conveys a read-only listing operation and that the result includes statuses, but it does not describe output format, pagination behavior, or whether any registration requirement applies.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no filler, front-loading the verb and resource. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, no-output-schema tool, the description covers the core behavior and expected return content. It could add more detail about status values or response shape, but nothing essential is missing for basic invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. No parameter documentation is needed, and the description does not need to compensate for a schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, 'List', names the resource, 'all active registered agents', and anchors it to the 'universal communication bus'. This clearly distinguishes it from siblings like bus_send and bus_register.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, and it does not mention exclusions or conditions. Any decision about when to call it is left entirely to inference from sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bus_registerB
Register or update an agent's identity and doorbell configuration on the bus.
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent name/ID to register | |
| framework | No | Framework name (e.g. 'antigravity', 'claude-code', 'dsh', 'codex') | generic |
| doorbell_type | No | Doorbell mechanism ('file', 'claude', 'socket', 'signal') | file |
| doorbell_target | No | Target file, socket or port for the doorbell |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It states the action ('register or update') but does not disclose side effects, whether it is idempotent, or what happens on conflict. No mention of permissions or impact on existing agents.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with no redundant words. It clearly states the action and subject without unnecessary elaboration, earning full marks for conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a simple registration tool but lacks contextual details such as return values, error conditions, or how it fits with sibling tools. It gives the core purpose but not enough for an agent to fully anticipate outcomes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with each parameter having a description. The tool description adds no extra meaning beyond the schema, so the baseline of 3 is appropriate. It does not clarify relationships between parameters (e.g., doorbell_type vs doorbell_target).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The verb 'Register or update' is specific, and the object 'agent's identity and doorbell configuration on the bus' clearly describes the tool's function. It distinguishes from siblings like bus_send or bus_list_agents by focusing on registration, though it does not explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus siblings (e.g., bus_list_agents for listing). It does not mention prerequisites, idempotency, or scenarios where registration is needed, leaving usage implied at best.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bus_sendA
Send a message to another agent on the universal agent bus. Persists to SQLite and triggers the recipient's doorbell for immediate wakeup.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target agent name/id (e.g. 'coordinator', 'antigravity-lead', 'deepseek-coder') | |
| topic | No | Short topic label (e.g. 'report', 'decision', 'greeting', 'task') | general |
| content | Yes | Message content or structured report | |
| from_agent | No | Sender agent name/id (e.g. 'coordinator', 'antigravity-lead') | |
| conversation_id | No | Optional correlation or session ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and discloses two meaningful behaviors: persistence to SQLite (durability) and immediate recipient wakeup (side effect). It stops short of explaining delivery guarantees, failure modes, or whether the call blocks.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler. The core action is front-loaded and the second sentence adds behavioral nuance without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a messaging tool: purpose, durability, and wakeup behavior are covered, and the schema documents all 5 parameters. Gaps remain since there is no output schema and the description never mentions the return value, acknowledgment, or error behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so every parameter (to, topic, content, from_agent, conversation_id) already has descriptive meaning in the schema. The description adds no parameter-level detail, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Send a message to another agent on the universal agent bus.' This clearly differentiates from siblings like bus_inbox, bus_wait_message, and bus_history, which handle receiving, waiting, and history respectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies urgency through 'triggers the recipient's doorbell for immediate wakeup,' hinting this tool is for time-sensitive agent-to-agent communication. However, it never explicitly names alternatives or states when to prefer bus_inbox or bus_wait_message.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
bus_wait_messageA
Long-poll and wait for an incoming message on the bus. Blocks until a message arrives or timeout expires. Eliminates terminal polling.
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Maximum wait time in seconds (default 300, max 600) | |
| mark_read | No | Whether to mark the delivered messages as read | |
| agent_name | Yes | Your agent ID to wait for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose the key blocking behavior and timeout expiration. However, it does not mention side effects such as mark_read, whether messages are consumed, or what the caller receives on arrival/timeout.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core operation, with no filler. 'Eliminates terminal polling' adds useful usage context without bloating the description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers what the tool does but not the full contract: there is no return-value description, no clarification of mark_read's effect, and no relationship to bus_inbox. For a blocking call with no annotations or output schema, this is a noticeable gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters are already documented. The description adds no parameter-specific detail beyond implying timeout relates to blocking, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific operation (long-poll/wait) and resource (incoming message on the bus), so an agent understands what the tool does. It is not merely a restatement of the tool name, though it does not explicitly name sibling tools such as bus_inbox.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Eliminates terminal polling' implies this tool is the blocking alternative to repeated polling, but there is no explicit statement of when to choose it over bus_inbox or bus_history. The guidance is suggestive rather than definitive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
bus_history - First observed
bus_inbox - First observed
bus_list_agents - First observed
bus_register - First observed
bus_send - First observed
bus_wait_message
TDQS
Scored across 6 tools
Most tools have clear, distinct purposes, but bus_inbox and bus_wait_message overlap heavily: both retrieve incoming messages and support blocking behavior. This creates potential confusion about which to use for waiting versus fetching.
All tools share a consistent bus_ prefix, but the naming patterns after the prefix are mixed: verbs (send, register), nouns (inbox, history), and verb-object phrases (wait_message, list_agents). This reduces predictability compared to a unified verb_noun convention.
Six tools is a reasonable size for an agent messaging bus, covering send, receive, polling, history, registration, and agent discovery. The slight redundancy between bus_inbox and bus_wait_message means one could potentially be removed, but the count is still well-scoped.
The toolset covers the core bus lifecycle: register agents, send and receive messages, wait for messages, view history, and list agents. Minor gaps exist, such as no explicit deregister/unregister operation or message acknowledgment mechanism, but these are not critical for basic bus functionality.
Maintenance
Related MCP Connectors
Persistent discussions, shared context and subscriptions for independently operated AI agents.
Durable agent-to-agent handoffs and shared scratchpad for multi-agent workflows.
End-to-end encrypted messaging and work coordination for autonomous AI agents.
Durable addresses and crash-safe FIFO mailboxes so AI agents message each other, free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA SQLite-backed message queue system that enables multiple AI agents to communicate with each other via a simple HTTP interface.4Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables multiple AI agents to communicate and coordinate via a shared SQLite-backed message log, supporting directed messages, broadcasts, and session discovery.-
- AlicenseAqualityBmaintenanceEnables local AI coding agents to message each other on one machine using a durable SQLite mailbox and live-ask tools.9MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI coding agents to communicate and coordinate through a durable, vendor-neutral message bus with support for threads, tasks, presence, and webhooks.283 npm-