GIMP Studio MCP

com.twelvetake由 twelvetake.com 發布v0.4.0更新於 Oct 24, 2026

Enables AI assistants to edit images in GIMP 3, with tools for print and DTF transfer production.

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理在 GIMP 3 中編輯影像,並支援印刷與 DTF 轉印生產流程。

可以做什麼
  • 開啟、新建並匯出影像,支援保留透明通道的 PNG 匯出與讀取中繼資料
  • 管理圖層、遮罩、Alpha 通道與選取範圍,包括邊緣感知去背與硬邊顏色去背
  • 繪製、建立與設定文字圖層,並調整顏色、色調與濾鏡
  • 準備印刷與 DTF 輸出:白色底墨、邊緣收縮、依衣服顏色智慧去背、半色調分色、拼版與 300 DPI 匯出
  • 透過可視預覽、直方圖與區域讀取檢查影像,並管理 ICC 色彩設定檔
  • 對影像狀態建立檢查點與回復,並透過逃生工具執行原始 GIMP Python
適用情境
適合希望助理完成例行 GIMP 修圖而不必手寫 GIMP Python 的情境,尤其適合印刷或 DTF 轉印準備,例如衣服顏色去背、底墨與透明膠片用 PNG 匯出。
執行需求
以 stdio 在本機執行(PyPI 套件,可用 uvx 啟動或經 pipx 安裝)。需要 GIMP 3.x(在 3.2.4 上測試)、Python 3.10+ 以及相容 MCP 的用戶端。需用 install-plugin 指令安裝 GIMP 端橋接並重新啟動 GIMP。選用環境變數可控制無頭模式、exec、連接埠、逾時與 GIMP 執行檔路徑。
安裝前請注意
與本機使用者處於同一信任邊界:任何連上的代理都能操作 GIMP,並可透過原始 exec 工具在 GIMP 程序中執行任意 Python,因此開啟的影像若藏有提示注入會有風險。可設定 GIMP_MCP_NO_EXEC=1 略過該工具。可能進行破壞性編輯,建議使用檢查點。橋接僅監聽本機回環位址並使用工作階段權杖。目前為 beta 版本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 GIMP Studio MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

GIMP Studio MCP is a Model Context Protocol server that enables AI assistants to edit images in GIMP 3. Every tool returns a structured result with captured errors, and checkpoints restore an earlier state of the image on request. It includes tools for print and DTF (direct-to-film) transfer production.

119 tools across 13 groups, each tested against a real GIMP instance.

Status: beta. Tested on GIMP 3.2.4, headless and live. Releases up to 0.3.3 were also tested on GIMP 3.0.4.

Why this server

It is built around print and DTF production: physical dimensions at print resolution, garment-color knockout, and transparent PNG output ready for film. Every tool returns a structured result, so the assistant does not need to write GIMP Python for routine edits.

The design rules (every tool follows these)

  1. Structured returns: { ok, result, stdout, warnings, error }; output is never lost, even on error.
  2. Raw exec stays: the universal escape hatch (gimp_exec) survives, with proper capture. (Opt out with GIMP_MCP_NO_EXEC=1; see Security model.)
  3. Compat / quirk layer: one module handles GIMP 3 differences and known issues.
  4. Mode-agnostic tools: work identically whether GIMP is live (visible canvas) or headless.
  5. Vision-first: get_bitmap returns a viewable image the agent can actually see (with region/scale/byte-budget), for self-verification.
  6. Safety by default: checkpoint / restore around destructive ops.
  7. Validated params everywhere.
  8. 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 -i and loads the same bridge.

Both speak one loopback-TCP, length-prefixed-JSON, token-authenticated protocol; pixel export works in both.

Capability areas (119 tools)

