ae-mcp
# ae-mcp
An [MCP](https://modelcontextprotocol.io) server for **Adobe After Effects**, built in *code mode*. It
exposes a few tools instead of one tool per action. The agent looks up what it needs in the
scripting API and then writes ExtendScript that runs inside the After Effects you have open. The
tool list stays small (about 1,500 tokens) whatever the agent does, and one call can do work that
would otherwise take dozens of tool calls.
| Tool | What it does |
| --- | --- |
| `search_api` | Searches a compact After Effects scripting API index and guides (text, shapes, keyframes, render, ES3 rules…). |
| `execute` | Runs ExtendScript in the open After Effects as one undo step and returns the result as JSON. |
| `preview_frame` | Returns a rendered frame of a comp as an image, so the agent can see what it did. |
| `render` | Renders with `aerender` in a separate process, so the After Effects interface stays usable. |
```
Agent (Claude / Codex / Gemini)
│ MCP (stdio)
▼
ae-mcp (this package, Python ≥ 3.11)
│ osascript → DoScriptFile (one .jsx per call)
▼
After Effects (open) ── writes the JSON result to a private temp file
```
Nothing has to be installed inside After Effects.
## Requirements
- macOS, After Effects 2024 or later (tested on After Effects 2026, 26.2).
- [uv](https://docs.astral.sh/uv/) (`curl -LsSf https://astral.sh/uv/install.sh | sh`).
- In After Effects, **Settings › Scripting & Expressions**:
- turn on **Allow Scripts to Write Files and Access Network** (the result comes back through a file);
- turn off **Enable JavaScript Debugger**, so a failing script reports an error instead of opening the debugger.
- The first call triggers a macOS prompt asking whether your agent app may control After Effects: allow it
(System Settings › Privacy & Security › Automation).
## Installation
Register the server with your agent. The command is
`uvx --from git+https://github.com/toolbox-design-ia/ae-mcp ae-mcp`. Desktop apps don't always inherit your
shell `PATH`: if they can't find `uvx`, use its full path (`which uvx`).
**Claude Desktop**: in `~/Library/Application Support/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"aftereffects": {
"command": "/Users/YOU/.local/bin/uvx",
"args": ["--from", "git+https://github.com/toolbox-design-ia/ae-mcp", "ae-mcp"]
}
}
}
```
**Claude Code**: `claude mcp add aftereffects -- uvx --from git+https://github.com/toolbox-design-ia/ae-mcp ae-mcp`
Check the connection with After Effects open:
```bash
uvx --from git+https://github.com/toolbox-design-ia/ae-mcp ae-mcp status
```
With several versions open at once, choose one with `AE_MCP_APP="Adobe After Effects 2026"`
(otherwise the newest running version is used).
## How `execute` works
The code runs as ExtendScript (ES3) inside After Effects:
```js
var comp = app.project.items.addComp("Main", 1920, 1080, 1, 10, 24);
var title = comp.layers.addText("Hello");
title.transform.opacity.setValuesAtTimes([0, 1], [0, 100]);
result = {comp: comp, title: title};
```
- Return data by assigning `result` or ending with an expression. After Effects objects come back as
summaries (items with id and name, layers with index and comp, properties with matchName, path and value).
- Each call is one undo step (`undo_name`, default "ae-mcp").
- Helpers: `log(...)`, `describe(obj, depth)`, `members(obj)` (real properties and methods, by reflection),
`findComp(name)`, `findItem(name, type)`, `findItems(nameOrTest)`, `activeComp()`, `toJSON(value)`.
- Scripts must not open dialogs (`alert`, `confirm`, `prompt`, `…WithDialog`): After Effects would wait for a click.
## Command line
```bash
ae-mcp status # is After Effects reachable?
ae-mcp run 'app.project.numItems' # run a snippet ("-" reads it from stdin)
ae-mcp search keyframe ease # search the API index
```
## Development
```bash
uv sync
uv run pytest
```
The tests run `runtime.jsx` under Node with a small fake After Effects when Node is installed.
## Notes
- The API index in `src/ae_mcp/data/api.txt` is written for this project; it is a summary, not
Adobe's documentation. When unsure, the agent checks members live with `members(obj)`.
- Adobe is bringing UXP plugins to After Effects (public beta, 27.1). A UXP bridge may be added
later; this version uses ExtendScript, which every current After Effects supports.
## License
Freeware: free to use, including commercially; not open source. See [LICENSE](LICENSE).
Adobe and After Effects are trademarks of Adobe Inc. This project is not affiliated with or endorsed by Adobe.
TDQS
Scored across 4 tools
Each tool targets a clearly distinct stage of the workflow: search_api reads documentation, execute runs code inside AE, preview_frame inspects a single rendered frame, and render produces output externally via aerender. The descriptions explicitly disambiguate the easily-confused pairs (execute vs render, preview vs render) by explaining process model and intent.
All names are consistent snake_case, but the verb pattern is mixed: two are verb_noun (search_api, preview_frame) while two are bare verbs (execute, render). Still perfectly readable and each name accurately signals its action.
Four tools is a tight, well-scoped set for a scripting bridge: documentation lookup, code execution, visual verification, and batch rendering. Each tool earns its place and there is no redundant or filler surface.
The surface covers the full loop for its domain — discover API usage, execute arbitrary ES3 (a universal escape hatch for saving, undo, project manipulation, etc.), visually confirm results, and render final output. No obvious dead ends remain, since anything not exposed as a first-class tool is reachable through execute.