Skip to main content
Glama
README.md
# AE MCP Pro — Model Context Protocol server for Adobe After Effects

Let Claude (or any MCP client) drive **Adobe After Effects**: build compositions, animate layers, write expressions,
apply effects, set type, draw shapes and masks, light 3D scenes, place markers, render — and **look at the result**.

**216 tools** across 11 groups, every one tested live in After Effects 2026, plus raw ExtendScript for
anything else. Each change is a single, named undo step in AE (`Edit > Undo MCP: …`).

| Group | Tools | Highlights |
|---|---:|---|
| System & scripting | 7 | connection status, launch AE, raw ExtendScript, `batch` many commands in one undo step |
| Project & footage | 27 | import files/sequences, folders, interpret footage, proxies, replace/relink, reduce/consolidate, collect files |
| Compositions | 17 | presets (1080p, 4K, social), precompose, deep duplicate, resize/crop with layers, nested flowchart |
| Layers | 37 | solids/nulls/adjustment, parenting, switches, track mattes, split/trim/time-remap, align/distribute/sequence |
| Properties, keyframes & expressions | 26 | any property by path, keyframes with easing, quick animations, wiggle/loop, link properties, bake expressions |
| Effects & presets | 17 | apply any of AE's effects by name, edit params, copy effects, `.ffx` presets, 18 one-call looks, layer styles |
| Text | 18 | point/paragraph text, fonts, styles, animators and 9 text animation presets, text on path, text to shapes |
| Shapes & masks | 18 | rect/ellipse/star/path shapes, fills/strokes, 9 shape modifiers, **SVG import**, draw-on, masks, mask→shape |
| Render, export & previews | 14 | **frame previews returned as images**, contact sheets, render queue, background `aerender` jobs, Media Encoder |
| 3D, markers & audio | 19 | cameras (focal-length presets, DOF), lights, materials, camera rigs/orbits, markers, audio fades, **beat detection** |
| Workflow, selection & audits | 16 | undo/redo, menu commands, project health report, expression errors, batch rename, organize, Essential Graphics, MOGRT |

Full reference with every argument: **[docs/TOOLS.md](docs/TOOLS.md)**.

## Why another After Effects MCP?

- **Breadth:** 216 purpose-built tools instead of a handful plus "run a script". Common jobs (fade in a layer, add a
  wiggle, put text on a path, parse an SVG into shapes, detect beats, orbit a camera, find expression errors) are one call.
- **Sees its work:** `preview_frame` / `preview_frames` return rendered frames as images, so the AI can check its own output.
- **Batching:** `batch` runs dozens of commands in one round trip *and* one undo step.
- **Two transports, zero mandatory install:** a dockable bridge panel (fastest) **or** direct mode, which runs commands
  through `AfterFX.exe -r` with no panel at all.
- **Forgiving references:** comps by name/path/id, layers by index/name/id, properties by display name, matchName or
  shortcut (`Position`, `Effects/Glow/Glow Radius`), times as seconds, `12f` or timecode, colors as hex.
- **Safe by design:** never opens modal dialogs, refuses to discard unsaved work, marks destructive tools for the client.

## Requirements

- Adobe After Effects 2024 or newer (developed and tested on **AE 2026 / 26.5**, Windows 11). macOS is supported by the code
  (osascript transport) but not yet tested — reports welcome.
- Node.js 18+.
- In After Effects: **Edit › Preferences › Scripting & Expressions › “Allow Scripts to Write Files and Access Network”** must
  be ticked (every AE automation bridge needs this to return results).

## Install

```bash
git clone https://github.com/Yavinesh2025/ae-mcp-pro.git
cd ae-mcp-pro
npm install
npm run build
```

### Add it to your MCP client

**Claude Code**

```bash
claude mcp add after-effects -- node /absolute/path/to/ae-mcp-pro/build/index.js
```

**Claude Desktop** (`claude_desktop_config.json`) and other clients:

```json
{
  "mcpServers": {
    "after-effects": {
      "command": "node",
      "args": ["/absolute/path/to/ae-mcp-pro/build/index.js"]
    }
  }
}
```

### Optional: the bridge panel (faster)

