brainferno-mcp-bridge

v0.3.4
brainferno-mcp-bridge Checked 3 days ago Published 1 month ago

MCP server that lets an AI assistant drive Adobe Photoshop, After Effects, Premiere Pro, Illustrator, Audition and Media Encoder software.

Brainferno MCP Bridge is an MCP server that gives Claude (Claude Code today; any MCP client) hands inside Adobe Photoshop, Adobe After Effects, Adobe Premiere Pro, Adobe Illustrator, Adobe Audition, and Adobe Media Encoder software — the apps you already have open, on the projects you already have loaded. It is independent software for use with those Adobe products; it is not made or endorsed by Adobe (see Trademarks). You describe the work in plain language; the assistant builds the comp, cuts the sequence, normalizes the audio, renders the file, and shows you previews along the way.

Summary extracted from the README.

Brainferno MCP Bridge (brainferno-mcp-bridge)

CI npm Release License: Apache-2.0

Let an AI assistant run your Adobe video and graphics pipeline.

Brainferno MCP Bridge is an MCP server that gives Claude (Claude Code today; any MCP client) hands inside Adobe Photoshop, Adobe After Effects, Adobe Premiere Pro, Adobe Illustrator, Adobe Audition, and Adobe Media Encoder software — the apps you already have open, on the projects you already have loaded. It is independent software for use with those Adobe products; it is not made or endorsed by Adobe (see Trademarks). You describe the work in plain language; the assistant builds the comp, cuts the sequence, normalizes the audio, renders the file, and shows you previews along the way. Every action is one undo step in the app, so you can always step back.

  • 135 tools across six applications, plus an ffmpeg audio lane that works with every Adobe app closed.
  • Cross-app pipelines: one request runs Photoshop → After Effects → aerender → Premiere → ffmpeg → back onto the timeline, with progress and a clear report if a step fails.
  • You can see what it did: frame previews from After Effects and Premiere, document previews from Photoshop and Illustrator, waveforms from audio files.
  • Runs on your machine. Nothing leaves your computer unless you turn on shared mode for other computers on your network (token-protected).

Status: the typed tools are verified live on Windows and macOS, the two platforms Adobe ships Creative Cloud for (Adobe 2026 apps). ae_run_script, ae_find_layers, ae_batch, ae_undo, ae_redo and After Effects names in place of ids are verified live on Windows (After Effects 26.5), not yet on macOS. The npm badge above is the current version. See Status.

The companion panel inside each app — here in Adobe After Effects and Adobe Photoshop — shows the connection, a live log, and a kill switch:

After Effects (CEP panel) Photoshop (UXP panel)

What you can ask for

Examples that work today, in one conversation:

  • "Take my open Photoshop document, export it, and drop it into the 'Title' comp in After Effects as a new layer."
  • "Make a 1920×1080 comp, add a dark background and the text 'Brainferno' in orange, animate it sliding in from the left with easy ease, add a glow, and show me frame 2."
  • "Render the comp with aerender and put it on the Premiere timeline at 10 seconds."
  • "Import these three clips, build a sequence from the first one, put the others after it, add a one-second cross dissolve between each, and add a marker where the music should hit."
  • "Scale the still to 60 % and animate it up to 100 % over its length."
  • "Export the sequence audio, denoise it, normalize it to −16 LUFS, and lay it on A2."
  • "Open this WAV in Audition, apply my 'Podcast Voice' favorite, export it as MP3."
  • "Measure the loudness of every file in this folder and tell me which ones are too hot."
  • "Export the Premiere project to H.264 through Media Encoder, in the background, and tell me when it is done."
  • "In Illustrator, draw a six-point star and a headline, export the artboard as PNG at 2×, and place it in Photoshop as a smart object."
  • "Which Illustrator objects overlap artboard 2? Align them to its left edge."
  • "What is open right now in each app?"

Ideas people build with it:

  • Template factories — a PSD or AI design becomes an animated title, then a rendered file, then a timeline element, by prompt.
  • Batch conforming — normalize, denoise and convert a folder of interview audio while Audition stays closed.
  • Review loops — "show me the frame at 3 s", change one thing, "show me again".
  • Hand-offs between people — a producer on a laptop drives the studio PC that has the apps and the media (shared mode).
  • A render box — Media Encoder jobs submitted headlessly, with status and history.

What it controls

Counts are the tools registered per app. Each family has a live-run write-up in docs/spikes/ with the quirks found on real installs.

Photoshop — 22 tools

Documents (list, create, open, save, export PNG/JPEG, preview image), layers (create, text layers with font/size/color, properties, move, duplicate, delete), layer styles (drop shadow, glows, bevel, satin, color and gradient overlay, stroke… — add, adjust, read, remove), place an image as a smart object, fill, filters (Gaussian/motion/unsharp…), resize, crop. Plus a raw batchPlay escape hatch (ps_batch_play) that is always listed but refuses until you enable raw scripts for Photoshop — see Raw scripts.

After Effects — 39 tools

