
IAF Agent Bridge
io.github.francescoveryra-dotv1.0.1更新于 Oct 3, 2026
MCP server that sends work to Cursor Agent over ACP and returns the session id needed to continue.
概览
让 Codex、Claude Code 等 stdio MCP 主机把编码工作交给本机 Cursor Agent,并继续同一个会话。
- 功能
- 该桥接把 MCP 主机的提示词通过 ACP 转发给本机 Cursor Agent,并返回继续同一 Cursor 会话所需的 session id。工具包括 delegate(发送提示词并等待该轮 Cursor 工作结束)、cancel(停止进行中的一轮,会话仍可恢复)和 doctor(检查 Node、桥接、Cursor CLI 与登录状态)。监督方主机读取 Cursor 的回复,再决定继续、完成还是标记受阻。
- 适用场景
- 适合让 MCP 主机充当监督者、由 Cursor Agent 在代码仓库中执行实现工作的场景,包括需要在同一个 Cursor 会话中多轮继续的任务。不要把它装进 Cursor 正在编辑的仓库的 Cursor MCP 配置中,这种自循环会被拒绝。
- 运行要求
- 需要 Node.js 20 或更高版本(测试套件需要 22)、PATH 中名为 agent 的 Cursor CLI,以及在该机器上完成 agent login。它以 stdio 在本机运行,通常通过 npx -y [email protected] 启动,不需要 OpenAI API key。仅支持桌面端。
安装
在 SourceWeft 中
- 打开 控制台中的 IAF Agent Bridge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
IAF Agent Bridge
MCP server that lets Codex, Claude Code, or another stdio host send work to Cursor Agent and continue the same Cursor session until the requested work is done.
The bridge carries the prompt, the session, and Cursor's reply. The supervisor decides what happens next. Cursor does the implementation.
delegate returns only after that Cursor turn is finished. A message that says the work is complete does not end the call while Cursor is still running tools, sub-agents, or a follow-up. Cursor keeps control of that internal work. The supervisor sees one result, then chooses CONTINUE, COMPLETE, or BLOCKED.
Status: npm [email protected] is the current public package. GitHub Release v1.0.2 matches it. v1.0.1 and v1.0.0 remain published. The Official MCP Registry entry is io.github.francescoveryra-dot/iaf-agent-bridge version 1.0.2.
[CI] [npm] [GitHub Release] [License: MIT] [Node]
Cursor Agent is the only production executor. Codex and Claude Code are supervisors. Do not install this server into the Cursor MCP config of a repository that Cursor itself is editing. That loop is refused.
What you can do
- Start a Cursor session from an MCP host and resume it with
sessionId. - Let ordinary development continue without approving every tool call.
- Reject force-push, history rewrite, destructive SQL, deletes outside the project, and secret staging unless you explicitly set
IAF_PERMISSION_MODE=allow-all. - Use a Master Prompt when the repository has one. A repository without one works normally.
Prerequisites
- Node.js 20 or newer. Running the test suite needs Node.js 22.
- The Cursor CLI on your
PATHasagent. agent logincompleted on that machine.
No OpenAI API key is required.
Install
Manual MCP configuration remains the fallback. See docs/installation.md and docs/hosts.md.
Quick start
doctor should show the Cursor executable and Authenticated: true. It does not print your account.
Point an MCP host at the published package:
A source checkout can use node and dist/cli.js after npm run build. Then ask the supervisor to implement the work with Cursor and to call delegate again with the returned sessionId while requested work remains.
Install by host
npm install (npx -y iaf-agent-bridge) installs 1.0.2. See docs/installation.md and docs/release.md.
Tools
Example follow-up: the first delegate returns "sessionId": "...". The next call uses that id and a prompt that names what is still missing.
How the supervisor should behave
Read result as if you had pasted Cursor's reply into the conversation. Then choose one state:
- CONTINUE when requested work remains and Cursor can still do it. This is the normal result. Plans, TODOs, mocks, and missing layers are CONTINUE.
- COMPLETE when the requested work is actually present.
- BLOCKED only for a real external decision, secret, or irreversible authorization.
The bridge does not demand a new lint run, end-to-end suite, or coverage gate after every turn. Details: docs/supervisor-loop.md.
If the repository contains MASTER_PROMPT.md or the other project files listed in docs/supervisor-loop.md, the first result names them. If it does not, nothing is created.
Configuration and troubleshooting
Environment variables: docs/configuration.md.
If doctor says Cursor was not found, install the CLI and open a new shell. If it says not authenticated, run agent login. More cases: docs/troubleshooting.md.
Security
The bridge can ask Cursor to edit the workspace you name and to run commands there. Read SECURITY.md and docs/security-model.md.
Report vulnerabilities privately: Security advisories. Do not open a public issue that contains a token, a credential, or a working exploit.
Contributing
CONTRIBUTING.md. Issues and pull requests are welcome. Support routes are in SUPPORT.md.
License
MIT. See LICENSE.
来源:README.md,提交 49b258e
工具
0版本历史
1- v1.0.1最新Oct 3, 2026


