After Effects MCP Server
# š¬ After Effects MCP Server




> **Fork notice.** This is a fork of [Dakkshin/after-effects-mcp](https://github.com/Dakkshin/after-effects-mcp)
> (MIT). The original project is the basis for everything here; this fork extends the ExtendScript
> bridge so a script can drive real animation ā keyframe tracks, expressions, effects and footage
> swaps ā rather than setting static properties one at a time. See
> [What this fork adds](#what-this-fork-adds).
⨠A Model Context Protocol (MCP) server for Adobe After Effects that enables AI assistants and other applications to control After Effects through a standardized protocol.
<a href="https://glama.ai/mcp/servers/@Dakkshin/after-effects-mcp">
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Dakkshin/after-effects-mcp/badge" alt="mcp-after-effects MCP server" />
</a>
## Table of Contents
- [Features](#features)
- [Core Composition Features](#core-composition-features)
- [Layer Management](#layer-management)
- [Animation Capabilities](#animation-capabilities)
- [Setup Instructions](#setup-instructions)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Update MCP Config](#Update-MCP-Config)
- [Running the Server](#running-the-server)
- [Usage Guide](#usage-guide)
- [Creating Compositions](#creating-compositions)
- [Working with Layers](#working-with-layers)
- [Animation](#animation)
- [Available MCP Tools](#available-mcp-tools)
- [For Developers](#for-developers)
- [Project Structure](#project-structure)
- [Building the Project](#building-the-project)
- [Contributing](#contributing)
- [License](#license)
## š¦ Features
### š„ Core Composition Features
- **Create compositions** with custom settings (size, frame rate, duration, background color)
- **List all compositions** in a project
- **Get project information** such as frame rate, dimensions, and duration
### š§± Layer Management
- **Create text layers** with customizable properties (font, size, color, position)
- **Create shape layers** (rectangle, ellipse, polygon, star) with colors and strokes
- **Create solid/adjustment layers** for backgrounds and effects
- **Create camera layers** with configurable zoom and position
- **Create null objects** for animation control
- **Modify layer properties** like position, scale, rotation, opacity, timing
- **Toggle 2D/3D mode** for layers
- **Set blend modes** (normal, multiply, screen, etc.)
- **Track matte** support (alpha, luma, inverted)
- **Duplicate layers** with optional rename
- **Delete layers** from composition
- **Create/modify masks** with feather, expansion, and opacity
### š Animation Capabilities
- **Set keyframes** for layer properties (Position, Scale, Rotation, Opacity, etc.)
- **Apply expressions** to layer properties for dynamic animations
- **Batch set properties** across multiple layers at once
## āļø Setup Instructions
### š Prerequisites
- Adobe After Effects (2022 or later)
- Node.js (v14 or later)
- npm or yarn package manager
### š„ Installation
1. **Clone the repository**
```bash
git clone https://github.com/Dakkshin/after-effects-mcp.git
cd after-effects-mcp
```
2. **Install dependencies**
```bash
npm install
# or
yarn install
```
3. **Build the project**
```bash
npm run build
# or
yarn build
```
4. **Install the After Effects panel**
```bash
npm run install-bridge
# or
yarn install-bridge
```
This will copy the necessary scripts to your After Effects installation.
### š§ Update MCP Config
#### Option 1: Using .mcp.json (Recommended for Claude Code)
The repository includes a `.mcp.json` file for easy configuration. Copy or reference it in your MCP settings:
```json
{
"mcpServers": {
"AfterEffectsMCP": {
"command": "node",
"args": ["PATH/TO/after-effects-mcp/build/index.js"]
}
}
}
```
#### Option 2: Manual Configuration
Go to your client (e.g., Claude or Cursor) and update your config file:
```json
{
"mcpServers": {
"AfterEffectsMCP": {
"command": "node",
"args": ["C:\\Users\\Dakkshin\\after-effects-mcp\\build\\index.js"]
}
}
}
```
### ā¶ļø Running the Server
1. **Start the MCP server**
```bash
npm start
# or
yarn start
```
2. **Open After Effects**
3. **Open the MCP Bridge Auto panel**
- In After Effects, go to Window > mcp-bridge-auto.jsx
- The panel will automatically check for commands every few seconds
- Make sure the "Auto-run commands" checkbox is enabled
## š Usage Guide
Once you have the server running and the MCP Bridge panel open in After Effects, you can control After Effects through the MCP protocol. This allows AI assistants or custom applications to send commands to After Effects.
### š Creating Compositions
You can create new compositions with custom settings:
- Name
- Width and height (in pixels)
- Frame rate
- Duration
- Background color
Example MCP tool usage (for developers):
```javascript
mcp_aftereffects_create_composition({
name: "My Composition",
width: 1920,
height: 1080,
frameRate: 30,
duration: 10
});
```
### āļø Working with Layers
You can create and modify different types of layers:
**Text layers:**
- Set text content, font, size, and color
- Position text anywhere in the composition
- Adjust timing and opacity
**Shape layers:**
- Create rectangles, ellipses, polygons, and stars
- Set fill and stroke colors
- Customize size and position
**Solid layers:**
- Create background colors
- Make adjustment layers for effects
### š¹ Animation
You can animate layers with:
**Keyframes:**
- Set property values at specific times
- Create motion, scaling, rotation, and opacity changes
- Control the timing of animations
**Expressions:**
- Apply JavaScript expressions to properties
- Create dynamic, procedural animations
- Connect property values to each other
## š Available MCP Tools
| Command | Description |
|-----------------------------|----------------------------------------|
| `create-composition` | Create a new composition |
| `run-script` | Run a JS script inside AE |
| `get-results` | Get script results |
| `get-help` | Help for available commands |
| `setLayerKeyframe` | Add keyframe to layer property |
| `setLayerExpression` | Add/remove expressions from properties|
| `setLayerProperties` | Set layer properties (position, scale, rotation, opacity, blendMode, threeDLayer, trackMatteType, enabled, etc.) |
| `batchSetLayerProperties` | Apply properties to multiple layers |
| `getLayerInfo` | Get layer info (position, 3D status) |
| `createCamera` | Create camera layer |
| `createNullObject` | Create null object for animation |
| `duplicateLayer` | Duplicate a layer |
| `deleteLayer` | Delete a layer |
| `setLayerMask` | Create/modify layer masks |
## šØāš» For Developers
### š§© Project Structure
- `src/index.ts`: MCP server implementation
- `src/scripts/mcp-bridge-auto.jsx`: Main After Effects panel script
- `install-bridge.js`: Script to install the panel in After Effects
### š¦ Building the Project
```bash
npm run build
# or
yarn build
```
**Note:** This project uses esbuild for fast builds, replacing the previous TypeScript compiler approach that could run out of memory on larger codebases.
### š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Star History
[](https://www.star-history.com/#Dakkshin/after-effects-mcp&type=date&legend=top-left)
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## What this fork adds
Upstream `batchSetLayerProperties` sets static transform properties. Driving an animation through it
meant one round trip per keyframe, which is unusable over a file-based bridge. This fork makes a
single batch call able to describe motion.
**New keys on `batchSetLayerProperties`:**
| key | what it does |
|---|---|
| `keyframes` | write a whole track at once ā `{"Position": [[t, [x, y]], ā¦]}` |
| `expressions` | set an expression per property; `""` clears and disables it |
| `expressionEnabled` | toggle an existing expression without losing it |
| `effects` | add or modify an effect and its properties, with `addIfMissing` |
| `clearKeyframes` + `holdValues` | strip a property's keys, holding a chosen value |
| `overridePositionKeyframes` | write Position even when it already has keys, shifting them by the delta |
| `locked` | applied before everything else, so one op can unlock, edit, and move on |
**New command:** `replaceFootage` ā repoint a layer at another file or at another composition
(`sourceId`), which is how nested comps get assembled programmatically.
**Also:** `getLayerInfo` reports far more per layer (keyframe counts, expressions, anchor point,
source id), `resolveCompFromArgs` accepts `compId` and errors clearly on an ambiguous name instead of
guessing, and `.mcp.json` no longer hardcodes one machine's absolute path.
### Honest limits
Things this bridge still cannot do, which are worth knowing before you plan around it:
- **No keyframe easing.** Every key it writes is linear; there is no velocity or influence API.
Shaped motion has to be baked as a dense run of samples.
- **No layer parenting, no masks, no layer reordering over time.**
- **No save and no render/export command.** The only pixel output is one still at a time via
`getLayerInfo` with `saveFramePath`.
- **Silent failures.** The bridge returns `status: "success"` even when a property was skipped,
encoding it in `changedProperties` as `positionSkippedKeyframed`, `keyPropNotFound`,
`exprPropNotFound` and similar. **Scan that array** ā a successful response does not mean the
property was written.
- A reused composition keeps the duration it was created with unless `setCompositionProperties`
is called.
TDQS
Scored across 13 tools
There are clear duplicates: apply-effect and mcp_aftereffects_applyEffect do the same thing, as do apply-effect-template and mcp_aftereffects_applyEffectTemplate. Additionally, get-help and mcp_aftereffects_get_effects_help overlap. This makes it ambiguous which tool to select for a given task.
Tool names mix snake_case (run-script, apply-effect-template), camelCase (setLayerKeyframe, setLayerExpression), and prefixed variants (mcp_aftereffects_applyEffect). There is no consistent pattern, which makes the API hard to predict.
13 tools is within a reasonable range, but several are redundant or aliases, inflating the count. A leaner set of unique tools would be more appropriate for the server's scope.
The set lacks essential operations for After Effects, such as creating layers, adding footage, rendering, or managing projects. While it covers composition creation, keyframes, expressions, and effects, major workflow steps are missing, limiting real-world use.