Skip to main content
Glama

rive-mcp

Create, edit, inspect, render and live-preview Rive (.riv) animations from Claude — no Rive editor and no subscription. The server runs on your machine; the few outside calls are listed under Network access.

🌐 English | 日本語 | 简体中文 | 한국어 | Español | Français | Deutsch | Português (Brasil)

rive-mcp is a free MCP (Model Context Protocol) server that gives Claude (or any MCP client) full control over .riv files. Unlike the official Rive MCP (which requires the editor running) or paid third-party servers, it works with nothing but a .riv file — and it can even build .riv files from scratch by serializing the binary format directly.

Rendering runs the official Rive runtime (@rive-app/canvas-advanced WASM) inside headless Chromium, so previews follow the runtime's output, except for the Canvas2D differences listed under Limitations.

Studio screenshot

Highlights

  • Generate .riv from JSON — shapes, gradients, embedded PNGs, text (including text on path), bones + skinning, IK, mesh deformation, keyframe animation with easing, multi-layer state machines, listeners, events, physics baking, particles, embedded audio (WAV/MP3/FLAC) fired from the timeline or a state machine

  • Pro-quality by construction — 28 semantic motion presets (pop-in, staggered rise-in, breathing, stagger-in, parallax-drift, shimmer, …) with professionally tuned amplitudes/easings, an OKLCH design-token generator (riv_design_tokens), motion-quality lint rules (robotic linear movement, teleports, missing stagger), and a one-call critique loop (riv_critique: frames + objective metrics + scoring checklist)

  • Real vector art pipeline — import SVG (Figma/Illustrator/Iconify, or npm SVG sets like @twemoji/svg when offline) as true bezier paths (riv_import_svg, riv_asset_search), decompile existing .riv files into editable specs including gradients, blend modes and hand-tuned animation tracks (riv_decompile), plus trim paths (draw-on), clipping masks, blend modes (multiply shadows, screen glows), follow-path motion, solos and detached bezier handles in the scene spec

  • Losslessly edit existing .riv — change any property, swap text, delete subtrees (references auto-remapped)

  • Local web Studio — Rive-editor-style 3-pane UI (hierarchy / canvas with click-select & drag / inspector / timeline) with hot reload; edits apply live. Also includes a bezier curve editor for hand-tuning keyframe easing (drag control points, hold/linear/cubic switching, 10 one-click presets), a state machine graph view (node graph of layers/states/transitions with lint findings and live-playback state highlighting), and an onion skin overlay (0-5 surrounding frames) for checking motion at a glance

  • Studio keeps growing — drag-and-drop image replacement for embedded assets (lossless swap), multi-artboard tabs, named snapshot save/restore/delete, dope-sheet marquee/Shift-click multi-select with grouped drag and Ctrl+C/V copy-paste, and a bone overlay with FK drag-to-pose that bakes straight to a keyframe

  • Human ⇄ AI loop — a two-way Agent chat in the Studio: you type feedback (with the current selection/artboard/animation/time attached), the AI picks it up via riv_studio_notes, fixes the file, and replies into the same thread; your browser updates instantly

  • Auto-rig characters — one call turns a character PNG into a rigged .riv with cutout parts, bone-skinned head mesh, eye blink, idle/happy animations and a state machine

  • Data binding & pipeline tooling — riv_inspect decodes ViewModel definitions, instances (with resolved values), enums, converters and bind wiring — data binding inspection that few tools support yet; riv_batch_render exports many files × formats in one glob-aware call for CI, and riv_ab_compare composites two files side by side into one labeled GIF/APNG for design review

  • Tested end to end — test/e2e.mjs starts the server and calls its tools over JSON-RPC on samples/vehicles.riv; generated files are loaded, rendered and state-machine-driven by the official runtime in those tests

Related MCP server: RiveMCP

Tools (35)

Tool

What it does

riv_list

Recursively find .riv files (size, format version)

riv_inspect

Full metadata: artboards, animations (duration/fps/loop), state machines and inputs, plus data-binding structure (ViewModel definitions, instances with resolved values, enums, converters, bind wiring) when the file uses it

riv_lint

Static diagnostic: broken references, oversized embedded assets, unreachable state-machine states, unconditional self-transitions (infinite-loop risk), unused inputs, easing silently discarded on a track's last keyframe, motion-quality rules (all-linear "robotic" movement, teleporting objects, missing stagger, one-sided scale)

riv_render_frame

Render any moment to PNG (inline image + file)

riv_render_gif

Turn an animation into a preview GIF

riv_render_apng

Animated PNG export — 24-bit color + alpha transparency (plays on GitHub)

riv_render_video

Record an animation or state machine to WebM video

riv_render_sprites

Sprite-sheet PNG + JSON metadata (for game engines)

riv_batch_render

Render a list of jobs — single files or globs — to png/gif/apng/webm/sprites in one call; per-job error isolation and a timing report, built for CI

riv_play_state_machine

Set/fire inputs → advance → state-transition report (+ optional frame captures)

riv_generate_code

Integration code with real artboard/SM/input names (React / JS / Vue / Svelte / Flutter)

riv_create

Build a .riv from a JSON scene spec — validated with the official runtime, returns a preview. Supports bezier-handled vertices, elastic easing, gradients, physics baking, particles, and semantic motion presets ({"preset":"pop-in","target":"card"} expands server-side into professionally tuned keyframes — entrances/exits/emphasis/ambient loops, with stagger for groups). Also embeds audio (WAV/MP3/FLAC) fired from timeline frames or state-machine entry — the AudioAsset/AudioEvent are written correctly but only play back in a GPU-backed Rive runtime, not this server's own preview

riv_design_tokens

Generate design tokens before designing: OKLCH-harmonized palette (+WCAG contrast), gradient pairs, Material-Motion durations & easing roles, spacing/radius/type scales — deterministic from seed color + mood

riv_import_svg

