Skip to main content

MCP reference

The agent-review-mcp binary (equivalently, agent-review serve) starts an MCP server over stdio, built with @modelcontextprotocol/sdk. It registers six tools, one per operation in core, using zod schemas for input validation.

Every tool returns its result the same way: a single text content block holding the same JSON you would get back from the equivalent CLI command, pretty-printed with two-space indentation.

Naming: underscores here, dots in prose

Tool ids use underscores (review_create), following common MCP naming convention for identifiers. This documentation, and the design notes behind it, refer to the same logical operations with dots (review.create) because that reads better in prose. review_create and review.create name the exact same operation; only the spelling differs by audience.

The six tools

Tool idLogical operationPurpose
review_createreview.createAdd the ai-review label plus any skill labels, and request the reviewer(s) natively.
review_listreview.listList open, ai-review-labeled pull requests requested from a login (defaults to yours).
review_claimreview.claimPin the head SHA, post a claim marker, and return the composed review task.
review_completereview.completeSubmit a PR review at the pinned SHA (which clears the request), then delete the claim marker.
review_enrichreview.enrichPost a consolidated second opinion once the primary review exists; otherwise report waiting or promote.
labels_bootstraplabels.bootstrapIdempotently create or update the ai-review label plus every skill label.

Input fields

review_create

FieldTypeRequired
repostringyes
prnumberyes
skillsarray of stringno, defaults to []
reviewersarray of stringyes, at least one
notestringno

review_list

FieldTypeRequired
repostringyes
reviewerstringno, defaults to your resolved login

review_claim

FieldTypeRequired
repostringyes
prnumberyes

review_complete

FieldTypeRequired
repostringyes
prnumberyes
eventstring enum: approve, request-changes, or commentyes
summarystringyes
commentsarray of { path: string, line: number, body: string }no

review_enrich

FieldTypeRequired
repostringyes
prnumberyes
verdictstring enum: agree, disagree, or mixedyes
summarystringyes
newFindingsarray of { path: string, line: number, body: string }no

Unlike the other tools, review_enrich makes a single attempt: it does not poll. It reports waiting or promote immediately, and the calling host is responsible for looping (the CLI's enrich command does this for you).

labels_bootstrap

FieldTypeRequired
repostringyes

These are the same shapes documented in full, with worked examples, on the Schemas page; review_create validates against Review Request, review_complete against Review Result.

Host wiring

Any MCP host can launch the server either through npx, with no local install, or against a globally installed binary.

{ "command": "npx", "args": ["-y", "@input-output-hk/agent-review", "serve"] }
note

Most MCP hosts let you set environment variables per server entry. Use that to pass GITHUB_TOKEN, or AGENT_REVIEW_CONFIG to point the server at a specific config file, without depending on whatever environment the host process itself started with.