Running Scripts with MCP
eXLib v1.0 can execute ExtendScript source submitted by a connected MCP client. That is
different from applying an expression: scripts use After Effects' scripting DOM (app,
project, layers, files, and so on) and run with your full user-account permissions.
What ships today
The exlib_run_script MCP tool accepts source text and an optional short label. eXLib
runs that source through the panel's host boundary, wraps After Effects project changes
in one undo group, catches script errors, and returns a bounded result to the client.
The agent supplies the source for each request; eXLib does not claim that the source came
from a saved Library row.
The safety boundary
Script execution is a destructive-class operation. The bridge must be paired and on, the access tier must permit live AE writes, and the live-AE authorization must be held. With Leeroy Mode off, eXLib then shows the script's full source and asks you to confirm that exact run. With Leeroy on, the standing authorization you approved replaces the per-run dialog; the status bar stays marked and every bypassed run is activity-logged.
After Effects can undo project mutations in the undo group. It cannot undo a script's file, network, application-launch, or preference side effects. Read the source and only grant script access to clients you trust.
Library script metadata
The Library file format already preserves an isScript flag. A row carrying that flag
is protected from Apply and Audition, because scripting-DOM source is not an AE
expression. This release does not expose a customer-facing action to create, open, or run
those saved rows; the flag is a forward-compatible storage boundary, not a shipped script
editor.
What is not in v1.0
There is no Library Run button, no special script tab, and no in-panel saved-script
authoring workflow in v1.0. The only shipped execution entry point is
exlib_run_script over the MCP Bridge. Organizing or saving Library items is also a
panel action, not an MCP capability.
Roadmap: scripting intelligence
The v1.1 roadmap covers a first-class script workflow: create and open saved scripts,
run them from the Library/editor, and eventually add completions and validation for the
AE scripting DOM. Until that UI exists, eXLib's ae-expression analyzer remains scoped
to expressions and does not pretend to validate script-only APIs.