Execute custom JavaScript in Photopea to automate advanced image editing tasks beyond standard tools. Access full Photopea DOM for direct manipulation of documents, layers, and more.
Open an existing image file in Photopea for editing. Supports PSD, PNG, JPG, WebP, SVG, and other common formats. The opened file becomes the active document.
Load custom fonts from a URL into Photopea to use in text layers. Supports TTF, OTF, and WOFF2. After loading, use list_fonts to get the font name for add_text or edit_text.
Retrieve available font PostScript names in Photopea for use with add_text and edit_text commands. Filter fonts by name using an optional search string.
Retrieve active document metadata including name, width, height, resolution (DPI), layer count, and color mode. Use to verify document dimensions before positioning layers or making selections.
Remove the current selection in your Photopea document to clear marching ants after completing selection-based operations like fills or adjustments. Leaves pixel data unchanged.
An MCP server that provides headless, read/write access to Photopea for image editing, including layers, text, filters, and document operations, enabling agents to edit images programmatically.
Enables AI agents to perform advanced image editing and graphic design through Photopea, a browser-based Photoshop alternative. Provides 34 tools for document management, layer operations, filters, adjustments, and exports via a WebSocket bridge to the browser.
Add a non-destructive solid color fill layer covering the entire canvas. This adjustment-style layer can be toggled, recolored, or deleted without affecting other layers. Adjust its opacity or blend mode using set_layer_properties.
Retrieve the complete layer hierarchy of the active document as JSON, including layer names, types, and indices for use in subsequent editing operations.
Start a new design project by creating a blank document with custom width, height, resolution, color mode, and background fill. Use this as the first step for image editing or graphic design workflows.
Add a new empty layer to the active document, making it active. Use this before drawing operations such as fill selection or add gradient to isolate edits on a separate layer.
Update layer properties such as opacity, blend mode, visibility, name, or locked state. Only specified properties are changed; others remain unchanged. First inspect current values with get_layers, then modify only what you need.
Move a layer by relative x/y offset in pixels. Specify target layer by name or index, and provide horizontal (positive right) and vertical (positive down) offsets to reposition from current location.
Group multiple layers into a layer folder by specifying layer names. Use with get_layers to find names, and ungroup_layers to reverse. Organize your layers panel efficiently.
Add a text layer to the active document at a given position. Configure font, size, color, alignment, bold, italic, letter spacing, line height. Specify paragraphBounds to create a text box with word wrapping.
Applies a solid color fill to the active selection on the current layer. Requires an existing selection — create one with make_selection. Supports custom hex color, opacity, and blend mode. Modifies pixel data directly.
Close the active Photopea document, optionally saving changes before closing. Discard unsaved changes when save is false; the next open document becomes active.