SVG → Rive bezier shapes (Figma/Illustrator exports, icons, illustrations): full cubic vertices, multi-contour paths, gradients, strokes, nested transforms — so the AI composes pro artwork instead of drawing with primitives. Fragments plug into riv_create via imports

riv_asset_search

Search Iconify's ~200k professionally designed icons and import one directly as Rive shapes (needs network)

riv_lottie_import

Lottie/bodymovin JSON → Rive scene fragment — pulls in LottieFiles' huge library of free professionally-animated assets art and choreography: keyframed transforms with exact bezier easing curves (not preset-approximated), path morphing (per-vertex keyframes), shape/null/precomp layers, gradients, trim-path draw-on, visibility windows. Unsupported bits (text layers, masks, mattes, …) are counted, not silently dropped

riv_decompile

.riv → editable scene spec: study or remix professional files (bezier paths, gradients, solos, trim paths, animations with named easings); unsupported types are counted, not silently dropped

riv_critique

One-call review bundle that makes motion visible to a VLM: a filmstrip (frames left→right), an onion-skin overlay (motion trails), a motion report (net displacement vector per animated object), objective metrics (bezier ratio, palette flags, easing distribution) + lint findings + a fixed 7-axis scoring checklist incl. spatial/directional coherence (does each mover travel toward its artwork's front? is the perspective consistent?)

riv_edit

Lossless editing of existing .riv files: set properties, swap named text, delete subtrees, add/replace/remove keyframes

riv_optimize

Shrink a .riv without changing its visual output: remove unreferenced interpolators/events/empty tracks left over from prior edits, thin redundant keyframes on strictly-linear runs (Douglas-Peucker, easing-safe — cubic/hold segments are never touched), with a dryRun report of the plan

riv_repair

Repair lint findings that can be fixed safely, one change at a time. Each candidate is compared pixel by pixel with the original, and a change that alters the rendering is skipped with the reason. Covers unused inputs, dead easing, broken references and unused interpolators. dryRun reports the plan without writing anything. Writes to out; without out, <name>.repaired.riv is created next to the source

riv_export_lottie

Export one animation of a .riv to Lottie JSON. Features that cannot be converted are listed as lost, approximated ones as approximated. Pixel comparison is reported as unverified

riv_preflight

Check which runtimes can run a .riv. Detects the features the file uses and returns ok / warn / unsupported / unknown for each target (web, iOS, Android, Flutter, Unity, React Native). The compatibility table covers only combinations with a documented source; everything else is unknown. Also tries loading the file in the bundled official WASM runtime

riv_extract_assets

Extract embedded images/fonts from a .riv

riv_visual_diff

Pixel diff of two .riv files with a highlighted diff image

riv_ab_compare

Render two .riv files under identical conditions into one labeled side-by-side (or stacked) GIF/APNG for human review — where riv_visual_diff measures a pixel-level delta, this one is for eyeballing two different things playing next to each other

riv_dump

Low-level binary structure dump (typeKeys / properties / hierarchy)

riv_slice_image

Cut character parts out of a PNG by polygon (for cutout rigging)

riv_rig_character

Character PNG → fully rigged .riv in one call

riv_diff

Structural diff between two .riv files

riv_studio

Local web Studio: Rive-editor-style dark UI — hierarchy tree, canvas select/drag/resize, inspector, keyframe timeline editing, bezier curve editor (drag control points, hold/linear/cubic, 10 easing presets), state machine graph view (node graph, transition details, lint-highlighted states, live playback highlighting), onion skin overlay, undo/redo, playback speed, one-click export (PNG/APNG/GIF/WebM), live preview + hot reload, EN/JA. share: true also opens a read-only LAN view behind an unguessable token URL (play / scrub / state-machine inputs only; the editable Studio stays on 127.0.0.1)

riv_studio_notes

Read the Studio's Agent chat (with auto-attached context: selection, artboard, animation, playback time) and post replies back into it

riv_ui_detect

Read a UI screenshot — or, with svgPath, a Figma/Illustrator SVG: finds panels, text runs and pictures, returns a nested element tree with rects, corner radii and fill colours plus a numbered overlay PNG. Each element says how it would be rebuilt (vector-panel / vector-shape / vector-text / raster) and what it looks like (panel / text / image / line) as separate fields. Geometry only — it does not know a button from a card

riv_ui_prototype

Screenshot → animated .riv in one more call: assign a role to each detected element and get a working prototype — vector rectangles where they can be rebuilt, image slices where they cannot, an entrance per role, hover and press on cards and buttons. Text is cut out with a real alpha matte where the colour model holds; where it does not, the element fades in place instead of moving, and the warnings say so

riv_setup

One-call environment setup: installs the bundled rive-design-guidelines skill into .claude/skills/ (project) or ~/.claude/skills/ (user) so the pro workflow auto-triggers — confirmation happens via the normal tool-permission prompt

Screenshot → animated prototype

screenshot to prototype

riv_ui_detect reads a UI screenshot into an element tree with a numbered overlay; assign a role to each element and riv_ui_prototype writes a working .riv. Panels come back as editable vector rectangles, pictures as image slices, and text is cut out with a real alpha matte where the colour model holds — where it does not, the element fades in place instead of moving, and says so. The detector's limits are measured rather than asserted: see docs/ui-screenshot-to-prototype.md.

If you still have the vector source, pass svgPath instead of imagePath to the same two tools — Figma's right-click → Copy as SVG, or any Illustrator export. Nothing is estimated then: rectangles, fills, corner radii and the parent/child tree are read out of the file, artwork keeps its real bezier vertices, <text> becomes editable Rive text (pass fonts for the design's own faces; a run whose glyphs are missing is baked as a picture rather than as tofu, always with a warning), embedded <image> data becomes an image asset, and Figma layer names arrive as role hints. Nothing is fetched over the network — unless you opt in by setting FIGMA_TOKEN, which enables a figmaUrl argument that pulls one frame straight from Figma's REST API; without the variable that argument errors and no request is made, and no other tool reads it. Rive's editor has accepted pasted SVGs since 2023; what these two calls add is that no editor and no person are in the loop, and that the roles bring the motion — entrances, ambient loops and hover/press states — with them.

