Repository avatar
Other Tools
v0.1.6
active

animate-mcp

io.github.gekkyo/animate-mcp

Inspect Adobe Animate documents and edit frame scripts, timelines, tweens, and library items.

Documentation

animate-mcp

Edit Adobe Animate scripts and timeline structure from an MCP-compatible AI agent.

English | 日本語

Changelog

CI MCP compatible npm license MIT


Overview

animate-mcp is a local Model Context Protocol (MCP) server that lets AI agents inspect Adobe Animate documents and edit frame scripts and animations. It uses JSFL, Animate's scripting system, to control Animate directly.

Agents can read scripts and structure from scenes and library symbols, then apply edited scripts through files. They can also edit layers, frames, tweens, and library items.

Highlights

  • AI agents can read frame scripts and structure from scenes and library symbols through files, then apply edited scripts back to Animate.
  • Inspect layers, keyframes, instances, and tweens.
  • Edit layer and frame structure and labels.
  • Create motion and classic tweens with preset or custom Bézier easing.
  • Organize library folders and items and find unused items.
  • Install GreenSock-AS3 with a prompt.
  • Work with ActionScript 3 and HTML5 Canvas, and run arbitrary JSFL.

Requirements

  • Node.js
  • Adobe Animate (must be running)
  • An MCP-compatible client (Claude Code, Claude Desktop, etc.)
  • Verified only on Animate 2024 / macOS. Other recent versions should work. Windows is untested.

Install

Claude Code

claude mcp add animate-mcp -- npx -y animate-mcp@latest

Clients configured with JSON (Claude Desktop, etc.)

{
  "mcpServers": {
    "animate-mcp": {
      "command": "npx",
      "args": ["-y", "animate-mcp@latest"]
    }
  }
}

Usage

  1. Start Animate and open the target .fla.
  2. Ask your agent to do the work.
  3. When editing scripts, the workflow is:
    1. export_scripts writes the structure and every frame script to ~/.animate-mcp/exports/<document name>/.
    2. The agent edits the files.
    3. apply_scripts writes them back into Animate.

Example prompts

Script operations

Export the scripts from the open document and find the cause of an error

Inspecting the timeline

Check the instance and tween on frame 12 of the Character layer in Scene 1

Editing layers and frames

Add a Background layer to Scene 1 and extend it to 24 frames

Creating a tween

Move the Ball instance 200 px to the right over frames 1–24 in Scene 1, using backOut easing (overshoot and return)

Organizing the library

List unused library items

Installing GreenSock

Install GreenSock-AS3 for the open document

Usage tips

  • If multiple documents are open, specify the target document.
  • Changes made in Animate after Export are detected as conflicts during Apply. Apply is refused if the library has changed.
  • Re-exporting is refused when unapplied edits exist. Use force: true only if you are willing to discard them.
  • After changing the timeline, tweens, or library, re-export before editing or applying scripts.
  • Deleting a layer, frames, or a library item requires confirm: true. Library items in use cannot be deleted.
  • Save manually in Animate. Renaming or moving a library item does not automatically update linkage names or string references in code.

Tools

ToolWhat it doesInputs and caveats
get_document_infoReports the open document's name, dimensions, frame rate, timeline names, ActionScript version, and GreenSock status.Takes no arguments.
export_scriptsExports scene and library-symbol structure and frame scripts, plus index.md and each timeline's structure.md.Defaults to ~/.animate-mcp/exports/<document name>/. Refuses to re-export over unapplied edits; force: true discards them.
apply_scriptsApplies edits to exported scripts in Animate. An empty script file deletes that frame's script.Pass the export directory as dir. Frames changed in Animate are not overwritten. Does not save the .fla.
inspect_timelineReads layers, keyframe ranges, and instances and tweens at a specified frame of a scene or library symbol.timeline is a zero-based scene index or library-item path. Frame numbers are one-based; layers can be filtered.
edit_timelineEdits layers, frames, keyframes, and labels, and distributes instances across layers. Runs operations in ops order.deleteLayer and removeFrames require confirm: true. shiftLayerFrames overwrites the clipboard and may require Undo if it fails partway through.
edit_tweenCreates motion or classic tweens and changes easing. Supports presets, numeric easing, and four-number custom easing.The named instance must be alone on its layer. Existing tween spans are not replaced.
edit_libraryCreates folders, moves, renames, and deletes items, and lists unused items.Deletion requires confirm: true and refuses items in use. Linkage names and string references in code are not updated.
install_greensockFetches GreenSock-AS3 12.1.5 from GitHub and places it alongside a saved AS3 document.Review the license and pass confirm: true. Does not change or save the .fla; does not support AS2 or HTML5 Canvas.
run_jsflExecutes arbitrary JSFL in Animate and returns the result. Object return values become strings.Can modify documents and files; ask the user before running code that makes changes.

Operations accepted in ops

edit_timeline, edit_tween, and edit_library accept the following operations in their ops arrays.

edit_timeline

OperationDescription
addLayerAdd a layer
deleteLayerDelete a layer (requires confirm: true)
moveLayerMove a layer
renameLayerRename a layer
setLayerTypeChange a layer's type
distributeToLayersPut each symbol instance from a single-span layer on its own layer
insertFramesInsert frames
removeFramesRemove frames (requires confirm: true)
insertKeyframeInsert a keyframe
clearKeyframeClear a keyframe
setLabelSet a frame label
setSpanLengthChange the length of a frame span
shiftLayerFramesMove one layer's content later without shifting other layers

edit_tween

OperationDescription
createTweenCreate a motion or classic tween for a named instance
setEaseChange an existing tween's easing

edit_library

OperationDescription
createFolderCreate a folder
moveItemMove an item to another folder
renameItemRename an item
deleteItemDelete an item (requires confirm: true; refuses items in use)
listUnusedList unused items

Environment variables

NameDescriptionDefault
ANIMATE_MCP_TIMEOUT_MSExecution timeout30000
ANIMATE_MCP_RUNS_DIRWorking directory~/.animate-mcp/runs
ANIMATE_MCP_LAUNCH_COMMANDCustom command to open the .jsfl fileOS default
ANIMATE_MCP_PROCESS_PATTERNCustom process pattern to detect AnimateOS default

Bug reports

Please open an issue with your Animate version, OS, steps to reproduce and error messages.

Development

npm install && npm run build
npm test

Client config: node /path/to/animate-mcp/server/dist/index.js (stdio).

Manual smoke test (real Animate)

  1. Start Animate with a document open.
  2. Run run_jsfl with fl.trace('hi'); 'ok'. hi appears in the Output panel and the tool returns "ok". Animate comes to the front (known behavior).
  3. Run get_document_info. It returns name, size, frame rate and timeline names.
  4. Close all documents and run get_document_info. It returns "No document open".
  5. Quit Animate and run run_jsfl. It returns "Animate not running".
  6. Unverified: behavior while a modal dialog is open.

License

MIT License

NPM
animate-mcp
Install Command
npm install animate-mcp