Labsco
MCP SERVER

Photopea MCP Server

by attalla1

Edit images in Photopea by instruction: open or create a document, address layers by name, set type, run adjustments and filters, and export the flattened result to a path on disk.

Image Analysis, OCR & VisionVerified
Summary
A layered design file becomes something a model can operate on one addressed layer at a time.

The layer tree is what makes the rest work: because photopea_get_layers hands back names, indices and bounds, every subsequent edit is aimed rather than guessed at. Much of the surface is destructive by design — filters, adjustments, transforms and canvas resizes all rewrite pixels with photopea_undo as the only way back — and photopea_run_script runs arbitrary ExtendScript with full access to the open document.

What it is

An automation server for the Photopea image editor, 34 tools covering documents, layers, text, shapes, selections, adjustments, filters, export and raw scripting.

What you get
  • Documents created blank or opened from PSD, PNG, JPG, WebP and SVG, resized with resampling, closed with or without saving, and described back with dimensions, DPI, layer count and colour mode
  • photopea_get_layers returning the whole layer tree as JSON — name, type, index, visibility, opacity, blend mode, bounds, groups nested — which is where the name or index every other tool takes comes from
  • Layers added, deleted, duplicated, grouped and ungrouped, reordered to top, bottom or one step, moved by a pixel offset, and scaled, rotated or flipped
  • Text added as point text or a wrapping box with alignment, letter spacing and line height, restyled later, and custom fonts loaded from a TTF, OTF or WOFF2 URL
  • Vector rectangles and ellipses with fill and stroke, linear gradients, non-destructive solid fill layers, and images placed from a URL or a local path at a chosen size and position
  • Selections made as a rectangle, an ellipse or the whole canvas, then expanded, contracted, feathered or inverted, filled with a colour at a blend mode and opacity, and cleared
  • Adjustments and filters applied to the active layer's pixels, with undo and redo taking a step count
  • Export of the flattened document to a file path at a chosen format and quality, and photopea_run_script for ExtendScript against the Photopea DOM
Requirements

Nothing to sign in to. Sources come from a local path or a URL that the machine running the server can reach, and photopea_export_image writes to a path on that same machine.

Setup effort

One command — npx -y photopea-mcp-server