Skip to content

Commit a13f7bd

Browse files
committed
MCP server for coding agents; AI summaries off
/mcp (Streamable HTTP, stateless, project-token auth) with list_builds, get_build, get_snapshot (page table with changed pixels, regions and text diffs, plus base, head and diff images as image content) and review. Snapshot page detail moves to the model so the web app and the MCP server share it. Reviews made with a project token are recorded without a user. AI summaries are off by decision: the code stays behind an empty ANTHROPIC_API_KEY, the project setting is gone from the web app, and the landing page describes agent review through MCP instead.
1 parent 1cbd9cb commit a13f7bd

12 files changed

Lines changed: 666 additions & 72 deletions

File tree

‎Cargo.lock‎

Lines changed: 193 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/design.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ server
7272
5. per snapshot: render cache hit? no → enqueue render (render node, gVisor)
7373
6. per page/image: same key as a baseline or variant? yes → unchanged (no diff)
7474
7. diff cache hit? no → enqueue diff
75-
8. ignore rules, then build summary → GitHub check, PR comment, AI summary (only when changed)
75+
8. ignore rules, then build summary → GitHub check
7676
client
7777
9. --wait: poll or stream until done; exit code by mode (see CI behaviour)
7878
```
@@ -154,13 +154,15 @@ compiled into the CLI and the Ruby gem's native extension or WASM), so a hash hi
154154
- Garbage collection: blobs referenced by no baseline, variant or build younger than the retention period go to trash
155155
(kept 30 days, then deleted).
156156

157-
### AI summaries
157+
### Coding agents (MCP)
158158

159-
- Only for builds with changes, and only for changed snapshots. Input: base, head and overlay images (cropped to the
160-
changed regions), the page text diff and the snapshot name. Output: a one-line summary per snapshot and a build
161-
summary ("Invoice long: the totals table now starts on page 3; page 2 has 9 fewer rows").
162-
- A Claude model through the API, priced as credits. Choose the model and check pricing when it's built.
163-
- Summaries help a reviewer and never approve anything themselves (that's a later, opt-in auto-approval rule).
159+
The server has an MCP endpoint (`/mcp`, Streamable HTTP, project-token auth) for coding agents, which do most of the
160+
fixing: `list_builds`, `get_build` (the changed snapshots), `get_snapshot` (per page: the operation, changed pixels
161+
and regions, the text diff, lines that moved page, and the base, head and diff images as image content) and `review`.
162+
An agent that broke a page looks at the images itself, in the session that broke it.
163+
164+
AI summaries written on the server are off (Nathan, 26 Nov 2026): a model call for every changed build costs money
165+
for little gain when agents read the diffs themselves. The code stays dormant behind an empty `ANTHROPIC_API_KEY`.
164166

165167
## Clients and CI behaviour
166168

@@ -172,7 +174,7 @@ compiled into the CLI and the Ruby gem's native extension or WASM), so a hash hi
172174
`after(:suite)` hook. Shards via `CIRCLE_NODE_INDEX` / `CIRCLE_NODE_TOTAL` and `CIRCLE_WORKFLOW_ID` as the build
173175
nonce.
174176
- **JS SDK / Playwright fixture** later, with DOM snapshot capture.
175-
- **MCP server**: list builds, read the diffs and text diffs of a snapshot, get summaries, approve (scoped token).
177+
- **MCP server** (`/mcp`): list builds, see changed snapshots, look at changed pages (images, regions, text diffs), approve or reject.
176178
- CI modes (per project, overridable per run):
177179
- `review` (default): the CI step passes; the GitHub check blocks the merge until approved.
178180
- `strict`: the CI step fails on any unapproved change (for ironpress parity runs, where a change is a bug).

‎server/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ rand = "0.9"
4949
base64 = "0.22"
5050
hmac = "0.12"
5151
time = "0.3"
52+
# The MCP server for coding agents (src/mcp.rs). MIT.
53+
rmcp = { version = "3.10", features = ["server", "transport-streamable-http-server", "macros"] }
54+
schemars = "1"
5255

5356
[[bin]]
5457
name = "visualci-server"

‎server/frontend/src/pages/Landing.tsx‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,20 +243,19 @@ export function Landing() {
243243
<section className="lp-section" id="pricing">
244244
<div className="lp-wrap lp-split">
245245
<div className="lp-stack">
246-
<h2>A summary of what changed</h2>
246+
<h2>Your coding agent can review it</h2>
247247
<p>
248-
When a snapshot changes, a model reads the base and head pages, the diff and the text diff, and writes
249-
one line for the reviewer. Summaries help you review faster. They never approve anything.
248+
VisualCI has an MCP server. A coding agent that broke a page can list the build’s changed snapshots,
249+
look at the base, head and diff images for each changed page, read the text diff, and fix the code,
250+
all from the same session. You review what it couldn’t fix.
250251
</p>
251-
<blockquote className="lp-quote">
252-
Invoice long: the totals table now starts on page 3, and page 2 has 9 fewer rows.
253-
<small>Example summary</small>
254-
</blockquote>
252+
<pre className="lp-quote mono">claude mcp add --transport http visualci https://visualci.com/mcp \
253+
--header "Authorization: Bearer $VISUALCI_TOKEN"</pre>
255254
</div>
256255
<div className="lp-stack">
257256
<h2>Pay when something changed</h2>
258257
<p>
259-
VisualCI uses prepaid credits. Renders, diffs and AI summaries use them. Fingerprint matches, unchanged
258+
VisualCI uses prepaid credits. Renders and diffs use them. Fingerprint matches, unchanged
260259
snapshots and API calls are free, so a run where nothing changed costs nothing.
261260
</p>
262261
<p>Buy credit packs from your organization’s billing page.</p>

‎server/frontend/src/pages/OrgsPage.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function OrgsPage() {
5353
<section className="panel">
5454
<h2>{orgs.length === 0 ? 'Create your first organization' : 'New organization'}</h2>
5555
<p className="muted">
56-
An organization holds your projects and the credit balance that pays for renders, diffs and summaries.
56+
An organization holds your projects and the credit balance that pays for renders and diffs.
5757
</p>
5858
<CreateForm
5959
idPrefix="org"

0 commit comments

Comments
 (0)