Showcases: professional assets in, professional motion out

Four sample scenes are built end-to-end by the pipeline, each rebuildable with node samples/<name>/build-scene.mjs:

  • samples/weather-widget/ — the hero animation above: a UI weather card that cycles sunny → rain (with a lightning flash) → sunny on one looping timeline. Twemoji sun/cloud/bolt imported as SVG, colors from riv_design_tokens, ambient motion from presets, everything clipped to the card.

  • samples/cosmic-journey/ — every piece of artwork is professionally designed (Twemoji rocket, ringed planet, moon, stars, comet — fetched as SVG via npm and converted with riv_import_svg); colors from riv_design_tokens, motion from presets, composition fixed through the riv_critique loop.

  • samples/night-delivery/ — remixes a professional .riv: Rive's official truck (hand-drawn bezier art and its hand-tuned wheel/body animation tracks) is extracted with riv_decompile and composed into a new night scene with a Twemoji moon, scrolling road and a screen-blended headlight beam.

  • samples/launch-success/ — hand-authored SVG + tokens + presets + TrimPath draw-on + particles + intro→idle state machine.

Twemoji artwork © Twitter/X and contributors, CC-BY 4.0; truck artwork from Rive's official example files.

Design quality guidance

riv_create output can look like flat "AI placeholder" shapes if a client just wings the scene spec. The server bakes quality in structurally — the recommended flow for any non-trivial scene is:

  1. riv_design_tokens → use only the returned palette/gradients/durations/easings (never invent raw hex or ad-hoc timings)

  2. riv_create with motion presets instead of hand-authored keyframes wherever one fits

  3. riv_critique → look at the frames, score the 7-axis checklist, fix anything below 4, re-run (at least twice)

The same workflow plus hand-authoring craft rules (bezier curves, easing semantics, rigging) is exposed as the rive-design-guidelines MCP prompt. It also carries numeric recipes (spacing/timing tokens, composition & layering rules, anti-patterns to avoid) across 6 dedicated sections. For clients without MCP prompts support, it ships as a portable skill file at skills/rive-design-guidelines/SKILL.md.

Quick start

Claude Code plugin (recommended) — one install gets the MCP server, the design-guidelines skill, and the rive-designer agent:

/plugin marketplace add ODU33104/rive-mcp
/plugin install rive-mcp@rive-tools

Or install from npm:

# Register with Claude Code (user scope = available in every project)
claude mcp add --scope user rive -- npx -y rive-mcp-server

Or install globally first:

npm install -g rive-mcp-server
claude mcp add --scope user rive -- rive-mcp

Or run from source:

git clone https://github.com/ODU33104/rive-mcp.git
cd rive-mcp
npm install
npm run build
claude mcp add --scope user rive -- node /absolute/path/to/rive-mcp/dist/index.js

To check the registration, run claude mcp list: rive should show as Connected. Restart Claude Code after registering, then ask it to run riv_list on a folder to confirm the tools respond.

A Chromium-based browser is auto-detected in this order (nothing to install if Chrome or Edge is already present):

  1. RIVE_MCP_CHROME env var (path to Chrome/Edge executable)

  2. Playwright browser cache

  3. Installed Chrome → Edge

Requires Node.js 20+ and a Chromium-based browser (Chrome, Edge or Chromium). If none is detected, set the RIVE_MCP_CHROME env var to the executable's path.

Relative paths in tool arguments resolve against the working directory the MCP server was started in. Use absolute paths when in doubt.

The Studio: human ⇄ AI collaboration

riv_studio opens a local web page where a human can inspect, directly edit, and request changes to whatever the AI built (first-run guide included, UI in English/Japanese):

  1. Let the AI build — "create a bouncing-ball riv and open it with riv_studio"

  2. Touch it — click/drag objects on the canvas, tweak numbers & colors in the inspector (applies live)

  3. Ask the AI — type bigger changes into the Agent panel, then say "check the studio notes" in chat

  4. When the AI edits the file, the browser hot-reloads instantly — and it writes back what it changed, in the same chat

Works without a scene JSON too: any .riv can be edited property-by-property through the hierarchy + inspector.

Studio-rendered animation preview

Feature tour

Laid out like the editor you already know — the Studio follows the official Rive editor's operating model: a Design / Animate mode switch, a Hierarchy panel with Expand All / Collapse All / Deep Expand / Deep Collapse on right-click and a name filter, Data / Assets / Animations / Agent accordions along the bottom of the left panel, and a Console / Problems / Changes status bar at the very bottom (Problems is wired to the same static checks as riv_lint, and clicking a finding jumps to it in the state-machine graph).

Keys are created where you'd expect them — in Animate mode every animatable inspector row grows a diamond key button with three states: hollow (no track), outlined blue (animated but no key under the playhead), filled blue (keyed here). Click to key or unkey at the playhead. The dope sheet below is for reading and rearranging what's already there.

Multiple artboards & snapshots — switch between a file's artboards with a tab bar, and save, restore or delete named snapshots of your edits — a separate history from undo/redo.

Artboard tabs and snapshots

Timeline / dope sheet — per-track keyframes with seek, zoom and playback-speed control. Marquee- or Shift-click to select across tracks, drag a whole selection of keyframes together, and copy/paste with Ctrl+C/V anchored at the playhead (curves carry over).

Timeline

Dope sheet multi-select

Bezier curve editor — pick a keyframe span, drag the control points, or apply one of 10 easing presets. Switch any span between hold / linear / cubic.

Curve editor

State machine graph view — layers, states and transitions as a node graph; click a transition to see its duration / exitTime / conditions. Lint-integrated: unreachable states are red, unconditional self-transitions yellow, and the active state glows during playback.

