IAF Agent Bridge
IAF Agent Bridge lets an MCP host delegate work to Cursor Agent, continue the same Cursor session, cancel turns, and run diagnostics.
Send a prompt to Cursor Agent for a workspace and wait until the Cursor turn is terminal, returning Cursor's reply and a sessionId.
Reuse the sessionId to continue the same Cursor conversation for follow-up work.
Set mode (agent, plan, ask), optional model, effort, context window, and fast tier.
Attach up to 20 context files; text becomes resource links and images are sent inline when accepted.
Cancel an in-flight Cursor turn by sessionId, optionally forcing process kill after a grace period.
Run doctor to check Node, bridge version, Cursor CLI discovery, authentication state, and optionally do an ACP handshake or scan a workspace.
Let the supervisor decide CONTINUE, COMPLETE, or BLOCKED based on Cursor's result.
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., "@IAF Agent Bridge delegate to Cursor: add retry logic to the upload handler, continue until done"
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.
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 iaf-agent-bridge@1.1.0 is the current public package. GitHub Release v1.1.0 matches it. v1.0.2, v1.0.1, and v1.0.0 remain published. The Official MCP Registry entry is io.github.francescoveryra-dot/iaf-agent-bridge version 1.1.0.
Supervisor (Codex, Claude Code, or another MCP host)
|
| MCP over stdio
v
IAF Agent Bridge
|
| ACP over stdio
v
Cursor Agent
|
v
Your repositoryCursor 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.
Related MCP server: Cursor Delegate
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 for the local stdio server.
Personal Private mode is separate from the local stdio server. You create your own Secure MCP Tunnel and restricted runtime key. npx iaf-agent-bridge setup chatgpt --project my-project=/absolute/path stores that alias locally, and npx iaf-agent-bridge chatgpt listens on a socket that only your user can open. IAF does not host a relay. Calling delegate from normal ChatGPT requires that workspace to expose Full MCP write tools. A tested ChatGPT Plus account did not. The bridge does not detect the plan. Details: docs/remote-chat.md.
Install
Channel | Status | How |
npm | AVAILABLE |
|
Official MCP Registry | AVAILABLE | |
Cursor plugin | DIRECT INSTALL AVAILABLE |
|
Cursor Marketplace | SUBMITTED — PENDING REVIEW | Not a public install yet. Direct install remains |
Claude Code | DIRECT INSTALL AVAILABLE |
|
GitHub Copilot CLI | DIRECT INSTALL AVAILABLE |
|
Codex / ChatGPT GitHub plugin | DIRECT INSTALL AVAILABLE |
|
OpenAI plugin directory | NOT APPLICABLE for this local server | The public directory reviews a hosted HTTPS MCP endpoint. This bridge runs on your machine and talks to your local Cursor CLI. |
VS Code MCP gallery | NOT LISTED | VS Code browses the GitHub MCP registry. This server is in the Official MCP Registry and is not in that gallery. Add it with |
Manual MCP configuration remains the fallback. See docs/installation.md and docs/hosts.md.
Quick start
git clone https://github.com/francescoveryra-dot/IAF-Agent-Bridge.git
cd IAF-Agent-Bridge
npm install
npm run build
node dist/cli.js doctordoctor should show the Cursor executable and Authenticated: true. It does not print your account.
Point an MCP host at the published package:
command: npx
args: ["-y", "iaf-agent-bridge@1.1.0"]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
Host | How | Detail |
Codex | Plugin manifest in this repo, or | |
Claude Code |
| |
Cursor | Plugin manifest for marketplace submission. Do not use it to delegate from Cursor to Cursor. | |
Any stdio MCP client |
|
npm install (npx -y iaf-agent-bridge) installs 1.1.0. See docs/installation.md and docs/release.md.
Tools
Tool | Use |
| Send a prompt. Pass |
| Stop an in-flight turn. The session can still be resumed. |
| Check Node, the bridge, the Cursor CLI, and authentication. |
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.
Available Tools
3 toolscancelADestructiveIdempotent
Cancel an in-flight Cursor turn by sessionId. Status is cancelled, killed, not-running (the turn ended and the session can still be resumed), or not-found.
Inputs: sessionId (required), force.
delegateADestructive
Send a prompt to Cursor Agent and wait until that Cursor turn is terminal, including tool work and any sub-agent follow-up Cursor performs before it stops. Returns Cursor's reply and the sessionId to reuse. A second call for a session that is still running is rejected. You decide CONTINUE, COMPLETE, or BLOCKED. Do not shell out to the agent binary.
Inputs: prompt (required), workspace (required), fast, mode, +5 more.
doctorARead-onlyIdempotent
Report Node, bridge version, Cursor CLI discovery, authentication state without secrets, and an optional ACP handshake.
Inputs: deep, workspace.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: delegate runs a Cursor turn, cancel aborts an in-flight turn, and doctor reports environment/diagnostic state. There is no overlap in verbs or resources, so misselection is essentially impossible.
All three tools use a consistent single-verb, lowercase naming convention (delegate, cancel, doctor). The pattern is uniform and readable throughout.
Three tools is a lean but defensible surface for a delegation bridge covering run, abort, and diagnose. It is slightly thin, since there is no explicit session-listing or status-inspection tool, but nothing feels redundant.
The core lifecycle is covered: start a turn (delegate), stop one (cancel), and verify the environment (doctor), with sessionId reuse enabling resume. Minor gaps exist around listing/inspecting existing sessions and reading history without re-delegating.
Maintenance
Related MCP Connectors
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
A task list shared by you and your coding agents (Claude Code, Cursor, Codex and any MCP client). Agents plan each task into steps, report live progress to a board, and block on questions you answer from your phone.
Shared task layer for AI agents: tasks, handoffs and decisions that persist across tools.
Hosted MCP runtime where your agent publishes its own tools by tool call and keeps working.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients like Claude Code to delegate coding tasks to the local Cursor Agent CLI, with persistent per-workspace sessions that resume across calls.12 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP clients like Claude Code and Codex to delegate coding tasks to Cursor's CLI agent, which implements changes in the workspace and returns clean, structured results for review.3580 npm9MIT
- AlicenseAqualityBmaintenanceEnables MCP clients like Codex to delegate coding tasks to DeepSeek Harness, reusing the same Web-visible session for feedback and keeping the conversation in the Harness Web UI.101MIT
- AlicenseAqualityBmaintenanceEnables a main agent to delegate execution tasks to WorkBuddy through MCP, supporting multi-turn sessions, task status tracking, permission approvals, execution reports, and CLI fallback.1060 npm2MIT