Agent Bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Agent Bridge(MCP v1):通过 agent-bridge 中继操作 Mac 上由 bridge 托管的 pi/Claude Code 会话。 只操作登记册内会话;新会话用 session_open,接管已有会话必须用户点名 sessionId 后用 session_adopt。 pi 的提问以普通消息出现:session_read/session_wait 会标出 needsUser 与原文,请逐字转达用户,再用 session_send 发回答复。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| bridge_statusA | 只读:连接/设备/bridge 信息。返回本连接器设备身份(public 部分)、relay、配对时记录的 bridge 信息、device.list 自查结果与登记册概览。 |
| session_listA | 只读:只列登记册内会话,并附带各自在 bridge 侧的实时状态(busy/hosted/归档等)。未登记的会话不会出现在这里。 |
| session_openA | get-or-create:按 (engine, cwd, purpose) 查登记册;命中且会话还在就复用,否则用 hosted.create 新建(非空启动偏好显式传;空值不传,交给 CLI 默认),自动打 MCP 标签、标题 MCP · ,并写入登记册。cwd 必须在 bridge 托管白名单内(远程设备不能 addDir)。 |
| session_readA | 只读:读登记册会话最近 N 条消息 + busy 状态,返回消息全文(不摘要/不截断,超长按条数分页)。回合结束后若 pi 在提问,标出 needsUser 与原文。 |
| session_waitA | 轮询到 busy 变 false 或超时(默认 120s,上限 600s),返回这期间的新消息(全文)与是否在等用户回答。用户从前端 stop/插话时如实返回,不自动续发。 |
| session_sendA | 写:给登记册会话发一条消息。带 operationId 幂等键(可传入复用:同一 operationId 已投递成功时不再重发);profile.promptSuffix 非空时在末尾追加该后缀(useSubagent=false 不加);写发送审计(只存哈希)。会话 busy 时直接报错,不排队不叠发。 |
| session_stopC | 写:停掉登记册会话的托管进程(hosted.stop)。 |
| session_archiveB | 写:归档登记册会话(hosted.archive),并在登记册里标记 archived。 |
| session_adoptB | 写:用户点名接管一个既有托管会话。先校验会话存在且在 bridge 侧是托管会话,再打 MCP 标签、写入登记册(参数 sessionId + purpose)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Most tools have clearly distinct purposes: read vs. send vs. wait vs. stop vs. archive are well-separated by action. The closest pair is session_open (get-or-create a new hosted session) and session_adopt (take over an existing hosted session), which share the 'register into registry' side effect but are distinguished by parameter shape and preconditions. session_read and session_wait also overlap slightly on returning messages, though wait's polling semantics are explicit.
Eight of nine tools follow a strict noun_verb/session_<action> pattern (session_list, session_stop, session_open, session_read, session_wait, session_send, session_archive, session_adopt). bridge_status is the one deviation, using a different prefix and noun-first form, but it is still readable and clearly a singleton status tool.
Nine tools is well-scoped for a session-bridge connector: one status tool plus a full session lifecycle. Each tool maps to a distinct operation with no filler or duplicate entry points.
The surface covers the full session lifecycle: discover (bridge_status, session_list), create/attach (session_open, session_adopt), interact (session_read, session_send, session_wait), and terminate (session_stop, session_archive). Minor gaps exist: no way to remove/unregister a session from the registry, and no update/rename of purpose or metadata after registration, which agents may need to work around.