State machine graph

State machine playground — flip bool inputs and fire triggers from the browser to watch transitions happen.

State machine inputs

Onion skinning — ghost the surrounding 0–5 frames with distance-based opacity to check motion arcs at a glance.

Onion skin

Direct editing — select in the hierarchy or on the canvas, then edit position / rotation / scale / colors / text in the inspector with undo/redo.

Inspector editing

Bone overlay & posing — see the bone skeleton over the canvas, following the playhead (scrubbing, playing and paused all show the runtime-evaluated pose), drag to rotate a bone (FK) while paused, and bake the current pose into a keyframe.

Bone overlay

Agent chat — a two-way conversation, not a suggestion box. Your message ships with the current selection, artboard, animation and playhead time attached; the AI picks it up via riv_studio_notes and posts its result back into the same thread, so you can see what it changed without leaving the Studio.

Agent chat

One-click export

Click PNG / APNG / GIF / WebM in the Studio toolbar to render the current animation on the spot — no MCP round-trip needed for a quick preview export.

Export panel

Character animation

Turn a single character PNG into a naturally moving .riv:

  • riv_slice_image cuts out ears/tail/etc. by polygon, riv_rig_character assembles the whole rig in one call: pivot groups, a seamless 2-bone head mesh for tilting, vector eyelid blink, idle/happy animations and a happy trigger

  • Or compose manually with riv_create: image embedding, grid meshes with per-vertex keyframes, bone chains with distance-weighted skinning, IK constraints

Example prompts

Examples for a cloned repository. With the npm version, the sample is in the package at <npm root -g>/rive-mcp-server/samples/ (global install), or use the path to your own .riv file.

  • "List the riv files in samples/ and inspect vehicles.riv"

  • "Render the curves animation as a GIF"

  • "Create a riv of falling snow over a night sky and open it in the studio"

  • "Rig characters/cat.png — ears and tail should move, and it should look happy on click"

  • "Check the studio notes" (after typing feedback into the Studio UI)

  • "Write the React integration code for this file"

Development

npm run build      # vendor runtime assets + tsc
npm run test:e2e   # spawns the real server, exercises all 35 tools over JSON-RPC

docs/riv-format.md documents the reverse-engineered knowledge of the .riv binary format used by the writer (typeKeys/propertyKeys resolved from the official rive-runtime type definitions vendored in vendor/rive-defs/defs.json).

Limitations

  • Text-run enumeration is not exposed by the runtime API (access by name works)

  • GIF output has no transparency (composited on a background color)

  • The Canvas2D preview renderer can show mesh seams that don't exist in the file (WebGL/Skia render clean)

  • fill.feather/stroke.feather (vector blur) writes correctly to the .riv but isn't rendered by this server's Canvas2D preview pipeline — only a GPU Rive Renderer supports it

  • Luau scripting and the Layout engine are not generated (runtime spec still moving)

  • Screenshot detection (riv_ui_detect) is sensitive to small pixel changes: a lossless PNG re-encode is identical, but ±2 RGB noise reclassifies most vector panels and can nearly triple the element count. Every flat fill is test-rendered against the screenshot before it ships, so what survives is measured to match — the cost is that fidelity wins over editability on photo-heavy pages, where most elements come back as slices that only fade. See docs/ui-screenshot-to-prototype.md for the measured numbers and the rest of the limits

Network access

The server runs locally. It makes outside requests only in these cases:

  • riv_asset_search: the Iconify API (api.iconify.design)

  • figmaUrl on riv_ui_detect / riv_ui_prototype: the Figma REST API (api.figma.com), and only when FIGMA_TOKEN is set in the server's environment. Without it, no request is made

  • riv_studio with share: true: a read-only view that other devices on the same LAN can open. This is incoming traffic, not an outside call

  • The first npx -y rive-mcp-server downloads the package from npm

License

Free to use (personal & commercial) — but not open source. This is source-available freeware:

  • ✅ Use the software freely; the .riv files and code it generates are yours without restriction

  • ❌ No modification, no redistribution, no derivative works

  • ❌ No reverse engineering; no AI-assisted analysis, extraction or reproduction of the code (including use as training data)

See LICENSE for the exact terms. Bundled third-party components: Inter font (OFL 1.1), Rive runtime & type definitions (MIT, © Rive, Inc.).

rive-mcp is an unofficial tool and is not affiliated with or endorsed by Rive, Inc.

Available Tools

35 tools
riv_ab_compareRender two .riv files side by side for visual A/B reviewA

Render the same artboard/animation/state-machine from two .riv files under identical conditions and composite them side by side (horizontal or vertical) into a single GIF/APNG for human review — e.g. a rig before/after an edit, or two design variants. 'A: ' / 'B: ' labels are burned into each frame by default. If the two files' animation lengths differ, the shorter one holds on its final frame once it ends. Different from riv_visual_diff: that tool computes a per-pixel numeric diff of the SAME thing rendered two ways (for regression testing); this tool is for eyeballing two DIFFERENT things playing side by side (for design review), not measuring a delta.

Inputs: pathA (required), pathB (required), fps, out, +10 more.

riv_batch_renderBatch-render many .riv files/formats in one callA

Render a list of jobs — each a single .riv (rivPath) or a glob of .riv files (glob) — to png/gif/apng/webm/sprites, sequentially reusing the same headless Chromium page (no parallel pages). Built for CI/scripts: call this tool repeatedly from your pipeline instead of expecting a live watch mode — none is provided, since MCP's request/response model doesn't fit a background file watcher. 'defaults' holds options shared across every job; each job's own fields override them. Every job needs a format (in the job or in defaults), or that job fails. One job's failure does not stop the batch — every job (and every file a glob expands to) gets its own success/error/outPath/durationMs entry in the returned report.

Inputs: jobs (required), defaults.

riv_createCreate a .riv file from a scene specA

