Skip to main content
Glama

gimp-mcp

Tell your AI assistant what you want, and watch it happen in GIMP. gimp-mcp connects Claude, Codex, Cursor, VS Code or any other MCP client to the GIMP window you already have open: it opens files, builds layers, sets editable text, makes selections, applies filters and exports, step by step, right in front of you.

PyPI Python CI License: MIT Linux macOS Windows

Quickstart

gimp-mcp runs on Linux, macOS and Windows. You need GIMP 3.2+, uv and an MCP client. On Ubuntu 26.04:

sudo apt install -y gimp python3-gi gir1.2-gimp-3.0   # GIMP 3.2+ (other distributions and Flatpak: see below)
uvx gimp-mcp setup                                    # installs the GIMP plug-in, adds the server to your MCP clients
uvx gimp-mcp doctor                                   # after (re)starting GIMP: every check should be [ok]

Then ask your assistant: "Use GIMP to create a 1280×720 image with the title 'Hello' and export it to ~/hello.png".

Related MCP server: GIMP MCP

Linux, macOS and Windows

The same package, the same uvx gimp-mcp setup, and the same tools on all three. Every change runs the full end-to-end suite against a real GIMP 3.2 on each of them, plus tests with GIMP's interface open, and each release is installed back from TestPyPI and PyPI and tested on all three.

Linux

macOS

Windows

Verified on

Arch, Ubuntu, Debian, Fedora, openSUSE, Alpine (x86_64)

macOS 15, Apple Silicon (arm64)

Windows Server 2025 (x86_64)

GIMP 3.2 from

your distribution, or Flathub

gimp.org (.dmg)

gimp.org (installer)

Bridge

Unix socket, 0600, peer uid checked

Unix socket, 0600, peer uid checked

named pipe, current user only

Tested in CI

✅ headless · ✅ with GIMP's interface

✅ headless · ✅ with GIMP's interface

✅ headless · ✅ with GIMP's interface

Exact versions and what differs per OS: compatibility.

Why gimp-mcp

Your GIMP, live. The assistant works in the GIMP you have open, not in a hidden copy. Every layer it adds shows up in the Layers panel, and you can take over with the mouse at any time.

Results you can keep editing. Titles stay editable text layers, each step can go on its own layer, blurs and color corrections can be editable filters, and the XCF keeps all of it. The assistant gives you a starting point, not a flattened PNG.

It checks its own work. Previews come back to the model as images, so it can see the result, fix what looks off and only then export. Checkpoints let it try an idea and go back to an earlier state when it doesn't work out.

Local and locked down. No network port: one Unix socket (a named pipe on Windows) that only you can open, a fresh token at every GIMP start, a fixed set of operations, and an allowlist for the GIMP procedures it may call (no eval, no Script-Fu passthrough). Details in the security model.

