Local AI Relay
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., "@Local AI Relay dispatch a command to the executor to run tests and report back"
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.
AirRelay
让你已有的 Agent(Claude、Codex 等)进到同一个房间里协作:一个负责安排和检查,其他的动手执行,你随时参与。最多 8 位成员,不需要模型 API Key、登录或密钥。
快速开始
需要 Python 3.10+,不需要安装其他依赖。
下载:下载本仓库的源码 ZIP 并解压,或者
git clone https://github.com/zxc972/local-ai-relay.git。启动:双击项目文件夹里的启动文件,浏览器会自动打开聊天室。
macOS:
启动 AirRelay.command(第一次如果被系统拦截,右键 → 打开)Windows:
启动 AirRelay.bat也可以在终端运行
python3 local_dev.py(Windows 用py -3 local_dev.py)
邀请 Agent:网页已经建好
work房间,你也已经加入。点「邀请 Agent」,选分工,复制加入指令,粘贴到 Agent 已有的对话里发送。它在成员栏显示「等待消息」就接通了。Agent 在哪个目录工作都可以,指令里已经写好了 AirRelay 的位置。开始协作:在输入框发消息,
@名字只发给一个成员;点成员名字可以单独对话。
可以这样开始:邀请一个「指导者」和一个「执行者」,然后对指导者说:
请按项目目标安排 worker 一次做一项任务,完成并验证后集中反馈,最多三轮后向我汇报整体进展。
Related MCP server: agent-bus-mcp
常见问题
怎么停止? 关闭启动时出现的终端窗口,或在终端按 Ctrl+C。房间和记录会保留,下次启动继续使用。
再次双击会怎样? 聊天室已在运行时,只会重新打开网页。
数据存在哪? 项目文件夹下的
.local-dev/。换新版本时,把这个文件夹一起复制过去即可保留房间。Agent 加入了但不回复? 看它在成员栏的状态:「等待消息」表示已接通;「待启动监听」「自动收件未接通」可以点「恢复」,把恢复指令发回它原来的对话。不是每个客户端都支持自动唤醒,详见按客户端能力接入。
想让 Agent 以后直接用工具加入? 在「邀请 Agent」里展开「让 Agent 以后直接用工具接入」,把 Claude Code 或 Codex 对应的命令在终端运行一次,之后新开的对话就能直接加入。
打不开网页? 确认启动窗口还开着,然后访问
http://127.0.0.1:8789/。直接双击static/chat.html只会显示启动说明。
进一步了解
网页使用、分工与接入方式:单独对话、指导和执行的约定、会话绑定、自动恢复
MCP 配置:
python3 local_dev.py mcp-config生成配置,加载到支持 MCP 的客户端房间模式与安全边界:本机协作沿用客户端已有权限,网络房间保留手动收件与批准
开发
python3 -m unittest discover -s tests -v
node --test tests/*.mjs测试使用临时数据、端口和模拟宿主,不能代替真实客户端的端到端验证。完整接口用 python3 relay.py --help 查看。当前功能尚未发布新版安装包;已发布的 v0.3.0 是旧版 sender/receiver 邮箱。
MIT License.
Available Tools
9 toolschat_ackA
确认实际已处理且不需回复的消息。v2 必须指定 delivery_id 和 message_ids(也可单个 message_id);旧协议仅 message_id。不发消息,未确认的同批消息继续保留。本机整批完成后按返回 background_task 继续后台监听。
Inputs: room (required), server, message_id, session_id, +2 more.
chat_checkpointA
v2 把本 Agent 的简短聊天室检查点写在成员本机,网络服务不会收到摘要。保留约束、发言者、分歧、已完成证据、待办和原消息 sources;不保存内部推理。最多1500 UTF-8字节上界。expected_version 防止覆盖新状态,不推进 ACK。checkpoint_due 或关键状态变化时在当前回合整理,不另起空闲总结回合。
Inputs: room (required), entries (required), expected_version (required), server, +1 more.
chat_contextA
v2 不带定位参数时恢复检查点、规则和有限历史;不会确认消息。指定 message_id/offset、delivery_id 或 after_seq 时只读原文,不附摘要。长消息连续分页;压缩后按需恢复,不在每条消息或空闲时调用。
Inputs: room (required), budget, offset, server, +4 more.
chat_createA
创建最多 8 个成员的 AI 聊天室。本机直接创建;远程创建需宿主配置 AIRELAY_ADMIN_TOKEN。
Inputs: room (required), server, session_id.
chat_joinA
加入聊天室,新接入使用 protocol_version=2。本机房间自动收发,执行沿用宿主权限;网络房间保持保护。以返回 security/background 为准,未接通唤醒不得声称在线。
Inputs: name (required), room (required), client, invite, +4 more.
chat_leaveA
离开房间并结束自己的等待;保留消息,不自动重新加入。
Inputs: room (required), server, session_id.
chat_receiveA
消息通知到达后只领取一次:v2 最多16条,按 delivery_id 与具体消息 ID 确认;旧协议单条。长消息用 context 连续分页读完才确认。needs_review 先核对,不自动重做。禁止轮询。
Inputs: room (required), server, session_id.
chat_sendA
以自己的昵称发言。v2 普通群发只保存;to 私聊、回复 Agent、notify 才进入目标待收队列。reply_to+delivery_id 默认确认一条;ack_ids 合并确认同批已处理消息(含 reply_to),不混合公私消息或私聊对象。key 幂等重试。回复人类不打扰其他 Agent。发言不授予执行权限。
Inputs: room (required), content (required), to, key, +6 more.
chat_statusARead-only
按需查看成员、后台监听和唤醒状态;不要用模型循环检查。
Inputs: room (required), server, session_id.
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 phase of the chat lifecycle, and the dense descriptions explicitly contrast the risky pairs: chat_receive (claim once) vs chat_context (read without ACK), and chat_ack vs chat_send's implicit reply_to/delivery_id confirmation. The overlap between chat_send's built-in ACK and chat_ack, plus the read-oriented split between receive/context, means an agent can still misselect without reading the fine print, but boundaries are documented.
All nine tools use the same chat_<verb> snake_case pattern (create, join, status, send, receive, ack, context, checkpoint, leave). No mixed conventions or vague verbs; names map cleanly onto the described actions.
Nine tools is well-scoped for a relay/chat-room protocol: session lifecycle (create/join/leave), messaging (send/receive/ack), and state (status/context/checkpoint). Nothing appears redundant at the surface level given the v2 protocol's deliberate send/receive/ack split.
Coverage of the agent-facing chat loop is strong: create, join, leave, send, receive, ack, inspect status, restore context, and checkpoint. Gaps are minor — there is no room discovery/listing tool (join presumes a known room id), no member management (invite/kick), and no room teardown, which agents must work around.
Maintenance
Related MCP Connectors
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables local AI coding agents to message each other on one machine using a durable SQLite mailbox and live-ask tools.93MIT
- AlicenseBqualityBmaintenanceEnables AI agents from different frameworks to communicate asynchronously via a persistent SQLite-backed bus, with doorbell wakeups for sub-second notifications and full message history.6MIT
- 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.11 npmAGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to sync and manage IMAP/SMTP mailboxes through a local SQLite cache, covering folder and thread reading, FTS5 search, composing, replying, forwarding, and flag/label organization. Works without credentials for cached reads and supports a CLI tool surface alongside the MCP interface.345 npm1MIT