The MCP Bridge
eXLib exposes a localhost-only MCP (Model Context Protocol) control surface, so an MCP client you already run — Claude, Codex, or any MCP client — can drive the panel directly instead of you copy-pasting between a chat window and After Effects.
What the bridge is, and what it is not
eXLib ships the bridge, not an agent. It doesn't call out to any AI service on its own, and it does nothing until an MCP client you control connects to it. The agent is yours; eXLib provides the surface it talks through.
The bridge is off by default at every layer described below. Nothing about installing or opening eXLib exposes this surface on its own.
Connecting a client
The bridge's host ships inside the extension itself — there's no separate download or companion package to install. Turn it on from Settings and the panel shows you the exact path to give your MCP client, plus a ready-to-paste registration command. Point your client at that path and it starts the bridge's host process itself.
Settings can also do the registration for you: Connect your AI tool installs eXLib into Claude Code, Claude Desktop, or Codex in one press — it writes the client's own config file, shows whether each client is present, already installed, or pointing at an old path, and can remove the entry just as cleanly. Anything else that speaks MCP over stdio gets a copy-paste snippet in the same section.
Before anything about your editor or your comp is disclosed, the panel and that host prove to each other that they belong together: the panel writes a per-install secret only the two of them can read, and the connection is authenticated against it before a single byte of editor content crosses it. Nothing else on your machine — another local app, a browser tab, a second process that happens to guess a port — can pair with it, and nothing is sent until that check passes. Once paired, your client sees a normal set of MCP tools: reading and editing the open expression, querying diagnostics, and (once you allow it) touching the property you have selected in After Effects.
What an agent can do
Once connected, an agent can work with the surfaces you'd expect from a code-editor integration: read and edit the current expression, inspect the current selection, request completions/hover/symbol information, and run the same headless semantic validation the panel's own diagnostics use — all without touching After Effects. On top of that, a smaller set of panel-mediated operations can read your currently selected AE property, and — only once you've allowed it — apply an expression to it or pull its current expression into the editor.
The status bar chip
Once the bridge is enabled, a chip in the status bar shows its state at a glance and gives you control without opening Settings:
- Off — the bridge is disabled; nothing is listening.
- On · idle (green frame) — connected and healthy, nothing running.
- On · working (amber frame) — the panel is currently executing an agent's request.
- On · problems (red frame) — the last request failed; the chip holds the error until a request succeeds.
Click the chip to toggle the bridge on or off. ⌘-click (Ctrl-click on Windows) jumps straight to the MCP Bridge settings.
Leeroy Mode
By default, destructive operations (writing to your selected AE property, running a script) are granted per session — a restart, disconnect, or peer change takes that session grant back. Leeroy Mode is the explicit exception: turning it on creates a standing authorization that survives disconnects, client changes, panel restarts, and quitting After Effects. Script source then runs without a per-run dialog. The status bar carries a flashing badge and every bypassed run is written to the activity log, so the exception is visible and auditable.
Leeroy is scoped to this paired eXLib installation, not to the display name of one MCP client. Any client that can launch this installation's host and complete its pairing inherits the standing authorization. Turn Leeroy off before handing control to another client. Reset pairing also turns it off and clears the held grant; secret rotation, removal, or any other pairing-identity failure does the same.
The three operation classes
Every operation the bridge exposes is classified into one of three tiers, and the tier decides what has to be true before it's allowed to run:
| Class | What it covers | What's required |
|---|---|---|
| Read | Reading editor content, diagnostics, hovers, completions, symbols, and the selected property's metadata | Always available once the bridge is connected |
| Mutating | Editing the open expression, changing the selection, pulling the selected property's live expression into the editor | Requires read-write mode |
| Destructive | Writing an expression onto your selected AE property; running arbitrary ExtendScript against After Effects | Requires read-write mode and an explicit destructive grant |
The tool catalog
Every tool the bridge exposes, generated straight from the running MCP server so this list can never drift from what your client actually sees:
R = read-only · M = mutating panel/editor state · D = destructive/live-host write.
| MCP tool | Class | What it does | What it needs |
|---|---|---|---|
exlib_get_content |
R | Read the full AE expression source currently open in the eXLib editor. | Read tier (default once the bridge is connected). |
exlib_set_content |
M | Replace the full AE expression source currently open in the eXLib editor. | Read & write tier. |
exlib_get_diagnostics |
R | Read the current plaintext semantic diagnostics from the eXLib editor. | Read tier (default once the bridge is connected). |
exlib_get_status |
R | Read panel readiness, content length, diagnostic count, and timestamp. | Read tier (default once the bridge is connected). |
exlib_get_capabilities |
R | Discover operations implemented by this panel build and their current R/M/D policy state. | Read tier (default once the bridge is connected). |
exlib_insert_text |
M | Insert AE expression source at a 1-based Monaco position. | Read & write tier. |
exlib_replace_range |
M | Replace an ordered, end-exclusive Monaco range with new source. | Read & write tier. |
exlib_get_selection |
R | Read the editor selection as anchor and active 1-based positions. | Read tier (default once the bridge is connected). |
exlib_set_selection |
M | Set the editor selection and optionally reveal its active position. | Read & write tier. |
exlib_validate |
R | Run the eXLib analyzer on arbitrary code without mutating the editor. | Read tier (default once the bridge is connected). |
exlib_get_completions_at |
R | Read eXLib language-service completions at a 1-based editor position. | Read tier (default once the bridge is connected). |
exlib_get_hover_at |
R | Read plaintext or Markdown diagnostic/type hover at a 1-based editor position. | Read tier (default once the bridge is connected). |
exlib_get_symbols |
R | Read all document symbols, or only symbols visible at an optional position. | Read tier (default once the bridge is connected). |
exlib_get_selected_property |
R | Read the selected AE property type, dimension, match name, and canonical path through the panel. | Read tier (default once the bridge is connected). |
exlib_apply_to_selected_property |
D | Destructively write code to the selected live AE property and return expressionError as AE’s verdict. | Read & write + live AE tier, plus the session-scoped destructive grant. |
exlib_read_from_selected_property |
M | Read the selected live AE property expression through the panel and replace the editor content. | Read & write tier. |
exlib_run_script |
D | Run an ExtendScript (scripting-DOM) script against AE in one undo group. The read/write policy and live-AE grant are always required. By default the panel also shows the source and asks the user to confirm that run; explicitly enabled Leeroy Mode replaces those per-run prompts with a persistent, visible, activity-logged standing authorization. Returns { ran, result | error }. | Read & write + live AE tier, plus the session-scoped destructive grant. Also requires the per-run confirm dialog unless the user has explicitly enabled Leeroy Mode. |
exlib_reveal_property |
R | Select a property host-side and ask After Effects to reveal it in the timeline. Read-only NAVIGATION, not a document mutation: it moves AE’s live selection/view state (a layer + property selection, and best-effort a reveal command), never the document itself, and carries no undo group — it runs even in read_only mode, unlike the write/apply tools. Honest about what AE could actually do: the response’s mechanism reports whether the AEGP companion took it (native, when installed — the only mechanism that truly jumps the timeline), a menu reveal command ran (command), or neither did (selection-only — the property IS selected but the timeline did not expand; when you see this, tell the human to press SS to solo it themselves, since no tool here can post that keystroke). attempts lists every probed reveal command in order, for diagnosing why a given AE build answered selection-only. |
Read tier (default once the bridge is connected). |
Script confirmation and the standing exception
With Leeroy off, running a script has four independent gates: the bridge must be on, the
tier must allow live AE writes, the session's destructive grant must be held, and the
panel shows the full source in a confirmation dialog for that specific run. Declining is
a normal outcome — { ran: false, error: "declined by user" } — not a transport error.
Leeroy replaces only the last gate. The bridge, tier, pairing, and live-AE authorization still have to pass, but the per-run dialog is skipped under the standing authorization you approved when enabling Leeroy. That bypass survives until you turn Leeroy off or reset the pairing identity; it is never enabled by default.
Multiple panels, one active connection
If eXLib is open in more than one After Effects instance at once — a release build and a Beta build, say — only one panel is ever the active connection your MCP client's requests reach. A second panel still pairs successfully, but it sits on standby rather than silently taking over or splitting requests between the two. Standby is not a dead end: Take control hands the active connection to that panel explicitly, and if the active panel closes or reloads on its own, the most recently connected standby is promoted automatically. If you ever need to cut off every connected client at once, Reset pairing does exactly that — every live session, active or standby, drops within about a minute and has to pair again from scratch.
Off by default
The bridge is inert by default, and turning it on takes more than one switch:
- Transport. With nothing set, the panel opens no socket at all. Turning the connection on is its own deliberate step.
- Action policy. Once connected, the default mode is read-only — mutating operations need read-write mode turned on explicitly.
- Destructive grant. Even in read-write mode, destructive operations stay off until you grant them separately, and that grant only does anything in read-write mode to begin with.
Revoking access at any layer takes effect immediately — a connection that was already open can't ride on a permission you've since turned off.