Set up in one command. gimp-mcp setup finds GIMP (distribution package, Flatpak, or gimp.org's app on macOS and Windows), installs the plug-in and adds the server to Claude Code, Claude Desktop, VS Code and Cursor, asking before it changes any file.

Things to ask

  • "Open ~/Pictures/team.jpg, crop it to a centered square and export a 512 px avatar."

  • "Make a 1200×630 social card for my blog post 'Shipping on Fridays', dark background, title on the left."

  • "Brighten only the background layer of poster.xcf and keep the original underneath, hidden."

  • "What's in ~/design/flyer.xcf? List the layers, the hidden ones and the fonts used."

  • "Blur the license plate in car.jpg and save a copy next to it."

Use cases

Typical GIMP jobs done end to end through MCP, each with a scripted version checked in CI on Linux, macOS and Windows, and an agent version (one plain-language request) in the evaluation suite:

  • Restore an old scanned photo: straighten, crop the scanner bed, heal dust and scratches, restore contrast, reduce grain, 16-bit TIFF for print (walk-through).

  • Product photo for an online store: cut out without losing pixels, soft shadow on pure white, centered square, JPEG and WebP in three sizes with an sRGB profile (walk-through).

  • Social media kit: one design in four formats (post, story, banner, thumbnail) with safe-area guides and an editable headline (walk-through).

  • Tutorial screenshot: callouts and arrows, private data pixelated beyond recovery, metadata removed (walk-through).

  • Photos for a website: a folder upright, resized, watermarked, GPS removed, WebP and JPEG, the corrupt file reported (walk-through).

  • Animated sticker: frames with timing and disposal, optimized GIF and animated WebP under a size budget (walk-through).

  • Print-ready flyer: A5 at 300 dpi with bleed, trim and safe-margin guides, PDF and TIFF at print size (walk-through).

  • Sky replacement: a new sky masked in, the foreground graded with an editable filter, no halo (walk-through).

  • YouTube thumbnail from one photo, with an editable title (guide).

What it can do

Look

list open images, inspect layer trees and items, render previews the model can see

Files

create, open, save XCF, export PNG and JPEG with options, close

Layers

add, import, duplicate, group, reorder, rename, opacity, blend modes, visibility

Shape

resize image or canvas, crop, scale, rotate, flip, move

Select

rectangles and ellipses (add, subtract, intersect, feather), invert, layer masks

Paint

fills, lines and paths, rectangles and ellipses

Text

editable text layers: font, size, color, alignment, spacing

Adjust

brightness/contrast, hue/saturation, blur, as destructive or editable filters

History

undo groups (one Ctrl+Z in GIMP) and checkpoints the assistant can restore

Everything else

about 420 more GIMP procedures, allowlisted (procedures toolset, opt-in)

159 tools in all (50 enabled by default), grouped into toolsets so your client only loads what it needs: see the tool reference and the coverage matrix.

How it works

 Claude / Codex / Cursor / …            gimp-mcp serve                 GIMP 3.2
 ───────────────────────────  MCP   ─────────────────────  Unix socket  ──────────────────────────
  "make the colors pop"      stdio   validates, maps ids  (named pipe   gimp-mcp-bridge plug-in
                            ──────▶  to GIMP operations   on Windows)   runs them in your session
                                                         ────────────▶

gimp-mcp setup copies a small Python plug-in into your GIMP profile. GIMP starts it with the application, and it serves its local socket while GIMP runs. The MCP server (uvx gimp-mcp serve, started by your client) talks to it. Also works with a headless GIMP for scripts and CI. More in the architecture notes.

Documentation

Also listed in the official MCP registry as io.github.mhbxyz/gimp-mcp. MIT licensed.

Available Tools

50 tools
gimp_add_layer_maskAdd layer maskA

Add a mask to a layer or group. fill: 'white' (everything visible), 'black' (everything hidden), 'alpha' (from the layer's transparency), 'selection' (selected = visible; EMPTY_SELECTION if nothing is selected), 'grayscale' (from the layer's luminance). invert inverts it. Non-destructive: the layer's pixels are kept.

Inputs: item (required), fill, invert. Returns: x, y, id, kind, +11 more

gimp_begin_undo_groupBegin undo groupA

Start grouping the following changes to an image into ONE step of GIMP's undo history (what Ctrl+Z undoes in GIMP's UI). Close it with gimp_end_undo_group. Groups nest. If this client disconnects, its open groups are closed automatically. Grouping is not a transaction: nothing is rolled back on error (use checkpoints for that).

Inputs: image (required), label. Returns: depth, image

gimp_brightness_contrastBrightness / contrastA
Destructive

