pedit — photo editing an agent can drive
pedit is an open-source layered image editor (a Photoshop / GIMP alternative): layers, groups, masks, clipping masks, blend modes, adjustment layers, clone stamp and healing, plus generative fill and expand, image-to-image, text-to-image, background removal and upscaling. Every operation is also an MCP tool. MIT licensed.
Use this skill when
- the user asks to remove or replace a background, retouch, recolor or crop a photo;
- they want something added, removed or extended in an image ("extend the sky", "remove the person");
- they need a thumbnail, cover or social image built from layers.
Setup (once)
uv tool install "pedit-mcp[ai]"
pedit doctor # says what is missing and how to fix it
Register the MCP server with your agent (stdio):
{ "mcpServers": { "pedit": { "command": "pedit-mcp" } } }
To let the user watch, start the editor with pedit ui (http://127.0.0.1:8770); the running
editor is itself an MCP server at http://127.0.0.1:8770/mcp/.
Generative features run locally (e.g. through a local ComfyUI) or with an API key the user provides. Never ask the user to paste keys into chat; they can set them in pedit's AI models panel or as environment variables.
How to work
- Open the user's image as a project; keep edits non-destructive (new layers, masks).
- After each step, check the result before the next one.
- Export only when the user confirms. The original file is never overwritten unless they ask.
By Mattia Cibin (Metiu) · source: https://github.com/metiutek/editorimage-ai
