Krita Codex MCP — Claude Code MCP server: control Krita
A local MCP server that lets your agent read a Krita document, paint with native brushes and export files. Useful when artwork is driven from code.
claude mcp add krita-codex-mcp -- uvx krita-codex-mcpWhat Krita Codex MCP does
The server runs a bridge between the agent and Krita. The MCP process speaks STDIO, while a Krita Python plugin listens on 127.0.0.1 only, checks a shared bearer token and pushes each Krita API call onto Qt's main thread. There is no tool for running arbitrary Python and no fallback that paints pixels directly — strokes, shapes, fills and correction filters all go through native Krita actions.
Tool count is small, each tool is broad. krita_state reports the active document, colour space and a layer tree with UUIDs; krita_preview returns a PNG of the whole canvas or a cropped area; krita_draw and krita_paint_path paint lines, paths and shapes with pressure. krita_layers edits the tree and reparents layers by UUID, krita_history handles undo and redo, krita_asset exports layer PNGs plus Unity-oriented packages, and krita_save_export writes KRA and PNG inside configured roots only.
Close Krita before installing, create the working directory and keep uv/uvx on PATH — without it the MCP process will not start. Krita needs Python scripting, and the **Krita Codex Bridge** plugin has to be enabled in the Python Plugin Manager and loaded after a restart. Windows is the original platform; Linux is experimental, so run the live compatibility check on other Krita builds first. When a build lacks a feature, krita_state and krita_document(action="compatibility") name the affected tools and the call returns a structured error.
What it helps with
- read the layer tree and active document without touching Krita by hand
- get a PNG of the full canvas or a cropped region back in the agent reply
- paint a line or shape with the active brush preset and pressure
- reparent a layer by UUID and roll back extra steps with undo
- export layer PNGs and Unity packages from the project
Example prompts for the agent
- Show the state of the open Krita document and its layer tree
- Render a canvas preview and crop it to the current selection
- Draw an ellipse with the current brush and save the KRA under the allowed root
How to install Krita Codex MCP
Platform CLI
claude mcp add krita-codex-mcp -- uvx krita-codex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from krita-codex-mcp <command>
Platform CLI
codex mcp add krita-codex-mcp -- uvx krita-codex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from krita-codex-mcp <command>
Config file
{
"mcpServers": {
"krita-codex-mcp": {
"command": "uvx",
"args": [
"krita-codex-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from krita-codex-mcp <command>
Config file
{
"servers": {
"krita-codex-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"krita-codex-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from krita-codex-mcp <command>
Platform CLI
gemini mcp add krita-codex-mcp uvx krita-codex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from krita-codex-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Krita Codex MCP
How do I install Krita Claude MCP in Claude Code?
Run claude mcp add krita-codex-mcp -- uvx krita-codex-mcp. Install and enable the bridge in Krita first, and make sure uvx is on PATH.
What does Krita Claude MCP do?
It gives an agent access to a Krita document: reading state and layers, canvas previews, painting with native brushes, history control and file export.
What is required to run the server?
Krita with Python scripting, the Krita Claude Bridge plugin enabled, and uv/uvx on PATH. The MCP process runs on the same machine as Krita.