anni-mcp
v0.3.2anni.run – a CSS animation editor for coding agents (Claude Code, Codex, Cursor): your agent opens the animations from your project, you tune keyframes…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open_animation Open animation in anni
Opens a CSS animation (@keyframes) from a local file in anni (the hosted timeline editor): the user scrubs, drags keyframes and edits values and timing in the browser. Pass PATHS only – this tool reads and uploads the files itself and opens the browser tab. Afterwards call wait_for_save: it writes the edited file back to disk when the user saves and returns a short diff. While the session is open, edits you make to these files on disk (the user asks for a new element or animation) show up in the editor right away, with the user’s unsaved edits kept on top – just edit the files, no need t…
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the .css or .html file containing the @keyframes (absolute, or relative to the working directory) |
animation | string | Name of the @keyframes to select. Defaults to the first one in the file. |
extra_files | array | Additional files the preview page needs (other CSS, scripts). Stylesheets/scripts linked relatively by the page are included automatically. |
preview | string | HTML page to preview on (for .css files). Defaults to an .html next to the CSS that links it, else a demo box. |
session | string | Existing session id to reuse (the open tab switches to the new content). |
wait_for_save Wait for the user to save in anni
Blocks until the user saves in anni (or the timeout passes). On save it writes the edited file to disk and returns a short diff – you do not need to touch the file. Returns a timeout note if nothing was saved yet; call again while the user is still working.
| Parameter | Type | Description |
|---|---|---|
session | string | Session id from open_animation (defaults to the last opened one) |
timeout_seconds | integer | How long to wait in seconds (default 45, at most 50 – MCP clients drop requests after 60 s; call again to keep waiting) |
snapshot_page Snapshot a rendered page
Fetches a route of a running app (dev server, staging, any URL) and writes it as static files anni can show: page.html plus its stylesheets, fonts and images with references rewritten, scripts removed. Use the returned page path as `preview` for open_animation or present – the preview then looks like the real app and anni can edit CSS in it live. Works for any framework that renders to the browser. Reports which @keyframes and source stamps (data-src) the page has.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL of the page, e.g. http://localhost:3000/ |
keep_scripts | boolean | Keep <script> tags (default false: a static snapshot is more faithful than a half-hydrated app) |
out | string | Directory to write into (default .anni/snapshot-<host>-<path>) |
present Present controls in anni
Turns values from code into a touchable panel: describe controls (number, length, color, enum, boolean, text), each with an optional preview wire (how it shows on the page: a CSS declaration `css: {selector, prop}`, a custom property `var: {name}` or an element's `text: {selector}`) and a source wire (`source: {file, find, replace?}` or `{file, range, template?}`, where the value lives in code). Pass the preview page and the files it links as local PATHS; this tool uploads them, opens the browser, and wait_for_changes later applies the source wires to your files itself. A rendered route of a r…
| Parameter | Type | Description |
|---|---|---|
schema * | object | |
files | array | Local paths: the preview page and what it links (stylesheets, scripts, images) |
preview | string | Local path of the HTML page to show (defaults to the first .html in files) |
session | string | Existing session id to update in place |
wait_for_changes Wait for the user to save changed values
Blocks until the user saves in a present() session (or the timeout passes). Applies every changed control that has a source wire to the local file and returns the diffs; changes without a source wire are listed for you to apply. Call again while the user keeps working.
| Parameter | Type | Description |
|---|---|---|
session | string | Session id from present (defaults to the last opened one) |
timeout_seconds | integer | How long to wait in seconds (default 45, at most 50 – MCP clients drop requests after 60 s; call again to keep waiting) |
get_animation_state Read anni editor state
Returns the animations of the open anni session as CSS, including edits the user has not saved yet, and whether there are unsaved changes.
| Parameter | Type | Description |
|---|---|---|
session | string | Session id (defaults to the last opened one) |
get_proposals Read changes exported from copies
People who watched the anni session can edit a copy of it and export their changes back. Returns those change sets (newest first): a markdown brief each, with before → after values and a diff against the revision the copy started from. Apply them to the code as the brief says – change only what is listed, keep everything else (including later changes), and ask the user about conflicts.
| Parameter | Type | Description |
|---|---|---|
session | string | Session id (defaults to the last opened one) |
list_animations List animations in a file
Lists all @keyframes in a local .css or .html file with their keyframes and timing, without opening the editor.
| Parameter | Type | Description |
|---|---|---|
file * | string | Path to the .css or .html file |