I recently built ae-motion, an MCP (Model Context Protocol) server that lets Claude (or any MCP client) build, animate, preview and render motion graphics in a live Adobe After Effects project. Ask for "a 5 second lower third with an eased slide-in," and the model creates the comp, adds layers, sets keyframes, checks a preview frame and kicks off a render — all in the project you have open.
The Problem
After Effects is powerful, but its interface can be overwhelming. Finding the right effect, adjusting keyframes, and managing layers takes time. I wanted to see if I could streamline this workflow by leveraging Claude's natural language understanding to control After Effects directly.
How It Works
ae-motion acts as a bridge between Claude and After Effects through a three-part architecture:
The MCP server runs in Node.js and communicates with a CEP (Common Extensibility Platform) panel embedded in After Effects. The panel listens on localhost with a token-based authentication system, and executes ExtendScript commands to manipulate the project. When you ask Claude to "add a glow effect to this layer," it translates that request through the chain and executes it in your live After Effects project.
What It Can Do
The project includes 77 tools organized into thirteen groups:
- Inspect — Get project info, comp details, layer properties, keyframes
- Project — Open, save, create comps, import footage
- Layers — Add, set, link, duplicate, reorder, precompose layers
- Timeline — Split, trim, shift, sequence layers, add markers
- Masks and mattes — Add masks, set track mattes
- Design — Align layers, set anchors, add shapes, layer styles
- Animate — Set properties, keyframes, expressions, effects, presets
- Motion — Named moves with springs, text reveals, transitions
- 3D and camera — Camera moves, shakes, rigs, 3D settings, lights
- Preview and render — Preview frames, start renders, check status
- Audio — Beat markers, audio reactivity, sound cues, SFX
Technical Implementation
The server is built with TypeScript and runs through Node.js. Key components include:
- MCP Server — Implements the Model Context Protocol, exposing tools to AI clients
- CEP Panel — Extension panel that runs inside After Effects
- Bridge Server — HTTP server on localhost with token-based auth
- ExtendScript Execution — Converts tool calls to After Effects scripting commands
Architecture Details
The CEP panel starts a small server on `127.0.0.1` (port 47670, or the next free port up to 47690) and writes its port and a random token to `~/.ae-motion-mcp/bridge.json`. The MCP server reads that file to find the panel. Every request includes the token for authentication, and the panel only listens on localhost for security.
Challenges
The biggest challenge was error handling and state management. After Effects scripting can be finicky, and operations need to be atomic — every mutating call is one undo step. I had to build robust validation, error messages with actionable hints, and a token meter to track context usage (ae-motion adds tool definitions and preview images to the model's context).
Security
Security was a priority:
- The panel only listens on `127.0.0.1` with random token authentication
- File operations are restricted to allowed directories
- The `run_jsx` escape hatch is disabled by default
- Bridge file is readable only by the user
What's Next
I'm continuing to add features and improve the tooling. The project is open source and the full documentation is available in the GitHub repository.
The goal isn't to replace After Effects, but to make it more accessible through natural language control.
If you're interested in trying it out or contributing, check out the GitHub repository. It requires After Effects 2022 or later and Node.js 22.18 or later.