Project info and file, compositions and footage (list, create, import), import a layered PSD or AI file as a composition (one layer each, with PSD layer styles editable), layers of every kind (footage, solid, text, null, adjustment), shape layers (rectangle, ellipse, star, polygon — with fill and stroke), masks (rectangle/ellipse, with mode, feather, opacity), keyframes with easing, expressions, effects and their parameters, layer styles (drop shadow, glows, bevel, stroke… — add, adjust, read, remove), text content/font/color/justification, markers, Essential Graphics (expose a control, export a Motion Graphics template), single-frame preview, render queue, and headless rendering through aerender (the UI stays free). Every ae_* tool that takes a composition or a layer takes it by id or index, or by exact name (compName, layerName, and parentName for a parent): indexes shift as layers are added, names do not, and a name more than one layer or composition has fails with the matches. ae_find_layers finds layers by name, kind, text and enabled state. ae_batch runs up to 200 edits as one eval and one undo step, and by default undoes the whole batch when one of them fails; ae_undo and ae_redo run After Effects' own Edit > Undo and Redo. These four and the name addressing are verified live on After Effects 26.5. Plus a raw ExtendScript tool (ae_run_script) that runs a whole script as one undo step and is always listed but refuses until you enable raw scripts for After Effects — see Raw scripts. It is verified live on Windows (After Effects 26.5). A script that closes or replaces the open project is refused until the operator agrees in the chat (seen live: the refusal, a flag with no refusal refused, the 10-minute limit, one approved run, and its second use refused).

Premiere Pro — 29 tools

Project, sequences and items, a full sequence read (every track and clip with times), import, create a sequence from media, insert/overwrite, Motion Graphics templates (.mogrt) dropped over the picture, ripple remove, move, trim, rename, transitions, effects and keyframes (Motion, Opacity, any applied effect), markers, frame preview, export preset search, and export (in Premiere or handed to Media Encoder).

Illustrator — 7 tools + Adobe's own 46

Create documents, draw shapes (rect, ellipse, line, polygon, star) and text, save .ai, export artboards (PNG/JPG/SVG), preview. Plus a pass-through to Adobe's built-in Illustrator MCP server (artboards, alignment, appearance, structure, export, preflight… — all 46 verified) when you give it your Illustrator key.

Audition — 12 tools

App and document state, 600+ menu commands (list and run), Favorites (apply a saved effect chain hands-off), markers, transport (play/stop/record), playhead, open, save, export, close, and a dump of the scripting API for this build.

Media Encoder — 6 tools

Headless encoding of any media file, a Premiere project (by sequence), or FCP XML with any .epr preset through Media Encoder's built-in service — started on demand, stopped when idle; status, history, cancel.

Audio (ffmpeg) — 9 tools, no Adobe app needed

Probe, loudness measurement (EBU R128), two-pass loudness normalization, convert/extract, trim, trim silence, denoise, mix, waveform image. These run your own installed ffmpeg as a separate process — nothing is bundled (licensing).

Pipelines and jobs — 8 tools

pipeline_ps_to_ae, pipeline_render_and_import (After Effects → aerender → Premiere Pro), pipeline_audio_roundtrip (Premiere → ffmpeg → Premiere), pipeline_ai_to_ps. Long renders and exports run as jobs: cc_job_status, cc_list_jobs, cc_job_wait, cc_job_cancel, and every pipeline reports which step failed and which single-app tool fixes it.

The full tool table is in Tool reference.


Install

Requirements

  • Windows 10/11 or macOS 14+ — the only platforms Adobe ships Creative Cloud for, so the only ones this software runs on. Two macOS specifics the installer handles: Media Encoder needs a one-time config file inside its app bundle, and — when both Illustrator and Illustrator (Beta) are installed — which one the ai_* tools drive has to be pinned, since the two bundles share a name. See docs/spikes/13-macos-live.md.
  • The Adobe apps you want to control (2024 or newer; Premiere Pro 25.6+ for its panel).
  • Node.js 20 or newer.
  • An MCP client: Claude Code, Codex CLI, Gemini CLI, or any other. The installer registers the server with all three CLIs it finds; see Other MCP clients for what differs outside Claude Code.
  • Optional: ffmpeg on your PATH for the audio tools (winget install ffmpeg / brew install ffmpeg). It is never bundled — the server runs the copy you install; see FFmpeg licensing.

1. Install the package

From npm (recommended):

npm install -g brainferno-mcp-bridge

Or from source, if you want to change it:

git clone https://github.com/Brainferno/brainferno-mcp-bridge.git
cd brainferno-mcp-bridge
npm install
npm run build

2. Run the installer

brainferno-mcp-bridge-install      # npm install
npm run install-cc                 # source checkout

It asks two questions and does the rest:

  1. Which applications? — a numbered list, pre-checked from what is installed (Photoshop, After Effects, Premiere Pro, Illustrator, Audition, Media Encoder — any mix). Only those apps' tools and setup steps are used.
  2. Who may use it? — Only this computer (default) or Shared on my network (other computers connect with a token).

Then it: writes ~/.brainferno-mcp-bridge/config.json, asks for your Illustrator MCP key if you chose Illustrator (paste the line Illustrator shows; it is checked on the spot), links the After Effects/Audition panel, sets Media Encoder's service address, opens or closes the firewall port, prints the Photoshop/Premiere panel steps, and offers to register the server with every MCP client CLI it finds — Claude Code, Codex CLI, Gemini CLI. On macOS it asks one more question when both Illustrator and Illustrator (Beta) are installed — see below.

Non-interactive examples (from a source checkout, replace brainferno-mcp-bridge-install with node packages/server/dist/install/cli.js):

brainferno-mcp-bridge-install --apps all --mode local --yes --register
brainferno-mcp-bridge-install --apps ps,ae --mode local --yes          # Photoshop + After Effects only
brainferno-mcp-bridge-install --apps ppro,ame --mode shared --yes      # Premiere + Media Encoder, shared

App names: ps ae ppro ai au ame or all. Re-run the installer any time to change apps or mode. Other flags: --token, --port, --host, --illustrator-key, --illustrator-url, --illustrator-app, --no-panels, --no-ame, --no-firewall, --no-illustrator, --register, --clients claude,codex,gemini.

