
Control Krita from OpenAI Codex through a secure local Model Context Protocol (MCP) server for Windows/Linux
概览
Control Krita from OpenAI Codex through a secure local Model Context Protocol (MCP) server for Windows and Linux. PyPI package · GitHub releases · Windows installation guide · Linux installation guide · Codex and MCP compatibility A local MCP server that lets Codex inspect and control Krita through a small, authenticated bridge. The MCP process uses STDIO. The Krita Python plugin listens only on 127.0.0.1, validates a shared bearer token, and dispatches every Krita API call to Qt's main thread. Windows is the original supported platform; Linux support is experimental. Both platforms use a capability-based runtime compatibility check. Krita 5.3.2.1 on Windows is a tested build, not a hard version requirement. The server deliberately exposes a small set of cohesive tools instead of a large collection of micro-tools: The bridge has no arbitrary Python execution tool and no direct pixel painting fallback.
README
以下为原文 README 节选,完整内容请查看原文。
Krita Codex MCP Server
Control Krita from OpenAI Codex through a secure local Model Context Protocol (MCP) server for Windows and Linux.
PyPI package · GitHub releases · Windows installation guide · Linux installation guide · Codex and MCP compatibility
A local MCP server that lets Codex inspect and control Krita through a small,
authenticated bridge. The MCP process uses STDIO. The Krita Python plugin listens only on
127.0.0.1, validates a shared bearer token, and dispatches every Krita API call to Qt’s main
thread.
Windows is the original supported platform; Linux support is experimental. Both platforms use a capability-based runtime compatibility check. Krita 5.3.2.1 on Windows is a tested build, not a hard version requirement. The server deliberately exposes a small set of cohesive tools instead of a large collection of micro-tools:
| Tool | Purpose |
|---|---|
krita_state |
Active document, canvas/color space, recursive layer tree with UUIDs, active layer and current painting state |
krita_preview |
Whole-canvas or pixel-precise cropped PNG returned directly as MCP image content |
krita_canvas |
Sample colors; resize, scale, crop, rotate or flip; import editable raster layers |
krita_edit |
Create/refine/move selections; native copy, cut, paste, selection-to-layer, fill and clear |
krita_document |
Inspect runtime compatibility; list, create, open, activate, save and close documents |
krita_layers |
Read/edit the layer tree, safely reparent, and transform layers by stable UUID |
krita_history |
Read undo/redo state and execute bounded undo or redo steps |
krita_brush |
Read/set native brush state and search installed Krita presets |
krita_paint_path |
Pressure-aware line segments through Krita’s native Node.paintLine API and active brush preset |
krita_draw |
Native preset-backed lines, open/closed paths, polygons, rectangles and ellipses |
krita_color |
KRA-backed project palettes, Krita palette swatches, color replacement and safe correction filters |
krita_asset |
Export layer PNGs plus Unity-oriented animation, tileset and named-region packages with direct previews |
krita_save_export |
Save KRA and export PNG beneath configured roots only |
Codex -> local STDIO MCP process -> authenticated 127.0.0.1 HTTP bridge
-> queued, timeout-aware Qt main-thread dispatch -> Krita Python API
The bridge has no arbitrary Python execution tool and no direct pixel painting fallback. Actual
安装
uvx --from "krita-codex-mcp==0.2.2"