Skip to content
Conduit

mcp server

gimp-mcp-pro

A production-grade MCP server for GIMP 3.0+. 67 typed tools connecting Claude Desktop to GIMP for image creation, layer management, drawing, filters, color adjustments, and more. Built with Python, Py

Hackerobi/gimp-mcp-procommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "gimp-mcp-pro": {
      "command": "uvx",
      "args": [
        "gimp-mcp-pro"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 25, 2026

GIMP MCP Pro

Production-grade Model Context Protocol server for GIMP 3.0+

67 typed tools • reliable communication • AI-friendly workflows

GIMP MCP Pro lets AI assistants (Claude, etc.) control GIMP through well-structured, typed MCP tools — creating images, managing layers, drawing shapes, applying filters, adjusting colors, and more.

Features

  • 67 typed MCP tools across 11 modules — image management, layers, selections, drawing, text, transforms, colors, filters, inspection, history, PDB access
  • Reliable communication — length-prefixed socket framing (no more JSON boundary guessing)
  • Persistent connections — one TCP connection, kept alive, with automatic reconnection
  • GIMP 3.0.8 compatible — tested against current GIMP release using stable APIs (DrawableFilter, PDB procedures)
  • Undo groups — multi-step AI workflows as a single undo step
  • Pydantic validation — inputs validated before reaching GIMP
  • AI guidance prompts — best practices and iterative workflow documentation
  • Visual verification — get_image_bitmap lets AI see what it's drawing
  • PDB discovery — search GIMP's thousands of procedures
  • Escape hatch — execute_python for anything without a dedicated tool

Architecture

AI Assistant  ←→  MCP Server (gimp-mcp-pro)  ←→  GIMP Plugin
   (Claude)         stdio/SSE                      TCP socket
                    Typed tools                    PyGObject
                    Pydantic models                Native handlers

Two processes: the MCP server runs outside GIMP and communicates with a plugin running inside GIMP's Python process via TCP with length-prefixed framing.

Quick Start

1. Install the MCP server

pip install gimp-mcp-pro

Or install from source:

git clone https://github.com/yourname/gimp-mcp-pro.git
cd gimp-mcp-pro
pip install -e .

2. Install the GIMP plugin

The setup script handles this automatically:

./setup.sh

Or manually copy the plugin:

# Linux
PLUG_DIR="$HOME/.config/GIMP/3.0/plug-ins/gimp-mcp-pro"
mkdir -p "$PLUG_DIR"
cp gimp_plugin/gimp_mcp_plugin.py "$PLUG_DIR/gimp-mcp-pro"
chmod +x "$PLUG_DIR/gimp-mcp-pro"

# macOS
PLUG_DIR="$HOME/Library/Application Support/GIMP/3.0/plug-ins/gimp-mcp-pro"
mkdir -p "$PLUG_DIR"
cp gimp_plugin/gimp_mcp_plugin.py "$PLUG_DIR/gimp-mcp-pro"
chmod +x "$PLUG_DIR/gimp-mcp-pro"

3. Start the plugin in GIMP

Open GIMP → Tools → Start MCP Pro Server

You should see "MCP Pro: Listening on localhost:9877" in the GIMP console.

4. Configure Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "gimp": {
      "command": "gimp-mcp-pro"
    }
  }
}

Restart Claude Desktop.

5. Start editing!

Ask Claude: "Create an 800x600 image with a red circle in the center and the text 'Hello World' below it"

Tool Reference

Image Management (6 tools)

ToolDescription
create_imageCreate a new blank image
list_imagesList all open images
get_image_infoGet active image metadata
export_imageExport as PNG, JPEG, TIFF, BMP, WebP
flatten_imageFlatten all layers into one
duplicate_imageDuplicate entire image

Layer Operations (9 tools)

ToolDescription
create_layerCreate a new layer
list_layersList all layers with properties
set_active_layerSwitch working layer
delete_layerDelete a layer
set_layer_opacityChange layer opacity (0-100)
set_layer_visibilityShow or hide a layer
duplicate_layerDuplicate a layer
merge_visible_layersMerge all visible layers
add_alpha_channelAdd transparency support to a layer

Drawing (9 tools)