Create a working .riv animation file from scratch (no Rive editor needed) and validate it with the official runtime. Returns a rendered preview frame. For polished results (gradients, organic bezier curves, easing, springy motion), read the "rive-design-guidelines" prompt this server exposes before designing a non-trivial scene. Scene spec example: { "artboard": {"name":"Demo","width":400,"height":300}, "backgroundColor": "#1a1a2e", "shapes": [ {"id":"box","type":"rect","x":120,"y":150,"width":80,"height":80,"cornerRadius":12,"rotation":0,"opacity":1, "fill":{"color":"#e94560"},"stroke":{"color":"#fff","thickness":3}}, {"id":"ball","type":"ellipse","x":280,"y":150,"width":70,"height":70, "fill":{"gradient":{"type":"linear","stops":[{"color":"#00d9ff"},{"color":"#0066ff"}]}}}, {"id":"tri","type":"polygon","x":200,"y":100,"points":[{"x":0,"y":-40},{"x":35,"y":20},{"x":-35,"y":20}],"fill":{"color":"#ffd700"}} ], "animations": [ {"name":"spin","fps":60,"duration":60,"loop":"loop","tracks":[ {"target":"box","property":"rotation","keyframes":[{"frame":0,"value":0},{"frame":60,"value":360,"easing":"linear"}]}, {"target":"ball","property":"y","keyframes":[{"frame":0,"value":150},{"frame":30,"value":80,"easing":"ease-out"},{"frame":60,"value":150,"easing":"ease-in"}]} ]} ], "stateMachine": {"name":"SM","inputs":[{"name":"go","type":"bool"}], "states":[{"name":"spinning","animation":"spin"}], "transitions":[{"from":"entry","to":"spinning","condition":{"input":"go"}}]} } Character animation (images/groups/mesh): { "groups": [{"id":"rig","x":300,"y":200}], "images": [{"id":"chara","pngPath":"./cat.png","x":0,"y":0,"scale":0.25,"parent":"rig", "mesh":{"columns":6,"rows":6}}], "animations": [{"name":"idle","duration":240,"loop":"loop","tracks":[ {"target":"rig","property":"y","keyframes":[{"frame":0,"value":200},{"frame":120,"value":195,"easing":"ease-in-out"},{"frame":240,"value":200,"easing":"ease-in-out"}]}, {"target":"chara#v0_3","property":"x","keyframes":[{"frame":0,"value":0},{"frame":120,"value":40,"easing":"ease-in-out"},{"frame":240,"value":0,"easing":"ease-in-out"}]} ]}] }

  • layouts[]: Flex nodes {id,parent?,width?,height?,widthMode?,heightMode?,widthWeight?,heightWeight?,direction?,justifyContent?,alignItems?,gap?,padding?,margin?,wrap?,fillColor?}. Modes: fixed (default), percent (width/height is 0-100 percentage), auto (hug contents), fill (remaining space; optional positive weight per axis). gap: number or {horizontal?,vertical?}; padding/margin: number or {left?,right?,top?,bottom?}. Parent must be an earlier layout id. Shapes themselves do not become Flex items.

  • images[].pngPath: PNG file embedded into the .riv. mesh enables vertex deformation; vertices addressed as "#v_" (row 0 = top), coordinates in the image's natural pixel space centered at origin. Mesh vertex tracks support x/y only.

  • texts[].followPath {"path":"<shapes[].id>","start":0,"end":1,"offset":0,"strength":1,"orient":true} bends the text along that shape's path (text on path; start/end/offset are 0-1 fractions of the path length). Needs fonts[] like any text.

  • groups are Nodes usable as parents (parent) of shapes/images for rig hierarchies and pivots; animatable like shapes.

  • transitions support exitTimeMs (play source animation this long before transitioning). Motion presets (tuned amplitudes and easings; about 10x fewer tokens than hand-authored keyframes): "animations":[{"name":"intro","duration":90,"presets":[ {"preset":"pop-in","target":"logo"}, {"preset":"rise-in","targets":["c1","c2","c3"],"at":12,"stagger":4}, {"preset":"float","target":"logo"} ],"tracks":[]}] Available: fade-in rise-in drop-in slide-in pop-in bounce-in | fade-out sink-out slide-out pop-out | pulse heartbeat tada shake wobble | breathing float sway spin glow-pulse blink(for eyelid overlays). Options: at(start frame), stagger(frames between targets), intensity(0.25-3), direction(left|right|up|down), cycleSeconds. Ambient presets (breathing..blink) span the whole animation seamlessly. A preset and a manual track must not drive the same target+property. Pro features: stroke.trim {start,end,mode} + trimStart/trimEnd tracks (draw-on effect), shapes[].clipBy (mask via an invisible shape), groups[].solo+active + soloActive track with keyframes[].ref (pose/mouth switching), constraints [{type:"followPath",item,path}] + followDistance track 0-1 (motion along a path), open paths (closed:false), multi-contour shapes (subpaths), stroke cap/join. "imports":[{"spec":"logo.scene.json","x":200,"y":150,"scale":0.8}] places riv_import_svg / riv_asset_search fragments under a wrapper group (id = file basename) — animate the wrapper or individual shape ids. PREFER imported real vector art over drawing with primitives for anything illustrative. Recommended flow: riv_design_tokens → (riv_import_svg / riv_asset_search for artwork) → riv_create (token values + presets + imports) → riv_critique → fix → re-critique. Shape z-order: later in array = on top; images render above shapes. properties for tracks: x,y,rotation(deg),scaleX,scaleY,opacity(0-1),width,height,fillColor(needs "color" in keyframes). Colors: #RRGGBB or #AARRGGBB. rotation in degrees. Easings include emphasized-decel (enters) / emphasized-accel (exits). Audio: "audio":[{"id":"beep","path":"./beep.wav"}] embeds a WAV/MP3/FLAC file (path resolved relative to cwd, or pass bytes directly). "events":[{"id":"beepEvent","type":"audio","audio":"beep"}] declares an AudioEvent bound to that clip. Trigger it either from a state machine state ("states":[{"name":"s1","fireEvent":"beepEvent"}]) or at specific frames inside a timeline via animations[].events: {"name":"anim1","duration":60,"tracks":[...],"events":[{"event":"beepEvent","frame":0},{"event":"beepEvent","frame":30}]}. NOTE: this server's preview (Canvas2D) does not play audio, so PNG/GIF/video previews and riv_studio stay silent. The AudioAsset/AudioEvent are still written correctly and play in a GPU-backed Rive runtime (WebGL/Skia).

