gimp-agent-mcp
This server connects MCP clients to GIMP 3 to inspect, edit, measure, automate, and export images in GUI or headless mode.
Check GIMP/bridge status, launch GIMP in GUI or headless mode, and shut it down.
List, open, create, inspect, and close images; export to PNG, WebP, JPEG, TIFF, BMP, GIF, and XCF.
Render previews, take snapshots, compare before/after/diff renders, and measure colors, bounding boxes, histograms, and dominant colors.
Search, describe, and call GIMP PDB procedures directly.
Search, describe, and apply GEGL filters; manage non-destructive layer effects.
Work with selections, layer masks, layers, text layers, fonts, and vector paths.
Remove image backgrounds with optional AI segmentation models, saving as mask or baked alpha.
Run arbitrary Python inside GIMP with persistent namespace and optional undo wrapping.
List, run, and batch-run built-in image-processing recipes over folders.
Use PDB/Python/recipe access for custom automation and multi-step GIMP workflows.
Provides tools for interacting with GIMP 3, enabling image opening and creation, layer and mask manipulation, application of GEGL filters, selections, paths, text, pixel measurement and rendering, background removal, and batch recipes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gimp-agent-mcp Open this image, remove the background, and export the result as a PNG."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GIMP Agent MCP
Let your AI agent edit in GIMP. Keep the layers. See what changed.

Connect Claude, Codex, Cursor or another MCP client to GIMP 3. The agent can work in your open window, inspect the result, refine an edit and save an XCF you can keep working on. Headless mode runs the same workflows over folders of images.
See it working

Watch the 20-second MP4 · Open the editable XCF · Reproduce the MCP session
This is a captured-step walkthrough of the real GIMP window, with pauses shortened. Three text layers are changed through MCP in one batch. One Ctrl+Z restores all three; Ctrl+Y brings them back. The text, artwork and background stay on separate named layers. This demonstrates actual tool execution, not a claim that every model will follow the same plan from a prompt.
Related MCP server: gimp-mcp
Try asking
“Change the headline and supporting text in this card. Keep them as text layers, group the edits into one undo step, and show me the result before exporting.”
“Make this transparent artwork into a Telegram sticker with a white outline and shadow. Save a 512 × 512 PNG.”
“Pack these equal-sized PNG frames into a sprite sheet. Keep an XCF master, write the atlas JSON and verify the exported pixels against the originals.”

