mcp-dispatch
Click on "Install 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., "@mcp-dispatchdispatch message to bob: deployment complete"
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.
mcp-dispatch
Local inter-agent messaging for AI coding agents via MCP.
Multiple Claude Code sessions (or any MCP-compatible agents) running on the same machine can send messages to each other through a shared filesystem relay. No server process, no ports, no network — just directories and JSON files with atomic writes.
Features
Non-destructive messaging — Messages persist until explicitly acknowledged. No more lost messages from crashes or compaction.
Threading — Group messages into conversations with
thread_idandreply_to.Structured payloads — Attach machine-readable data alongside human-readable messages.
TTL & must_read — Time-sensitive messages auto-expire. Critical messages survive until acknowledged.
Delivery receipts —
peek()shows read/unread state of messages you've sent.Config-driven — TOML config for agent rosters, directories, and limits. Or go dynamic with no roster.
Zero infrastructure — Filesystem relay survives process crashes. No daemon to manage.
Related MCP server: AI Bridge MCP
Quick Start
1. Install
Requires Python 3.11+ and uv.
git clone https://github.com/sophia-labs/mcp-dispatch.git
cd mcp-dispatch
uv syncFor real-time stderr alerts when messages arrive (optional):
uv sync --extra watch2. Configure Claude Code
Add to your ~/.claude.json:
{
"mcpServers": {
"dispatch": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-dispatch", "python", "server.py"],
"env": {
"MCP_DISPATCH_AGENT_ID": "alice"
}
}
}
}Each Claude Code window needs a unique MCP_DISPATCH_AGENT_ID.
3. Send messages
From any Claude Code session:
Agent alice: dispatch("Hey bob, I pushed the fix", target="bob")
Agent bob: peek() → sees alice's message
Agent bob: ack(["msg-abc12345"]) → message removedTools
Tool | Description |
| Send a message to one agent or all |
| Read messages and delivery receipts for sent messages |
| Acknowledge and delete processed messages |
| List connected agents |
dispatch
dispatch(
message="Deployed to staging",
target="all", # or a specific agent name
priority="normal", # "normal" or "urgent"
thread_id="deploy-123", # optional: group into conversation
reply_to="msg-abc", # optional: reference specific message
payload={"commit": "abc123", "env": "staging"}, # optional: structured data
ttl=3600, # optional: expire after 1 hour
must_read=True, # optional: survive TTL, require explicit ack
)peek
peek() # new (unread) messages only
peek(include_read=True) # all unacknowledged messages
peek(thread_id="deploy-123") # filter by threadack
ack(message_ids=["msg-abc", "msg-def"]) # delete specific messagesConfiguration
Create ~/.config/mcp-dispatch/config.toml:
# Agent roster (omit for dynamic registration — any name accepted)
agents = ["alice", "bob", "carol"]
# Message directory (default: ~/.config/mcp-dispatch/messages)
dispatch_dir = "~/.config/mcp-dispatch/messages"
# Maximum message size in bytes (default: 65536)
max_message_bytes = 65536
# Default TTL in seconds (0 = no expiry)
default_ttl = 0
# Custom MCP instructions template (optional)
# Placeholders: {agent_id}, {agent_list}
# instructions = "You are {agent_id}. Available agents: {agent_list}."Environment Variables
Variable | Description |
| Agent identity (required in dynamic mode) |
| Config file path (default: |
| Override dispatch directory from config |
Dynamic Mode
When no agents roster is configured, any agent name is accepted. Inbox directories are created on demand. This is more flexible but less safe (typos create phantom agents).
How It Works
Each agent gets an inbox directory (
{dispatch_dir}/{agent_name}/)Messages are JSON files written atomically (tmp + rename)
Presence is tracked via PID files in
{dispatch_dir}/.presence/Messages have states:
pending→read→ acknowledged (deleted)Piggyback delivery: pending messages are attached to every tool response
TTL cleanup runs lazily on read operations
Optional watchdog prints stderr alerts for the human operator
Message Format
{
"id": "msg-a1b2c3d4",
"from": "alice",
"to": "bob",
"timestamp": "2026-02-17T20:30:00Z",
"priority": "normal",
"content": "Deployed to staging",
"payload": {"commit": "abc123"},
"thread_id": "deploy-123",
"reply_to": null,
"ttl": 3600,
"must_read": false,
"state": "pending"
}License
MIT — see LICENSE.
Available Tools
4 toolsackA
Acknowledge and delete messages by their IDs. This is the only way to permanently remove messages from your inbox (besides TTL expiry). Pass a list of message IDs to acknowledge.
| Name | Required | Description | Default |
|---|---|---|---|
| message_ids | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the key behavioral trait: acknowledgment permanently deletes messages and is irreversible outside TTL expiry. It does not cover edge cases like idempotency or unknown IDs, but the main destructive side effect is clearly stated.
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 two sentences with no wasted words, front-loading the action and effect before adding the permanence note. Every sentence contributes useful information.
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 simple one-parameter tool, the description covers purpose, invocation, and effect. Missing details like return value or error behavior are minor given the tool's simplicity, though the absence of any output schema leaves some ambiguity.
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 0%, so the description must compensate for the parameter. It explicitly says 'Pass a list of message IDs to acknowledge', which directly explains the single message_ids parameter. It does not add constraints or examples beyond what the parameter name and schema already convey.
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 a specific action ('Acknowledge and delete messages') and resource ('messages by their IDs'), and adds the unique capability of permanent removal. It does not explicitly name or contrast sibling tools, so differentiation is implicit rather than direct.
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 the use case: when you want to permanently remove messages, noting TTL expiry as the only alternative. It does not explicitly say when not to use the tool or how it compares with dispatch, peek, or who, so usage guidance is suggestive rather than prescriptive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dispatchA
Send a message to another agent or all agents. Use priority='urgent' for time-sensitive messages. Optional: thread_id groups messages into conversations, reply_to references a specific message, payload carries structured data (dict), ttl sets expiry in seconds, must_read=true prevents auto-expiry. Returns confirmation plus any pending messages for you.
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | ||
| target | No | all | |
| message | Yes | ||
| payload | No | ||
| priority | No | normal | |
| reply_to | No | ||
| must_read | No | ||
| thread_id | No |
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 it covers key behaviors: sending, auto-expiry via ttl, must_read preventing auto-expiry, and the return of confirmation plus pending messages. It does not mention failure modes or delivery guarantees, but the core side effects are disclosed.
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 three sentences with no filler: the main action is front-loaded, and optional parameters are compactly summarized. Every sentence adds useful information.
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 tool with 8 parameters and no output schema, the description covers all optional parameters and the return value. Minor gaps remain around target identifier format and interaction with ack/peek/who, but the description is sufficient for an agent to call the tool correctly.
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 0%, so the description must compensate. It explains priority values, thread grouping, reply_to references, payload as a dict, ttl in seconds, must_read preventing expiry, and target scope via 'another agent or all agents.' This adds substantial meaning beyond the bare schema.
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 states a specific verb and resource: 'Send a message to another agent or all agents.' This clearly differentiates dispatch from sibling tools like ack, peek, and who, which imply receiving, inspecting, and querying rather than sending.
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?
It gives clear operational guidance, such as using priority='urgent' for time-sensitive messages and explaining when to use optional fields. It does not explicitly name alternatives or say when not to use the tool, but the send-oriented purpose is unambiguous from the context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
peekA
Read incoming messages without deleting them. By default returns only NEW (unread) messages with full bodies. Set include_read=true to see ALL unacknowledged messages. Filter by thread_id to see a specific conversation. Use ack() to acknowledge messages when you're done with them. Also returns delivery receipts for your recently sent messages.
Modes:
mode='full' (default): each message returned with full content + payload.
mode='metadata': each message returned as {id, from, ts, priority, preview_120, size_bytes, thread_id, state} — no full body. ~80% smaller; use this for defensive polling.
since: ISO8601 timestamp filter — only return messages with timestamp >= since.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | full | |
| since | No | ||
| thread_id | No | ||
| include_read | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that peek is non-destructive ('without deleting them'), that it defaults to only new/unread messages, that it also returns delivery receipts, and that the metadata mode is ~80% smaller. This is strong behavioral context, though it does not explain whether peeking changes read state or how delivery receipts are structured.
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 front-loaded with the core behavior, then logically grouped into mode and since sections. Every sentence adds value, and the labeled sections make the details easy to scan despite the length. No filler or repetition is present.
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?
Given there is no output schema, the description does a good job of explaining return values: full content plus payload for the default mode, and an explicit field list for metadata mode. It also mentions delivery receipts. Minor omissions such as pagination, limits, or exact delivery receipt format keep it from being fully comprehensive, but it is complete enough for an agent to call the tool correctly in most cases.
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 0%, so the description must compensate for everything. It explains all four parameters: mode with both allowed values and their effects, since with ISO8601 format and filter semantics, thread_id with a concrete use case, and include_read with a clear behavioral toggle. This fully covers the input schema's gaps.
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-resource pair: 'Read incoming messages without deleting them,' which immediately distinguishes peek as a non-destructive read operation. It also names sibling ack() and contrasts peek against acknowledgement, so an agent can tell the tools apart without opening their schemas.
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 gives clear conditional guidance: use include_read=true to see all unacknowledged messages, filter by thread_id for a specific conversation, and use ack() when done. It also recommends the metadata mode 'for defensive polling,' which gives a concrete context for choosing a mode. It does not explicitly contrast peek with dispatch or who, but enough context is present.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
whoA
List all currently connected agents and their status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb 'List' implies a read-only operation with no side effects, but the description does not explicitly state safety, authentication requirements, or any limitations. This is adequate for a simple tool but not richly transparent.
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, front-loaded sentence contains exactly the necessary information with no filler. Every word contributes value.
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, low-complexity tool with no output schema, this description is complete enough. It tells the agent what the tool does and what it returns, leaving no critical gaps.
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 description does not need to explain parameter behavior. The baseline of 4 applies because there are no parameters and no ambiguity to resolve.
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 ('List'), resource ('all currently connected agents'), and what is returned ('their status'). This clearly distinguishes it from sibling tools like dispatch, ack, and peek, which imply different actions.
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 clearly implies when to use this tool: whenever an agent needs to see which agents are currently connected and their status. It does not explicitly name alternatives or exclusions, but for a simple no-argument query tool, the context is clear.
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. Dates show when Glama detected each change.
4 tool updates
v0.2.0- First observed
ack - First observed
dispatch - First observed
peek - First observed
who
TDQS
Each tool has a clearly distinct responsibility: dispatch sends, peek reads, ack deletes, and who lists agents. The only minor overlap is dispatch returning pending messages, but its primary purpose is unambiguous.
Tool names are consistently short, lowercase, and command-like, but they are not all verbs: dispatch, ack, and peek are actions while who is a query. This is a minor deviation from an otherwise coherent naming style.
Four tools is an ideal size for a messaging and dispatch server. Each tool covers a necessary operation without redundancy or bloat.
The message lifecycle is fully covered: create via dispatch, read via peek, remove via ack, plus agent discovery via who. Advanced features like reply_to, thread grouping, TTL, and payloads are supported through parameters, so there are no obvious gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Durable agent-to-agent handoffs and shared scratchpad for multi-agent workflows.
End-to-end encrypted messaging and work coordination for autonomous AI agents.
271Central async research commons for persistent AI agents
Messaging and inboxes for AI agents: register, send signed messages, check your inbox, find agents.
Related MCP Servers
- FlicenseCqualityDmaintenanceA lightweight messaging system that enables real-time communication between different AI agents through a shared, file-based message queue. It provides tools for sending, checking, and broadcasting messages to facilitate coordination across isolated project namespaces.81-
- AlicenseNot gradedqualityDmaintenanceEnables multi-agent coordination for Claude Code and Claude.ai through file-based JSON communication, eliminating the human bottleneck of message relaying.18MIT
- AlicenseNot gradedqualityCmaintenanceFile-based MCP server for AI coding agents to coordinate via inbox messaging and human escalation.MIT
- AlicenseAqualityBmaintenanceEnables local AI coding agents to message each other on one machine using a durable SQLite mailbox and live-ask tools.9MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sophia-labs/mcp-dispatch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server