About IAF Agent Bridge
IAF Agent Bridge is an MCP server for teams using Codex, Claude Code, or another stdio host to delegate implementation to Cursor Agent. It returns a session ID so work can continue in the same Cursor session, while the supervisor decides whether to continue, complete, or block.
Key features
- 01Delegate tasks to Cursor Agent
- 02Resume sessions with sessionId
- 03Cancel an active turn
- 04Check setup and authentication
- 05Restrict destructive operations by default
Use cases
- 01Delegate code changes from Codex
- 02Continue a Cursor task across turns
- 03Stop an in-flight Cursor turn
- 04Check the local Cursor CLI setup
MCP support
Exposes `delegate`, `cancel`, and `doctor` tools to MCP hosts over stdio. It communicates with the local Cursor CLI over ACP and returns a session ID for follow-up calls.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
3Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| fast | boolean | No | Request Cursor's fast tier. Leave false unless the user asks. Higher cost. |
| mode | enum | No | agent implements. plan asks Cursor to produce a plan and stop. ask is for a read-oriented question. The mode is an instruction to Cursor.agent | plan | ask |
| model | string | No | Optional Cursor model id. Omit to keep Cursor's current default. |
| effort | string | No | Exact effort value advertised by the selected model. Invalid values fail before the prompt and name the accepted set. |
| prompt | string | Yes | Natural prompt for Cursor. Sent as written. Point at files and project documents instead of pasting them. |
| context | string | No | Context-window option when the model advertises one, such as 272k or 1m. Omit unless the user asks. |
| sessionId | string | No | Resume this Cursor session. Omit to start one. Use the sessionId from the previous result for follow-up work. |
| workspace | string | Yes | Existing project directory Cursor will work in. Must not be the home directory or filesystem root. |
| contextFiles | array | No | Files to attach. Text becomes resource links. Images (png, jpg, gif, webp, under 5MB) are sent inline when Cursor accepts them. Missing files are warnings, not failures. |
Details
From the project READMEIAF 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.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 repository
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 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 | npx -y [email protected] |
| Official MCP Registry | AVAILABLE | io.github.francescoveryra-dot/iaf-agent-bridge 1.1.0 |
| Cursor plugin | DIRECT INSTALL AVAILABLE | agent plugin marketplace add https://github.com/francescoveryra-dot/IAF-Agent-Bridge.git |
| Cursor Marketplace | SUBMITTED — PENDING REVIEW | Not a public install yet. Direct install remains agent plugin marketplace add https://github.com/francescoveryra-dot/IAF-Agent-Bridge.git. |
| Claude Code | DIRECT INSTALL AVAILABLE | claude plugin marketplace add francescoveryra-dot/IAF-Agent-Bridge then claude plugin install iaf-agent-bridge@iaf-agent-bridge |
| GitHub Copilot CLI | DIRECT INSTALL AVAILABLE | copilot plugin marketplace add francescoveryra-dot/IAF-Agent-Bridge then copilot plugin install iaf-agent-bridge@iaf-agent-bridge |
| Codex / ChatGPT GitHub plugin | DIRECT INSTALL AVAILABLE | codex plugin marketplace add https://github.com/francescoveryra-dot/IAF-Agent-Bridge.git --ref main then codex plugin add iaf-agent-bridge@iaf-agent-bridge |
| 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 npx -y iaf-agent-bridge. |
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 doctor
doctor 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", "[email protected]"]
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 config.toml | docs/hosts.md |
| Claude Code | claude mcp add or the plugin in .claude-plugin/ | docs/hosts.md |
| Cursor | Plugin manifest for marketplace submission. Do not use it to delegate from Cursor to Cursor. | docs/marketplaces.md |
| Any stdio MCP client | node + dist/cli.js | docs/installation.md |
npm install (npx -y iaf-agent-bridge) installs 1.1.0. See docs/installation.md and docs/release.md.
Tools
| Tool | Use |
|---|---|
delegate | Send a prompt. Pass sessionId to continue the same Cursor conversation. |
cancel | Stop an in-flight turn. The session can still be resumed. |
doctor | 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.