### Server Console Output Example Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Example log output showing client registration and command routing. ```text adb-mcp Command proxy server running on ws://localhost:3001 User connected: UeLeHJW9AAAAB Client UeLeHJW9AAAAB registered for application: photoshop Command from UeLeHJW9AAAAB for application photoshop: {...} Sending to 1 clients for photoshop Sent confirmation to client UeLeHJW9AAAAB User disconnected: UeLeHJW9AAAAB ``` -------------------------------- ### Start Proxy Server from Source Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Commands to launch the proxy server from the source directory. ```bash cd adb-proxy-socket node proxy.js ``` -------------------------------- ### Install MCP with UV Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Recommended installation command for MCP using the uv package manager with required dependencies. ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow ps-mcp.py ``` -------------------------------- ### Start Proxy Server from Binary Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Commands to execute the prebuilt proxy binary on different operating systems. ```bash ./adb-proxy-socket-macos-arm64 # macOS Apple Silicon ./adb-proxy-socket-win-x64.exe # Windows ``` -------------------------------- ### Expected Server Startup Output Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md The expected console output when the proxy server starts successfully. ```text adb-mcp Command proxy server running on ws://localhost:3001 ``` -------------------------------- ### Initialize MCP server environment Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Set the target application and proxy connection details before starting the server. ```python APPLICATION = "photoshop" # "photoshop", "premiere", "aftereffects", "illustrator", "indesign" PROXY_URL = 'http://localhost:3001' PROXY_TIMEOUT = 20 ``` -------------------------------- ### Install MCP for Adobe Applications Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Use the uv package manager to install the necessary dependencies and register the MCP server for specific Adobe applications. ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with numpy ps-mcp.py ``` ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow pr-mcp.py ``` ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow id-mcp.py ``` ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow ae-mcp.py ``` ```bash uv run mcp install --with fonttools --with python-socketio --with mcp --with requests --with websocket-client --with pillow ai-mcp.py ``` -------------------------------- ### Start the proxy server Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Execute the proxy server script to enable communication between the MCP server and the Adobe plugin. ```bash node adb-proxy-socket/proxy.js # Output: adb-mcp Command proxy server running on ws://localhost:3001 ``` -------------------------------- ### Create a Pixel Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Defines the function signature and provides an example for creating a new pixel layer. ```python def create_pixel_layer( layer_name: str, fill_neutral: bool, opacity: int = 100, blend_mode: str = "NORMAL" ) ``` ```python layer = create_pixel_layer( layer_name="Paint Layer", fill_neutral=False, opacity=100 ) ``` -------------------------------- ### Adobe Application Prompts Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Examples of natural language prompts for creating and manipulating content in Photoshop and Premiere. ```text Create a new Photoshop file with a blue background, that is 1080 width by 720 height at 300 dpi ``` ```text Create a new Photoshop file for an instagram post ``` ```text Create a double exposure image in Photoshop of a woman and a forest ``` ```text Generate an image of a forest, and then add a clipping mask to only show the center in a circle ``` ```text Make something cool with photoshop ``` ```text Add cross fade transitions between all of the clips on the timeline in Premiere ``` -------------------------------- ### Execute ExtendScript in After Effects Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Example of executing a script to retrieve active document properties from After Effects. ```python script = ''' var doc = app.activeDocument; return { name: doc.name, path: doc.fullName.fsName, layers: doc.layers.length }; ''' result = execute_extend_script(script) ``` -------------------------------- ### Create a Single-Line Text Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Defines the function signature and provides an example for creating a single-line text layer. ```python def create_single_line_text_layer( layer_name: str, text: str, font_size: int, postscript_font_name: str, opacity: int = 100, blend_mode: str = "NORMAL", text_color: dict = {"red": 255, "green": 255, "blue": 255}, position: dict = {"x": 100, "y": 100} ) ``` ```python text_layer = create_single_line_text_layer( layer_name="Title", text="Hello World", font_size=48, postscript_font_name="Helvetica-Bold", text_color={"red": 0, "green": 0, "blue": 0}, position={"x": 50, "y": 100} ) ``` -------------------------------- ### Create a Multi-Line Text Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Defines the function signature and provides an example for creating a multi-line text layer within specific bounds. ```python def create_multi_line_text_layer( layer_name: str, text: str, font_size: int, postscript_font_name: str, opacity: int = 100, blend_mode: str = "NORMAL", text_color: dict = {"red": 255, "green": 255, "blue": 255}, position: dict = {"x": 100, "y": 100}, bounds: dict = {"top": 0, "left": 0, "bottom": 250, "right": 300}, justification: str = "LEFT" ) ``` ```python text_layer = create_multi_line_text_layer( layer_name="Description", text="This is a longer text\nthat spans multiple lines", font_size=24, postscript_font_name="Helvetica", bounds={"top": 0, "left": 0, "bottom": 400, "right": 800}, justification="CENTER" ) ``` -------------------------------- ### Create US Letter document Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Example usage of create_document to generate a US Letter sized document with specific margins and columns. ```python # US Letter size with 1-inch margins and 2 columns result = create_document( width=612, height=792, pages=10, pages_facing=False, columns={"count": 2, "gutter": 18}, margins={"top": 72, "bottom": 72, "left": 72, "right": 72} ) ``` -------------------------------- ### Get Active Document Info via Photoshop MCP Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Retrieves metadata and properties of the currently active document. ```python info = get_document_info() print(f"Document size: {info['width']}x{info['height']}") ``` -------------------------------- ### Edit a Text Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Defines the function signature and provides an example for updating properties of an existing text layer. ```python def edit_text_layer( layer_id: int, text: str = None, font_size: int = None, postscript_font_name: str = None, text_color: dict = None ) ``` ```python edit_text_layer( layer_id=42, text="Updated Text", font_size=32 ) ``` -------------------------------- ### set_clip_start_end_times Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Sets the start and end times of a clip in the timeline. ```APIDOC ## set_clip_start_end_times ### Description Sets the start and end times of a clip in the timeline. ### Parameters - **sequence_id** (str) - Required - ID of the sequence - **track_index** (int) - Required - Track index (0-based) - **track_item_index** (int) - Required - Clip index within track (0-based) - **track_type** (str) - Required - Track type: "VIDEO" or "AUDIO" - **start_time_ticks** (int) - Required - Start time in ticks - **end_time_ticks** (int) - Required - End time in ticks ### Response - Returns a dict with operation status ### Example ```python set_clip_start_end_times( sequence_id="seq_001", track_index=0, track_item_index=0, track_type="VIDEO", start_time_ticks=0, end_time_ticks=1000000000 ) ``` ``` -------------------------------- ### Initialize FastMCP Server Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Sets up the FastMCP instance for the Adobe Premiere server on stdio. ```python mcp_name = "Adobe Premiere MCP Server" mcp = FastMCP(mcp_name, log_level="ERROR") ``` -------------------------------- ### Initialize FastMCP Server Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Sets up the FastMCP instance with a specific name and log level for the Photoshop MCP server. ```python mcp_name = "Adobe Photoshop MCP Server" mcp = FastMCP(mcp_name, log_level="ERROR") ``` -------------------------------- ### Get layer bounds Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Retrieves the pixel coordinates for the boundaries of a specific layer. ```python def get_layer_bounds(layer_id: int) ``` ```python bounds = get_layer_bounds(layer_id=42) print(f"Layer dimensions: {bounds['right'] - bounds['left']}x{bounds['bottom'] - bounds['top']}") ``` -------------------------------- ### Create a New Project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Initializes and saves a new project file at the specified directory path. ```python result = create_project( directory_path="/path/to/projects", project_name="MyProject" ) ``` -------------------------------- ### Create Premiere Project and Sequence Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Shows the process of creating a project, importing media, generating a sequence, and applying transitions. ```python # Create project project = create_project( directory_path="/path/to/projects", project_name="MyProject" ) # Import media import_media(["/path/to/video.mp4", "/path/to/audio.wav"]) # Create sequence sequence = create_sequence_from_media( item_names=["video.mp4", "audio.wav"], sequence_name="Main Sequence" ) # Add transition append_video_transition( sequence_id=sequence.id, video_track_index=0, track_item_index=0, transition_name="Cross Dissolve", duration=1.0 ) # Export export_sequence( sequence_id=sequence.id, output_path="/path/to/output.mp4", preset_path="/path/to/preset.epr" ) ``` -------------------------------- ### Open an Existing Project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Opens a Premiere Pro project file from the provided absolute path. ```python open_project(file_path="/path/to/project.prproj") ``` -------------------------------- ### Initialize Express and Socket.IO Server Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Sets up the HTTP server with Socket.IO, configuring WebSocket transports and a 50MB buffer limit for large data payloads. ```javascript const express = require("express"); const http = require("http"); const { Server } = require("socket.io"); const app = express(); const server = http.createServer(app); const io = new Server(server, { transports: ["websocket", "polling"], maxHttpBufferSize: 50 * 1024 * 1024, }); const PORT = 3001; const applicationClients = {}; ``` -------------------------------- ### Get layer image Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Returns a JPEG of the specified layer's content as an MCP Image object. ```python layer_img = get_layer_image(layer_id=42) ``` -------------------------------- ### Get document image Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Returns a JPEG of the current visible Photoshop document as an MCP Image object. ```python image = get_document_image() ``` -------------------------------- ### Configure MCP Server Initialization Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Sets up the socket client connection parameters required for all MCP servers to communicate with the Node.js proxy. ```python APPLICATION = "" # photoshop, premiere, aftereffects, illustrator, indesign PROXY_URL = 'http://localhost:3001' PROXY_TIMEOUT = 20 # seconds socket_client.configure( app=APPLICATION, url=PROXY_URL, timeout=PROXY_TIMEOUT ) ``` -------------------------------- ### Save Project As Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Saves the current project to a new specified file path. ```python save_project_as(file_path="/path/to/new_project.prproj") ``` -------------------------------- ### Set clip start and end times Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Adjusts the duration and position of a specific clip using tick-based timing. ```python def set_clip_start_end_times( sequence_id: str, track_index: int, track_item_index: int, track_type: str, start_time_ticks: int, end_time_ticks: int ) ``` ```python set_clip_start_end_times( sequence_id="seq_001", track_index=0, track_item_index=0, track_type="VIDEO", start_time_ticks=0, end_time_ticks=1000000000 ) ``` -------------------------------- ### Create a bin in the active project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Creates a new folder in the root of the active project. Requires the bin name as a string. ```python create_bin_in_active_project(bin_name="Assets") ``` -------------------------------- ### Create a sequence from media Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Creates a new sequence using the provided list of project items. If no active sequence exists, the new sequence becomes active. ```python result = create_sequence_from_media( item_names=["intro.mp4", "main.mp4", "outro.mp4"], sequence_name="Final Edit" ) ``` -------------------------------- ### configure Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Configures the socket client with proxy connection parameters. ```APIDOC ## configure ### Description Configures the socket client with proxy connection parameters. ### Signature `configure(app=None, url=None, timeout=None)` ### Parameters - **app** (str) - Application identifier (e.g., "photoshop") - **url** (str) - Proxy server URL (e.g., "http://localhost:3001") - **timeout** (int) - Communication timeout in seconds ``` -------------------------------- ### Create and Export Photoshop Document Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Demonstrates the workflow for initializing a document, adding layers, and exporting the final result. ```python # Create document doc = create_document( document_name="Instagram Post", width=1080, height=720, resolution=300, fill_color={"red": 255, "green": 255, "blue": 255} ) # Get layers layers = get_layers() # Create text layer text = create_single_line_text_layer( layer_name="Title", text="Hello World", font_size=48, postscript_font_name="Helvetica-Bold" ) # Export as PNG save_document_as( file_path="/path/to/output.png", file_type="PNG" ) ``` -------------------------------- ### open_project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Opens an existing Premiere Pro project file from a specified path. ```APIDOC ## open_project ### Description Opens the Premiere Pro project at the specified path. ### Parameters - **file_path** (str) - Required - Absolute path including filename. ### Response - **Returns** (dict) - Operation status. ``` -------------------------------- ### create_project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Creates a new Adobe Premiere Pro project file at the specified location and opens it. ```APIDOC ## create_project ### Description Creates a new Adobe Premiere Pro project file, saves it to the specified location, and opens it in Premiere. ### Parameters - **directory_path** (str) - Required - Full path to directory where project will be saved. - **project_name** (str) - Required - Project name (.prproj extension added automatically). ### Response - **Returns** (dict) - Created project information. ``` -------------------------------- ### Display Project File Structure Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/MANIFEST.md Visual representation of the documentation directory layout. ```text output/ ├── README.md (Navigation hub) ├── photoshop-api.md (Photoshop: 80+ tools) ├── premiere-api.md (Premiere: 35+ tools) ├── other-mcp-servers.md (AE, AI, ID + shared modules) ├── command-proxy-architecture.md (Node.js proxy + messaging) ├── configuration-and-types.md (Config, types, enums) └── MANIFEST.md (This file) ``` -------------------------------- ### Create CEP Extension Junctions on Windows Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Use these commands in an Administrator Command Prompt to create directory junctions for AfterEffects or Illustrator plugins on Windows. ```cmd mklink /D "C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions\com.mikechambers.ae" "C:\Users\USERNAME\src\adb-mcp\cep\com.mikechambers.ae" ``` ```cmd mklink /D "C:\Users\USERNAME\AppData\Roaming\Adobe\CEP\extensions\com.mikechambers.ai" "C:\Users\USERNAME\src\adb-mcp\cep\com.mikechambers.ai" ``` -------------------------------- ### Verify Proxy Server Connection Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Check the console output to confirm the command proxy server is active and a client has successfully registered. ```text adb-mcp Command proxy server running on ws://localhost:3001 User connected: Ud6L4CjMWGAeofYAAAAB Client Ud6L4CjMWGAeofYAAAAB registered for application: photoshop ``` -------------------------------- ### Define Adjustment Layer Parameters Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Configuration dictionaries for Brightness/Contrast, Color Balance, and Vibrance adjustments. ```python brightness_contrast = { "brightness": 20, # int, -100 to 100 "contrast": 15 # int, -100 to 100 } ``` ```python color_balance = { "cyan_red": 20, # int, -100 (cyan) to 100 (red) "magenta_green": -10, # int, -100 (magenta) to 100 (green) "yellow_blue": 5, # int, -100 (yellow) to 100 (blue) "preserve_luminosity": True # bool } ``` ```python vibrance = { "vibrance": 30, # int, -100 to 100 "saturation": 20 # int, -100 to 100 } ``` -------------------------------- ### create_bin_in_active_project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Creates a new bin (folder) in the root of the active project. ```APIDOC ## create_bin_in_active_project ### Description Creates a new bin (folder) in the root of the active project. ### Parameters - **bin_name** (str) - Required - Name of the bin to be created ### Returns dict with bin creation status ### Example ```python create_bin_in_active_project(bin_name="Assets") ``` ``` -------------------------------- ### Retrieve Project Information Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Fetches metadata and sequence details for the currently active Premiere Pro project. ```python info = get_project_info() ``` -------------------------------- ### Client Logging Implementation Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Python logging implementation for tracking socket client activity. ```python # In mcp/socket_client.py logger.log(f"Connected to server with session ID: {sio.sid}") logger.log(f"Sending message to {application}: {command}") logger.log(f"Received response: {data}") ``` -------------------------------- ### Configure Python Client Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Configures the client connection parameters including target application, proxy URL, and timeout. ```python socket_client.configure( app=APPLICATION, # "photoshop", "premiere", etc. url=PROXY_URL, # "http://localhost:3001" timeout=PROXY_TIMEOUT # 20 seconds ) ``` -------------------------------- ### Define Premiere Project Info Response Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Placeholder structure for Premiere project metadata. ```python project = { # Project metadata # Sequences array # Media library contents } ``` -------------------------------- ### Define Layer Style Parameters Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Configuration dictionaries for applying Drop Shadow, Stroke, and Gradient layer styles. ```python drop_shadow = { "layer_id": 42, # int "angle": 120, # int, 0-360 degrees "distance": 10, # int, pixels "spread": 0, # int, percentage "size": 5, # int, blur radius in pixels "opacity": 75, # int, 0-100 "color": {...} # RGB dict, default black } ``` ```python stroke = { "layer_id": 42, # int "stroke_size": 3, # int, pixels "stroke_color": {...}, # RGB dict "opacity": 100, # int, 0-100 "position": "OUTSIDE" # str: INSIDE, CENTER, OUTSIDE } ``` ```python gradient = { "layer_id": 42, # int "angle": 90, # int, -180 to 180 degrees "type": "LINEAR", # str: LINEAR or RADIAL "color_stops": [], # list of color stop dicts "opacity_stops": [] # list of opacity stop dicts } ``` -------------------------------- ### Query Available APIs Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Use this prompt to discover the available functions and APIs for Adobe applications. ```text Can you list what apis / functions are available for working with Photoshop / Premiere? ``` -------------------------------- ### Configure Proxy Server Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Sets the listening port, buffer size, and transport protocols for the server instance. ```javascript const PORT = 3001; const maxHttpBufferSize = 50 * 1024 * 1024; // 50 MB const io = new Server(server, { transports: ["websocket", "polling"], maxHttpBufferSize: maxHttpBufferSize, }); ``` -------------------------------- ### open_photoshop_file(file_path) Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Opens the specified Photoshop-compatible file within Photoshop. ```APIDOC ## open_photoshop_file(file_path) ### Description Opens the specified Photoshop-compatible file within Photoshop. ### Parameters - **file_path** (str) - Required - Absolute path including filename and extension ### Returns - dict: Operation status ### Raises - RuntimeError: If file doesn't exist or is unsupported ### Example ```python open_photoshop_file("/path/to/design.psd") ``` ``` -------------------------------- ### place_image(layer_id: int, image_path: str) Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Places an image at the specified path onto an existing pixel layer, centering and scaling it to fill the layer while maintaining aspect ratio. ```APIDOC ## place_image ### Description Places the image at the specified path on the existing pixel layer. The image will be placed on the center of the layer and will fill the layer without changing aspect ratio. ### Parameters - **layer_id** (int) - Required - ID of the layer where image will be placed - **image_path** (str) - Required - File path to the image to place ### Returns - dict: Operation status ### Example ```python place_image(layer_id=42, image_path="/path/to/image.jpg") ``` ``` -------------------------------- ### create_document(document_name, width, height, resolution, fill_color, color_mode) Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Creates a new Photoshop Document with specified dimensions and properties. ```APIDOC ## create_document ### Description Creates a new Photoshop Document. New document will contain a layer named "Background" that is filled with the specified fill color. ### Parameters - **document_name** (str) - Required - Name for the new document - **width** (int) - Required - Width in pixels - **height** (int) - Required - Height in pixels - **resolution** (int) - Required - Resolution (Pixels per Inch) - **fill_color** (dict) - Optional - Background color fill dict with "red", "green", "blue" keys (0-255) - **color_mode** (str) - Optional - Color mode (default: "RGB") ### Response - **Returns** (dict) - Created document information ``` -------------------------------- ### Import media files into Premiere Pro Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Use this function to import a list of absolute file paths into the active project. ```python import_media([ "/path/to/video.mp4", "/path/to/audio.wav", "/path/to/image.png" ]) ``` -------------------------------- ### Set Python Path Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Environment variable configuration required if the MCP server fails to import modules. ```bash export PYTHONPATH=/path/to/adb-mcp/mcp ``` -------------------------------- ### createCommand Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Creates a command object formatted for transmission to Adobe applications. ```APIDOC ## createCommand ### Description Creates a command object for sending to Adobe applications via the proxy. ### Signature `def createCommand(action: str, options: dict) -> dict` ### Parameters - **action** (str) - Command action name (e.g., "createDocument", "getDocuments") - **options** (dict) - Parameters for the command ### Returns - **dict** - A dictionary containing the application ID, action, and options. ``` -------------------------------- ### save_project_as Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Saves the current Premiere Pro project to a new specified location. ```APIDOC ## save_project_as ### Description Saves the current Premiere Pro project to the specified location. ### Parameters - **file_path** (str) - Required - Absolute path including filename. ### Response - **Returns** (dict) - Operation status. ``` -------------------------------- ### Open an Illustrator file Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Opens a specific .ai file using its absolute path. ```python result = open_file(path="/Users/username/Documents/my_artwork.ai") ``` -------------------------------- ### create_sequence_from_media Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Creates a new sequence from the specified project items, placing clips on the timeline in the order provided. ```APIDOC ## create_sequence_from_media ### Description Creates a new sequence from the specified project items, placing clips on the timeline in the order provided. If no active sequence exists, the newly created sequence will be set as active. ### Parameters - **item_names** (list[str]) - Required - List of project item names in desired order - **sequence_name** (str) - Optional - Name to give the new sequence (Default: "default") ### Returns dict with new sequence information ### Example ```python result = create_sequence_from_media( item_names=["intro.mp4", "main.mp4", "outro.mp4"], sequence_name="Final Edit" ) ``` ``` -------------------------------- ### Create New Document via Photoshop MCP Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Creates a new Photoshop document with specified dimensions, resolution, and background color. ```python doc = create_document( document_name="Instagram Post", width=1080, height=720, resolution=300, fill_color={"red": 255, "green": 255, "blue": 255} ) ``` -------------------------------- ### sendCommand Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Dispatches a command to the Adobe application and awaits the response. ```APIDOC ## sendCommand ### Description Sends a command to the Adobe application through the socket client and waits for a response. ### Signature `def sendCommand(command: dict) -> dict` ### Parameters - **command** (dict) - Command dictionary (typically created by createCommand) ### Returns - **dict** - The response received from the Adobe application. ### Errors - **RuntimeError** - Raised if the command fails or times out. ``` -------------------------------- ### Define Common Premiere Transitions Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md List of common video transitions available in Premiere. ```python COMMON_TRANSITIONS = [ "Cross Dissolve", "Dip to Black", "Dip to White", "Fade", "Iris Round", "Iris Square", "Push", "Slide", "Squeeze", "Stretch", "Wipe" ] ``` -------------------------------- ### Configure MCP Server Settings Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Defines the required variables for MCP server operation, including application ID, proxy URL, timeout, and font limits. ```python APPLICATION = "" # Application identifier PROXY_URL = 'http://localhost:3001' # Proxy server location PROXY_TIMEOUT = 20 # Command timeout in seconds FONT_LIMIT = 1000 # (Photoshop only) Max fonts to return ``` -------------------------------- ### Create CEP Extension Symlinks on macOS Source: https://github.com/mikechambers/adb-mcp/blob/main/README.md Use these commands to link AfterEffects or Illustrator plugins into the Adobe CEP extensions directory on macOS. ```bash cd /Users/USERNAME/Library/Application Support/Adobe/CEP/extensions ln -s /Users/USERNAME/src/adb-mcp/cep/com.mikechambers.ae com.mikechambers.ae ``` ```bash cd /Users/USERNAME/Library/Application Support/Adobe/CEP/extensions ln -s /Users/USERNAME/src/adb-mcp/cep/com.mikechambers.ai com.mikechambers.ai ``` -------------------------------- ### Broadcast command packets with sendToApplication Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Dispatches a command packet to all registered clients for a specific application. Returns true if clients were found and notified, otherwise returns false. ```javascript function sendToApplication(packet) { let application = packet.application; if (applicationClients[application]) { console.log( `Sending to ${applicationClients[application].size} clients for ${application}` ); let senderId = packet.senderId; applicationClients[application].forEach((clientId) => { io.to(clientId).emit("command_packet", packet); }); return true; } console.log(`No clients registered for application: ${application}`); return false; } ``` -------------------------------- ### open_file Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Opens an Illustrator (.ai) file in Adobe Illustrator. ```APIDOC ## open_file ### Description Opens an Illustrator (.ai) file in Adobe Illustrator. ### Parameters - **path** (str) - Required - Absolute file path to .ai file ### Response - **success** (bool) - Whether file opened successfully - **error** (str) - Error message if opening failed ``` -------------------------------- ### Handle Client Connection and Registration Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Manages socket connections and registers clients to specific applications, storing their IDs in a tracking set. ```javascript io.on("connection", (socket) => { console.log(`User connected: ${socket.id}`); socket.on("register", ({ application }) => { socket.data.application = application; if (!applicationClients[application]) { applicationClients[application] = new Set(); } applicationClients[application].add(socket.id); socket.emit("registration_response", { type: "registration", status: "success", message: `Registered for ${application}`, }); }); socket.on("disconnect", () => { // Clean up client from all application registrations }); }); ``` -------------------------------- ### Define Text Layer Properties Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Standard properties for creating text layers. ```python text_layer = { "layer_name": "Title", # str, layer name "text": "Hello World", # str, text content "font_size": 48, # int, font size in points "postscript_font_name": "Helvetica-Bold", # str, PostScript font name "opacity": 100, # int, 0-100 "blend_mode": "NORMAL", # str, blend mode name "text_color": { # RGB color dict "red": 0, "green": 0, "blue": 0 }, "position": { # Position dict "x": 100, "y": 100 } } ``` -------------------------------- ### Open Photoshop file Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Opens a file from the specified absolute path. Raises a RuntimeError if the file is missing or unsupported. ```python open_photoshop_file("/path/to/design.psd") ``` -------------------------------- ### Emit Response from Plugin Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Sends the result of a command execution back to the proxy server. ```javascript socket.emit("command_packet_response", { packet: { senderId: "UeLeHJW9AAAAB", status: "SUCCESS", response: { documentId: 42, name: "Doc1", width: 1080, height: 720 } } }); ``` -------------------------------- ### get_project_info Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Retrieves information about the currently active project in Premiere Pro, including sequences and metadata. ```APIDOC ## get_project_info ### Description Returns information on the currently active project in Premiere Pro. ### Parameters None ### Response - **Returns** (dict) - Project information including sequences and metadata. ``` -------------------------------- ### Define Application Registration Map Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Represents the server-side structure for tracking active socket connections per application. ```javascript const applicationClients = { "photoshop": Set(["socket_id_1", "socket_id_2"]), "premiere": Set(["socket_id_3"]), "aftereffects": Set([]), "illustrator": Set(["socket_id_4"]), "indesign": Set(["socket_id_5"]) }; ``` -------------------------------- ### Move project items to a bin Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Moves a list of project items into an existing bin. Raises a RuntimeError if the bin does not exist or items are not found. ```python move_project_items_to_bin( item_names=["video1.mp4", "audio1.wav"], bin_name="Media Assets" ) ``` -------------------------------- ### import_media Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Imports a list of media files into the active Premiere Pro project. ```APIDOC ## import_media(file_paths: list) ### Description Imports media files into the active Premiere Pro project. ### Parameters - **file_paths** (list) - Required - List of absolute file paths to import ### Returns dict with import status and imported item information ### Example ```python import_media([ "/path/to/video.mp4", "/path/to/audio.wav", "/path/to/image.png" ]) ``` ``` -------------------------------- ### Define Export Layer Info Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Specifies layer ID and absolute file path for export. ```python export_info = { "layerId": 42, # int, layer ID "filePath": "/path/to/layer.png" # str, absolute output path } ``` -------------------------------- ### Export document as PNG Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Exports the active document to a PNG file with configurable scaling, transparency, and matte options. ```python # Basic PNG export result = export_png("/Users/username/Desktop/my_artwork.png") # High-resolution export with transparency result = export_png( path="/Users/username/Desktop/high_res.png", horizontal_scale=300, vertical_scale=300, transparency=True ) # PNG8 export with red matte background result = export_png( path="/Users/username/Desktop/small_file.png", export_type="PNG8", matte=True, matte_color={"red": 255, "green": 0, "blue": 0} ) ``` -------------------------------- ### create_single_line_text_layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Creates a new single-line text layer. ```APIDOC ## create_single_line_text_layer ### Description Creates a new single-line text layer. ### Parameters - **layer_name** (str) - Required - Name of the layer - **text** (str) - Required - Text content - **font_size** (int) - Required - Font size in points - **postscript_font_name** (str) - Required - PostScript font name - **opacity** (int) - Optional - Opacity (0-100), default 100 - **blend_mode** (str) - Optional - Blend mode, default "NORMAL" - **text_color** (dict) - Optional - Color {"red": 0-255, "green": 0-255, "blue": 0-255}, default White - **position** (dict) - Optional - Position {"x": int, "y": int}, default {"x": 100, "y": 100} ### Request Example create_single_line_text_layer(layer_name="Title", text="Hello World", font_size=48, postscript_font_name="Helvetica-Bold", text_color={"red": 0, "green": 0, "blue": 0}, position={"x": 50, "y": 100}) ### Response - **Returns** (dict) - Created text layer information ``` -------------------------------- ### Configure font limits Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Set the maximum number of fonts returned to prevent exceeding AI context limits. ```python FONT_LIMIT = 1000 ``` -------------------------------- ### Structure of Command Object Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md The expected dictionary structure returned by the createCommand function. ```python { "application": , "action": , "options": } ``` -------------------------------- ### Add Brightness/Contrast Adjustment Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Applies a brightness and contrast adjustment layer to the document. ```python def add_brightness_contrast_adjustment_layer( brightness: int, contrast: int ) ``` ```python result = add_brightness_contrast_adjustment_layer(brightness=20, contrast=15) ``` -------------------------------- ### Place image on layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Places an image file onto a specific pixel layer, centering it while maintaining the aspect ratio. ```python def place_image(layer_id: int, image_path: str) ``` ```python place_image(layer_id=42, image_path="/path/to/image.jpg") ``` -------------------------------- ### Add Black and White Adjustment Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Applies a black and white adjustment layer with no additional parameters. ```python def add_black_and_white_adjustment_layer() ``` ```python result = add_black_and_white_adjustment_layer() ``` -------------------------------- ### execute_extend_script Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Executes arbitrary ExtendScript code in Illustrator. ```APIDOC ## execute_extend_script ### Description Executes arbitrary ExtendScript code in Illustrator and returns the result. The script must use `return` to send data back. ### Parameters - **script_string** (str) - Required - ExtendScript code to execute ### Response - **Returns** (any) - Result from script or error object containing error message and line number. ``` -------------------------------- ### create_multi_line_text_layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Creates a new multi-line text layer within specified bounds. ```APIDOC ## create_multi_line_text_layer ### Description Creates a new multi-line text layer within the specified bounds. ### Parameters - **layer_name** (str) - Required - Name of the layer - **text** (str) - Required - Text content - **font_size** (int) - Required - Font size in points - **postscript_font_name** (str) - Required - PostScript font name - **opacity** (int) - Optional - Opacity (0-100), default 100 - **blend_mode** (str) - Optional - Blend mode, default "NORMAL" - **text_color** (dict) - Optional - Color dict - **position** (dict) - Optional - Position dict - **bounds** (dict) - Optional - Text bounding box - **justification** (str) - Optional - Text justification, default "LEFT" ### Request Example create_multi_line_text_layer(layer_name="Description", text="This is a longer text\nthat spans multiple lines", font_size=24, postscript_font_name="Helvetica", bounds={"top": 0, "left": 0, "bottom": 400, "right": 800}, justification="CENTER") ### Response - **Returns** (dict) - Created text layer information ``` -------------------------------- ### Process Command Packets Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Listens for command packets from clients and routes them to the appropriate application handler. ```javascript socket.on("command_packet", ({ application, command }) => { console.log( `Command from ${socket.id} for application ${application}:`, command ); let packet = { senderId: socket.id, application: application, command: command, }; sendToApplication(packet); }); ``` -------------------------------- ### Define Media Sequence Item Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Used for creating new sequences from project items. ```python sequence_item = { "item_name": "video.mp4", # str, project item name "sequence_name": "Sequence 1" # str, new sequence name } ``` -------------------------------- ### Add media to a sequence timeline Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Adds a project item to a specific track in a sequence at a given time. ```python add_media_to_sequence( sequence_id="seq_001", item_name="video.mp4", video_track_index=0, audio_track_index=0, insertion_time_ticks=0 ) ``` -------------------------------- ### Define an MCP tool Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/README.md Use the @mcp.tool() decorator to expose functions as tools for AI assistants. ```python @mcp.tool() def my_function(param: str): """Tool description for AI.""" # Implementation return result ``` -------------------------------- ### Emit Command Packet from MCP Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Initiates a command request from the MCP client to the proxy server. ```python // In mcp/socket_client.py sio.emit('command_packet', { 'type': "command", 'application': "photoshop", 'command': { "application": "photoshop", "action": "createDocument", "options": { "name": "Doc1", "width": 1080, "height": 720 } } }) ``` -------------------------------- ### Append Video Transition Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Appends a specified video transition to a clip on a given track. Requires valid sequence and track indices. ```python def append_video_transition( sequence_id: str, video_track_index: int, track_item_index: int, transition_name: str, duration: float = 1.0, clip_alignment: float = 0.5 ) ``` ```python append_video_transition( sequence_id="seq_001", video_track_index=0, track_item_index=0, transition_name="Cross Dissolve", duration=1.0, clip_alignment=0.5 ) ``` -------------------------------- ### execute_extend_script Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/other-mcp-servers.md Executes arbitrary ExtendScript code in After Effects and returns the result. The script must use return to send data back; results are automatically JSON stringified. ```APIDOC ## execute_extend_script ### Description Executes arbitrary ExtendScript code in After Effects and returns the result. The script must use return to send data back; results are automatically JSON stringified. ### Method Function Call ### Parameters - **script_string** (str) - Required - ExtendScript code to execute ### Returns - **result** (any) - The result from the script, or a dict containing an error object with 'error' (str) and 'line' (str) fields. ### Example ```python script = ''' var doc = app.activeDocument; return { name: doc.name, path: doc.fullName.fsName, layers: doc.layers.length }; ''' result = execute_extend_script(script) ``` ``` -------------------------------- ### Handle Response in MCP Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Receives the final command response on the MCP client side. ```python @sio.event def packet_response(data): logger.log(f"Received response: {data}") response_queue.put(data) sio.disconnect() ``` -------------------------------- ### Save Active Project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Saves the currently active project in Premiere Pro. ```python save_project() ``` -------------------------------- ### get_documents() Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Returns information on the documents currently open in Photoshop. ```APIDOC ## get_documents ### Description Returns information on the documents currently open in Photoshop. ### Response - **Returns** (dict) - List of open documents with their properties ``` -------------------------------- ### create_pixel_layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Creates a new pixel layer with specified properties. ```APIDOC ## create_pixel_layer ### Description Creates a new pixel layer. ### Parameters - **layer_name** (str) - Required - Name of the new layer - **fill_neutral** (bool) - Required - Fill with neutral color for blend mode - **opacity** (int) - Optional - Opacity (0-100), default 100 - **blend_mode** (str) - Optional - Blend mode, default "NORMAL" ### Request Example create_pixel_layer(layer_name="Paint Layer", fill_neutral=False, opacity=100) ### Response - **Returns** (dict) - Created layer information ``` -------------------------------- ### Process Command in Adobe Plugin Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/command-proxy-architecture.md Listens for command packets within the Adobe plugin environment and returns a response. ```javascript // In uxp/ps/socket.io.js socket.on("command_packet", async (packet) => { try { const response = await parseAndRouteCommand(packet.command); socket.emit("command_packet_response", { senderId: packet.senderId, status: "SUCCESS", response: response }); } catch (error) { socket.emit("command_packet_response", { senderId: packet.senderId, status: "FAILURE", message: error.message }); } }); ``` -------------------------------- ### Define Multi-line Text Layer Properties Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Extends standard text layer properties with bounds and justification. ```python multiline_text_layer = { # ... (all properties from text_layer above) "bounds": { # Text bounding box "top": 0, "left": 0, "bottom": 250, "right": 300 }, "justification": "LEFT" # str, text alignment: LEFT, CENTER, RIGHT } ``` -------------------------------- ### Define Gradient Opacity Stop Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Configures opacity stops for gradient layer styles. ```python opacity_stop = { "location": 0, # int, 0-100, position along gradient "opacity": 100, # int, 0-100, opacity percentage "midpoint": 50 # int, 0-100, transition bias } ``` -------------------------------- ### Add Vibrance Adjustment Layer Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/photoshop-api.md Applies a vibrance and saturation adjustment layer. ```python def add_vibrance_adjustment_layer(vibrance: int, saturation: int) ``` ```python result = add_vibrance_adjustment_layer(vibrance=30, saturation=20) ``` -------------------------------- ### move_project_items_to_bin Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Moves specified project items to an existing bin/folder in the project. ```APIDOC ## move_project_items_to_bin ### Description Moves specified project items to an existing bin/folder in the project. ### Parameters - **item_names** (list[str]) - Required - List of exact project item names to move - **bin_name** (str) - Required - Name of the existing bin (must already exist) ### Returns dict with operation status ### Raises RuntimeError if bin doesn't exist or items not found ### Example ```python move_project_items_to_bin( item_names=["video1.mp4", "audio1.wav"], bin_name="Media Assets" ) ``` ``` -------------------------------- ### Define InDesign Columns Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/configuration-and-types.md Configures column layout including count and gutter spacing. ```python columns = { "count": 2, # int, number of columns per page "gutter": 18 # int, space between columns in points } ``` -------------------------------- ### save_project Source: https://github.com/mikechambers/adb-mcp/blob/main/_autodocs/premiere-api.md Saves the currently active project in Premiere Pro. ```APIDOC ## save_project ### Description Saves the active project in Premiere Pro. ### Parameters None ### Response - **Returns** (dict) - Operation status. ```