Inputs: scene (required), outPath (required), previewTime.

riv_critiqueCritique a .riv: filmstrip + onion skin + motion vectors + metrics + checklistA

One-call review bundle for the render→critique→revise loop. Returns (1) a FILMSTRIP image — N frames left→right across the duration, so motion is readable as a sequence, (2) an ONION-SKIN image — all frames ghost-overlaid so every mover leaves a visible trail (use it to check trajectories and travel direction vs the artwork's facing), (3) a MOTION REPORT — net displacement/rotation vector per animated object computed from the file data, (4) objective design metrics + lint findings, and (5) a fixed 7-axis scoring checklist (incl. spatial/directional coherence). LOOK at the images, score each axis 1-5, fix anything below 4 (riv_edit / regenerate), then re-run. Iterate at least twice before delivering any non-trivial scene.

Inputs: path (required), width, frames, artboard, +3 more.

riv_decompileDecompile a .riv into an editable scene specA

Reverse a .riv file into a riv_create scene spec (shapes with bezier vertices, solid/gradient fills incl. gradient opacity, blend modes, artboard background, groups/solos, trim paths, clipping, animations with named easings, loop modes). Paint objects are resolved by parentId, so editor-authored files (paints deferred to the stream tail) decompile correctly. Use it to study professional files as few-shot examples, or to remix them — art AND hand-tuned animation tracks — into new scenes (decompile → edit spec → riv_create; see samples/night-delivery). Object types outside the writer's coverage are counted in 'skipped', not silently dropped. Note: community/marketplace files are CC BY 4.0 — keep attribution.

Inputs: path (required), outSpec.

riv_design_tokensGenerate a design-token set (palette / motion / layout)A

Deterministically generate professional design tokens for a scene BEFORE calling riv_create: an OKLCH-harmonized palette (with WCAG contrast ratios), gradient pairs, Material-Motion-derived durations & easing roles, spacing/radius/stroke scales and a type scale. Call this first, then use ONLY the returned values in the scene spec — never invent raw hex colors or ad-hoc durations. Inputs: optional seed color, mood (calm|playful|elegant|tech|warm|natural), scheme (dark|light).

Inputs: mood, seed, scheme.

riv_diffDiff two .riv filesB

Structural diff between two .riv files: type count changes and per-object property differences.

Inputs: pathA (required), pathB (required), maxDiffs.

riv_dumpDump .riv binary structureA

Low-level dump of a .riv file's object stream (typeKeys, property values, hierarchy). Useful for debugging and format research. Large files return a summary unless full=true.

Inputs: path (required), full.

riv_editEdit an existing .riv fileA

Modify an existing .riv (lossless roundtrip): set any property, change named text runs, delete objects (with automatic subtree + reference remapping), or edit keyframes on an existing animation (op=setKeyframes). Use riv_dump to find object indices/names. Renders a preview of the result. setKeyframes: target an animated object via index/name(+type), give 'animation' (LinearAnimation name) and 'property' (x/y/rotation/scaleX/scaleY/opacity/width/height — rotation in degrees), then 'keyframes' (array of {frame,value,easing}). 'mode': replace (default, swaps the whole track) | add (appends keyframes, creating the track if absent) | remove (deletes keyframes matching the given frame numbers; keyframes[].value/easing are ignored).

Inputs: path (required), edits (required), outPath.

riv_export_lottieExport a .riv animation to Lottie JSONB

Export one .riv animation to Lottie JSON. Reports unsupported and approximated features, and indicates whether pixel comparison was available.

Inputs: path (required), fps, out, artboard, +1 more.

riv_extract_assetsExtract embedded assets from a .riv fileA

Extract embedded image/font/audio asset binary contents (ImageAsset/FontAsset/AudioAsset + FileAssetContents pairs) from a .riv file to disk, with the file extension inferred from magic bytes (PNG/JPEG/WEBP/TTF/OTF/WOFF/WOFF2/GIF). Externally-referenced (non-embedded) assets are skipped.

Inputs: path (required), outDir.

riv_generate_codeGenerate integration codeA

Generate ready-to-use integration code (React/Vue/Svelte/plain JS/Flutter) for a .riv file, using its real artboard, state machine and input names.

Inputs: path (required), framework (required).

riv_import_svgImport an SVG as Rive vector shapesA

Convert an SVG file (Figma/Illustrator export, icon, illustration) into Rive bezier path shapes — the professional way to get high-quality artwork instead of drawing with primitives. Writes a scene-fragment JSON (shapes with full cubic vertices, gradients, strokes) and returns a rendered preview. Use the fragment in riv_create via "imports". Supports path/rect/circle/ellipse/polygon/polyline/line, nested transforms, style attrs, linear/radial gradients. Not imported: (use texts[] with a font), , filters, masks.

Inputs: outSpec (required), svg, svgPath, idPrefix.

riv_inspectInspect a .riv fileA

Extract full metadata from a .riv file: artboards, animations (duration/fps/loop), state machines and their inputs (name/type/initial value). Uses the official Rive runtime. Also decodes Data Binding (ViewModel) structure when present — ViewModel definitions and their properties, ViewModelInstances with resolved property values (including enum/nested-viewmodel/list references), enums, converters, and DataBind wiring (which target object/property each bind writes to) — via direct binary parsing (returned as dataBinding, omitted when the file has none).

Inputs: path (required).

riv_lintDiagnose a .riv file for structural problemsA

Static diagnostic pass over a .riv file: broken/out-of-range references, oversized embedded assets, state-machine states unreachable by any transition, unconditional self-transitions (infinite-loop risk), unused state-machine inputs, keyframe easing silently discarded on a track's last keyframe, plus motion-quality rules (all-linear robotic movement, teleporting objects, missing stagger on simultaneous fade-ins, one-sided scale animation). Complements riv_dump (which shows raw structure but doesn't judge it).