On macOS

Two things differ from Windows, and the installer handles both:

  • Media Encoder needs ame_webservice_config.ini inside /Applications/Adobe Media Encoder <year>/Adobe Media Encoder <year>.app/Contents/Resources/. Adobe ships none, and without it the headless service starts but never listens. The installer creates it — and because macOS "App Management" blocks writes into app bundles even under sudo, it asks Finder to copy the file in. If that is refused, allow App Management for your terminal in System Settings → Privacy & Security and re-run, or create the file by hand with the two lines ip = 127.0.0.1 and port = 8080. ame_server tells you the exact path if it is missing.
  • Illustrator and Illustrator (Beta) both ship a bundle named Adobe Illustrator.app, so an AppleScript name resolves to whichever one happens to be running — the ai_* tools would follow it mid-session. The installer asks which one to drive and pins its bundle id (illustratorApp in config.json; BRAINFERNO_MCP_ILLUSTRATOR_APP overrides, --illustrator-app com.adobe.illustratorBeta sets it non-interactively).

3. Open the panels

The Adobe apps talk to the server through a small panel called Brainferno MCP Bridge. Open it once per app; it connects on its own and shows a log and a kill switch.

  • After Effects / Audition: Window → Extensions → Brainferno MCP Bridge.
  • Photoshop / Premiere Pro: these are UXP panels; today they load through Adobe's free UXP Developer Tool: Add Plugin → pick the manifest.json the installer printed (packages/panel-uxp or packages/panel-uxp-ppro) → Load. Then Window → Extensions (UXP) → Brainferno MCP Bridge. Premiere needs Settings → Plugins → Enable developer mode first (restart Premiere). From a clone, npm run package also builds a .ccx for each of the two panels, which installs with a double-click and needs no UXP Developer Tool (docs/quirks/panel-packaging.md); the releases do not ship those files yet.
  • Illustrator needs no panel: the ai_* tools drive it from outside (AppleScript on macOS, COM on Windows). For Adobe's own Illustrator tools, turn on MCP in Illustrator's preferences and give the installer the key it shows. On macOS with both the release and the Beta installed, the installer asks which one the tools should drive.
  • Media Encoder needs no panel; the server starts its service when a job comes.

4. Talk to it

In Claude Code: /mcp shows brainferno-adobe-bridge connected. Try: "Which Adobe apps are connected?" (cc_connected_apps), then anything from the examples above.

Other MCP clients: Codex CLI, Gemini CLI, and more

