adb-mcp

repository·main·Indexed 20 days ago

https://github.com/mikechambers/adb-mcp

A proof-of-concept project that enables AI agents (such as Claude Desktop or OpenAI Agent SDK) to control Adobe Photoshop, Premiere Pro, InDesign, After Effects, and Illustrator via the Model Context Protocol (MCP). It utilizes a Node-based command proxy server (adb-proxy-socket) to bridge communication between the MCP server and Adobe UXP or CEP plugins.

Tokens
12K
Snippets
39
Records
58
Agent score
70%

What's inside adb-mcp

  1. Overview of adb-mcp

    main

    adb-mcp is a proof-of-concept project that enables AI control of Adobe Photoshop and Adobe Premiere by providing an interface to Large Language Models (LLMs) via the Model Context Protocol (MCP).

    It allows AI clients (such as Claude Desktop or the OpenAI Agent SDK) to perform tasks like:

    • Providing conversational instructions for Photoshop.
    • Automating complex tasks (e.g., creating Instagram posts or double exposures).
    • Generating custom Photoshop tutorials by creating example files.
    • Using Claude as a utility tool (e.g., renaming layers).
    • Pre-populating Premiere projects with clips, transitions, and effects.

    Note: The Premiere agent currently has more limited functionality than the Photoshop agent due to limitations in the Premiere plugin API.

  2. How adb-mcp works

    main

    The system architecture uses a multi-layered approach to bridge the gap between the AI and the Adobe application. Because UXP-based JavaScript plugins cannot act as servers to listen for socket connections, a Node-based command proxy server is used as an intermediary.

    The communication flow is: AI <-> MCP Server <-> Command Proxy Server <-> Photoshop / Premiere UXP Plugin <-> Photoshop / Premiere

  3. Install MCP for Adobe Apps via uv

    main

    To install the Model Context Protocol (MCP) servers for specific Adobe applications, navigate to the project directory and use the uv run mcp install command. This command installs the necessary dependencies and configures the MCP client (like Claude Desktop) to use the specific Python script for that application.

    Note: You must restart Claude Desktop after installation for changes to take effect.

    #### Photoshop
    ```bash
    uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with numpy ps-mcp.py

    Premiere Pro

    uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow pr-mcp.py

    InDesign

    uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow id-mcp.py

    AfterEffects

    uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow ae-mcp.py

    Illustrator

    uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow ai-mcp.py
  4. Install CEP Plugins (AfterEffects, Illustrator)

    main

    For CEP-based applications, you must create a symlink or junction in the Adobe CEP extensions directory.

    macOS

    1. Ensure the directory exists: /Users/USERNAME/Library/Application Support/Adobe/CEP/extensions.
    2. Create a symlink to the plugin in the CEP directory:
    cd "/Users/USERNAME/Library/Application Support/Adobe/CEP/extensions"
    ln -s /Users/USERNAME/src/adb-mcp/cep/com.mikechambers.ae com.mikechambers.ae
    # OR for Illustrator
    ln -s /Users/USERNAME/src/adb-mcp/cep/com.mikechambers.ai com.mikechambers.ai

    Windows

    1. Ensure the directory exists: C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions.
    2. Open Command Prompt as Administrator.
    3. Create a junction/symbolic link:
    mklink /D "C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions\com.mikechambers.ae" "C:\Users\USERNAME\src\adb-mcp\cep\com.mikechambers.ae"
    # OR for Illustrator
    mklink /D "C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions\com.mikechambers.ai" "C:\Users\USERNAME\src\adb-mcp\cep\com.mikechambers.ai"
    mklink /D "C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions\com.mikechambers.ae" "C:\Users\USERNAME\src\adb-mcp\cep\com.mikechambers.ae"
  5. How to add new functionality to adb-mcp

    main

    To extend the project with new capabilities, you must implement the functionality in two distinct layers: the MCP server layer (which defines the interface for the AI) and the UXP command layer (which executes the logic within the Adobe application).

    1. Define the AI Interface: Add the new API method and its required parameters in either mcp/ps-mcp.py (for Photoshop) or mcp/pr-mcp.py (for Premiere Pro). This allows the Model Context Protocol (MCP) server to expose the new tool to the AI agent.
    2. Implement the Logic: Implement the actual command execution in uxp/ps/commands/index.js (for Photoshop) or uxp/pr/commands/index.js (for Premiere Pro). This is where the UXP-based code that interacts with the Adobe app resides.
  6. Start an Adobe MCP Session in Claude

    main

    Once the proxy server, the Adobe app, and the plugin are all running and connected, follow these steps in Claude Desktop to initialize the session:

    1. In the Claude chat input field, click the "+" button.
    2. Select "Add from Adobe [App Name]" (e.g., Add from Adobe Photoshop).
    3. Select config://get_instructions.
    4. Submit this to Claude to load the necessary instructions and context.

    This process provides Claude with the guidance required to interact with the specific Adobe application effectively.

  7. Install UXP Plugins (Photoshop, Premiere Pro, InDesign)

    main

    For UXP-based applications, use the UXP Developer Tools from Creative Cloud:

    1. Launch UXP Developer Tools and enable developer mode when prompted.
    2. Select File > Add Plugin.
    3. Navigate to the project directory and select the appropriate manifest.json:
      • Photoshop: uxp/ps/manifest.json
      • Premiere Pro: uxp/pr/manifest.json
      • InDesign: uxp/id/manifest.json
    4. Click Load.
    5. In your Adobe application, open the plugin panel and click Connect.

    Important: You must enable Developer Mode in the application settings and restart the app.

    Enable Developer Mode in Photoshop/Premiere Pro

    1. Launch Photoshop (2025/26.0 or greater) or Premiere Pro (2025/26.0 or greater).
    2. Go to Settings > Plugins and check "Enable Developer Mode".
    3. Restart the application.
  8. Requirements for adb-mcp

    main

    To use adb-mcp, you must meet the following requirements:

    • AI Client: An LLM with support for the MCP Protocol (tested with Claude Desktop on Mac & Windows, and OpenAI Agent SDK).
    • Python: Python 3 is required to run the MCP server.
    • Node.js: Required to run the proxy server between the MCP server and Photoshop.
    • Adobe UXP Developer Tool: Available via Creative Cloud; used to install and debug the UXP plugins.
    • Adobe Software:
      • Adobe Photoshop: Version 26.0 or greater.
      • Adobe Premiere: Premiere Beta (version 25.3 Build 46 or greater).
  9. Set Up the adb-proxy-socket Proxy Server

    main

    The proxy server must remain active for Claude to communicate with Adobe plugins. You can set it up using prebuilt executables or by running from source.

    1. Download the appropriate executable for your platform from the releases page.
    2. Unzip the executable.
    3. Run the executable from your terminal or double-click it.

    Running from Source

    1. Navigate to the adb-proxy-socket directory.
    2. Run node proxy.js.

    You should see a confirmation message indicating the server is running on a WebSocket URL (e.g., ws://localhost:3001).

    node proxy.js
  10. Automated Selection Commands in Photoshop

    main

    This module provides a set of commands for manipulating selections within Adobe Photoshop via the UXP API. Most commands require a layerId within the options object to target a specific layer. Many selection-based operations (like cutSelectionToClipboard, copySelectionToClipboard, deleteSelection, fillSelection, and invertSelection) require an active selection to be present in the document before execution, otherwise they will throw an error.

    Common error messages include:

    • ... : Could not find layerId : <id>
    • ... : Requires an active selection
  11. Troubleshoot Adobe MCP Connection Issues

    main

    If you encounter issues, check the following common failure points:

    Plugin won't install or connect

    • App State: Ensure the Adobe application is running before trying to load the plugin in UXP Developer Tools.
    • Proxy Server: Verify the adb-proxy-socket node server is running. If connected, you should see output like: User connected: [ID] registered for application: [app_name]
    • Debugging: In UXP Developer Tools, click the Debug button next to the loaded plugin to view errors.

    MCP won't run in Claude

    • If Claude reports the MCP is not working, you may need to edit your Claude configuration file to use an absolute path for the uv command.

    Font issues

    • The MCP server may omit some fonts to manage data size. By default, it lists the first 1000 fonts alphabetically. To use a specific font, ask the AI to use its exact Postscript name.

    AI Client Errors

    • If the AI fails, click the command/code box in the chat to view the specific error.
    • Check if the plugin is still connected in the Adobe app and if the proxy server is still running.
    • If response times are slow, try restarting the chat to clear the context window.