Adjust brightness and contrast of a layer, each from -100 to 100 (0 = unchanged; mapped to GIMP's -1..1). One undo step.

Inputs: item (required), contrast, brightness, destructive. Returns: item, filter, operation, destructive, +1 more

gimp_close_imageClose imageA
Destructive

Close an image. Refused with UNSAVED_CHANGES when it has unsaved changes, unless discard_changes=true. Its id (and its items' ids) become invalid.

Inputs: image (required), discard_changes. Returns: image, closed

gimp_create_checkpointCreate checkpointA

Keep a full copy of the image's current state (layers, text, masks, filters, selection) so it can be restored later: this is how to undo/redo. Copies are hidden from image lists and use memory; at most 20 per image.

Inputs: image (required), label. Returns: image, label, width, height, +2 more

gimp_create_groupCreate layer groupA

Add an empty layer group at an explicit parent and position. One undo step.

Inputs: name (required), image (required), parent, position. Returns: x, y, id, kind, +11 more

gimp_create_imageCreate imageA

Create a new image with a single layer named layer_name filled with an explicit color (default white; 'transparent' gives an alpha layer). Like a new image in GIMP's UI, it starts without unsaved changes and without undo history. Shown in a window when GIMP has a UI.

Inputs: width (required), height (required), fill, base_type, +2 more. Returns: id, file, name, dirty, +5 more

gimp_create_layerCreate layerB

Add a new raster layer (with alpha) to an image, at an explicit parent and position. Size and offset are in image pixels (default: the image size at 0,0). fill: 'transparent' or a color. One undo step.

Inputs: name (required), image (required), x, y, +8 more. Returns: x, y, id, kind, +11 more

gimp_create_text_layerCreate text layerA

Add an editable text layer. Position (x, y) is the top-left corner in image pixels. size is in size_unit ('px' or 'pt'). Without box_width/box_height the layer grows with the text; with both, the text wraps in a fixed box. The text stays editable (never rasterized). One undo step.

Inputs: text (required), image (required), x, y, +12 more. Returns: x, y, id, kind, +11 more

gimp_crop_imageCrop imageA
Destructive

Crop the image to the rectangle (x, y, width, height) in image pixels, which must lie inside the canvas. Destructive: layer pixels outside the rectangle are discarded. One undo step.

Inputs: x (required), y (required), image (required), width (required), +1 more. Returns: dirty, image, width, height

gimp_delete_checkpointDelete checkpointA
Destructive

Free a checkpoint's memory. Closing an image deletes its checkpoints too.

Inputs: checkpoint (required). Returns: deleted, checkpoint

gimp_delete_layerDelete layerA
Destructive

Remove a layer or a group with all its children. Destructive: the pixels are lost unless undone in GIMP or the image is reverted from a saved file. Ids of removed items become invalid.

Inputs: item (required). Returns: item, deleted

gimp_draw_pathDraw line / polylineA
Destructive

Stroke a polyline through points [[x, y], ...] (image pixels, at least 2 points) with a plain line of the given width, color and opacity; closed=true joins the last point to the first. Uses a solid line, never the user's brush. Points outside the layer are clipped. One undo step.

Inputs: item (required), color (required), points (required), cap, +5 more. Returns: item, changed, affected

gimp_draw_shapeDraw rectangle / ellipseA
Destructive

Draw a rectangle or an ellipse (inscribed in x, y, width, height) on a layer, filled with fill_color and/or outlined with stroke_color (stroke centered on the outline). The image's selection is left unchanged. One undo step.

Inputs: x (required), y (required), item (required), shape (required), +7 more. Returns: item, changed, affected

gimp_duplicate_layerDuplicate layerA

Copy a layer or a whole group (with masks and children). By default the copy is placed just above the original in the same parent. GIMP names it ' copy'. One undo step.

Inputs: item (required), parent, position. Returns: x, y, id, kind, +11 more

gimp_enable_toolsetsEnable toolsetsA

Add the tools of one or more toolsets (see gimp_list_toolsets) to your tool list for this session. The server notifies the client that its tool list changed; a client that does not refresh its tool list needs a restart with the toolsets in --toolsets or GIMP_MCP_TOOLSETS.

Inputs: toolsets (required). Returns: enabled, added_tools

gimp_end_undo_groupEnd undo groupA

Close the innermost undo group this client opened on the image (NO_OPEN_GROUP otherwise).

Inputs: image (required). Returns: depth, image

gimp_export_imageExport PNG/JPEGA
Destructive

Export the visible composite of the image to PNG or JPEG (format from the extension). The image itself is not modified. Existing files are only replaced when overwrite=true. Defaults: PNG compression 9, not interlaced; JPEG quality 90, baseline, optimized, transparency flattened on white.

Inputs: path (required), image (required), format, overwrite, +2 more. Returns: path, bytes, image, width, +3 more

gimp_fillFillA
Destructive

Fill a layer (or layer mask) with a solid color. area='selection' fills the selected part only (EMPTY_SELECTION if nothing is selected); area='layer' fills the whole layer and ignores (but keeps) the selection. Destructive for the pixels it covers. One undo step.

Inputs: item (required), color (required), area, mode, +1 more. Returns: item, changed, affected

gimp_flip_layerFlip layerA

Mirror a layer or group horizontally or vertically around its center. Lossless. One undo step.

Inputs: item (required), direction (required). Returns: x, y, id, kind, +11 more

gimp_gaussian_blurGaussian blurB
Destructive

Blur a layer with a Gaussian of standard deviation radius pixels (radius_y defaults to radius). One undo step.

Inputs: item (required), radius (required), radius_y, destructive. Returns: item, filter, operation, destructive, +1 more

gimp_get_selectionGet selectionB
Read-only

Whether the image has a selection, its bounds, and optionally whether a point is selected.

Inputs: image (required), probe_x, probe_y. Returns: empty, image, bounds, contains

gimp_hue_saturationHue / saturationA
Destructive

Rotate hue (degrees, -180..180) and change saturation and lightness (-100..100, 0 = unchanged) of a layer, for all colors or one hue range. One undo step.

Inputs: item (required), hue, overlap, hue_range, +3 more. Returns: item, filter, operation, destructive, +1 more

gimp_import_layerImport file as layerA

Load an image file (PNG, JPEG, XCF... absolute path) as a new layer of an existing image. Multi-layer files are flattened into one layer. Placed at x,y (default 0,0); name defaults to the file name. One undo step.

Inputs: path (required), image (required), x, y, +3 more. Returns: x, y, id, kind, +11 more

gimp_inspect_imageInspect imageA
Read-only

Describe one image: size, mode, precision, resolution, unsaved changes, associated files and the full ordered layer tree (groups, children, masks, offsets, opacity, blend mode, locks). Does not depend on GIMP's active selection.

Inputs: image (required). Returns: id, file, name, unit, +12 more

gimp_inspect_itemInspect itemA
Read-only

Describe one item by id: kind (layer, group, text, mask, channel, path), owning image, parent and position, and its layer properties. Fails with NOT_FOUND once the item is deleted.

Inputs: item (required). Returns: x, y, id, kind, +13 more

gimp_inspect_textInspect text layerC
Read-only

Text, font, size and unit, color, justification, spacing, antialiasing and geometry.

Inputs: item (required). Returns: x, y, font, item, +10 more

gimp_list_checkpointsList checkpointsC
Read-only

Checkpoints of an image, oldest first.

Inputs: image (required). Returns: image, checkpoints

gimp_list_filtersList editable filtersC
Read-only

Editable (non-destructive) filters attached to a layer.

Inputs: item (required). Returns: item, filters

gimp_list_fontsList fontsB
Read-only

Fonts GIMP knows (fontconfig names), filtered by a substring.

Inputs: limit, query. Returns: fonts, total

gimp_list_toolsetsList toolsetsA
Read-only

List the groups of GIMP tools (toolsets), what each contains and which are enabled. Tools of disabled toolsets are not in your tool list: enable them with gimp_enable_toolsets.

Inputs: no named parameters. Returns: toolsets

gimp_modify_selectionSelect all / none / invertB

'all' selects the whole canvas, 'none' clears the selection, 'invert' inverts it.

Inputs: image (required), action (required). Returns: empty, image, bounds, contains

gimp_move_layerMove layer in the stackA

Move a layer or group to another parent (a group of the same image, or null for the top level) and position (0 = top-most). Does not change pixels or offsets. One undo step.

Inputs: item (required), parent (required), position (required). Returns: x, y, id, kind, +11 more

gimp_open_imageOpen imageA

Open a local file (XCF or any format GIMP can load: PNG, JPEG, WebP, TIFF...) as a new image. The path must be absolute (~ allowed).

Inputs: path (required). Returns: id, file, name, dirty, +5 more

gimp_previewPreview imageA
Read-only

Render the composite of an image (all visible layers, with transparency) as a PNG whose longest side is at most max_size pixels (16-1024, default 512 or $GIMP_MCP_PREVIEW_MAX_SIZE). Proportions are kept and the image is never upscaled. Does not modify the document, its undo history or its saved state.

Inputs: image (required), max_size. Returns: bytes, image, scale, width, +5 more

gimp_remove_filterRemove editable filterB

Remove an editable filter from a layer: the layer renders as if it had never been applied.

Inputs: item (required), filter (required). Returns: item, filters

gimp_remove_layer_maskRemove layer maskA
Destructive

Remove a layer's mask. mode='apply' bakes it into the layer's alpha (destructive: hidden pixels become transparent); mode='discard' drops it (the layer is shown unmasked).

Inputs: item (required), mode (required). Returns: x, y, id, kind, +11 more

gimp_resize_canvasResize canvasA

Change the canvas size without resampling. Layers move by (offset_x, offset_y) and keep their size, unless resize_layers is 'all' or 'image-sized' (layers that covered the old canvas): those grow or shrink to the canvas, new areas transparent or fill_color. One undo step.

Inputs: image (required), width (required), height (required), offset_x, +3 more. Returns: dirty, image, width, height

gimp_resize_imageScale imageA
Destructive

Scale the whole image and every layer to width x height pixels (layer sizes and offsets scale proportionally). Lossy: pixels are resampled with the given interpolation. One undo step.

Inputs: image (required), width (required), height (required), interpolation. Returns: dirty, image, width, height

gimp_restore_checkpointRestore checkpoint (undo/redo)A
Destructive

Replace the image with the state saved in a checkpoint. The restored image gets a NEW image id and new item ids (the old ones become invalid); GIMP windows showing it are reconnected; its file association is kept and it is marked as having unsaved changes; its GIMP undo history starts empty. Checkpoints are kept, so restoring a later one redoes. Destructive for the current state unless it was checkpointed.

Inputs: image (required), checkpoint (required). Returns: id, file, name, dirty, +7 more

gimp_rotate_layerRotate layerA
Destructive

Rotate a layer or group by angle degrees (clockwise) around its center. clip='adjust' grows the layer to keep all pixels, 'clip' keeps the original bounds. Multiples of 90 are lossless with interpolation 'none'; other angles resample. One undo step.

Inputs: item (required), angle (required), clip, interpolation. Returns: x, y, id, kind, +11 more

gimp_save_imageSave project (XCF)A
Destructive

Save the image as a GIMP project (.xcf), keeping layers, groups, masks and text. Without path, saves to the image's current XCF file (a normal 'Save'). With a path, an existing file is only replaced when overwrite=true. Marks the image as having no unsaved changes.

Inputs: image (required), path, overwrite. Returns: bytes, dirty, image, xcf_file

gimp_scale_layerScale layerA
Destructive

Resample a layer or group to width x height pixels. anchor='center' keeps its center, 'top-left' keeps its top-left corner. Lossy. One undo step.

Inputs: item (required), width (required), height (required), anchor, +1 more. Returns: x, y, id, kind, +11 more

gimp_select_ellipseSelect ellipseA

Select the ellipse inscribed in the rectangle (x, y, width, height), antialiased, combined with the current selection.

Inputs: x (required), y (required), image (required), width (required), +3 more. Returns: empty, image, bounds, contains

gimp_select_rectangleSelect rectangleA

Select a rectangle (image pixels, origin top-left) combined with the current selection. The part outside the canvas is ignored. Selections are part of the image (undoable, saved in XCF).

Inputs: x (required), y (required), image (required), width (required), +3 more. Returns: empty, image, bounds, contains

gimp_set_layer_maskConfigure layer maskC

apply: whether the mask affects the rendering (disable to see the layer unmasked); show: display the mask itself; edit: make painting tools target the mask.

Inputs: item (required), edit, show, apply. Returns: x, y, id, kind, +11 more

gimp_set_layer_offsetsMove layer (offsets)A

Place a layer or group so its top-left corner is at (x, y) in image pixels (may be negative or outside the canvas). Lossless. Refused with LOCKED when its position is locked. One undo step.

Inputs: x (required), y (required), item (required). Returns: x, y, id, kind, +11 more

gimp_set_layer_propertiesSet layer propertiesA

Rename a layer or group and/or change its visibility, opacity (0-100), blend mode or locks (content, position, visibility, alpha). Only the given properties change. Not destructive: pixels are untouched. One undo step.

Inputs: item (required), mode, name, opacity, +5 more. Returns: x, y, id, kind, +11 more

gimp_set_textEdit text layerA

Change the text, font, size, color, justification, spacing, box or position of an existing text layer; only given properties change. Refused with WRONG_KIND on non-text layers and with FONT_NOT_FOUND (nothing changed) for unknown fonts. One undo step.

Inputs: item (required), x, y, font, +10 more. Returns: x, y, id, kind, +11 more

gimp_statusGIMP statusA
Read-only

Diagnose the connection to the running GIMP session: GIMP version, session id and the list of open images (with their ids). Call this first.

Inputs: no named parameters. Returns: images, socket, connected, session_id, +4 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 50 tools

    Disambiguation5/5

    The tools are clearly separated by target resource and action: image, layer, mask, text, selection, drawing, filters, checkpoints, and toolsets. Related families such as inspect_image/inspect_item/inspect_text and preview/export_image are explicitly differentiated by their descriptions, so an agent can select the right tool.

    Naming Consistency4/5

    All tools share the gimp_ prefix and snake_case naming, which is highly predictable. Most follow verb_noun, but a few names such as gimp_status, gimp_preview, gimp_brightness_contrast, and gimp_gaussian_blur deviate from the strict verb_noun pattern.

    Tool Count2/5

    Fifty tools is a very large surface for an agent, well above the typical 3-15 range, even for a complex domain like GIMP. The toolsets mechanism mitigates this by allowing subsets to be enabled, but the full exposed set is still too heavy.

    Completeness4/5

    Coverage is broad across image lifecycle, layers, masks, text, selections, drawing, basic filters, and checkpoint-based undo/redo. Minor gaps remain, such as adding editable filters, converting image mode/precision, and path-object creation, but core workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to operate GIMP 3 end-to-end: open and inspect images, call every PDB procedure, apply GEGL filters destructively or as layer effects, measure pixels, render before/after/diff comparisons, cut out subjects with AI segmentation, and run multi-step recipes across folders.
      32
      92 PyPI
      5
      Apache 2.0
    • A
      license
      C
      quality
      B
      maintenance
      Enables 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.
      61
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to create, paint, edit, inspect, and export images in a running GIMP 3.2 instance via MCP.
      199 PyPI
      GPL 3.0
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents to drive GIMP 3 over MCP, covering layers, selections, painting, text, color adjustments, GEGL filters, raw PDB procedures, and free-form Python inside GIMP, with image previews so the agent can see the result of each step. It installs its bridge plugin automatically and launches or attaches to a running GIMP instance, which stays open across MCP client restarts.
      42
      MIT