layercake
A local MCP server that connects AI agents to Adobe After Effects, enabling reliable project inspection, reasoning, and controlled mutations through structured tools and typed patches.
README
LayerCake
Use professionally designed After Effects projects as agent-ready video templates.
Template-first, state-aware After Effects automation for AI agents.
LayerCake is a local Model Context Protocol server that lets agents inspect, fill, adapt, and validate existing Adobe After Effects projects.
Instead of rebuilding motion design from scratch, an agent can work with a ready-made .aep template: find the right compositions and layers, understand timing and dependencies, insert content, make controlled changes, and save the result as a new project.
LayerCake runs scripts directly through After Effects on macOS and Windows. No plugin or bridge panel has to remain open.
What LayerCake is for
Fill After Effects templates
Use professionally designed projects as the basis for automated video production. Agents can identify placeholders, update content through typed tools or ExtendScript, preserve the existing animation, and create project variants.
Generate variations
Adapt one template for different customers, products, languages, campaigns, or formats without recreating the motion design for every output.
Understand existing projects
Inspect compositions, layers, sources, timing, expressions, fonts, effects, and footage interpretation before changing anything.
Validate production templates
Check for missing footage, missing fonts, third-party effects, broken assumptions, or unexpected project structure before a project enters a rendering pipeline.
Maintain projects safely
Target exact objects, detect when project state has changed, verify mutations, and save copies or backups explicitly.
What you can ask
Inspect this project and identify its editable text, image, logo, and video layers.
Explain how the main composition and its precompositions are connected.
Replace the customer name and logo while preserving the existing animation.
Create three versions of this project using different product assets.
Show the timing, expressions, and animated properties of this layer.
Check the project for missing footage, fonts, and third-party effects.
Move the lower-third animation two seconds earlier without changing its duration.
Save the completed version as a new project without overwriting the template.
Why state-aware?
After Effects projects are live, nested documents. Names can be duplicated, indexes move, expressions affect property values, and a person can edit the open project between two agent operations.
LayerCake gives agents enough context to act deliberately:
- compact project inventories with deep inspection on demand
- stable After Effects IDs for follow-up operations
- project fingerprints that detect stale state
- guarded typed patches with verified before-and-after results
- explicit save-copy and backup operations
- direct ExtendScript access for unsupported work
Inspection is not the end goal. It is what makes reliable template automation possible.
Features
Project inspection
- Open and close
.aepand.aetprojects - Read project path, dirty state, revision, and fingerprint
- Summarize project health
- List compositions and their layers
- List footage, solids, placeholders, and folders
- Resolve inbound references for a project item
- Inspect layer property trees
- Inspect footage interpretation settings
- Detect missing footage and fonts
- Identify third-party effects
Project editing
Typed mutations go through ae_patch_project. Current operations include:
- text style and layer rename
- layer timing (frame-exact), switches, transform, index, and delete
- composition settings and property expressions
- create solid, replace layer source, and reset layer surface
- Project panel create/move/rename/delete, plus
safe_delete_project_item
Typed patches validate their targets, can reject stale project state, and return verified before-and-after evidence. They do not save the project implicitly.
Use ae_eval_script for template-filling steps and other edits that do not yet have a typed tool.
After Effects scripting
LayerCake includes a searchable local copy of the After Effects Scripting Guide. Agents can consult the object model before writing and running ExtendScript.
Scripts execute inside After Effects and can return structured results to the agent.
Explicit saving
LayerCake separates editing from persistence:
save_copysaves the active project to a new path and continues working on that copycreate_backupcopies the clean project file without changing the active project
How it works
A typical workflow looks like this:
- Open or identify the After Effects project.
- Bind to its current state.
- Inventory compositions, layers, sources, and dependencies.
- Inspect the relevant template controls or placeholders.
- Apply a typed patch or reviewed ExtendScript.
- Verify the result.
- Save a copy or create a backup.
LayerCake drives After Effects through:
- AppleScript
DoScriptFileon macOS AfterFX.exe -ron Windows
Requirements
- Adobe After Effects installed locally
- Node.js 20 or newer
- An MCP-compatible agent or client
- macOS or Windows
Windows host control has been smoke-tested with After Effects in a Windows 11 VM running in UTM.
Quickstart
git clone https://github.com/alphacornutum/layercake.git
cd layercake
npm install
npm run docs:fetch
npm run build
Copy the environment template:
# macOS
cp .env.example .env
# Windows PowerShell
Copy-Item .env.example .env
In After Effects, enable:
Preferences → Scripting & Expressions → Allow Scripts To Write Files And Access Network
Configure the local After Effects installation.
On macOS:
AE_APP_NAME="Adobe After Effects 2025"
On Windows:
AE_EXECUTABLE=C:\Program Files\Adobe\Adobe After Effects 2025\Support Files\AfterFX.exe
Add LayerCake as a stdio MCP server.
macOS example
{
"mcpServers": {
"layercake": {
"command": "node",
"args": ["/absolute/path/to/layercake/dist/index.js"],
"env": {
"AE_APP_NAME": "Adobe After Effects 2025"
}
}
}
}
Windows example
{
"mcpServers": {
"layercake": {
"command": "node",
"args": ["C:\\absolute\\path\\to\\layercake\\dist\\index.js"],
"env": {
"AE_EXECUTABLE": "C:\\Program Files\\Adobe\\Adobe After Effects 2025\\Support Files\\AfterFX.exe"
}
}
}
}
See Setup and connection for development configurations, installation variants, and troubleshooting.
Machine IDs such as the npm package, CLI, and MCP configuration key use lowercase layercake. The product name is LayerCake.
Verify the connection
Open After Effects and ask your agent:
Use LayerCake to check the After Effects host status.
Then ask:
Inspect the currently open project and list its compositions.
Tools and agent skill
LayerCake registers its inventory, inspection, patch, save, documentation, and ExtendScript tools automatically.
The bundled drive-after-effects skill teaches compatible agents to inspect before mutating, prefer stable IDs, verify changes, and save deliberately. It ships in skills/; you can copy or symlink it into an agent’s skills folder, or load it through the MCP resources skill://drive-after-effects/SKILL.md and skill://index.json.
See MCP tools and agent skill for the complete tool reference.
Related projects
Dakkshin/after-effects-mcp takes a creation-first approach. It provides ready-made commands for constructing compositions, layers, shapes, cameras, masks, keyframes, expressions, and effects through a persistent ScriptUI bridge.
LayerCake is template-first and state-aware. It focuses on using existing After Effects projects as reliable production templates: understanding their structure, finding exact targets, working against known project state, and verifying changes.
Both approaches are useful:
- Choose a creation-first tool when the main job is building a scene through predefined creative commands.
- Choose LayerCake when the main job is filling, adapting, validating, or maintaining an existing After Effects project.
See Choosing an After Effects MCP for a detailed comparison.
Current limitations
- The typed editing surface covers common inspect-and-edit jobs, but many template-filling steps still need ExtendScript.
- Raw
ae_eval_scriptdoes not provide all the guards of typed patches. - LayerCake does not visually judge rendered output.
- One agent should control one After Effects session.
- Features unavailable through Adobe’s scripting API cannot be automated.
Documentation
- Setup and connection
- MCP tools and agent skill
- Choosing an After Effects MCP
- Troubleshooting
- Scripting Guide corpus
- Architecture
- Architecture decision records
- Contributing
Safety
ae_eval_script can change the open project, write files, and perform operations that are difficult to undo.
Inspect first, review destructive scripts, and work on a copy when the source project matters. Typed patches provide stronger targeting and verification, but they still modify the live After Effects project.
See SECURITY.md.
License
MIT. See LICENSE.
The Scripting Guide content under vendor/ retains its original Adobe and docsforadobe licensing and attribution. See Scripting Guide corpus.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。