rivet CLI and a resident stdio MCP server (rivet mcp serve, registered under the name rivet). Both control the same thing and return the same JSON envelope, so everything below applies to agents and humans alike.
MCP tools
The MCP server exposes three tools.rivet_status
Read-only session state for a project: server health, active work with workIds, and per-variant progress. Fast (~10ms) — poll it after starting work; there is no blocking wait. When a response carries a nextAction, follow its instructions. While variants.starting is true, a start is still provisioning — keep polling rather than retrying.
Parameters:
project(string, optional) — project root path; defaults to the server for the current directoryinclude(array, optional) —"history"adds past variant sets;"auth"adds signed-in state
rivet_variants
Drives the variant lifecycle (“directions” in the UI).
Parameters:
action(required) —start|complete|commit|cancelproject(string, optional) — project root path
action: "start":
instruction(string) — what to vary and howrunLabel(string) — 1–3 word batch summary (required unlessfresh)briefs(array) — one per direction; length sets the count (required unlessfresh). Each brief:label— 1–5 word direction title (distinct across the batch)body— subtitle of at most 10 wordsnotes(optional) — richer implementation intent (design tokens, motion specs, constraints), delivered verbatim to that direction’s workervisualReferenceUrl(optional)
count(number) — number of variantselement(string) — CSS selector scoping the variationfiles(array, max 12) — known project files for workers to inspect firstfresh(boolean) — zero-to-one run ignoring prior context; Rivet authors the directions server-side, sobriefs/runLabelmay be omittedfidelity—low(fast sketch-grade) |medium(balanced default) |high(frontier-model authorship, up to a few minutes)contextImages(array, 1–6) — local reference image paths (png/jpg/webp/gif/avif)referencePages(array, 1–3, fresh only) — reference page URLs, rendered server-sidereferenceVideos(array, 1–2, fresh only) — local video paths, sampled into keyframes server-sidetarget(string) —sessionId:variantIdto refine an existing variant in place
action: "complete" (host-executed work items): workId, status (succeeded | failed | cancelled), plus optional output, error, title, description, sessionId.
For action: "commit": variantId, optional sessionId.
For action: "cancel": sessionId (required).
Rivet normally implements directions with its own server-side workers — agents watch
rivet_status until work is terminal. Only when a response carries nextAction.action: "complete_host_variant_work" does the host agent implement items itself, following the packet instructions exactly.rivet_design_context
Gathers design context from a URL. Routing is automatic: Pinterest (pinterest.com / pin.it) and Are.na URLs return the connected account’s reference data (boards, pins, blocks); any other URL is rendered live and captured as visual evidence (screenshot plus rendered-page metadata). Slow — network/render bound.
Parameters:
url(string, required)screenshot(boolean, optional) — capture a screenshot (render path only)width,height(numbers, optional) — viewport (render path only)project(string, optional)
CLI commands
rivet command: --user-port (your dev server’s port, default 3000), --rivet-port (Rivet’s port, default 4000), --framework (override detection), --no-git, --no-browser, --debug, --no-telemetry.
JSON envelope & exit codes
Every control-plane subcommand prints exactly one JSON envelope on stdout and routes human-readable progress to stderr:ok: false mapped to an MCP error result.
Supported frameworks
Rivet auto-detects the framework and dev-server port when it opens a project, and you can override with--framework:
- Next.js (
nextjs) - Vite (
vite) - Create React App (
cra) - Remix (
remix) - SvelteKit (
svelte) - Static HTML (
static— no dev server required; set the entry with--entry)

