
GIMP Studio MCP
com.twelvetakev0.3.3更新于 Sep 29, 2026
Lets an AI assistant edit images in GIMP 3, including print and DTF transfer prep.
安装
在 SourceWeft 中
- 打开 控制台中的 GIMP Studio MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
GIMP Studio MCP
A TwelveTake Studios project.
[PyPI] [CI] [Python] [Tools] [License: MIT] [Buy Me a Coffee] [Ko-fi]
Listed in the MCP Registry as mcp-name: com.twelvetake/gimp-studio-mcp.
A comprehensive GIMP 3.x MCP server that gives an AI agent full, reliable control of GIMP — with structured returns, real error capture, a GIMP-3 compatibility layer, safety checkpoints, and print/DTF-aware tooling.
119 tools across 13 groups, each behaviorally tested against a real (headless) GIMP. Built for a working print shop's DTF (direct-to-film) pipeline, not as a thin API wrapper.
Status: v1 — feature-complete and verified on GIMP 3.0.4 and 3.2.4 (headless and live).
Why this exists
The existing thin GIMP MCP wrapper is intentionally minimal — one universal call_api console exec plus a few read-only inspectors. That's a deliberate design, not a gap to PR against. This is a separate project that makes a different bet: own the ergonomics layer the thin wrapper punts to the model at runtime, so the agent gets validated, structured, print-aware tools instead of having to write GIMP Python by hand every time.
The design rules (every tool follows these)
- Structured returns —
{ ok, result, stdout, warnings, error }; output is never lost, even on error. - Raw
execstays — the universal escape hatch (gimp_exec) survives, with proper capture. (Opt out withGIMP_MCP_NO_EXEC=1— see Security model.) - Compat / quirk layer — one module owns GIMP-3 gotchas so nobody relearns them per session.
- Mode-agnostic tools — work identically whether GIMP is live (visible canvas) or headless.
- Vision-first —
get_bitmapreturns a viewable image the agent can actually see (with region/scale/byte-budget), for self-verification. - Safety by default —
checkpoint/restorearound destructive ops. - Validated params everywhere.
- Print-aware throughout — DPI / inches are first-class; DTF output is a headline feature.
Architecture (hybrid, day one)
Live and headless differ only in who launches GIMP, not how we talk to it — so it's one bridge:
- Live: a persistent GIMP extension (installed by
gimp-mcp install-plugin) starts on launch and publishes a loopback endpoint; the MCP server auto-attaches to the running GIMP, canvas visible. - Headless: if no live GIMP is found, the server spawns a long-running
gimp -iand loads the same bridge.
Both speak one loopback-TCP, length-prefixed-JSON, token-authenticated protocol; pixel export works in both.
Capability areas (119 tools)
Tools are self-describing through your MCP client; describe_op and list_* tools enumerate ops and resources at runtime.
Requirements
- GIMP 3.x (tested on 3.0.4 and 3.2.4)
- Python 3.10+ (for the MCP server)
- An MCP-compatible AI assistant (e.g. Claude Code / Claude Desktop)
Installation
1. Install the server
From PyPI:
Or from a clone:
2. Install the GIMP-side bridge
Restart GIMP (or it loads on next launch). The bridge auto-starts as a persistent extension.
3. Register with your MCP client
Add to your client's MCP config (e.g. .mcp.json):
The server attaches to a running GIMP if one is available, and otherwise spawns a headless GIMP automatically. Set GIMP_MCP_HEADLESS=1 to always run headless.
Quick start
General editing
DTF (direct-to-film) — the headline workflow
knockout_background is garment-aware: pass a shirt= preset (black, navy, heather_gray, red, …) and it picks the right removal technique (color-to-alpha for dark garments where black is the shirt showing through, hard select-and-clear for light/saturated ones). list_shirt_presets shows the catalog.
Security model
This server runs on the same trust boundary as the local user. Installing it grants any attached AI agent the ability to drive GIMP on your machine — and, through gimp_exec, to run arbitrary Python in GIMP's process. That is intended for a single-user workstation; it is not a sandbox.
- Loopback only + token. The bridge listens on
127.0.0.1with an ephemeral port and a per-session token. It is not exposed to the network. gimp_execis arbitrary host code execution by design. A malicious or prompt-injected instruction (for example, hidden in an image you ask the agent to open) could reachgimp_exec. Only attach trusted agents and trusted content.- Disable switch. Set
GIMP_MCP_NO_EXEC=1to skip registeringgimp_execentirely; the other 118 structured tools still work.
See SECURITY.md for the full threat model and reporting instructions.
Environment variables
Troubleshooting
Run gimp-mcp doctor first — it checks the install, locates the GIMP executable, and round-trips the bridge. Add --headless to also spawn a headless GIMP and verify a full round-trip.
- "Bridge not reachable" with GIMP open: make sure you ran
gimp-mcp install-pluginand restarted GIMP so the bridge extension loaded. - Edited the server but tools look unchanged: the MCP server does not hot-reload — restart your MCP client session.
License
MIT — see LICENSE.
TwelveTake Studios LLC Website: twelvetake.com Contact: [email protected]
来源:README.md,提交 ae03288
工具
0版本历史
1- v0.3.3最新Sep 29, 2026

