MCP
MCP is the connection that lets a coding agent call Iris Code tools. Set it up using the MCP server guide, then ask the agent to get a plan, make one reviewed change and verify it before continuing.Tools reference
In plain terms: the plan tool saves a copy of the code and gives it an ID,
baseline_id. The verify tool compares the agent’s edits with that copy, or with your last commit (Git HEAD) when there is no ID, and says which it used.
Planning and verifying one file are Free. A new folder or workspace plan uses one successful local project action. Applying that plan’s approved fixes and verifying against its saved copy are included. Changing the saved starting point or asking for a different plan is new work. See Free allowances.
Every MCP server checks whether the agent is currently allowed to use Iris Code. The server keeps its own saved copy of the code, so an agent cannot hand it a replacement “before” version to compare against.
Files in a folder where the agent handoff is off are hidden from plans and verification details. The result shows only how many were withheld, as withheldByPolicy.
CLI scanning
The CLI is the set of Iris Code commands you run in a terminal. An agent can run them too:--verify compares against your last commit (Git HEAD) instead.
The project rules Iris Code generates describe the same loop and work without MCP. They respect any fixes or suggestions you have disabled, and tell the agent to:
- Apply the fixes Iris Code has proved safe.
- Review suggestions in order.
- Keep behaviour and exports unchanged.
- Stop when the file passes.
- Verify, then run tests.
Finish verification
A finish hook is an optional check that runs when an agent tries to stop. If the agent’s edits made things worse compared with a plan it is still working from, the hook sends it back to correct the problem. It works alongside the package guard and does not replace your tests.--verify-on-finish flag adds this check alongside the package guard. In either editor, Hooks has a separate Enable control with the same multi-select agent choice, so you can set it up or remove it independently of the package guard.
Each agent signals “stop” and “keep going” differently:
Windsurf can report that an agent finished but cannot send it back, so no finish hook is installed there.
Which plan it checks
The hook only checks a plan the agent got in its current conversation, from an Iris Code MCP server that is still running for the same workspace. It finds the plan’sbaseline_id in the agent’s transcript, the record of the conversation.
The saved copy of your code stays in the server’s memory. The only thing written locally is a small registry of connection details and plan IDs.
If the transcript is missing, empty or has been compacted (shortened by the agent), the hook does nothing. It does not guess a starting point or fall back to your last commit.
What happens when it finds a problem
Only aregressed verdict sends the agent back with a correction. not-improved is a warning and does not stop it finishing.
The agent gets at most one correction per agent turn, meaning one request you sent it. That single correction is shared with verification integrity, however many refactors the turn verifies.
maxCorrections: 0 turns corrections off; a larger value does not add more. After the one correction, the hook asks the agent to stop and show you the verdict and its changes. The agent’s own limits on repeated turns add another safeguard.
Cursor’s stop response has no field for warnings, so they are written to the error output instead. The hook does not call an AI model or change the push or build gate.
Codex also needs hooks switched on in its local configuration, and the project hook approved. Agents can change how they record transcripts, so automatic matching is best effort. When it is not active, the agent can still verify explicitly.