The installer registers the server with every client CLI it finds. To do it by hand (replace the path with your install's dist/index.js — the installer prints the exact line):

codex mcp add brainferno-adobe-bridge --env BRAINFERNO_MCP_DEFAULT_WAIT=false \
  --env BRAINFERNO_MCP_PREVIEW=path --env BRAINFERNO_MCP_JOB_WAIT_SECONDS=50 \
  -- node "<path>/dist/index.js"
gemini mcp add -s user -e BRAINFERNO_MCP_DEFAULT_WAIT=false brainferno-adobe-bridge node "<path>/dist/index.js"

The env vars adapt the server to each client — Claude Code runs without them:

  • Codex CLI kills any tool call at 60 seconds (tool_timeout_sec). BRAINFERNO_MCP_DEFAULT_WAIT=false makes renders, exports and pipelines return a jobId immediately instead of blocking; the agent polls cc_job_wait, whose default timeout BRAINFERNO_MCP_JOB_WAIT_SECONDS=50 keeps each poll inside Codex's limit. Alternatively raise tool_timeout_sec for this server in ~/.codex/config.toml.
  • Codex cannot show the model MCP image blocks, so BRAINFERNO_MCP_PREVIEW=path returns previews as file paths (its own view_image tool reads them). Gemini CLI renders images, so it keeps inline previews.

Any other MCP client works the same way: stdio node <path>/dist/index.js, plus whichever of the three env vars its timeouts and image support call for. In shared mode the server also speaks Streamable HTTP with a bearer token (next section); Codex takes the token from an env var named by bearer_token_env_var in ~/.codex/config.toml, Gemini from a headers block in ~/.gemini/settings.json — the installer prints both snippets.

Using it from another computer

In shared mode the server also speaks MCP over HTTP on port 7898 and refuses every request without the bearer token (~/.brainferno-mcp-bridge/config.json → httpToken; the installer prints the exact line). On the other computer:

claude mcp add --scope user --transport http \
  --header "Authorization: Bearer <token>" brainferno-adobe-bridge http://<studio-pc>:7898/mcp

The Adobe apps, panels, media and previews all stay on the studio PC; only commands and results travel. The wire is plain HTTP — use a trusted LAN, a VPN, or Tailscale. The panels' own hub never leaves loopback. An SSH alternative needs no server setting at all: claude mcp add brainferno-adobe-bridge -- ssh user@studio-pc node <path>/packages/server/dist/index.js.

Updating

npm: npm install -g brainferno-mcp-bridge@latest. Source: git pull && npm install && npm run build. Then re-run the installer (your choices are kept) and reconnect in Claude Code (/mcp → brainferno-adobe-bridge → reconnect). Panels pick up changes on reload (UXP Developer Tool → Reload; CEP on reopen).


How it works

Creative Cloud applications do not share one automation surface, so the server reaches each app down the lane it has:

MCP client  <--stdio / HTTP+token-->  brainferno-mcp-bridge  <--ws://127.0.0.1:7897-->  UXP panel   (Photoshop, Premiere Pro)
                                                     <--                     -->  CEP panel   (After Effects, Audition)
                                                     --- osascript / COM ------->  Illustrator (no panel)
                                                     --- HTTP :8080 ----------->  Media Encoder web service (headless)
                                                     --- process -------------->  aerender, ffmpeg
  • Panels dial out to a hardened WebSocket hub on loopback (token auth, Origin/Host checks, heartbeat, per-socket result matching) and run the named commands they are sent. UXP has no script engine, so Photoshop and Premiere commands are real functions in the panel; After Effects and Audition run ExtendScript templates.
  • Illustrator is driven panel-less over OS scripting, and optionally through Adobe's own MCP server inside Illustrator.
  • Long work is a job: aerender, Media Encoder, exports and pipelines run in a registry with steps, progress notifications, cancel, and a per-job work folder under ~/.brainferno-mcp-bridge/work/.

Two scripting engines, on purpose:

Application Engine Language
Photoshop UXP Modern JavaScript (photoshop module, batchPlay)
Premiere Pro (≥ 25.6) UXP Modern JavaScript (require("premierepro"), action model)
After Effects ExtendScript ES3 — var only, no arrow functions, no JSON
Illustrator ExtendScript ES3 (no public UXP exists)
Audition ExtendScript ES3, via a CEP-only API learned by reflection

Scripts in src/tools/ are written for their host's engine and are not interchangeable. The ExtendScript ones look dated on purpose; modernizing them breaks them. The wire protocol is documented in docs/protocol.md.


Tool reference

Tools Application Purpose
cc_connected_apps all Each app's lane, panel, engine, and connection state
cc_get_capabilities all What the server can do for this session, without contacting any app: server and protocol versions, local or remote session, the raw-script gate, one row per gated tool (enabled or not, how to enable it, app connected, panel supports it), and each panel's version and host version
cc_job_status · cc_list_jobs · cc_job_wait · cc_job_cancel jobs Background jobs; wait streams progress; long renders/exports take wait:false and return a jobId
ps_* (22) Photoshop Documents (list/create/open/save/export/preview), layers (create/text/props/move/duplicate/delete), layer styles, place image, fill, filters, resize, crop, and the gated ps_batch_play (below) — live run
ae_* (38) After Effects The typed tools: project/comps/footage, PSD/AI import as comp, layers of every kind (by index or by name), find layers, shapes and masks, keyframes + easing, expressions, effects + params, layer styles, text, markers, Essential Graphics, frame preview, render queue, headless aerender, several edits as one undo step (ae_batch), Edit > Undo / Redo; the gated ae_run_script has its own row (below) — live run
pp_* (29) Premiere Pro Project/sequences/items, get_sequence (tracks + clips), import, create sequence from media, insert/overwrite, ripple remove, move/trim/props, transitions, effects + keyframes, markers, frame preview, export presets, export in-app or to Media Encoder — live run
ai_* (7) Illustrator Documents, shapes, text, save, export artboard, preview (panel-less)
ai_beta_status · ai_beta_list_tools · ai_beta_call Illustrator (Adobe's MCP) Pass-through to Adobe's 46 Illustrator tools — needs a key (docs, sweep)
au_* (12) Audition App/document state, 600+ menu commands, Favorites, markers, transport, open/save/export, API dump — live run
ame_* (6) Media Encoder (headless) Encode media / .prproj sequence / FCP XML with an .epr preset; status, history, cancel, service start/stop — live run, macOS
audio_* (9) ffmpeg Probe, R128 measure + two-pass normalize, convert/extract, trim, trim silence, denoise, mix, waveform image
pipeline_* (4) cross-app ps_to_ae, render_and_import, audio_roundtrip, ai_to_ps — one call, one job, failure names the step + recovery tool — live run
cc_eval_script After Effects, Illustrator, Audition Raw ExtendScript escape hatch — always listed; refuses unless enabled (opt-in, BRAINFERNO_MCP_ALLOW_RAW_SCRIPTS) — see cc_get_capabilities; refuses an After Effects script that closes or replaces the open project (use ae_run_script)
ae_run_script After Effects Raw ExtendScript as one undo step, with __args and After Effects' warning dialogs suppressed — always listed; refuses unless enabled for After Effects (opt-in, same switch); a script that closes or replaces the open project needs the operator's OK, given in the chat after the tool's refusal — live run on Windows
ps_batch_play Photoshop Raw batchPlay descriptors — always listed; refuses unless enabled for Photoshop (opt-in, same switch)

Tools are always advertised for the apps you chose, even when an app is closed — a closed app returns an actionable "not connected" error rather than vanishing mid-session. The raw-script tools follow the same rule: listed, and refusing until they are enabled. Only the ai_beta_* tools stay out of the list until an Illustrator key is configured.

A panel that drops mid-call returns an error saying the call may have partly run and how to reconnect; a panel older than the server says to update or reload it. Errors from the typed After Effects tools (ae_* other than ae_run_script) also name the tool and its arguments (cut short, keys and tokens removed), say where the tool's script failed (quoting the failing line and its neighbours when it is the tool's own code), and suggest close names for an unknown effect, property or effect parameter. A layer or composition name that is not there lists what is; a name more than one has lists the matches and says to pass the index or id. A failing ae_batch operation reads the same, with its position in the batch, only its own arguments, and whether the batch was undone.

Raw scripts (opt-in)

cc_eval_script runs your own ExtendScript in After Effects, Illustrator or Audition; ae_run_script runs one in After Effects as a single undo step; ps_batch_play runs raw batchPlay descriptors in Photoshop. They are for work the typed tools do not cover yet, and each refuses every call until the operator sets BRAINFERNO_MCP_ALLOW_RAW_SCRIPTS in the server env — 1 (or all) for every app with a raw-script tool, or a comma list such as after_effects,photoshop — and restarts. Remote (shared) sessions are refused even then unless BRAINFERNO_MCP_ALLOW_REMOTE_RAW_SCRIPTS=1 is also set. cc_get_capabilities shows the calling session which tools are enabled and how to enable the rest. cc_eval_script does not send an After Effects script that closes or replaces the open project; ae_run_script runs it after asking the operator (below).

They all return the same envelope, keys in this order:

{ "ok": false, "error": { "message": "…", "line": 3, "bodyLine": 3 }, "durationMs": 41, "value": null, "logs": [] }

error is present only when ok is false, and a logsDropped count follows logs only when log lines were dropped. bodyLine is the line in your script that failed; it is null when the error was raised outside your script's own text or the host's line numbering cannot be calibrated. durationMs is the server's round trip, including any wait behind other calls to the same app. In cc_eval_script and ae_run_script the value of the script's last statement is the result (a top-level return is a syntax error — wrap such code in an IIFE; to return an object literal, wrap it in parentheses, ({ a: 1 }), since a bare { a: 1 } on the last line is a block), __log(msg) collects up to 200 lines / 20000 characters, and the result must be plain data (strings, numbers, booleans, null, arrays, plain objects) — a host object such as a layer is refused with its path. In ps_batch_play the value is batchPlay's results array, and a descriptor that Photoshop reports as failed (an { "_obj": "error" } entry) makes the call fail, naming the index: the descriptors before it already ran and are not undone.

ae_run_script adds what After Effects work needs around the same wrapper (verified live on After Effects 26.5 on Windows; the probes are in docs/spikes/06-aftereffects-tools-live.md):

  • One undo step. The whole call runs inside one undo group named undoGroupName (default Brainferno script), so one Ctrl-Z undoes everything the script changed, including what a script that failed part-way changed before it failed. Opening, creating or closing a project, or importing an .aep, inside the script resets or breaks After Effects' undo history, so those calls are outside that guarantee. It covers project edits only: what the script saves or writes (a saved project, files, renders, preferences) stays changed.

  • args reaches the script as __args ({} when omitted): plain JSON data, at most 32 levels deep. Deeper data, a number that is not finite (such as 1e999) or a nested __proto__ key is refused before anything is sent; a top-level __proto__ key is dropped. Strings arrive exactly; numbers as After Effects keeps them: it reads a number below about 2.2e-308 as 0, and writes numbers in the result with 15 significant digits (0.1 + 0.2 comes back as 0.3).

  • Dialogs. suppressDialogs (default on) suppresses and discards After Effects' own warning dialogs while the script runs. It was verified on an export warning and on the missing-font dialog shown when the script opens a project, and is not promised for every dialog. With it on, a script that opens or creates another project (app.open, app.openFast, app.newProject) while the open project has a file and unsaved changes gets no save prompt: After Effects saves the open project over its file, those changes included (seen live). On a project with no file, app.open still showed After Effects' save prompt, which blocks After Effects until someone answers it; app.openFast and app.newProject on such a project were not tried. To discard the changes instead, close the project first with app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES), which closed it without a prompt in the live run. Modal UI the script opens itself is not covered. A bare alert, confirm or prompt written in the script's own text fails the call instead of opening a dialog, and says what to do instead: __log(msg) for alert; for confirm or prompt, pass the answer in args. Everything else modal still opens and blocks After Effects and every later call until someone dismisses it: Window.alert, $.global.alert and this.alert; a library loaded with $.evalFile, or a global helper, that calls alert, confirm or prompt; ScriptUI dialogs; file or folder pickers; a menu command that opens a dialog. (That list was not probed live, by design: each one would block After Effects.)

  • Closing or replacing the open project needs the operator's OK, given in the chat. A script whose text calls app.open, app.openFast, app.newProject, app.project.close, app.quit or app.restart (with a dot or as a quoted name in brackets, such as app['open']), or names CloseOptions — comments and strings included — is never sent on its first call. The tool reads the open project (ae_project_info's read-only script) and refuses in plain text, giving the file name (or "never saved"), whether there are unsaved changes, and, for each call in the script, what the live run saw After Effects do with them, or that it was not tried. A close counts as one CloseOptions value only when its own argument is that value written out. Any other close gets the outcome of each value: through app.project always, and on any other object (a File's or a window's too) when it has an argument and the script names CloseOptions or closes through app.project. With two switch calls or more, the refusal adds that each clause describes the project open now, and the later calls act on the project the first one leaves open. The model tells the operator, asks in the chat, and only if they agree calls again with the same script, args (as sent; left out counts as {}) and suppressDialogs plus allowProjectSwitch: true. The flag is honoured only for a call this session refused within the last 10 minutes, and only once; a flagged call with no such refusal gets the refusal instead, so the model cannot skip the risk. The approved call does not read the project again: the refusal describes the project as it was then, and says to call without the flag for a new refusal if it changes first. If After Effects is not connected when the approved call is sent, the OK stays for a retry; once the script was sent, it is used. A session is one MCP connection: in Claude Code that is one server process per window, so its subagents and a new conversation after /clear in that window are expected to share the refusals (not verified live). In a shared (remote) session the refusal adds that the person in the chat answers for whoever is at After Effects. The server cannot tell whether the operator was asked: the guard only makes sure a refusal stating the risk reached the model first (the audit line records the pair); the asking happens in the chat, where the operator can see the model's tool calls. The tool never asks through the MCP client: in the AE-01 live check, Claude Code 2.1.296 in a Windows 11 terminal, in three tries (auto mode twice, manual once), advertised MCP form elicitation, did not show the question, and answered accept {allowProjectSwitch: false} by itself (no Elicitation hook in user or project settings; managed settings not checked conclusively). Seen live on the current build (After Effects 26.5, Windows 11, 2026-10-13, driven from Claude Code): the refusal in its current wording, a flag with no matching refusal refused, a flag sent 10 min 4 s after the refusal refused as expired, the approved call run once, and its second use refused. Still unit-tested only: the 64-refusal cap, the key's suppressDialogs part, the OK kept when After Effects is not connected, a failed or cancelled check, the remote line, and the per-close and later-calls risk texts. What After Effects did with a project's unsaved changes in the earlier live run (2026-10-12):

    Call suppressDialogs Project Seen live
    app.open, app.openFast, app.newProject on saved no prompt; saved over its file
    app.open on never saved After Effects' save prompt anyway, blocking After Effects (the call timed out); after Don't Save, the other project was not opened
    app.open off saved the save prompt, blocking After Effects (the call timed out); after Don't Save, the other project opened and the file was unchanged
    close(CloseOptions.PROMPT_TO_SAVE_CHANGES) on saved no prompt; saved over its file
    close(CloseOptions.DO_NOT_SAVE_CHANGES) on or off saved no prompt; changes thrown away, file unchanged
    close(CloseOptions.DO_NOT_SAVE_CHANGES) on never saved no prompt; afterwards the open project had no file and no items
    close(CloseOptions.SAVE_CHANGES) off saved no prompt; saved over its file

    Not tried: app.quit and app.restart; app.openFast and app.newProject with suppression off or on a never-saved project; close(SAVE_CHANGES) with suppression on; close(PROMPT_TO_SAVE_CHANGES) with suppression off; SAVE_CHANGES or PROMPT_TO_SAVE_CHANGES on a never-saved project; app.open with suppression off on a never-saved project; close(DO_NOT_SAVE_CHANGES) with suppression off on a never-saved project. The refusal says "not verified live" for these (an expected save prompt as expected). In the live run a script could not wrap app.open, app.newProject or app.project.close (assigning a function to each changed nothing); app.openFast, app.quit, app.restart and other ways to wrap were not probed. The text check is the only guard. It reads the text only and does not catch, among others: a computed name, an alias, with (app) { open(f) }, (app).open, .call/.apply, a comment or escape inside the call, a menu command, or code run from elsewhere at run time ($.evalFile, eval of a file's text or of text passed in args).

  • The tool owns the undo group and dialog suppression, so a script that names app.beginUndoGroup, app.endUndoGroup, app.beginSuppressDialogs or app.endSuppressDialogs — even in a comment or a string — is refused before it is sent. If ending the suppression or closing the undo group fails after the script ran, the envelope reports it in error.message (after the script's own error, if it had one) and keeps the script's value and logs. If it fails after the call itself failed outside the script (the wrapper or a begin call threw), the note follows that error's message instead. (These notes are unit-tested only: the live run found no way to make After Effects fail an end call.)

  • A timeout stops the wait, not the script: After Effects keeps running it, and later After Effects calls wait behind it.

Reading a raw-script error: a tool error in plain text means your script was not sent to the app (raw scripts disabled, app not enabled, app not connected, args or script refused (ae_run_script), an After Effects script that closes or replaces the open project (cc_eval_script), or the operator's OK for such a script not given (ae_run_script; only its read-only project check may have run)). A tool error whose text is a JSON envelope means the script or batch was sent and may have partly run — check the document before re-running it.


Configuration

The installer writes ~/.brainferno-mcp-bridge/config.json (enabledApps, illustratorKey, illustratorUrl, illustratorApp, httpPort, httpHost, httpToken). Environment variables override it:

Variable Default Purpose
BRAINFERNO_MCP_APPS (all) Apps to register, e.g. ps,ae
BRAINFERNO_MCP_BRIDGE_PORT 7897 Port the panels dial back to (0 = OS-assigned)
BRAINFERNO_MCP_BRIDGE_TOKEN (empty → generated) Panel hub secret; empty generates a random per-run token
BRAINFERNO_MCP_BRIDGE_INSECURE (off) 1 disables hub auth and the handshake file (debug only)
BRAINFERNO_MCP_HANDSHAKE_FILE ~/.brainferno-mcp-bridge/bridge.json Where the {port, token} file panels read is written
BRAINFERNO_MCP_EVAL_TIMEOUT_MS 30000 How long to wait for a "slow" script result
BRAINFERNO_MCP_HEARTBEAT_MS 15000 Ping cadence for detecting a dead panel
BRAINFERNO_MCP_ALLOW_RAW_SCRIPTS (off) Lets the raw-script tools run (Raw scripts): 1 (also true, all, *) for After Effects, Photoshop, Illustrator and Audition, or a comma list of app ids — after_effects, photoshop, illustrator, audition (ae, ps, ai, au work too). Empty, 0, false, no, off = off. Other names (Premiere Pro, Media Encoder, typos) are ignored with a warning, never enabled
BRAINFERNO_MCP_ALLOW_REMOTE_RAW_SCRIPTS (off) 1 (or true) also lets remote (shared) sessions run raw scripts; anything else refuses them
BRAINFERNO_MCP_ILLUSTRATOR_KEY / _URL (config.json) / http://localhost:18412/v1/mcp Adobe's Illustrator MCP key and endpoint
BRAINFERNO_MCP_ILLUSTRATOR_APP (config.json, else the app's name) Which Illustrator the ai_* tools drive — AppleScript name, bundle id (com.adobe.illustrator, com.adobe.illustratorBeta) or .app path on macOS; COM ProgID on Windows
BRAINFERNO_MCP_FFMPEG / _FFPROBE ffmpeg / ffprobe Executables for the audio_* lane
BRAINFERNO_MCP_AME_WEBSERVICE (auto-detect) Path to Media Encoder's ame_webservice_console
BRAINFERNO_MCP_AME_PORT / _AME_IDLE_MS (from its ini) / 600000 Media Encoder service port; idle time before it is stopped
BRAINFERNO_MCP_HTTP_PORT / _HTTP_HOST / _HTTP_TOKEN (off) / 127.0.0.1 / (none) Remote mode (set by the installer's shared choice)
BRAINFERNO_MCP_DEFAULT_WAIT true Whether long tools (renders, exports, pipelines) block when wait is not passed; false returns a jobId at once — for clients with short tool timeouts (Codex)
BRAINFERNO_MCP_PREVIEW both Preview tools return inline (image only), path (file path only — for clients that can't show the model images), or both
BRAINFERNO_MCP_JOB_WAIT_SECONDS 300 Default cc_job_wait timeout; keep it below the client's own tool timeout
BRAINFERNO_MCP_LOG_LEVEL info error | warn | info | debug

Security

  • The panel hub binds to 127.0.0.1 only and evaluates script inside your Adobe applications. It requires a token by default (auto-generated, written mode-600 to the handshake file the panels read), rejects web Origins and non-loopback Hosts, and matches each result to the socket that issued the command. Never run it with BRAINFERNO_MCP_BRIDGE_INSECURE=1 on a shared machine.
  • Remote mode (shared) is off by default. When on, every request needs the bearer token; there is no anonymous path. The wire is plain HTTP — keep it to a trusted network, VPN or tunnel.
  • Media Encoder's built-in service has no password of its own and listens on a LAN address unless pinned to loopback; the installer's local choice pins it (one admin prompt on Windows; on macOS it writes the config file the service needs, via Finder), and the server only runs it while a job is active plus a short idle window. On macOS the server also ends the hidden renderer it started — never one that was already running.
  • Keys and tokens are stored in ~/.brainferno-mcp-bridge/config.json, never logged, and never written into an error message by the server itself. Script errors from the typed After Effects tools (ae_* except ae_run_script, and the After Effects steps of jobs and pipelines) also remove them from the host's message, the echoed arguments and the quoted code; where After Effects cut a long name less than 8 characters into a key, those few characters stay. In every app, the text of a panel older than the server (UNKNOWN_COMMAND) loses them too and is put on one line. Elsewhere — other apps' script errors, the raw-script envelopes, a render's log tail — the host's own text is passed on unchanged, so a project, document or layer name that contains a key shows as written.
  • Raw scripts (cc_eval_script, ae_run_script, ps_batch_play) run arbitrary code inside your Adobe applications with your user's rights, so they are opt-in and off by default: the tools are listed but refuse every call, touching no app, until BRAINFERNO_MCP_ALLOW_RAW_SCRIPTS names the app. 1/all opens After Effects, Photoshop, Illustrator and Audition — Illustrator included: its raw scripts go through the OS scripting lane, which launches Illustrator if it is closed. Remote (shared) sessions stay refused unless BRAINFERNO_MCP_ALLOW_REMOTE_RAW_SCRIPTS=1.
  • Every raw-script call, run or refused, writes one audit line to the server's stderr log, at every BRAINFERNO_MCP_LOG_LEVEL (the level cannot silence it): [brainferno-mcp-bridge] AUDIT raw-script tool=<tool> app=<app> sha256=<12 hex> len=<n> [count=<n>] via=<via> outcome=<run|refused>[ consent=<flag|needed>]. consent appears only on ae_run_script calls whose script closes or replaces the open project: needed on the refusal that states the risk (a call the client cancelled while a read-only check that succeeded was running is audited refused consent=needed too, but records no refusal of its own; a failed check is audited without consent), flag on the run that allowProjectSwitch let through after that refusal (the server cannot check that the operator agreed). A refusal and the run it lets through carry the same sha256 and len, since the run repeats the refused call (args left out is recorded as {}, so it matches args: {}). The run's line is written before the script is sent, so a flagged call that then finds After Effects not connected also writes outcome=run consent=flag though nothing was sent, and keeps the OK for a retry: each retry while After Effects is not connected writes one more run consent=flag line. It records the first 12 hex digits of a SHA-256 and the length of the script (for ae_run_script, of the JSON of { script, args }, args {} when left out; for ps_batch_play, of the descriptors' JSON, plus their count) — never the script itself; on a run the first 200 characters of that payload go to the debug log only. via is stdio for a local session or http: plus the first 8 characters of a remote session's id (the same prefix the "remote session … opened" log line shows). When the gate is open the server also writes one AUDIT raw scripts ENABLED for … line at startup, saying whether remote sessions are allowed.

Development

npm run dev        # watch mode
npm run typecheck  # tsc --noEmit
npm test           # vitest (the audio lane test runs a real ffmpeg if present)
npm run panels:sync  # copy the shared bridge client into each panel folder

Tests live in packages/server/test and use the MCP SDK's in-memory transport, a fake panel over a real WebSocket, a fake Remote AME, and a real ffmpeg when available — the full path from tool call to result with no Adobe application involved.

stdout is the MCP wire. Never console.log in this server; use the log helper in src/logging.ts, which writes to stderr.

Layout (npm workspaces)

packages/
  protocol/          @brainferno/mcp-bridge-protocol — shared by server and panels
    src/apps.ts      the five hosts: lane, panel, and scripting engine each uses
    src/protocol.ts  wire format (v2, zod-validated) between server and panel
  server/            brainferno-mcp-bridge — the MCP server (bin: dist/index.js) and installer (dist/install/cli.js)
    src/index.ts     entry point: stdio transport, optional HTTP listener, signal handling
    src/server.ts    runtime (hub, drivers, jobs) + per-session McpServer with every tool
    src/http.ts      remote mode: Streamable HTTP + bearer token
    src/jobs.ts      job registry (steps, progress, cancel, work folders)
    src/config.ts    environment + ~/.brainferno-mcp-bridge/config.json
    src/bridge/      hub (socket.ts), handshake file, script escaping, errors
    src/drivers/     os-script lane (Illustrator), Illustrator MCP delegate, Media Encoder web service
    src/tools/       per-application tools, audio lane, pipelines, jobs
    src/install/     the installer (lib.ts is pure and tested; cli.ts is interactive)
    test/            vitest
  bridge-client/     shared panel dial-out client (vendored into each panel by npm run panels:sync)
  panel-uxp/         Photoshop UXP panel
  panel-uxp-ppro/    Premiere Pro UXP panel
  panel-cep/         After Effects + Audition CEP panel
docs/                build plan, protocol, live-run notes (spikes/), Audition API dump

Status

  • Working, verified live on Windows and macOS (Adobe 2026 apps): all six application lanes and their v1 tool sets, the ffmpeg lane, the job registry, the four pipelines, remote mode, and the installer. Write-ups with the quirks found: docs/spikes/05–14 (13 is the macOS run: aerender path, Media Encoder's config file and renderer; 14 is the release process and what npm actually does after a publish).
  • Not yet: .ccx/.zxp panel files in the releases, and an installer that installs them, so that nobody needs the UXP Developer Tool (npm run package builds both kinds from a clone today); a single signed installer; TLS for shared mode; Audition multitrack writes; Media Encoder queue control. The Codex CLI / Gemini CLI lanes are built and unit-tested but not yet verified against the live CLIs — that run is docs/spikes/15-multi-client-lanes.md. ae_run_script (AE-01) is verified live on After Effects 26.5 on Windows (docs/spikes/06-aftereffects-tools-live.md), not yet on macOS. Its project-switch OK (a refusal stating the risk, then the operator's OK in the chat) is verified live there too, from Claude Code; the per-close and later-calls risk texts are unit-tested only. ae_find_layers, ae_batch, ae_undo, ae_redo and the name addressing (AE-03) are verified live on After Effects 26.5 on Windows (same spike), not yet on macOS.
  • Roadmap: docs/BUILD_PLAN.md (Phase 6).

License

Copyright 2026 Brainferno. Licensed under the Apache License, Version 2.0 — see LICENSE and NOTICE. You may use, modify, and redistribute this software, including commercially, as long as you keep the license and notices; the license also gives you an express patent grant from contributors. Third-party components and the Adobe materials this project relies on are listed in THIRD_PARTY_NOTICES.md. Contributions are accepted under the same license.

FFmpeg

The audio_* tools shell out to FFmpeg. No FFmpeg binary or source is included in this repository or in the published npm packages, and there is no FFmpeg npm dependency: the server runs the ffmpeg and ffprobe already installed on your machine (found on PATH, or at BRAINFERNO_MCP_FFMPEG / _FFPROBE) as separate processes, passing command-line arguments and file paths. Nothing from FFmpeg is linked into this software, so this project stays Apache-2.0 — and if you simply install FFmpeg alongside it, so does yours.

Each FFmpeg build carries its own license, and builds differ. FFmpeg is LGPL-2.1-or-later by default; a build configured with --enable-gpl — most packaged builds, since they include x264 and x265 — is GPL-2.0-or-later, and --enable-version3 moves either to v3. A build configured --enable-nonfree (e.g. with libfdk_aac) may not be redistributed at all. Check the one you have rather than assuming:

ffmpeg -hide_banner -L   # the license this build is under
ffmpeg -version          # the configure flags it was built with

Homebrew's ffmpeg 9.0.1, used to verify the audio tools on macOS, reports GPL-3.0-or-later (--enable-gpl --enable-version3).

If you redistribute FFmpeg — bundling it into your own installer, application or container image alongside this bridge — that build's obligations become yours: shipping its license text and corresponding source (or a written offer for it), and, under the LGPL, keeping relinking possible. Pointing users at brew install ffmpeg or winget install ffmpeg, as this project does, carries no such obligation.

Codec patents are separate from copyright: encoding or decoding H.264, HEVC or AAC can require a patent license from the relevant pool for some commercial uses in some countries, and no software license grants those rights. See FFmpeg's own legal page.

None of the above is legal advice.

Trademarks

Adobe, After Effects, Audition, Creative Cloud, Illustrator, Media Encoder, Photoshop, and Premiere Pro are either registered trademarks or trademarks of Adobe in the United States and/or other countries. FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project; this project is not affiliated with or endorsed by the FFmpeg project.

Brainferno MCP Bridge is an independent project. It is not authorized, endorsed, or sponsored by Adobe. Adobe product names are used only to say which products this software works with ("for use with Adobe Photoshop software"), as Adobe's trademark guidelines for plug-in and extension developers allow. No Adobe logos or product icons are included. "Brainferno" and the Brainferno MCP Bridge name and panel icon belong to Brainferno; the Apache License grants no right to use them in the names of derived products.