gimp-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools to inspect and edit images in a running GIMP 3 session.
Start with gimp_status to get the open images and their ids. More tools (procedures, ...) are grouped in
toolsets: gimp_list_toolsets shows them, gimp_enable_toolsets adds them. Ids are opaque, bound to the current
GIMP session, and must be passed back verbatim. Errors carry a stable code; when outcome is
"unknown" the change may have been applied: inspect before retrying. Resources gimp://images and
gimp://images/{image}/layers|preview give the same state without tool calls; prompts describe common workflows.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gimp_statusA | Diagnose the connection to the running GIMP session: GIMP version, session id and the list of open images (with their ids). Call this first. |
| gimp_list_toolsetsA | 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. |
| gimp_enable_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. |
| gimp_inspect_imageA | 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. |
| gimp_inspect_itemA | 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. |
| gimp_previewA | 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. |
| gimp_create_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. |
| gimp_open_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). |
| gimp_save_imageA | 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. |
| gimp_export_imageA | 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. |
| gimp_close_imageA | Close an image. Refused with UNSAVED_CHANGES when it has unsaved changes, unless discard_changes=true. Its id (and its items' ids) become invalid. |
| gimp_create_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. |
| gimp_create_groupA | Add an empty layer group at an explicit parent and position. One undo step. |
| gimp_import_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. |
| gimp_duplicate_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. |
| gimp_set_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. |
| gimp_move_layerA | 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. |
| gimp_delete_layerA | 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. |
| gimp_resize_imageA | 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. |
| gimp_resize_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. |
| gimp_crop_imageA | 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. |
| gimp_set_layer_offsetsA | 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. |
| gimp_scale_layerA | 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. |
| gimp_rotate_layerA | 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. |
| gimp_flip_layerA | Mirror a layer or group horizontally or vertically around its center. Lossless. One undo step. |
| gimp_select_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). |
| gimp_select_ellipseA | Select the ellipse inscribed in the rectangle (x, y, width, height), antialiased, combined with the current selection. |
| gimp_modify_selectionB | 'all' selects the whole canvas, 'none' clears the selection, 'invert' inverts it. |
| gimp_get_selectionB | Whether the image has a selection, its bounds, and optionally whether a point is selected. |
| gimp_add_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. |
| gimp_set_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. |
| gimp_remove_layer_maskA | 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). |
| gimp_fillA | 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. |
| gimp_draw_pathA | 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. |
| gimp_draw_shapeA | 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. |
| gimp_brightness_contrastA | Adjust brightness and contrast of a layer, each from -100 to 100 (0 = unchanged; mapped to GIMP's -1..1). One undo step. |
| gimp_hue_saturationA | 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. |
| gimp_gaussian_blurB | Blur a layer with a Gaussian of standard deviation |
| gimp_list_filtersC | Editable (non-destructive) filters attached to a layer. |
| gimp_remove_filterB | Remove an editable filter from a layer: the layer renders as if it had never been applied. |
| gimp_create_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. |
| gimp_set_textA | 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. |
| gimp_inspect_textC | Text, font, size and unit, color, justification, spacing, antialiasing and geometry. |
| gimp_list_fontsB | Fonts GIMP knows (fontconfig names), filtered by a substring. |
| gimp_begin_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). |
| gimp_end_undo_groupA | Close the innermost undo group this client opened on the image (NO_OPEN_GROUP otherwise). |
| gimp_create_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. |
| gimp_list_checkpointsC | Checkpoints of an image, oldest first. |
| gimp_restore_checkpointA | 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. |
| gimp_delete_checkpointA | Free a checkpoint's memory. Closing an image deletes its checkpoints too. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| thumbnail | Open an image, scale it so its longest side fits, export it and close it. |
| remove-background | Make the background of a photo or logo transparent with a layer mask, then export a PNG. |
| photo-touch-up | Measure, then correct exposure, contrast and colors of a photo, and compare with the original. |
| batch-export | Convert or resize every matching file of a folder with one batch recipe. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| images | The images open in GIMP: id, name, file, size, unsaved changes. |
TDQS
Scored across 50 tools
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.
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.
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.
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.