# GIMP Agent MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/SarutobiSasuke8/gimp-agent-mcp  
**GitHub Stars:** 5  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gimp-agent-mcp

## Description
GIMP 3 for AI agents: every PDB procedure and GEGL filter, renders, pixel measurement, recipes.

## Tools
Capabilities this server exposes over MCP:

- **gimp_help** — Read this first. How to work with GIMP through this server, by topic: start, filters, colours, text, masks, paths, layers, measure, recipes, compose, errors, or all.
- **gimp_status** — Check whether GIMP and the agent bridge are reachable. Returns GIMP version, mode, and open images.
- **gimp_launch** — Start GIMP 3 with the bridge running. mode='gui' opens the normal window; 'headless' runs gimp-console with no UI.
- **gimp_shutdown** — Stop the bridge. quit_gimp defaults to True for headless sessions and False for the GUI (unsaved work is not prompted for).
- **gimp_context** — Read a document's selected layers, selection bounds and bridge colour/brush context. Optionally select layers or present a GUI document. With multiple images pass image_id; focused-image detection is unavailable, never inferred from list order.
- **gimp_edit_batch** — Run 1..100 edits on one image in ONE undo group. steps=[{op:'layer'|'text'|'select'|'path'|'layer_mask'|'apply_filter', params:{...}}]. Params use the corresponding tool arguments; image_id is injected. Reference an earlier result with {'$ref':'0.id'}. Check complete/error: failure stops later steps, preserves partial work, and always closes the undo group. One Ctrl+Z in GIMP reverts it; this is not automatic rollback or programmatic undo. No edits by another bridge request interleave within the batch.
- **gimp_list_images** — List open images with ids, dimensions, file path, and layer count.
- **gimp_image_info** — Full structure of one image: layer tree with item ids, channels, paths, selection bounds, resolution.
- **gimp_new_image** — Create an RGB image with one layer. fill: 'transparent', 'white', 'black', 'foreground', 'background' or any colour.
- **gimp_open** — Open an image file (PNG, JPEG, WebP, XCF, PSD, SVG, ...) and return its structure.
- **gimp_export** — 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.
- **gimp_close_image** — Close an image without saving.
- **gimp_render** — Render an image as PNG. layer_id isolates a layer; region crops. Diagnostic overlays may include grid, layers, selection and points. points=[{"x": 100, "y": 80, "label": "target"}]. Overlays affect only the returned preview.
- **gimp_pdb_search** — Search GIMP's Procedure Database by words in the procedure name (e.g. 'image scale', 'layer text', 'file png').
- **gimp_pdb_describe** — Describe a PDB procedure: arguments with types, defaults and enum choices, plus return values.
- **gimp_pdb_call** — Call any PDB procedure by name with arguments keyed by name. Pass images/items as ids, colours as strings, enums by nick. Example: name="gimp-image-scale", args={"image": 3, "new-width": 800, "new-height": 600}; name="gimp-image-select-round-rectangle", args={"image": 3, "operation": "replace", "x": 10, "y": 10, "width": 200, "height": 80, "corner-radius-x": 20, "corner-radius-y": 20}. Use gimp_pdb_describe first when unsure.
- **gimp_filter_search** — Search the GEGL operations available as filters (e.g. 'blur', 'shadow', 'levels', 'noise').
- **gimp_filter_describe** — Describe a GEGL operation's properties (names, types, ranges, defaults).
- **gimp_apply_filter** — Apply a GEGL operation to a layer. mode='merge' bakes it in; mode='append' adds a non-destructive layer effect. Examples: white outline = op="gegl:dropshadow", params={"x":0,"y":0,"radius":0,"grow-radius":8,"color":"white"}; soft shadow = {"x":0,"y":6,"radius":12,"opacity":0.4}; blur = op="gegl:gaussian-blur", params={"std-dev-x":4,"std-dev-y":4}. gimp_help("filters") lists the useful ops.
- **gimp_adjust** — Common adjustments without discovery. action: brightness_contrast, hue_saturation, curves, desaturate, invert, blur, sharpen, noise, pixelate. mode='append' keeps GEGL actions editable; mode='merge' bakes pixels. curves is destructive and needs params={channel:'value', points:[0,0,1,1]}. Returns the installed operation description used.
- **gimp_layer_effects** — List the non-destructive filters currently attached to a layer.
- **gimp_measure** — 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.
- **gimp_snapshot** — Take a hidden snapshot of an image's current state so gimp_render_compare can show before/after later.
- **gimp_drop_snapshot** — Release a stored comparison snapshot. At most 16 may be retained per bridge; snapshots are also cleaned up when the bridge closes.
- **gimp_render_compare** — 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).
- **gimp_select** — 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.
- **gimp_canvas** — Common canvas operations without PDB discovery. action: scale, crop, resize, rotate (angle 90/180/270), flip (direction horizontal/vertical), merge_visible, flatten. Operations bake pixels or layer structure and return the installed PDB description plus final image info.
- **gimp_draw** — Fill or draw without PDB discovery. action: fill_layer, fill_selection, rectangle, ellipse, rectangle_outline, ellipse_outline, line. Colours use the normal CSS/#hex convention; coordinates are image pixels. Shapes clear their temporary selection. Drawing bakes pixels and returns every installed PDB operation used.
- **gimp_layer_mask** — 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.
- **gimp_layer** — 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.
- **gimp_layer_effect** — Edit or delete a non-destructive layer effect (ids from gimp_layer_effects). action='set' updates params/visible/opacity/blend_mode; 'delete' removes it.
- **gimp_list_fonts** — List installed font names, optionally filtered by a regex.
- **gimp_text** — 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.
- **gimp_path** — 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'.
- **gimp_remove_background** — 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.
- **gimp_run_python** — 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.
- **gimp_list_recipes** — List tested multi-step recipes and their parameters.
- **gimp_run_recipe** — Run a recipe by name with parameters. Recipes are Python jobs executed inside GIMP with defaults applied.
- **gimp_batch_recipe** — Run a recipe over every file matching input_glob, writing to output_dir. Recipes must accept input_path and output_path.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "gimp-agent-mcp": {
    "command": "uvx",
    "args": ["gimp-agent-mcp"]
  }
}
```

## Documentation

## What the GIMP Agent MCP MCP server does

GIMP Agent MCP MCP server lets an MCP client operate GIMP 3 on the same machine. It supports opening, creating, editing, rendering, measuring, and exporting images while keeping document structure such as named layers, text, paths, masks, and layer effects. The server can work with an existing GIMP window, launch a new GUI session, or run headless workflows for folders of images.

The project is aimed at workflows where an agent must inspect its output instead of only issuing edits. It can produce whole-image, layer, or region previews; compare before-and-after renders; measure pixel data; and save snapshots. Editable XCF files can be kept alongside delivery formats such as PNG.

## How it works

The MCP process communicates with a bridge running inside GIMP. After installing the plugin, start the bridge from GIMP's Filters → Development → Start Agent Bridge menu. An MCP client then starts `gimp-agent-mcp serve` through stdio. A shortcut can launch GIMP with the bridge enabled, and `gimp_launch` supports either GUI or headless mode.

Image and item references use integer IDs. When multiple documents are open, the agent should select an explicit image ID with `gimp_context`; the public GIMP API does not reliably identify the document that has keyboard focus. The context tool can also bring a selected document to the front. If a connection is lost, the server does not silently repeat an edit whose result is unknown; the agent should reconnect and inspect the document before deciding whether to retry.

## Setup and configuration

GIMP Agent MCP MCP server requires GIMP 3.2.x, Python 3.11 or newer, `uv`, an MCP client, and GIMP installed on the same machine. Start GIMP once before setup so its user profile exists. The basic installation commands are:

```bash
uvx gimp-agent-mcp install-plugin
uvx gimp-agent-mcp install-skills
uvx gimp-agent-mcp doctor
```

Restart GIMP after installing or upgrading the bridge. Add the following server entry to the client's MCP settings:

```json
{
  "mcpServers": {
    "gimp": {
      "command": "uvx",
      "args": ["gimp-agent-mcp", "serve"]
    }
  }
}
```

Claude Code can add it with `claude mcp add gimp -- uvx gimp-agent-mcp serve`. Optional background removal support uses the `segmentation` extra and downloads a model on first use; processing remains local. Source checkouts can use `uv sync --extra dev` and configure the server with `uv run`.

## Tools and capabilities

GIMP Agent MCP MCP server provides tools for connection status, launching and stopping GIMP, image management, rendering, snapshots, pixel measurement, PDB discovery and calls, GEGL filter discovery and application, adjustments, canvas operations, drawing, selections, layers, masks, text, paths, and recipes.

Notable tools include `gimp_edit_batch` for grouping supported edits on one image into a single undo step, `gimp_render_compare` for visual comparisons, and `gimp_measure` for colors, alpha bounds, histograms, and dominant colors. `gimp_pdb_search` and `gimp_filter_search` expose installed procedures and operations with their parameters and enum values. Numeric arrays can represent curves or brush strokes.

Bundled recipes cover Telegram stickers, compositions, sprite-sheet packing, and related repeatable jobs. Folder batching and workflow skills support larger runs. `gimp_remove_background` is optional because it requires the segmentation runtime, while `gimp_run_python` may be disabled. Generic access is broad, but individual GIMP procedures or GEGL operations may not accept every possible argument combination.

_Full upstream README: https://allmcps.com/mcp/gimp-agent-mcp/readme_