ToolDescription
set_foreground_colorSet drawing color
set_background_colorSet background color
fill_selectionFill current selection with color
draw_lineDraw a straight line
draw_brush_strokePencil or brush stroke along points
draw_rectangleRectangle (filled or outline)
draw_ellipseEllipse/circle (filled or outline)
draw_polygonPolygon (filled or outline)
add_textAdd a text layer with font/size/color

Selections (8 tools)

ToolDescription
select_rectangleRectangular selection
select_ellipseElliptical/circular selection
select_polygonFreeform polygon selection
select_allSelect entire image
select_noneClear all selections
select_invertInvert current selection
select_growExpand selection by pixels
select_shrinkShrink selection by pixels

Transforms (11 tools)

ToolDescription
scale_imageScale entire image
scale_layerScale a single layer
rotate_imageRotate image 90°/180°/270°
rotate_layerRotate layer by arbitrary angle
flip_imageFlip image horizontal/vertical
flip_layerFlip layer horizontal/vertical
crop_imageCrop to specific rectangle
crop_to_selectionCrop to selection bounds
autocrop_imageAuto-trim unused canvas
resize_canvasResize canvas without scaling content
offset_layerMove layer position on canvas

Color Adjustments (13 tools)

ToolDescription
adjust_brightness_contrastBrightness and contrast
adjust_hue_saturationHue, saturation, and lightness
adjust_levelsInput/output levels with gamma
adjust_curvesCustom tone curves
desaturateConvert to grayscale (multiple methods)
invert_colorsNegative/invert effect
apply_thresholdConvert to pure black and white
posterizeReduce color levels
color_to_alphaMake a color transparent
auto_white_balanceAutomatic levels stretch
get_colorsGet current foreground/background colors
swap_colorsSwap foreground and background
sample_colorPick color from pixel

Filters & Effects (8 tools)

ToolDescription
apply_gaussian_blurGaussian blur
apply_unsharp_maskSharpen with unsharp mask
apply_pixelizePixelization/mosaic effect
apply_edge_detectEdge detection (Sobel, Prewitt, Laplace)
apply_embossEmboss/relief effect
apply_noiseAdd random noise/grain
apply_medianMedian denoise filter
apply_drop_shadowDrop shadow effect

Inspection (4 tools)

ToolDescription
get_image_bitmapGet image as viewable PNG (for AI verification)
get_image_metadataFast metadata without pixel data
get_context_stateCurrent colors, brush, opacity settings
get_gimp_infoGIMP version, environment, capabilities

History (3 tools)

ToolDescription
begin_undo_groupGroup operations as a single undo step
end_undo_groupEnd current undo group
edit_clearClear selection to transparent

Advanced (2 tools)

ToolDescription
search_pdbSearch GIMP's procedure database
execute_pythonRun raw Python in GIMP's console

Known Limitations

  • Undo/Redo: GIMP 3.0's plugin API does not expose programmatic undo/redo. Use Ctrl+Z/Ctrl+Y in GIMP directly. Undo groups work for grouping AI operations.
  • Drop Shadow: Uses Script-Fu internally; may cause connection issues on some setups.
  • Font Names: GIMP 3.0 uses names like Sans-serif, Serif, Monospace. The add_text tool maps common aliases automatically.

Environment Variables

VariableDefaultDescription
GIMP_MCP_HOSTlocalhostGIMP plugin socket host
GIMP_MCP_PORT9877GIMP plugin socket port
GIMP_MCP_TIMEOUT30Default command timeout (seconds)
GIMP_MCP_LOG_LEVELINFOLogging level
GIMP_MCP_DEBUGfalseEnable debug mode

Technical Notes

Filter Implementation

All filters use Gimp.DrawableFilter which safely wraps GEGL operations within GIMP's plugin context. Direct GEGL graph construction (Gegl.Node()) crashes in GIMP 3.0 plugin context — this is a known limitation that GIMP MCP Pro works around.

Color Handling

Colors are accepted as names ("red"), hex ("#FF0000"), or CSS rgb ("rgb(255,0,0)") across all tools. Internally, colors use Gegl.Color objects with the GIMP 3.0 API.

Connection Protocol

The MCP server communicates with the GIMP plugin over TCP using 4-byte big-endian length-prefixed JSON messages. This eliminates the fragile JSON boundary detection used by earlier implementations.

Development

git clone https://github.com/yourname/gimp-mcp-pro.git
cd gimp-mcp-pro
pip install -e ".[dev]"
pytest

Credits

Built on insights from:

License

MIT

↑↓ navigate openesc close