Inputs: path (required).

riv_listList .riv filesA

Recursively find .riv files under a directory and report size and format version for each.

Inputs: dir (required).

riv_lottie_importImport a Lottie/bodymovin JSON as a Rive scene fragment (art + timing + easing)A

Convert a Lottie (bodymovin, .json) animation — the format of LottieFiles' free animation library — into a riv_create scene fragment. Unlike riv_import_svg (shapes only), this keeps the keyframed timing: position, rotation, scale and opacity with their exact bezier easing (not mapped to a named preset), shape/null/precomp layer hierarchy, solid layers, gradient fills, stroke trim-path animation, and layer in/out visibility windows. Writes a scene-fragment JSON with {groups,shapes,animations} plus a rendered preview and a coverage/warnings summary. Since the fragment includes animations (which riv_create's "imports" mechanism does not merge), splice its groups/shapes/animations arrays directly into your riv_create scene spec instead of using "imports". Supported: shape layers (path/ellipse/rect/star/polygon/fill/stroke/gradient/trim/nested groups), null layers, solid layers, one level of precomp inlining, parented layers, hold and bezier easing. Not imported (counted in coverage.skipped, not silently dropped): text layers, masks, track mattes, repeaters, merge-paths, path/gradient-position keyframe morphing (frozen to first frame + warning), time-remapped precomps, expressions.

Inputs: outSpec (required), json, path, idPrefix.

riv_optimizeOptimize a .riv file (lossless)A