Direct mode works out of the box. For the panel, either:

- run `npm run install-panel` (copies `AE-MCP-Pro-Bridge.jsx` into AE's *ScriptUI Panels* folder; on Windows this needs an
  Administrator terminal), restart AE and open **Window › AE-MCP-Pro-Bridge.jsx**, or
- without installing: **File › Scripts › Run Script File…** and pick `build/AE-MCP-Pro-Bridge.jsx`.

Keep the panel open (dock it anywhere). The server uses it automatically when its heartbeat is fresh and falls back to
direct mode otherwise.

### Check the connection

```bash
node build/index.js doctor
```

prints the AE installs found, whether AE and the panel are running, and a live ping. Inside a chat, the `bridge_status`
tool does the same.

## Examples (what you can ask)

- “Create a 1080p 10-second comp called *Promo*, add a dark blue background and a centered title ‘Summer Sale’ in
  Montserrat Bold, then make it slide up word by word.”
- “Draw this SVG logo as a shape layer and animate it drawing on over 2 seconds.”
- “Add a camera rig and orbit the camera 90° around the scene over 6 seconds, with depth of field.”
- “Import `music.wav`, detect the beats and put a marker on each one.”
- “Find every expression error in this project and fix them.”
- “Show me frame 3 s of the comp.” → the frame comes back as an image.

## How it works

```
MCP client ──stdio──▶ ae-mcp-pro (Node) ──JSON files──▶ After Effects (ExtendScript)
                                         │  panel : ScriptUI panel polls a queue folder (app.scheduleTask)
                                         └─ direct: AfterFX.exe -r stub.jsx (macOS: osascript DoScriptFile)
```

- `src/tools/*.ts` declare tools (name, description, zod schema). The server forwards arguments to the ExtendScript handler
  with the same name in `jsx/modules/*.jsx`, registered with `AEMCP.register(name, fn)`.
- `jsx/core/00-core.jsx` is a small ES3 runtime: JSON codec, resolvers for comps/layers/properties, value conversion, undo
  grouping and dialog suppression.
- The bridge folder is `%APPDATA%\ae-mcp-pro\bridge` (macOS: `~/Library/Application Support/ae-mcp-pro/bridge`).

### Environment variables

| Variable | Meaning |
|---|---|
| `AE_MCP_TRANSPORT` | `auto` (default), `panel` or `direct` |
| `AE_PATH` | Path to `AfterFX.exe` (or its *Support Files* folder) if AE is installed somewhere unusual |
| `AE_MCP_HOME` | Override the data folder (bridge + temp files) |

## Development

```bash
npm run build                 # tsc + bundle jsx -> build/
npm run ci:quick              # typecheck, ES3 lint of jsx, unit tests (also the git pre-commit hook)
npm run ci                    # full: build, TS<->JSX contract, unit tests, docs in sync, repo hygiene
npm run ci -- --live          # + end-to-end tests against a running After Effects
node tools/dev-call.mjs layers create_null '{"comp":"Main","name":"Ctrl"}'   # live-test one handler
```

ExtendScript is ES3: no `let`/`const`, arrow functions, `Array#map`, `JSON`… `tools/check-jsx.mjs` parses every `.jsx` file
as ES3 and rejects modern APIs; use the `AEMCP.u.*` and `AEMCP.json.*` helpers instead.

Adding a tool: add a `ToolDef` to `src/tools/<group>.ts`, register a handler with the same name in `jsx/modules/<group>.jsx`,
add a case to `tests/live/cases/<group>.mjs`, run `node tools/gen-docs.mjs`.

## Troubleshooting

| Symptom | Fix |
|---|---|
| “After Effects is not running” | Start AE (or call `launch_after_effects`). |
| Calls time out in direct mode | Close any open dialog in AE; enable *Allow Scripts to Write Files and Access Network*. |
| “panel did not pick up the command” | The panel is paused or AE is busy (rendering) — press *Resume* in the panel. |
| A tool can't find a property | Use `list_properties` on the layer to see exact names/matchNames. |

## License

MIT — see [LICENSE](LICENSE). After Effects is a trademark of Adobe Inc.; this project is not affiliated with or endorsed
by Adobe.