MCP server for AI-driven image editing with Photopea
The server has 19 well-defined tools with consistent naming, comprehensive parameter schemas, and detailed descriptions. Tool names follow verb_noun patterns (photopea_create_document, photopea_open_file, etc.). All tools have descriptions between 100-250 characters, addressing WHAT they do and WHEN to use them. Input schemas are complete with types and descriptions for all parameters. However, output schemas are not documented in the visible code, the descriptions mention what is returned (e.g., 'Returns JSON' for get_document_info) but no formal output schema is visible. Error handling is present (errorReporting=true) but recovery guidance is limited. Tool composition is excellent, tools chain naturally (create_document → place_image → export_image). Descriptions distinguish similar tools well (create_document vs open_file, apply_adjustment vs apply_filter). Parameter constraints are specific: enums for color modes, gradient types, filter types; hex patterns for colors; numeric ranges for opacity/quality. Risk annotations (WRITE, READ_ONLY, IRREVERSIBLE, DESTRUCTIVE, REVERSIBLE) are clear and help agents understand consequences. The primary weakness is lack of visible output schema documentation and limited error recovery guidance.
Apply a linear gradient fill to a layer, replacing its current pixel content. The target layer must already exist — use add_layer to create one first. Colors are distributed evenly across the gradient.
Apply a destructive image adjustment to the active layer's pixel data. Use select_layer to target a specific layer first. Modifies pixels directly — use undo to revert if needed.
Apply a destructive filter effect to the active layer's pixel data. Use select_layer to target a specific layer first. Modifies pixels directly — use undo to revert if needed.
Close the active document. Set save to true to save changes before closing. Unsaved changes are discarded if save is false. The next open document becomes active, if any.
Create a new blank document and make it the active document. This is typically the first step in a workflow. The document opens with a Background layer. Use open_file instead to edit an existing image.
Output schemas not documented. Tool descriptions mention return types (e.g., 'Returns JSON') but no formal output schema is visible in source. LLMs need explicit schema to know which fields are available for downstream tool chaining.
Limited error recovery guidance. Error responses indicate 'success: false' but descriptions lack actionable guidance on what to do next (e.g., 'If file not found, check the path and retry' or 'If Photopea not ready, call waitForReady explicitly').
photopea_run_script is overly permissive. Accepts arbitrary ExtendScript/JavaScript with full access to Photopea DOM. High risk for malicious or erroneous scripts. Should document constraints, provide examples, and validate script syntax.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 65 | 2026-07-28+ | v2 |
Export the active document to a file and save it to the local filesystem. The entire document is flattened and exported in the chosen format. Use create_document or open_file to set up the document before exporting.
Fill the current selection with a solid color. A selection must be active — use make_selection to create one first. This is destructive and modifies layer pixel data.
Get metadata about the active document including name, width, height, resolution (DPI), layer count, and color mode. Returns JSON. Use this to check document dimensions before positioning layers or making selections.
List available fonts in Photopea. Returns font PostScript names that can be used with add_text and edit_text.
Load a custom font from a URL (TTF, OTF, or WOFF2) into Photopea. The font becomes available for add_text and edit_text. Use list_fonts to find the PostScript name after loading.
Create a selection in the active document. Selections define which pixels are affected by subsequent fill, stroke, or filter operations. Use deselect to clear the selection.
Modify an existing selection by expanding, contracting, feathering, or inverting it. A selection must already be active — use make_selection to create one first.
Open an existing image file in Photopea as a new document. Supports PSD, PNG, JPG, WebP, SVG, and other common formats. The opened file becomes the active document. Use create_document instead to start with a blank canvas.
Place an image into the active document from a URL or local file path. Creates a new layer with the placed image as the active layer. Use width/height to resize while preserving aspect ratio, or x/y to position the layer.
Redo one or more previously undone actions in the active document. Only available after using undo — the redo history is cleared when new actions are performed.
Resize the active document canvas to new pixel dimensions, resampling all layer content to fit. This is a destructive operation — all layers are scaled proportionally. Use undo to revert if needed.
Execute arbitrary Photopea/ExtendScript JavaScript in the Photopea environment. Use this for advanced operations not covered by other tools. Has full access to the Photopea DOM (app, activeDocument, layers). Use with caution — scripts can modify or delete any document data.
Scale, rotate, or flip a layer in-place. Modifies the layer's pixel data destructively. Use get_layers to check current layer bounds before transforming, and undo to revert if needed.
Undo one or more recent actions in the active document. Each step reverses one operation from the history. Use after destructive operations (apply_filter, apply_adjustment, fill_selection) to revert changes.
apply_adjustment and apply_filter have loose 'settings' objects. Parameters are documented as 'key-value settings' but no strict schema validation. LLMs may pass invalid keys or ranges (e.g., brightness 999 instead of -100..100). Should use structured parameter objects or enum constraints.
Missing tools for common workflows. No text/label tools (add_text, edit_text, add_label) despite photopea_load_font existing. No layer management tools (add_layer, delete_layer, rename_layer, get_layers, select_layer, merge_layers). This forces agents into photopea_run_script fallback.