zyndiff mcp serve runs a stdio MCP server named zyndiff. zyndiff setup wires it into your agents; see Agent feedback. Shapes named here are defined in src/types.ts (ReviewRecord, ReviewSuggestion, ReviewScorecard) and src/mcp/operations.ts (the result wrapper).
Returns { review, suggestions, suggestionsError? }. zyndiff --wait --json prints the same object.
suggestions lists every suggestion fence in the open (not resolved) line and range comments, in comment order, so the agent can apply them without parsing comment text.
ReviewSuggestion field
type
meaning
commentId
string
the comment that holds the fence
path
string
repo-relative file
side
"old" | "new"
which side the line numbers count on
startLine
number
first anchored line, 1-based
endLine
number
last anchored line, inclusive
original
string[]
the anchored lines as currently in the diff
suggested
string[]
the replacement lines; [] means delete the original lines
A range that crosses unchanged lines outside the diff is left out of suggestions and reported in suggestionsError: comment <id> (<file> <start>-<end>): this range spans unchanged lines that are not in the diff, so it cannot carry a suggestion; comment on lines inside one hunk. When the diff can’t be re-read, suggestions is [] and suggestionsError starts with could not read the review's diff:.
Real result for a comment with one suggestion (the review record is trimmed):
{ from: { file, start, end }, to: { file, start, end }, edited }[]
Flag kind values: sensitive-path, public-api-removed, public-api-added, dependency, leftover, untested, hotspot, large. Each flag has a reason and an optional line.
{ "id": "tests", "label": "Tests", "band": "medium", "summary": "1 changed code file without a test in the diff", "reasons": ["retry.ts: code change with no matching test in this diff"] }
Returns { review }. The reply is authored as agent. The reviewer sees it live in the thread. Resolved comments take replies too. Once the review is approved or cancelled, the call fails with review record is terminal.
Returns { review } with status: "cancelled". A second call on a cancelled review returns it unchanged. Cancelling an approved review fails with review record is terminal.
If the zyndiff server doesn’t show up in your agent, run zyndiff doctor. A stale diffle-review or loupe-review plugin keeps the old server wired in its place. After zyndiff update, reconnect the server (/mcp in Claude Code) or start a new agent session.