The included skills guide layered artwork, sprite sheets and batch jobs. They tell the agent to inspect and measure the actual output before calling a job complete.
Install
You need GIMP 3.2.x, Python 3.11+, uv and an MCP client. GIMP must be installed on the same machine as the server. Start GIMP once so its user profile exists.
uvx gimp-agent-mcp install-plugin
uvx gimp-agent-mcp install-skills
uvx gimp-agent-mcp doctorRestart GIMP after installing or upgrading the bridge. In your open GIMP window, choose Filters → Development → Start Agent Bridge.
Add this configuration to your client's MCP settings:
{
"mcpServers": {
"gimp": {
"command": "uvx",
"args": ["gimp-agent-mcp", "serve"]
}
}
}For Claude Code:
claude mcp add gimp -- uvx gimp-agent-mcp serveClaude Code can also install the server and skills as a plugin; see skills installation. For AI background removal, install the optional model runtime with uvx --from "gimp-agent-mcp[segmentation]" gimp-agent-mcp serve (use the same arguments in your MCP config). The first use downloads a model; image processing stays local.
Working from source? Run uv sync --extra dev, then uv run gimp-agent-mcp install-plugin. Configure the server as uv run --no-sync --directory /absolute/path/to/repo gimp-agent-mcp serve. --no-sync avoids Windows executable-lock errors when another server is running.
Work in your window, or run a batch
Your existing window: start the bridge from the menu. Continue editing the same document by hand.
A shortcut:
uvx gimp-agent-mcp shortcutcreates a launcher that starts GIMP with the bridge enabled.Agent-launched:
gimp_launch(mode="gui")opens GIMP;mode="headless"runs without a window.
gimp_status and gimp_list_images report the image attached to GIMP's active user display, its selected layer ids, selection bounds and dirty state. When the user says "this layer" or "the selection", read that context before editing. Use gimp_context(image_id) for a specific document or to bring it forward with present=true. If multiple bridges run, gimp_status follows the newest bridge file; isolate test profiles when a user session is active.
What makes this useful
Capability | What you get |
Visual feedback | Whole-image, layer and region previews; saved snapshots; before/after/diff comparisons. Diagnostic overlays can add a coordinate grid, layer boxes, selection bounds and labelled points without changing the source. |
Measured output | Pixel colours, alpha bounds, histograms and dominant colours. Sprite packing reopens the exported PNG and compares each cell's decoded RGBA pixels with its source. |
Editable work | Named layers, text, paths, masks and non-destructive layer effects. Export an XCF master and delivery files separately. |
Everyday editing | Three compact tools cover common adjustments, canvas transforms, fills and simple drawing. Every action reports the installed GEGL or PDB operation it used. |
One undo step |
|
Runtime discovery | Search and describe the installed PDB procedures and GEGL operations, including parameter names, types and enum values. Numeric-array arguments support curves and brush strokes. |
Repeatable jobs | Eleven recipes and folder batching, plus three bundled workflow skills. |
Honest failure handling | A lost connection never silently replays an edit whose outcome is unknown. Reconnect, inspect, then decide whether to retry. |
Other GIMP MCP projects also provide TCP bridges and visual feedback. This project's emphasis is editable output, measurement, grouped edits and reproducible validation. Generic API access is broad, but does not guarantee that every GIMP procedure or GEGL operation works with every argument combination.
Tools (40)
Area | Tools |
Learn and connect |
|
Images |
|
See and measure |
|
PDB |
|
Filters |
|
Everyday edits |
|
Structured edit |
|
Cut out |
|
Automate |
|
Images and items use integer IDs. Colours accept hex, common names, CSS RGB strings or component arrays; enums use nicks returned by the describe tools. Call gimp_help("batch") for grouped-edit examples. gimp_run_python may be disabled, reducing the tool count by one.
Common work no longer needs procedure discovery. For example, use gimp_adjust(layer_id, "brightness_contrast", {"brightness": 0.15}), gimp_canvas(image_id, "crop", width=1200, height=630, x=40, y=20), or gimp_draw(image_id, layer_id, "line", color="#ffffff", x=20, y=40, x2=300, y2=40, line_width=6). Adjustments default to editable layer effects where GIMP supports them; canvas and drawing actions bake pixels or structure. Every result identifies the runtime operation selected before execution.
For visual placement, ask for a diagnostic preview without marking the working image:
gimp_render(image_id=3, overlay=["grid", "layers", "selection"], grid_size=100,
points=[{"x": 600, "y": 340, "label": "headline centre"}])Recipes
Recipe | Job |
| Fit, outline and shadow on a transparent 512 × 512 canvas. |
| Cards and banners from a manifest of images, text, shapes and effects. |
| Ordered, equal-sized PNGs → verified grid PNG, layered XCF and atlas JSON, with optional margin and spacing. |
| Mixed-size PNGs → padded, optionally trimmed atlas PNG, layered XCF and atlas JSON, verified pixel for pixel. |
| Named social profiles (Open Graph, X, Instagram, story, YouTube or custom) around a focus point, with measured, pixel-checked output. |
| Fixed-size tiles from a sheet, optionally skipping empty cells. |
| Resize and adjust export quality toward a file-size budget. |
| Export a square source at multiple sizes. |
| Position a text or image watermark. |
| Labelled thumbnails from a folder. |
| Fit to a maximum edge and export by extension. |
Brand kits for compose
Store a brand's colours, fonts, assets and canvas sizes once, then refer to them by token. Profiles are JSON files in the per-user config directory (%APPDATA%\gimp-agent-mcp\brands on Windows, ~/Library/Application Support/gimp-agent-mcp/brands on macOS, $XDG_CONFIG_HOME/gimp-agent-mcp/brands elsewhere; GIMP_AGENT_BRANDS_DIR overrides). Font names are checked against the running GIMP when a profile is saved.
gimp_brand(action="set", profile={"name": "example",
"colors": {"bg": "#0f1117", "accent": "#1f3a8a", "text": "#ffffff"},
"fonts": {"headline": "Bahnschrift Bold"}, "assets": {"logo": "/brand/logo.png"},
"canvases": {"x-card": [1200, 675], "og": [1200, 630]}})
gimp_run_recipe("compose", {"output_path": "out/card.png", "manifest": {
"brand": "example", "canvas": "x-card", "background": "@bg",
"items": [{"type": "image", "path": "@logo", "x": 40, "y": 40, "width": 160},
{"type": "text", "text": "Launch day", "font": "@headline", "size": 72, "color": "@text", "x": 40, "y": 240}]}})Tokens are resolved in the server before anything reaches GIMP, so a token manifest becomes exactly the manifest you would have written by hand. Literal values still work and win over the profile; an unknown token fails with the profile name and its available keys. gimp_help("compose") has the full rules.
Recipe arguments and examples · Asset workflows · Skills
Tested scope and limits
Version 0.5.0, beta. Tested with Windows GIMP 3.2.4, Linux GIMP 3.2.2 (Ubuntu 26.04), and macOS 15 GIMP 3.2.4 on Apple Silicon and Intel. Each platform runs the full smoke suite, targeted capability proof and all 23 everyday editing actions against real GIMP. GIMP 2.10 is unsupported; earlier 3.x releases are not part of the current test matrix.
gimp_edit_batchaccepts bounded layer, text, selection, path, mask and filter edits.gimp_undo_group(image_id, action="start", name="agent: sticker pass")holds a group across calls; end it withaction="end".gimp_statuslists open groups. A client disconnect closes its groups. The supplied name is tracked by the bridge, but GIMP 3's public undo-group API cannot set the Undo History label. The human uses GIMP's Undo/Redo; there is no programmatic undo endpoint.uv run python scripts/undo_group_smoke.pychecks three edits against a pre-turn snapshot after you press Ctrl+Z once in a GUI GIMP session. The headlessgimp-agent-mcp smokecheck covers group lifecycle and disconnect cleanup.Some GEGL source operations, including linear gradients, are not drawable filters. Use the PDB gradient-fill procedure instead. Vector warp/liquify parity is not claimed; see the warp investigation note.
Sprite packing takes equal-sized frames (
sprite_sheet_pack, with margin and spacing) or mixed-size PNGs and open layers (sprite_atlas_pack, with padding and trimming). Neither aligns animation or rotates sprites.Long work reports progress and can be cancelled with
gimp_cancelat checkpoints: between recipe items, batch files and edit-batch steps, between passes ofgimp_run_pythoncode that callscheckpoint(), and before a filter starts. A single GEGL merge already running cannot be interrupted, and GIMP's own per-procedure progress is not forwarded yet.
Verify your setup
uvx gimp-agent-mcp smoke
# From the source checkout:
uv run pytest
uv run python scripts/capability_proof.py /path/to/proof-output
uv run python scripts/everyday_proof.py /path/to/proof-outputCI checks supported Python versions, and separate jobs exercise real GIMP on Windows, Linux and both macOS architectures. Release publication depends on all three real-GIMP workflows passing. The general capability proof measures curves, gradients and brush output and checks batch recovery, document boundaries, diagnostic overlays, nested previews and snapshot cleanup. A second proof resolves and exercises every action in gimp_adjust, gimp_canvas and gimp_draw, recording dimensions, layer counts and measured pixels. See validation details.
Each smoke and proof script runs on a GIMP it launched itself and, when it shuts that GIMP down, waits until the bridge is really gone (port closed, bridge file removed, plug-in process exited) before returning. A bridge that has been asked to shut down refuses new connections and new requests at once. The smoke asserts this in its shutdown (bridge gone before return) check, and CI sets GIMP_AGENT_REQUIRE_OWN_GIMP=1 so a proof that finds an earlier step's bridge still answering fails with that reason instead of borrowing it. This fixed the macOS arm64 live-smoke failures of 15 October 2026, which looked like GIMP crashes but were a proof attaching to the previous step's GIMP while it quit. The live jobs do not retry checks: if the macOS job fails, its log says whether macOS wrote a GIMP crash report, and the macos-gimp-proof-<arch> artifact holds the proof reports, the GIMP launch log and any crash reports.
Architecture and trust
MCP client → stdio server → authenticated loopback TCP → plug-in inside GIMP
The plug-in runs operations on its GLib main loop, without worker threads. It uses a per-install token and only binds to 127.0.0.1. PDB calls, recipes and Python can execute code with your user permissions: connect only trusted clients. Disabling gimp_run_python is not a sandbox. Security · Architecture
Clean-room implementation under Apache-2.0; no code copied from other GIMP MCP projects. Roadmap · Changelog · Report a bug
Available Tools
32 toolsgimp_apply_filterB
Apply a GEGL operation to a layer. mode='merge' bakes it in; mode='append' adds a non-destructive layer effect.
Inputs: op (required), layer_id (required), mode, name, +3 more. Returns: object
gimp_batch_recipeA
Run a recipe over every file matching input_glob, writing to output_dir. Recipes must accept input_path and output_path.
Inputs: name (required), input_glob (required), output_dir (required), params, +1 more. Returns: object
gimp_close_imageA
Close an image without saving.
Inputs: image_id (required). Returns: object
gimp_exportA
Export an image; the extension chooses the format (.png .webp .jpg .tiff .bmp .gif .xcf). options are passed to the format's export procedure, e.g. {"quality": 0.85} for JPEG (0..1), {"quality": 80, "lossless": false} for WebP, {"compression": 9} for PNG. Unknown option names return the valid list.
Inputs: path (required), image_id (required), options. Returns: object
gimp_filter_describeA
Describe a GEGL operation's properties (names, types, ranges, defaults).
Inputs: op (required). Returns: object
gimp_filter_searchB
Search the GEGL operations available as filters (e.g. 'blur', 'shadow', 'levels', 'noise').
Inputs: limit, query. Returns: object
gimp_image_infoA
Full structure of one image: layer tree with item ids, channels, paths, selection bounds, resolution.
Inputs: image_id (required). Returns: object
gimp_launchB
Start GIMP 3 with the bridge running. mode='gui' opens the normal window; 'headless' runs gimp-console with no UI.
Inputs: mode, wait_seconds. Returns: object
gimp_layerB
Layer operations. action: new (image_id, name, width, height, fill, x, y, position), set (name, visible, opacity, mode, x, y, lock), move (dx, dy), reorder (position, parent_id), duplicate, merge_down, delete, resize_to_image, scale (width, height), add_alpha, crop_to_content, info.
Inputs: action (required), x, y, dx, +15 more. Returns: object
gimp_layer_effectA
Edit or delete a non-destructive layer effect (ids from gimp_layer_effects). action='set' updates params/visible/opacity/blend_mode; 'delete' removes it.
Inputs: filter_id (required), action, params, opacity, +2 more. Returns: object
gimp_layer_effectsC
List the non-destructive filters currently attached to a layer.
Inputs: layer_id (required). Returns: result
gimp_layer_maskA
Layer masks. action='add' with type selection|alpha|alpha-transfer|white|black|copy; 'apply' bakes the mask in; 'remove' discards it; 'enable'/'disable' toggle it; 'show'/'hide' preview it.
Inputs: layer_id (required), type, action. Returns: object
gimp_list_fontsB
List installed font names, optionally filtered by a regex.
Inputs: limit, filter. Returns: object
gimp_list_imagesA
List open images with ids, dimensions, file path, and layer count.
Inputs: no named parameters. Returns: result
gimp_list_recipesA
List tested multi-step recipes and their parameters.
Inputs: no named parameters. Returns: result
gimp_measureA
Measure pixels instead of guessing from a render. kind='color' (rgba at image x,y), 'bbox' (bounding box of non-transparent pixels), 'histogram' (mean/median/std per channel), 'dominant' (top k colours). Defaults to the selected layer.
Inputs: kind (required), k, x, y, +4 more. Returns: object
gimp_new_imageA
Create an RGB image with one layer. fill: 'transparent', 'white', 'black', 'foreground', 'background' or any colour.
Inputs: fill, width, height. Returns: object
gimp_openB
Open an image file (PNG, JPEG, WebP, XCF, PSD, SVG, ...) and return its structure.
Inputs: path (required). Returns: object
gimp_pathB
Vector paths. action='create' (image_id, strokes=[{type:'line'|'bezier', points:[[x,y],...], closed:bool}]; bezier points after the first are control1, control2, anchor triples), 'select' (path to selection), 'stroke' (draw it on layer_id with color and width), 'fill' (fill it on layer_id), 'delete'.
Inputs: op, name, color, width, +5 more. Returns: object
gimp_pdb_callA
Call any PDB procedure by name with arguments keyed by name. Pass images/items as ids, colours as strings, enums by nick.
Inputs: name (required), args, undo_group. Returns: object
gimp_pdb_describeA
Describe a PDB procedure: arguments with types, defaults and enum choices, plus return values.
Inputs: name (required). Returns: object
gimp_pdb_searchA
Search GIMP's Procedure Database by words in the procedure name (e.g. 'image scale', 'layer text', 'file png').
Inputs: limit, query. Returns: object
gimp_remove_backgroundA
AI subject cut-out. Runs a segmentation model on the layer and writes the result as an editable layer mask (mode='mask') or bakes it into the alpha channel (mode='apply'). Needs the optional segmentation extra. Models: u2net (default), isnet-general-use, u2net_human_seg, isnet-anime, silueta.
Inputs: layer_id (required), mode, model, alpha_matting. Returns: object
gimp_renderB
Render the current state of an image as a PNG you can see. Optional layer_id isolates one layer; region={x,y,width,height} crops before scaling.
Inputs: region, image_id, layer_id, max_size.
gimp_render_compareB
Side-by-side render of a snapshot and the current image. panels is a comma list of before, after, diff (diff = pixel difference, black means identical).
Inputs: image_id (required), snapshot_id (required), panels, max_size, +1 more.
gimp_run_pythonA
Run Python inside GIMP. Gimp, Gegl, Gio, GLib and helpers image_by_id/item_by_id/make_color are available; the namespace persists between calls. Returns stdout plus the expression value or result. Pass image_id to wrap the call in one undo step.
Inputs: code (required), image_id. Returns: object
gimp_run_recipeC
Run a recipe by name with parameters. Recipes are Python jobs executed inside GIMP with defaults applied.
Inputs: name (required), params. Returns: object
gimp_selectA
Selection in one tool. mode: rect, ellipse (x,y,width,height), color (color, threshold 0..1, layer_id), alpha (layer_id: select the layer's opaque pixels), item (item_id: path or channel), all, none, invert, grow/shrink/feather/border (amount), bounds (just report). op: replace, add, subtract, intersect. Returns the selection bounds.
Inputs: image_id (required), x, y, op, +9 more. Returns: object
gimp_shutdownA
Stop the bridge. quit_gimp defaults to True for headless sessions and False for the GUI (unsaved work is not prompted for).
Inputs: quit_gimp. Returns: object
gimp_snapshotA
Take a hidden snapshot of an image's current state so gimp_render_compare can show before/after later.
Inputs: image_id (required). Returns: object
gimp_statusA
Check whether GIMP and the agent bridge are reachable. Returns GIMP version, mode, and open images.
Inputs: no named parameters. Returns: object
gimp_textA
Create a text layer (image_id + text) or edit one (layer_id). size in px, font by name (gimp_list_fonts), colour, justify left|center|right|fill, spacing, optional fixed box.
Inputs: x, y, font, name, +10 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Most tools target a clear resource and action pair, so agents can generally tell images, layers, filters, PDB, fonts, and recipes apart. The main overlaps are gimp_pdb_call vs gimp_run_python, which both allow arbitrary GIMP operations, and gimp_layer_effects vs gimp_layer_effect, which differ only by plural and could be mis-selected.
All names share the gimp_ prefix and use snake_case, which helps predictability. However, conventions are mixed: some tools are verb-first (gimp_list_images, gimp_open, gimp_export) while others are noun-first with an action parameter (gimp_layer, gimp_path, gimp_select), and gimp_layer_effects vs gimp_layer_effect is an easily confused singular/plural pair.
With 32 tools, this exceeds the 25-tool threshold for a heavy tool surface. While GIMP is a broad domain, several tools are generic escape hatches or overlapping (gimp_pdb_call, gimp_run_python, recipe tools), making the set feel larger than necessary.
The surface covers session lifecycle, image create/open/export/close, layer and mask operations, selections, filters, paths, text, measurement, PDB access, and scripting, so core GIMP automation workflows are largely complete. Minor gaps exist for direct image-level operations like resize, rotate, and undo, though gimp_pdb_call and gimp_run_python can work around those.
Maintenance
Related MCP Connectors
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Image and video AI tools and your own pipelines, run from any AI assistant.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Related MCP Servers
- AlicenseAqualityBmaintenanceEditmamei provides a natural-language interface for Adobe Photoshop, running as a local MCP server. Rather than focusing on generative AI, it acts as an AI orchestration layer that plans edits and executes them with native Photoshop tools.64701 npm18Functional Source , Version 1.1, MIT Future
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control GIMP for image editing tasks such as opening, resizing, filtering, exporting, and batch processing images through Python-Fu scripting.223 npmMIT
- AlicenseBqualityDmaintenanceEnables controlling GIMP 3 locally through natural language, providing tools for image editing, layer management, selections, and PDB procedure invocation. Keeps all images and files on the user's machine with a local-first, secure design.401GPL 3.0
- AlicenseCqualityBmaintenanceEnables AI agents to perform structured, semantic artwork editing in GIMP 3 through session-based tools for layers, selections, text, transforms, non-destructive filters, previews, and image export, backed by snapshot undo/redo and XCF-persisted sessions. It also offers a live control center and operation event timeline for observing and managing edits, plus PDB search for expert discovery.61MIT