gimp-mcp-studio
Provides tools for interacting with a running GIMP 3.x instance through a local socket, enabling image metadata and snapshots, layer and transform operations, selections, drawing and fills, text, color/tone/blur/sharpen/noise adjustments, crop/scale/rotate/warp, undo/redo, export, and batch/social formats. Also exposes GIMP PDB procedure discovery and execution plus GEGL operation inspection and filter application.
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-mcp-studio resize the open image to 1920x1080 and export it 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 MCP bridge
GIMP MCP Studio contains a GIMP 3 plug-in and MCP server, distributed as the standalone Python package source tree gimp-mcp-studio. The public source repository is Onru-Labs/gimp-mcp-studio. It has not been published to a package registry.
This is a modified fork of gimp-mcp/gimp-mcp, distributed under GPL-3.0 with original source attribution retained. See LICENSE and NOTICE.
From this directory, install with python -m pip install . and launch the stdio server with gimp-mcp-studio. The wheel includes the companion plug-in, PowerShell installer, and batch-start script under the environment's share/gimp-mcp-studio directory. GIMP itself is installed separately. For tests, install python -m pip install ".[test]" then run python -m unittest discover -s tests -v; these do not substitute for live GIMP editing verification.
The server exposes 89 named MCP tools in gimp_mcp_server.py. That number describes the fixed convenience tools; the live GIMP Procedure Database (PDB) and GEGL registries add operations discovered from the running GIMP installation. The bridge does not claim that every GIMP UI action or third-party plug-in is callable through the PDB.
Runtime
GIMP 3.x with this plug-in installed and its MCP socket started.
Python 3.11 or later for the MCP server.
The package declares
mcp>=2.0,<3;pip install .installs its server dependency.A local socket on
localhost:9877between the server and GIMP plug-in.
For a standalone checkout, python -m pip install . is sufficient for the MCP server.
Install or preview the plug-in copy from this checkout:
.\install-plugin.ps1 -WhatIf
.\install-plugin.ps1Restart GIMP after installation, open an image, then choose Tools → MCP → Start MCP Server.
Launch the MCP server through the configured client using stdio. A direct local invocation is:
python gimp_mcp_server.pyRelated MCP server: GimpMCP
Capability map
The fixed tools cover image metadata and snapshots; layers and transforms; selections; drawing and fills; text; color, tone, blur, sharpen, and noise adjustments; crop, scale, rotate, and warp; undo/redo; export; and batch/social formats.
For operations not represented by a fixed tool, discover the running GIMP's own installed procedures:
pdb_searchsearches procedure names and descriptive fields with paging.pdb_describereturns typed input/output schemas.pdb_runexecutes one named procedure with typed JSON values and explicit image/layer references.gegl_list_operationsandgegl_describe_operationinspect available GEGL operations and properties.gegl_apply_filter,gegl_list_filters, andgegl_filter_actionapply and manage editable, non-destructive layer filters.
The PDB tools expose procedures installed in that GIMP instance. Generic JSON mapping handles common scalars, arrays, enums, colors, and supported GIMP object references; procedures requiring unsupported GObject values or UI-only interactions need a typed adapter. GIMP's own procedure browser and plug-in APIs describe what the installed application exposes.
Raw Python execution through call_api is disabled unless GIMP_MCP_ALLOW_UNSAFE_PYTHON=1 is set for the MCP server and plug-in. Typed tools and PDB access should be preferred. Independently, pdb_run always rejects procedure names matching code-evaluation, console, and application-shutdown patterns; the raw-Python opt-in does not bypass that PDB guard.
MCP versioning
The locally verified Python MCP SDK version is 2.3.0. Its implementation supports the 2026-07-28 protocol revision and compatibility paths for earlier handshake-era revisions; this package has not independently tested every client/revision combination. The current mcp.run() transport is stdio; the bridge's separate GIMP socket is an internal local transport, not an MCP network endpoint. Protocol version, SDK major version, and the count of GIMP tools are separate concepts.
The modern protocol uses stateless requests and supports multi-round-trip replies. It does not give this plug-in arbitrary server-initiated push to a client. The Tasks extension is not implemented by the Python SDK 2.0 baseline; long GIMP operations currently return through ordinary tool calls and local logs.
Service and verification
The service is registered as a GIMP persistent procedure, signals readiness to the host, and dispatches all GIMP API calls through the GLib main loop. File open/export/save calls have a 120-second socket timeout; other commands use 10 seconds. Set GIMP_MCP_OPERATION_TIMEOUT to override the operation timeout (bounded to 1–600 seconds).
For an isolated local profile, set GIMP3_DIRECTORY to a dedicated local directory and copy the plug-in into its plug-ins/gimp-mcp-plugin/gimp-mcp-plugin.py. Launch the installed gimp-console executable with --new-instance --no-data --no-shm --console-messages --batch-interpreter=python-fu-eval and a --batch expression that executes this folder's batch-start.py. Keep that process running; do not pass --quit.
A controlled GIMP 3.2.6 session opened a layered ORA, adjusted a named layer, exported a PNG and saved an XCF through an SDK 2.x in-process client. This verifies only that exercised edit path, not every registered tool or external stdio editing. A longer file-operation timeout addresses an observed export timeout.
The built wheel was also installed into an isolated target on 2026-11-05. Both its Python module and installed Windows gimp-mcp-studio.exe entry point successfully returned the same 89-tool registry over a real SDK 2 stdio connection. The wheel includes the companion plug-in, installer, batch-start script, GPL license, and notice. That transport/package probe calls discovery only and does not establish live editing coverage for every tool. On restricted Windows environments, use a writable TEMP/TMP directory when building or installing.
A separate read-only SDK 2 stdio probe of the running GIMP 3.2.6 instance on 2026-11-05 discovered 1,034 installed PDB procedures and 182 GEGL operations, alongside the 88 registered MCP tools. It paged every name and inspected five representative PDB schemas, without executing any discovered procedure or filter. These counts describe the installed environment, not guaranteed execution coverage or a maximum capability limit. GEGL property description was deliberately skipped in this strictly read-only probe because its implementation constructs and deletes a temporary filter on an existing layer.
A subsequent isolated GIMP 3.2.6 helper regression probe verified that native GEGL configuration is applied and updated before merging: the sharpen fixture produced a nonzero pixel change, while an invalid blur radius and an unknown property returned explicit errors. Local checks include validation of requested properties, clamped values, merge-error propagation, and the SDK 2 stdio registry. This confirms the exercised helper paths only; it does not extend coverage to every installed GEGL filter.
An isolated GIMP 3.2.6 snapshot regression session subsequently captured 24 actual full/detail views while exercising native object handles, checkpoint edits and restoration. Snapshots now duplicate the explicitly selected image, render its full composite, crop/scale that owned scratch image, and delete it; they no longer select a top layer through the global clipboard. Native alpha-preserving thumbnails cover sizes up to 1024 pixels, with PNG export for larger snapshots. The source ORA remained unchanged. Four snapshot tests exercise this behavior; this probe did not exercise every MCP tool.
A subsequent controlled native-semantics session on 2026-11-05 verified all 89 registered tools were discoverable, imported an original RGBA asset as a layer at explicit coordinates, created native GimpTextLayer text, and edited its content, font size and color with successful readback. It rejected a raster layer as editable text, created and attached a layer mask through actual PDB object handles, saved an XCF and reopened it to verify native text content, 40-pixel font size, position, original imported dimensions and mask persistence. The source ORA hash remained unchanged. This was a deterministic verification session without model calls, not proof of autonomous creative quality or every tool's execution. No client artwork is distributed with this project.
get_pixel_color returns encoded sRGB bytes through Babl (R'G'B'A u8), with explicit encoding and straight-alpha metadata. GEGL's linear get_rgba() values are not multiplied directly into CSS hex values. Native text state retains its linear-sRGB floats with an explicit encoding label. A controlled live swatch probe verified brand blue [11,95,255], encoded mid-gray 128, half alpha 128 without premultiplying RGB, and preserved RGB beneath zero alpha; its source PNG hash stayed unchanged. Six focused unit tests also cover conversion errors and invalid byte counts. This does not establish color accuracy for every image profile or output workflow.
add_text and edit_text use native Gimp.Font and Gimp.Unit objects and verify setter results plus property readback. Font substitutions are reported as requested/resolved names with fallback_used; they are not silent. Rasterized lettering remains rasterized. list_layers preserves its compatibility fields and adds native class, text state, mask, vector-layer and path inspection metadata, allowing callers to distinguish native objects from raster layers with descriptive names. import_layer imports a local file into the existing owned image and reports its actual dimensions and bounds. Generic PDB conversion also accepts local file values for GFile properties and explicit mask/path references; unsupported types still require adapters.
Export and geometry checks alone do not establish visual quality or product identity. Inspect the artwork before release; an unreviewed output is not an approved result.
Useful entry points:
gimp_mcp_server.py: MCP tool definitions and stdio server.gimp-mcp-plugin.py: GIMP 3 plug-in, local socket commands, PDB and GEGL adapters.install-plugin.ps1: profile detection, copy, and hash verification.
Upstream status
This directory has package metadata, a GPL license and attribution notice, protocol/registry checks, and a CI workflow intended for a standalone checkout. The standalone source is published at Onru-Labs/gimp-mcp-studio. Thirty-four local unit/protocol/helper/snapshot/import/native-text/color checks pass on Python 3.13, and the standalone Python 3.11/3.13 Linux CI matrix passed. The checks cover connection handling, file-operation timeouts, and tool registration; full MCP protocol conformance and every live GIMP operation remain unverified. Publication makes the source available; it does not establish upstream acceptance or full GIMP capability coverage.
Available Tools
89 toolsadd_textA
Add a text layer to an image.
Parameters:
text: The text string to render
x, y: Position of the text layer's top-left corner (default 0, 0)
font: Font family name — "Sans" (default), "Serif", etc.
size: Font size in pixels (default 24)
color: Text color (CSS name, hex, or rgb() string; default "black")
image_index: Target image index (default 0)
Returns: {layer_name, layer_id, text_width, text_height, position}
Inputs: text (required), x, y, font, +3 more.
adjust_brightness_contrastB
Adjust brightness and contrast of a layer.
Parameters:
brightness: -127 to +127 (default 0)
contrast: -127 to +127 (default 0)
image_index: Target image index (default 0)
layer_name: Layer to adjust; defaults to active layer
Returns status dict.
Inputs: contrast, brightness, layer_name, image_index.
adjust_color_balanceB
Adjust color balance (shadows / midtones / highlights) of a layer.
Parameters:
cyan_red: -100 to +100 (negative = cyan, positive = red; default 0)
magenta_green: -100 to +100 (default 0)
yellow_blue: -100 to +100 (default 0)
range: "shadows", "midtones" (default), "highlights"
image_index: Target image index (default 0)
layer_name: Layer to adjust; defaults to active layer
Returns status dict.
Inputs: range, cyan_red, layer_name, image_index, +2 more.
adjust_curvesB
Adjust tonal curves for a layer.
Parameters:
preset: Built-in curve shape — "s_curve" (default), "lighten", "darken", "contrast"
points: Custom control points as [[input, output], ...] override (overrides preset)
channel: "value" (all), "red", "green", "blue", "alpha"
image_index: Target image index (default 0)
layer_name: Layer to adjust; defaults to active layer
Returns status dict.
Inputs: points, preset, channel, layer_name, +1 more.
adjust_hue_saturationB
Adjust hue, saturation, and lightness of a layer.
Parameters:
hue: Hue rotation -180 to +180 (default 0)
saturation: Saturation shift -100 to +100 (default 0)
lightness: Lightness shift -100 to +100 (default 0)
color_range: "all", "red", "yellow", "green", "cyan", "blue", "magenta" (default "all")
image_index: Target image index (default 0)
layer_name: Layer to adjust; defaults to active layer
Returns status dict.
Inputs: hue, lightness, layer_name, saturation, +2 more.
apply_drop_shadowB
Apply a drop shadow effect to a layer.
Parameters:
offset_x, offset_y: Shadow offset in pixels (default 5, 5)
blur_radius: Shadow softness radius (default 10)
color: Shadow color (default "black")
opacity: Shadow opacity 0-100 (default 60)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: color, opacity, offset_x, offset_y, +3 more.
apply_embossA
Apply an emboss (bas-relief) effect to a layer.
Parameters:
azimuth: Light direction in degrees 0-360 (default 315 = top-left)
elevation: Light elevation angle 0-90 (default 45)
depth: Effect depth/intensity (default 2)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: depth, azimuth, elevation, layer_name, +1 more.
apply_gaussian_blurB
Apply Gaussian blur as a destructive filter operation.
Parameters:
radius: Blur radius in pixels (default 5.0)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: radius, layer_name, image_index.
apply_noiseB
Add noise/grain to a layer.
Parameters:
amount: Noise intensity 0.0-1.0 (default 0.2)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: amount, layer_name, image_index.
apply_pixelateB
Pixelate a layer using a mosaic/block effect.
Parameters:
block_size: Size of each mosaic block in pixels (default 10)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: block_size, layer_name, image_index.
apply_vignetteB
Apply a vignette darkening effect around the edges of a layer.
Parameters:
softness: Edge softness / fade width (default 3.0)
shape: Shape factor — 1.0 = elliptical (default), values >1 = more rectangular
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: shape, softness, layer_name, image_index.
auto_levelsB
Automatically stretch the tonal range of an image (auto levels / auto stretch contrast).
Parameters:
image_index: Index of the target image (default 0)
layer_name: Name of the layer to adjust; defaults to active layer
Returns status dict.
Inputs: layer_name, image_index.
batch_exportA
Export all open images (or a specific one) to a directory.
Parameters:
output_dir: Directory to write exported files into
format: "png", "jpeg", "webp", "tiff" (default "png")
quality: JPEG/WEBP quality (default 90)
name_pattern: Filename template — use {name} for image name, {index} for position
image_index: If set, export only that image; omit to export all open images
Returns:
exported: list of {file_path, name, width, height}
count: number of files written
errors: list of any export errors
Inputs: output_dir (required), format, quality, image_index, +1 more.
batch_resizeA
Resize all open images to a common target size.
Parameters:
width / height: Target dimensions in pixels (provide one or both)
scale_factor: Proportional scale (e.g. 0.5 = 50%); overrides width/height if set
maintain_aspect: Preserve aspect ratio when only one dimension is given (default True)
Returns: {results: [{image_id, old_width, old_height, new_width, new_height}], count}
Inputs: width, height, scale_factor, maintain_aspect.
blurB
Apply Gaussian blur to a layer.
Parameters:
radius_x: Horizontal blur radius in pixels (default 5.0)
radius_y: Vertical blur radius in pixels (default 5.0)
image_index: Target image index (default 0)
layer_name: Layer to blur; defaults to active layer
Returns status dict.
Inputs: radius_x, radius_y, layer_name, image_index.
call_apiA
Call GIMP 3.2 API methods through PyGObject console.
GIMP MCP Protocol:
Use api_path="exec" to execute Python code in GIMP
args[0] should be "pyGObject-console" for executing commands
args[1] should be array of Python code strings to execute
Commands execute in persistent context - imports and variables persist
Always call Gimp.displays_flush() after drawing operations
For image operations, use get_image_bitmap() which return proper MCP Image objects that Claude can process directly.
GUIDANCE PROMPTS:
For common operations and best practices, invoke the 'gimp_best_practices' prompt
For complex multi-element drawings with layers, invoke the 'gimp_iterative_workflow' prompt
Optional Initialization Pattern: ["images = Gimp.get_images()", "image1 = images[0]", "layers = image1.get_layers()", "layer1 = layers[0]", "drawable1 = layer1"]
Common Operations:
Draw line: ["Gimp.pencil(drawable1, [0, 0, 200, 200])", "Gimp.displays_flush()"]
Set color: ["from gi.repository import Gegl", "red_color = Gegl.Color.new('red')", "Gimp.context_set_foreground(red_color)"]
Draw ellipse: ["Gimp.Image.select_ellipse(image1, Gimp.ChannelOps.REPLACE, 100, 100, 30, 20)", "Gimp.Drawable.edit_fill(drawable1, Gimp.FillType.FOREGROUND)", "Gimp.Selection.none(image1)", "Gimp.displays_flush()"]
Paint curve: ["Gimp.paintbrush_default(drawable1, [50.0, 50.0, 150.0, 200.0, 250.0, 50.0, 350.0, 200.0])", "Gimp.displays_flush()"]
Draw bezier curve: ["path = Gimp.Path.new(image1, 'my_bezier_path')", "image1.insert_path(path, None, 0)", "stroke_id = path.bezier_stroke_new_moveto(100, 100)", "path.bezier_stroke_cubicto(stroke_id, 150, 50, 250, 150, 300, 100)", "Gimp.Drawable.edit_stroke_item(drawable1, path)", "Gimp.Selection.none(image1)", "Gimp.displays_flush()"]
Get open filenames: ["print([x.get_file().get_path() for x in Gimp.get_images()])"]
Copy layer between images: ["image1 = Gimp.get_images()[0]", "image2 = Gimp.get_images()[1]", "width = image1.get_width()", "height = image1.get_height()", "image1.select_rectangle(Gimp.ChannelOps.REPLACE, 0, 0, width, height)", "image1_layers = image1.get_selected_layers()", "drawable = image1_layers[0]", "Gimp.edit_copy([drawable])", "image2_layers = image2.get_layers()", "target_drawable = image2_layers[0]", "floating_sel = Gimp.edit_paste(target_drawable, True)[0]", "Gimp.floating_sel_anchor(floating_sel)", "Gimp.displays_flush()"]
New image: ["image1 = Gimp.Image.new(350, 800, Gimp.ImageBaseType.RGB)", "layer1 = Gimp.Layer.new(image1, 'Background', 350, 800, Gimp.ImageType.RGB_IMAGE, 100, Gimp.LayerMode.NORMAL)", "image1.insert_layer(layer1, None, 0)", "drawable1 = layer1", "white_color = Gegl.Color.new('white')", "Gimp.context_set_background(white_color)", "Gimp.Drawable.edit_fill(drawable1, Gimp.FillType.BACKGROUND)", "Gimp.Display.new(image1)"]
Important Tips:
When filling layers with color, ensure layer has alpha channel using Gimp.Layer.add_alpha()
Use Gimp.Drawable.fill() for reliable full-layer fills
Specify colors precisely with rgb(R, G, B) or rgba(R, G, B, A) to avoid transparency issues
After drawing operations, always call Gimp.displays_flush()
After selection operations for drawing, unselect with Gimp.Selection.none(image1)
GIMP 3.2 API Changes:
Use Gimp.get_images() instead of deprecated Gimp.list_images()
Use image.get_layers() instead of Gimp.get_active_layer()
gimpfu module not available in GIMP 3.2
Colors created with Gegl.Color.new('color_name')
Full API documentation: https://developer.gimp.org/api/3.0/libgimp/
Parameters:
api_path: Use "exec" for Python execution
args: ["pyGObject-console", ["python_code_array"]] or ["pyGObject-eval", ["expression"]]
kwargs: Dictionary of keyword arguments (rarely used)
Returns:
JSON string of the result or error message
Inputs: api_path (required), args, kwargs. Returns: result
check_serverA
Check whether the GIMP MCP plugin socket is reachable and responding.
Returns a status dict:
connected: bool
host / port: where it tried
gimp_version: if connected successfully
error: description if not connected
Use this before any other operation to verify the GIMP plugin is running. If not connected, open GIMP and run Tools > Start MCP Server.
Inputs: no named parameters.
close_imageB
Close an image, optionally saving as XCF first.
Parameters:
image_index: Index of the image to close (default 0)
save_first: If True, save as XCF before closing (default False)
Returns status dict.
Inputs: save_first, image_index.
convert_color_modeB
Convert an image to a different color mode.
Parameters:
mode: "RGB", "GRAY", or "INDEXED"
num_colors: Number of colors for INDEXED mode (default 256)
image_index: Target image index (default 0)
Returns status dict.
Inputs: mode (required), num_colors, image_index.
create_layerA
Create and insert a new layer into an image.
Parameters:
name: Layer name (default "New Layer")
width, height: Layer dimensions; defaults to image dimensions
fill: Initial fill — "transparent" (default), "white", "black", or any CSS color
opacity: Layer opacity 0-100 (default 100)
blend_mode: GIMP layer mode name — "NORMAL" (default), "MULTIPLY", "SCREEN", etc.
position: Stack position — -1 = top (default), 0 = bottom
image_index: Target image index (default 0)
Returns: {layer_name, layer_id, width, height, position}
Inputs: fill, name, width, height, +4 more.
crop_to_rectB
Crop the image canvas to an explicit rectangle.
Parameters:
x, y: Top-left corner of the crop rectangle
width, height: Dimensions of the crop rectangle
image_index: Target image index (default 0)
Returns: {status, x, y, width, height}
Inputs: x (required), y (required), width (required), height (required), +1 more.
crop_to_selectionB
Crop the image canvas to the current selection bounds.
Parameters:
autocrop: If True, auto-detect crop bounds instead of using selection (default False)
image_index: Target image index (default 0)
Returns: {status, x, y, width, height} — crop region applied
Inputs: autocrop, image_index.
delete_layerB
Delete a layer from an image.
Parameters:
layer_name: Name of the layer to delete
layer_index: Position index of the layer (alternative to layer_name)
image_index: Target image index (default 0)
Provide either layer_name or layer_index. Defaults to active layer if neither given.
Returns status dict.
Inputs: layer_name, image_index, layer_index.
denoiseB
Reduce noise in a layer using GEGL noise-reduction.
Parameters:
strength: Noise reduction strength 0-100 (default 50)
image_index: Target image index (default 0)
layer_name: Layer to denoise; defaults to active layer
Returns status dict.
Inputs: strength, layer_name, image_index.
desaturateB
Convert a layer to grayscale (desaturate).
Parameters:
mode: Desaturation algorithm — "luminosity" (default), "luma", "average", "lightness"
image_index: Target image index (default 0)
layer_name: Layer to desaturate; defaults to active layer
Returns status dict.
Inputs: mode, layer_name, image_index.
draw_ellipseA
Draw an ellipse outline (stroke only) on a layer.
Parameters:
x, y: Top-left corner of the bounding box
width, height: Bounding box dimensions
color: Stroke color; uses current foreground if omitted
line_width: Stroke width in pixels (default 2.0)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), width (required), height (required), +4 more.
draw_lineA
Draw a straight line on a layer.
Parameters:
x1, y1: Start point
x2, y2: End point
color: Stroke color (CSS / hex / rgb); uses current foreground if omitted
width: Stroke width in pixels (default 2.0)
tool: "pencil" (default, hard edge) or "paintbrush" (soft edge)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +5 more.
draw_rectangleA
Draw a rectangle outline (stroke only) on a layer.
Parameters:
x, y: Top-left corner
width, height: Rectangle dimensions
color: Stroke color; uses current foreground if omitted
line_width: Stroke width in pixels (default 2.0)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), width (required), height (required), +4 more.
duplicate_layerA
Duplicate a layer and insert the copy above it.
Parameters:
layer_name: Name of the layer to duplicate; defaults to active layer
image_index: Target image index (default 0)
Returns: {layer_name, layer_id}
Inputs: layer_name, image_index.
edit_textA
Edit an existing text layer's content or formatting.
Parameters:
layer_name: Name of the text layer to edit
text: New text content (omit to leave unchanged)
font: New font family (omit to leave unchanged)
size: New font size in pixels (omit to leave unchanged)
color: New text color (omit to leave unchanged)
image_index: Target image index (default 0)
Returns status dict.
Inputs: layer_name (required), font, size, text, +2 more.
export_icon_sizesA
Export an image as a complete icon set for Android or iOS.
Android sizes: 48 (mdpi), 72 (hdpi), 96 (xhdpi), 144 (xxhdpi), 192 (xxxhdpi), 512 (Play Store) iOS sizes: 20x1/2/3, 29x1/2/3, 40x2/3, 60x2/3, 76x1/2, 83.5x2, 1024x1
Parameters:
output_dir: Directory to write icon files into
platform: "android" (default) or "ios"
source_image_index: Image to use as source (default 0)
format: Output format — "png" (default)
Returns: {exported: [{size, file_path}], count, platform}
Inputs: output_dir (required), format, platform, source_image_index.
export_imageA
Export the current image to a raster file (PNG, JPEG, WEBP, TIFF).
Parameters:
file_path: Absolute path for the output file
format: Output format — "png" (default), "jpeg", "webp", "tiff"
quality: JPEG/WEBP quality 1-100 (default 90; ignored for PNG/TIFF)
flatten: Flatten all layers before export (default True)
image_index: Index of the image to export (default 0)
Returns:
status, file_path, format, file_size_bytes
Inputs: file_path (required), format, flatten, quality, +1 more.
export_social_media_kitA
Export an image resized for multiple social media platforms.
Platform sizes (all in pixels):
instagram_square: 1080x1080
instagram_story: 1080x1920
twitter_header: 1500x500
facebook_cover: 820x312
youtube_thumbnail: 1280x720
Parameters:
output_dir: Directory to write output files
platforms: List of platform names to export (omit for all five)
image_index: Source image index (default 0)
Returns: {exported: [{platform, file_path, width, height}], count}
Inputs: output_dir (required), platforms, image_index.
export_sprite_sheetA
Combine multiple frames into a sprite sheet PNG.
Parameters:
output_path: Absolute path for the output PNG file
columns: Number of columns in the grid (defaults to square root of frame count)
padding: Pixel gap between frames (default 0)
source: "layers" (each layer is a frame; default) or "images" (each open image)
image_index: Source image when source="layers" (default 0)
Returns: {file_path, columns, rows, frame_width, frame_height, count}
Inputs: output_path (required), source, columns, padding, +1 more.
export_web_optimizedA
Export an image as both JPEG and PNG, choosing the smaller format.
Parameters:
output_dir: Directory to write output files
jpeg_quality: JPEG quality 1-100 (default 85)
png_compression: PNG compression level 0-9 (default 9)
max_width / max_height: Optional scaling before export
image_index: Source image index (default 0)
Returns: {jpeg_path, jpeg_size, png_path, png_size, recommendation}
Inputs: output_dir (required), max_width, max_height, image_index, +2 more.
fill_ellipseB
Fill an elliptical region with a solid color.
Parameters:
x, y: Top-left corner of the bounding box
width, height: Bounding box dimensions
color: Fill color (CSS name, hex, or rgb() string)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), color (required), width (required), +3 more.
fill_layerB
Fill an entire layer with a solid color.
Parameters:
color: Fill color as CSS name, hex, or rgb() string
layer_name: Layer to fill; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: color (required), layer_name, image_index.
fill_rectangleB
Fill a rectangular region with a solid color.
Parameters:
x, y: Top-left corner
width, height: Rectangle dimensions
color: Fill color (CSS name, hex, or rgb() string)
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), color (required), width (required), +3 more.
fill_selectionB
Fill the current selection with a color or fill type.
Parameters:
color: Fill color as CSS name, hex, or rgb() string (used when fill_type is omitted)
fill_type: Fill type override: "foreground", "background", or "transparent"
image_index: Target image index (default 0)
layer_name: Target layer; defaults to active layer
Returns status dict.
Inputs: color, fill_type, layer_name, image_index.
flatten_imageB
Flatten all layers into a single background layer.
Parameters:
image_index: Target image index (default 0)
Returns status dict.
Inputs: image_index.
flip_imageB
Flip the entire image horizontally or vertically.
Parameters:
direction: "horizontal" (default) or "vertical"
image_index: Target image index (default 0)
Returns status dict.
Inputs: direction, image_index.
gegl_apply_filterC
Append a named, editable, non-destructive GEGL filter to a layer.
Inputs: operation (required), properties (required), name, opacity, +2 more.
gegl_describe_operationC
Inspect a live GEGL filter's property schema on a layer before applying it.
Inputs: operation (required), layer_name, image_index.
gegl_filter_actionB
Change a filter's visibility/opacity or remove it by its GIMP filter ID.
Inputs: action (required), filter_id (required), opacity, visible.
gegl_list_filtersC
List the editable non-destructive filters attached to a layer.
Inputs: layer_name, image_index.
gegl_list_operationsC
Discover installed GIMP 3.2 GEGL filters with paging; patterns are case-insensitive regex.
Inputs: limit, offset, pattern.
get_context_stateA
Get the current GIMP context state (colors, brush, settings).
IMPORTANT: Context state can be changed by the user in GIMP UI at any time. Check context state before operations that depend on specific settings.
Returns information about:
Foreground and background colors (RGB/RGBA values)
Current brush and its properties
Opacity setting (0-100%)
Paint/blend mode
Feather state and radius
Antialiasing state
Use cases:
Verify colors before drawing operations
Check if feathering is enabled (avoid unwanted blurry edges)
Ensure correct opacity and blend mode
Detect if user changed settings in GIMP UI
Returns:
Dictionary containing current context state
Raises exception if unable to get context state
Inputs: no named parameters.
get_gimp_infoA
Get comprehensive information about the GIMP installation and environment.
Returns detailed information about GIMP that AI assistants need to understand the current environment, including:
GIMP version and build information
Installation paths and directories
Available plugins and procedures
System configuration
Runtime environment details
This information helps AI assistants provide better support and troubleshooting by understanding the specific GIMP setup they're working with.
Returns:
Dictionary containing comprehensive GIMP environment information
Raises exception if GIMP connection fails
Inputs: no named parameters.
get_histogramA
Get histogram statistics for a channel of the active layer.
Parameters:
channel: "value" (all; default), "red", "green", "blue", "alpha"
image_index: Target image index (default 0)
Returns: {mean, median, std_dev, min, max, pixels, count}
Inputs: channel, image_index.
get_image_bitmapA
Get the current open image in GIMP as an Image object with optional scaling and region selection.
No size restrictions — pass any max_width/max_height you need. For large images, omit max_width/max_height to get the full resolution.
Supports two main use cases:
Full image with optional scaling (pass max_width/max_height)
Region extraction with optional scaling (pass region dict)
Parameters:
max_width, max_height: Target dimensions for scaling (aspect-ratio preserved). Omit for full resolution.
region: Dictionary with keys:
origin_x, origin_y: Top-left corner of region to extract
width, height: Dimensions of region to extract
max_width, max_height: Optional scaling for the extracted region
Examples:
Full image at full res: get_image_bitmap()
Full image scaled: get_image_bitmap(max_width=2048, max_height=2048)
Region: get_image_bitmap(region={"origin_x": 0, "origin_y": 0, "width": 512, "height": 512})
Returns:
Image object containing PNG data in MCP-compliant format
Includes width, height, and base64-encoded image data
The returned Image object automatically handles base64 encoding and MIME types according to the Model Context Protocol specification.
Raises:
RuntimeError if no image is open, region is invalid, or export fails
Inputs: region, max_width, max_height.
get_image_metadataA
Get metadata about the current open image in GIMP without the bitmap data.
Returns detailed information about the currently active image including:
Image dimensions (width, height)
Color mode and base type
Number of layers and channels
File information if available
Layer structure and properties
This is much faster than get_image_bitmap() since it doesn't export the actual image data. Perfect for when you only need to know image properties for decision making.
Returns:
Dictionary containing comprehensive image metadata
Raises exception if no images are open
Inputs: no named parameters.
get_pixel_colorB
Get the color of a single pixel.
Parameters:
x, y: Pixel coordinates
image_index: Target image index (default 0)
layer_name: Layer to sample from; defaults to active layer
Returns: {color_hex, color_rgb: [r, g, b], alpha}
Inputs: x (required), y (required), layer_name, image_index.
get_selection_boundsB
Get the bounding rectangle of the current selection.
Parameters:
image_index: Target image index (default 0)
Returns: {has_selection, x, y, width, height}
Inputs: image_index.
get_state_snapshotA
Return a live visual snapshot of the current image state — no file save needed.
AI agents call this to get immediate visual feedback after any edit operation, letting them verify results and decide next steps without saving to disk.
Parameters:
image_index: Which open image to snapshot (default: 0 = most recent)
max_size: Maximum width/height of the returned preview in pixels (default: 512)
region: Optional dict {x, y, width, height} to zoom into a specific area e.g. {"x": 200, "y": 300, "width": 100, "height": 80} for mouth area
label: Optional annotation label (logged but not drawn — for agent bookkeeping)
Returns:
PNG image of the current GIMP canvas state (with alpha if present)
Typical agent workflow: 1. open_image / new_canvas 2. 3. get_state_snapshot() ← see result, decide next step 4. 5. get_state_snapshot(region={"x":200,"y":300,"width":100,"height":80}) 6. export_image when satisfied
Inputs: label, region, max_size, image_index.
gradient_fillA
Fill a layer or selection with a gradient.
Parameters:
color1: Start color (default "black")
color2: End color (default "white")
x1, y1: Gradient start point (default top-left 0,0)
x2, y2: Gradient end point (defaults to bottom-right of image)
gradient_type: "linear" (default) or "radial"
layer_name: Target layer; defaults to active layer
image_index: Target image index (default 0)
Returns status dict.
Inputs: x1, x2, y1, y2, +5 more.
import_layerA
Import an existing local asset as a layer into the owned, already open image.
Preserves the file's pixels/alpha and native dimensions. x/y are exact canvas pixel offsets; position is the top-to-bottom insertion index (0 means top). Does not open another image. Returns actual layer ID, name, bounds and image ID.
Inputs: file_path (required), x, y, name, +2 more.
invert_colorsB
Invert all colors in a layer (create a negative).
Parameters:
image_index: Target image index (default 0)
layer_name: Layer to invert; defaults to active layer
Returns status dict.
Inputs: layer_name, image_index.
invert_selectionC
Invert the current selection (select what is not selected).
Parameters:
image_index: Target image index (default 0)
Returns status dict.
Inputs: image_index.
list_fontsB
List available fonts installed in GIMP.
Parameters:
filter: Optional string to filter font names (case-insensitive substring match)
Returns: {fonts: [font_name, ...], count}
Inputs: filter.
list_imagesA
List all images currently open in GIMP.
Returns:
images: list of {index, image_id, name, width, height, color_mode, num_layers, file_path, is_dirty}
count: total number of open images
Inputs: no named parameters.
list_layersB
List all layers in an image with their properties.
Parameters:
image_index: Target image index (default 0)
Returns: {layers: [{name, id, visible, opacity, blend_mode, width, height, has_alpha}], count}
Inputs: image_index.
merge_visible_layersB
Merge all visible layers into a single layer.
Parameters:
image_index: Target image index (default 0)
Returns: {layer_name, layer_id}
Inputs: image_index.
modify_selectionB
Grow, shrink, feather, border, or sharpen the current selection.
Parameters:
operation: "grow", "shrink", "feather", "border", "sharpen"
amount: Pixel radius for grow/shrink/feather/border; ignored for sharpen
image_index: Target image index (default 0)
Returns status dict.
Inputs: amount (required), operation (required), image_index.
new_canvasA
Create a new blank canvas in GIMP and open it in a display window.
Parameters:
width: Canvas width in pixels
height: Canvas height in pixels
name: Layer/image name (default: "Untitled")
color_mode: "RGB" (default), "RGBA", "GRAY", "GRAYA"
fill: Fill color for the background layer. Any CSS color name or hex string: "white" (default), "black", "transparent", "#FF5733", "rgb(100,200,50)", etc.
resolution: DPI resolution (default: 72)
Returns:
image_id: internal GIMP image ID
width / height: confirmed dimensions
color_mode: confirmed mode
display_opened: whether a GIMP window was opened
Examples:
new_canvas(1024, 1024) — white 1024x1024 RGB canvas
new_canvas(1920, 1080, name="Background", fill="black")
new_canvas(512, 512, color_mode="RGBA", fill="transparent")
Inputs: width (required), height (required), fill, name, +2 more.
open_imageA
Open an image file in GIMP and create a display window.
Parameters:
file_path: Absolute path to the image file to open (PNG, JPEG, TIFF, etc.)
Returns:
image_id: internal GIMP image ID
width / height: image dimensions in pixels
color_mode: RGB / Grayscale / Indexed
num_layers: number of layers in the image
display_opened: whether a GIMP display window was created
Inputs: file_path (required).
pdb_describeA
Inspect a GIMP PDB procedure's argument and return schemas without running it.
Inputs: name (required).
pdb_runA
Run one installed GIMP PDB procedure using named JSON-compatible arguments.
This can modify the current document. Search and describe first. Procedures accept JSON scalars and arrays; object values use explicit references such as {"$ref": "image", "index": 0} or {"$ref": "layer", "index": 0, "image_index": 0}. Layer indices include nested layers. Drawable references resolve against the image's selected drawables. Inspect the schema first. Arbitrary Python/Scheme evaluation and GIMP shutdown procedures are blocked.
Inputs: name (required), arguments (required).
pdb_searchA
Search procedures installed in this GIMP instance (read-only discovery).
Use this when a focused tool does not cover the operation. Search any of GIMP's PDB metadata fields (name, blurb, help, help_id, authors, copyright, date, proc_type) using a regex, then call pdb_describe before execution. Results are paged because GIMP commonly exposes hundreds of procedures.
Inputs: field, limit, offset, pattern.
redoA
Redo one or more previously undone operations on an image.
Parameters:
steps: Number of redo steps (default 1)
image_index: Target image index (default 0)
Returns: {steps_redone}
Inputs: steps, image_index.
rename_layerB
Rename a layer.
Parameters:
new_name: New name for the layer
old_name: Current name of the layer to rename
layer_index: Position index alternative to old_name
image_index: Target image index (default 0)
Returns: {old_name, new_name}
Inputs: new_name (required), old_name, image_index, layer_index.
reorder_layerB
Move a layer to a new stack position.
Parameters:
new_position: Target stack index (0 = bottom)
layer_name / layer_index: Identify the layer (defaults to active layer)
image_index: Target image index (default 0)
Returns status dict.
Inputs: new_position (required), layer_name, image_index, layer_index.
resize_canvasA
Resize the image canvas without scaling the content.
Parameters:
width, height: New canvas dimensions in pixels
anchor: Position of existing content — "center" (default), "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right"
fill: Color for new canvas areas — CSS color or "transparent"
image_index: Target image index (default 0)
Returns: {status, width, height, offset_x, offset_y}
Inputs: width (required), height (required), fill, anchor, +1 more.
restart_serverA
Drop and re-establish the connection to the GIMP MCP plugin.
Use this when:
GIMP was restarted after Claude Code was already running
The socket connection dropped mid-session
check_server() shows not connected but GIMP is open
Returns the new connection status (same format as check_server).
Inputs: no named parameters.
rotate_imageB
Rotate the entire image.
Parameters:
angle: Rotation in degrees — 90, 180, 270 use lossless GIMP rotation; other values rotate all layers with interpolation and flatten
image_index: Target image index (default 0)
Returns status dict.
Inputs: angle (required), image_index.
save_xcfA
Save the current image as a GIMP XCF file (preserves all layers and metadata).
Parameters:
file_path: Absolute path for the output .xcf file
image_index: Index of the image to save (default 0 = first open image)
Returns:
status: "success" or "error"
file_path: confirmed output path
Inputs: file_path (required), image_index.
scale_imageA
Scale an image to exact pixel dimensions.
Parameters:
width: Target width in pixels
height: Target height in pixels
interpolation: "cubic" (default), "linear", "none"
image_index: Target image index (default 0)
Returns: {status, width, height}
Inputs: width (required), height (required), image_index, interpolation.
scale_to_fitA
Scale an image to fit within a bounding box, preserving aspect ratio.
Parameters:
max_width: Maximum allowed width in pixels
max_height: Maximum allowed height in pixels
interpolation: "cubic" (default), "linear", "none"
image_index: Target image index (default 0)
Returns: {status, width, height} — final dimensions after scaling
Inputs: max_width (required), max_height (required), image_index, interpolation.
select_allC
Select the entire image canvas.
Parameters:
image_index: Target image index (default 0)
Returns status dict.
Inputs: image_index.
select_by_colorB
Select regions by color similarity.
Parameters:
color: Target color as CSS name, hex (#rrggbb), or rgb() string
threshold: Color similarity tolerance 0-255 (default 15)
operation: "replace" (default), "add", "subtract", "intersect"
image_index: Target image index (default 0)
layer_name: Layer to sample from; defaults to active layer
Returns status dict.
Inputs: color (required), operation, threshold, layer_name, +1 more.
select_ellipseB
Create an elliptical selection.
Parameters:
x, y: Top-left corner of the bounding box
width, height: Bounding box dimensions
operation: "replace" (default), "add", "subtract", "intersect"
feather: Feather radius in pixels (default 0)
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), width (required), height (required), +3 more.
select_noneB
Remove / deselect all selections.
Parameters:
image_index: Target image index (default 0)
Returns status dict.
Inputs: image_index.
select_rectangleB
Create a rectangular selection.
Parameters:
x, y: Top-left corner of the selection
width, height: Dimensions of the selection
operation: "replace" (default), "add", "subtract", "intersect"
feather: Feather radius in pixels (default 0 = no feather)
image_index: Target image index (default 0)
Returns status dict.
Inputs: x (required), y (required), width (required), height (required), +3 more.
set_active_imageA
Raise a specific image to the front / make it active in GIMP.
Parameters:
image_index: Index of the image to activate (from list_images)
Returns status dict.
Inputs: image_index (required).
set_colorsA
Set the GIMP foreground and/or background color.
Parameters:
foreground: New foreground color (CSS name, hex, rgb()); omit to leave unchanged
background: New background color; omit to leave unchanged
Returns: {foreground, background} confirmation dict.
Inputs: background, foreground.
set_layer_propertiesA
Set properties on an existing layer.
Parameters:
layer_name / layer_index: Identify the layer (defaults to active layer)
opacity: New opacity 0-100 (omit to leave unchanged)
blend_mode: New GIMP layer mode name (omit to leave unchanged)
visible: True/False visibility (omit to leave unchanged)
image_index: Target image index (default 0)
Returns status dict.
Inputs: opacity, visible, blend_mode, layer_name, +2 more.
sharpenB
Sharpen a layer using unsharp mask.
Parameters:
amount: Sharpening strength 0-500 (default 50.0)
radius: Blur radius for the mask in pixels (default 3.0)
threshold: Minimum difference before sharpening is applied (default 0)
image_index: Target image index (default 0)
layer_name: Layer to sharpen; defaults to active layer
Returns status dict.
Inputs: amount, radius, threshold, layer_name, +1 more.
transform_layerA
Apply a bounded, named-layer 2D transform without changing the canvas.
Rotation is in degrees. Translation and optional pivot coordinates are image pixels. The default pivot is the layer center. This changes visible pixels; it does not invent a new camera view or reveal hidden product surfaces.
Inputs: layer_name (required), pivot_x, pivot_y, scale_x, +5 more.
undoB
Undo one or more operations on an image.
Parameters:
steps: Number of undo steps (default 1)
image_index: Target image index (default 0)
Returns: {steps_undone}
Inputs: steps, image_index.
warp_regionA
Warp / liquify a region of the image by pushing pixels in a direction.
Uses GEGL warp (GIMP 3 native) with plug-in-iwarp fallback. Ideal for subtle facial expression edits — e.g. turning a neutral mouth into a smile by pushing the mouth corners upward.
Parameters:
vectors: List of warp stroke dicts, each with:
x, y : center of the warp influence (pixels)
dx, dy : push direction — negative dy = push upward
radius : influence radius in pixels (default: 40)
amount : deform strength 0–1 (default: 0.3)
image_index: Which open image to edit (default: 0)
layer_name: Target layer; omit to use the active/top layer
Examples — make a character smile: warp_region(vectors=[ {"x": 215, "y": 355, "dx": 5, "dy": -8, "radius": 18, "amount": 0.45}, {"x": 295, "y": 355, "dx": -5, "dy": -8, "radius": 18, "amount": 0.45}, {"x": 255, "y": 370, "dx": 0, "dy": -4, "radius": 22, "amount": 0.30}, ])
Returns: {"warped_vectors": N}
Inputs: vectors (required), layer_name, image_index.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 89 tools
Most tools map to a distinct operation, but several pairs overlap significantly: blur vs apply_gaussian_blur (both Gaussian blur, destructive vs non-destructive), get_image_bitmap vs get_state_snapshot (both return a PNG of the current image), and scale_image vs scale_to_fit vs batch_resize. The generic escape hatches (pdb_run, call_api, gegl_apply_filter) also overlap with the focused effect tools (sharpen, denoise, apply_pixelate), forcing agents to guess which path is intended.
The set is overwhelmingly snake_case verb_noun (create_layer, select_rectangle, export_image, apply_noise), which is predictable. Deviations are minor: some filters use a bare verb (sharpen, blur, denoise) while siblings use apply_ (apply_emboss, apply_vignette), and the gegl_/pdb_ namespaces put the qualifier before the verb (gegl_list_filters vs list_layers).
89 tools is far beyond the practical range and clearly over-scoped; the effect/filter surface alone is split across dozens of near-duplicate entries (adjust_curves, auto_levels, adjust_brightness_contrast vs the GEGL filter tools). While image editing is a broad domain, a large fraction of these tools could be consolidated without losing capability.
Coverage is unusually thorough: lifecycle (new/open/save/export/close), layers, selections, transforms, drawing, text, filters, batch operations, and named export presets are all present. Gaps remain around layer masks, channels, and paths, but pdb_run/call_api provide a workaround for those.
Maintenance
Related MCP Connectors
Browse, search, upload, tag, transfer, and delete images in your Raster libraries over MCP.
Hosted MCP server for AI photo editing: nothing to install, no desktop photo editor needed.
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that bridges GIMP 3.0 with natural language commands, enabling conversational image editing through Claude Desktop and other MCP clients. Exposes GIMP's full PyGObject API for AI-powered image manipulation.289GPL 3.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows LLMs to control GIMP programmatically, including images, layers, selections, text, transforms, filters, and arbitrary Script-Fu code.MIT
- AlicenseAqualityCmaintenanceEnables scripted image editing with GIMP 3, including cropping, resizing, aspect-ratio fitting, dimension-spec validation, batch processing, and live control of a running GIMP instance.181MIT
- AlicenseBqualityBmaintenanceEnables 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.3276 PyPI5Apache 2.0