
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