GroupToolsWhat it covers
Session5health/status, open-image list, active-image switch, raw gimp_exec, namespace reset
Document4new/open image, metadata, alpha-safe export (preserves transparency)
Layers18create/duplicate/delete/reorder/move, opacity, blend mode, groups, merge, content-offset + seam-check (tileable textures)
Masks & Alpha9add/apply/remove masks, alpha add/lock, alpha↔selection, luminance→alpha, color→alpha (soft) + cutout_color (crisp hard knockout)
Selections15rect/ellipse/by-color/fuzzy/from-path/from-alpha, grow/shrink/feather/border, invert, to-channel, foreground_select (edge-aware subject/matting)
Paint10pencil/paintbrush, bucket fill, gradient, stroke, fg/bg + brush + opacity context
Text5create/edit text layers, props, outline, font check/substitute
Color & Tone10brightness/contrast, levels, curves, hue/sat, color balance, desaturate, posterize, invert, threshold, normalize (auto stretch-contrast)
Filters & Effects4gaussian blur, unsharp mask, drop shadow, generic GEGL apply_filter
Print / DTF13white underbase, edge choke/spread, trim-to-content, knockout_background (garment-aware), clean-for-DTF, halftone separation, gang sheet (22″@300), DTF PNG export, geometry/bleed
Color Management7assign/convert ICC profiles, grayscale/RGB conversion, profile inspect
Analysis12get_bitmap (viewable preview), histogram (perceptual, matches levels), color-at, region read, metadata, op describe, GEGL/procedure listing
Safety7checkpoint/restore (scriptable rollback), undo groups, list checkpoints

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.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:

bash
pipx install twelvetake-gimp-studio-mcp

Or from a clone:

bash
git clone https://github.com/TwelveTake-Studios/gimp-studio-mcpcd gimp-studio-mcppip install -e .

2. Install the GIMP-side bridge

bash
gimp-mcp install-plugin     # copies the bridge into GIMP's plug-ins dirgimp-mcp doctor             # verify install + GIMP exe + bridge reachability

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):

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

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

"Open logo.png and tell me its size and layers""Add a 12px white outline to the text layer""Auto-crop the image to its content, then export a transparent PNG""Show me the current canvas"          → get_bitmap returns a viewable preview

DTF (direct-to-film) — the headline workflow

"Knock out the black shirt color behind this artwork"     → knockout_background, garment-aware"Add a white underbase choked 2px so it doesn't peek"      → white_underbase + edge_choke"Clean this up for DTF and export a 300-DPI transparent PNG""Gang up 12 copies of this design onto a 22-inch sheet at 300 DPI"

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.1 with an ephemeral port and a per-session token. It is not exposed to the network.
  • gimp_exec is 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 reach gimp_exec. Only attach trusted agents and trusted content.
  • Disable switch. Set GIMP_MCP_NO_EXEC=1 to skip registering gimp_exec entirely; the other 118 structured tools still work.

See SECURITY.md for the full threat model and reporting instructions.

Environment variables

VariableEffect
GIMP_MCP_HEADLESSAlways run a headless GIMP (spawn gimp -i) instead of attaching to a running one (1/true/yes/on).
GIMP_MCP_NO_EXECSkip registering the raw gimp_exec host-code-exec tool (1/true/yes/on).
GIMP_MCP_DISABLEDThe in-GIMP bridge acks and does not serve.
GIMP_MCP_ENDPOINT_FILEExplicit endpoint-file path (advanced / headless).
GIMP_MCP_PORTPin a bridge port instead of an ephemeral one.
GIMP_MCP_EXEPath to GIMP's gimp-console executable, for an installation the server does not find automatically.
GIMP3_DIRECTORYGIMP's own variable for a non-default GIMP profile folder. gimp-mcp install-plugin installs the bridge there and gimp-mcp doctor checks it there.
GIMP_MCP_OPERATION_TIMEOUTSeconds a single GIMP operation may run before it returns a timeout error (default 120).
GIMP_MCP_START_TIMEOUTSeconds to wait for a headless GIMP to start (default 60).
GIMP_MCP_CONNECT_TIMEOUTSeconds to wait when connecting to GIMP (default 10).

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-plugin and 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,提交 e961111

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.4.0最新Oct 20, 2026
  2. v0.3.4Sep 30, 2026
  3. v0.3.3Sep 29, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分