Shrink a .riv without changing its visual output: remove unreferenced objects (dangling easing interpolators, fired-events nothing points to, empty keyframe tracks left over from prior edits) and thin redundant keyframes on strictly-linear-interpolation runs within a tolerance. Only runs where every segment is linear are touched — any run touching hold/cubic easing is left alone, so no easing gets shifted (see keyed_property.cpp semantics: a KeyFrame's interpolationType applies to the segment going INTO the next frame). Colors and id-keyframes (soloActive) are never thinned, only numeric (KeyFrameDouble) tracks. Each step is a boolean that is on by default (set it to false to skip that step), and the run is idempotent/safe to repeat. Use dryRun=true to see the removal/thinning plan without writing anything. Run riv_lint afterwards if in doubt.

Inputs: path (required), dryRun, outPath, tolerance, +2 more.

riv_play_state_machineInteractively drive a state machineB

Run a .riv state machine step by step: set/fire inputs, advance time, observe state transitions, and optionally capture frames. Returns a transition report.

Inputs: path (required), steps (required), width, artboard, +2 more.

riv_preflightCheck .riv runtime compatibilityB

Detect .riv features and compare optional target runtime versions with documented minimums. Report unsupported, conditional, or unverified support, and inspect the file with bundled official WASM.

Inputs: path (required), strict, targets, versions.

riv_render_apngRender an animation to APNGA

Render a .riv animation (or state machine playback) to an animated PNG (APNG). Unlike GIF this supports 24-bit color plus full alpha transparency, and GitHub READMEs animate it like a regular image. Frames are rendered with a transparent background by default.

Inputs: path (required), fps, out, loops, +8 more.

riv_render_frameRender a single frame to PNGA

Render one frame of a .riv animation or state machine to PNG. Returns the image inline and saves it to disk.

Inputs: path (required), time, width, height, +5 more.

riv_render_gifRender an animation to GIFB

Render a .riv animation (or state machine idle playback) to an animated GIF file for preview.

Inputs: path (required), fps, width, outPath, +5 more.

riv_render_spritesRender an animation to a sprite sheet PNGA

Render N evenly-spaced frames of a .riv animation/state machine into a single grid sprite sheet PNG (columns = ceil(sqrt(N))). Writes the PNG plus a JSON metadata file (cellW/cellH/cols/rows/count/fps) alongside.

Inputs: path (required), fps, out, count, +7 more.

riv_render_videoRender an animation to a WebM videoA

Render a .riv animation (or state machine) to a real-time WebM video using canvas.captureStream() + MediaRecorder (VP9, falls back to VP8/generic webm). Default duration is one loop of the animation (2s for a bare state machine or when the animation's length can't be determined).

Inputs: path (required), fps, out, width, +6 more.

riv_repairRepair safe .riv lint findingsA

Repair lint findings one change at a time. Compare pixels for each candidate, skip visual changes with reasons, and validate the final result before writing. dryRun never writes.

Inputs: path (required), out, fixes, dryRun.

riv_rig_characterAuto-rig a character PNGA

One call: character PNG -> fully rigged .riv with cutout parts (ears/tail via polygons), 2-bone head-tilt mesh (seamless), vector eyelid blink, idle + happy animations, and a state machine with a 'happy' trigger. Returns a preview. Fine-tune afterwards with riv_edit or riv_studio.

Inputs: outPath (required), pngPath (required), eyes, parts, +5 more.

riv_setupInstall the bundled rive-design-guidelines skill into this environmentA

One-time setup: copies the bundled rive-design-guidelines skill (the mandatory tokens → pro-asset ingestion → presets → critique workflow, asset-source registry, icon-animation recipes and craft rules) into the client's skills directory so it auto-triggers on future Rive work — .claude/skills/ in the current project (scope=project, default) or ~/.claude/skills/ for all projects (scope=user). Idempotent: re-running updates the skill to this server version's copy. Recommended on first use of this server in a new environment; clients without skill support can read the same content via the rive-design-guidelines MCP prompt instead.

Inputs: scope, projectDir.

riv_slice_imageSlice a PNG into parts for riggingA

Cut polygon regions out of a character PNG for parts-based rigging (cutout animation). Writes each part as .png plus base.png (source with parts erased) into outDir, and returns each part's bbox for placement. Use with riv_create: images per part + groups as pivots.

Inputs: outDir (required), pngPath (required), regions (required).

riv_studioStart the local Studio web UIA

Start a local web UI (Rive-editor-like 3-pane layout) for live-previewing and editing a .riv file: hierarchy tree + click/drag selection on canvas + inspector (position/size/color/text edits apply live), timeline with keyframe markers, hot reload on file change, auto-generated state machine input controls, event log, and (with scenePath) direct scene-JSON editing. The UI also has an 'Instructions for AI' box — fetch those with riv_studio_notes. Re-running riv_create/riv_edit on the watched file updates the browser instantly. Only one studio runs at a time.

Inputs: path (required), port, stop, share, +3 more.

riv_studio_notesRead the Studio chat and reply into itA

Read the Studio web UI's Agent chat and reply into it.

  1. READ: call with no reply to fetch the messages the user typed (consumes the queue; the Studio shows them as picked up). Trigger on 'check the studio notes' / 「スタジオの指示を確認して」, or after opening riv_studio when the user mentions they left notes. Act on each instruction — usually riv_edit or riv_create on the watched file, which hot-reloads the browser.

  2. REPLY: after doing the work, call again with reply set to a short summary of what you changed (and anything you could not do). It appears as your message in the same chat. Always reply: without a reply the user cannot tell whether you acted. Both can be done in one call: pass reply together with the read to answer and pick up anything new at the same time.

Inputs: peek, port, reply.

riv_ui_detectDetect UI elements in a screenshotA

Find the rectangles, text runs and images in a UI screenshot or design comp. Returns a nested element tree with rects, corner radii and fill colours, plus a numbered overlay PNG. Coordinates are in source pixels (accurate to about 1-2 px); corner radii to about 1 px. Each element carries renderMode ("vector-panel" | "raster" — how it would be reconstructed; flat fills are test-rendered and turned into crops when more than 2% of their visible pixels would differ, the measured share is returned as renderRisk) and semanticHint ("panel" | "text" | "image" | "line" — what it looks like) as independent fields. Next, give each element a role and pass the result to riv_ui_prototype. This is geometry only: it does not know a button from a card. If you have the vector source, pass svgPath instead of imagePath: nothing is estimated, the element tree is the SVG's own group nesting, non-rectangular artwork comes through as "vector-shape" with its real bezier vertices, becomes "vector-text" (editable Rive text — the bundled Inter is substituted unless you pass fonts, and a run whose glyphs are missing is baked as a picture instead, always with a warning), embedded data comes through as its own pixels, and Figma layer names arrive as roleHint.

Inputs: fonts, minArea, svgPath, figmaUrl, +3 more.

riv_ui_prototypeTurn a detected UI screenshot into an animated .rivA

Take the elements from riv_ui_detect, assign each one a role, and get back a working .riv: every element becomes a shape or an image asset, each gets an entrance appropriate to its role, and buttons and cards get hover and press states. Roles: background, nav, header, card, panel, button, fab, text, icon, image, chart, list-item, badge, divider, avatar, input. Elements you leave unassigned animate as a generic panel. Pass exactly one of imagePath, svgPath or figmaUrl, the same one you gave riv_ui_detect. If you changed minArea or maxElements there, pass the same values here so the ids match. With svgPath no screenshot is embedded, every element stays editable, and the file reproduces the SVG; its becomes real Rive text you can re-type at runtime, and its embedded data becomes an image asset. figmaUrl fetches the same thing straight from Figma, and needs FIGMA_TOKEN.

Inputs: roles (required), outPath (required), fonts, ambient, +8 more.

riv_visual_diffPixel-diff two .riv filesA

Render the same artboard/animation/time from two .riv files under identical conditions (forced to the same output size) and compute a thresholded per-pixel visual diff. Returns match rate, differing pixel count, and a diff visualization PNG (differing pixels in red, matching pixels dimmed).

Inputs: pathA (required), pathB (required), out, time, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 35 tools

    Disambiguation4/5

    Most tools target a clearly distinct action or output format, and the descriptions explicitly distinguish similar pairs like riv_visual_diff vs riv_ab_compare and riv_repair vs riv_optimize. There is still some clustering among rendering tools and among edit/lint/repair/optimize tools, but an agent can resolve it from the descriptions.

    Naming Consistency5/5

    All tools use the same riv_ prefix, snake_case, and generally a verb or action-oriented naming pattern. Variants like riv_render_frame, riv_render_gif, and riv_render_apng are predictable and consistent.

    Tool Count2/5

    35 tools is a very large surface for a single MCP server, even given the broad Rive workflow it covers. The set spans rendering, editing, linting, rigging, UI prototyping, studio interaction, and setup, which makes selection and maintenance heavy.

    Completeness4/5

    The surface covers an unusually complete Rive lifecycle: listing, inspection, rendering, diffing, creation, editing, linting, optimization, import/export, character rigging, UI prototyping, and live studio interaction. Minor gaps remain around general file management and some runtime/preview limitations, but core workflows are well covered.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to create and edit Rive animations through 139 MCP tools, supporting shapes, animations, state machines, physics, and export to .riv or .rev files.
      453 npm
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables authoring, preview, and export of Spine 2D skeletal animations via natural language from Claude Code or any MCP client, with a web dashboard and tools for keyframing, templates, and GIF preview.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables Claude Code and other MCP clients to connect to an open browser-based 3D motion design studio tab, build and modify real layers and keyframes, inspect frames, and export PNG or video files.
      127 npm
      MIT