dcc-mcp-krita
Typed document, layer, painting, save, and export automation for Krita.
Illustrative workflow generated with OpenAI ImageGen from the retained source in docs/images/sources; it is not a Krita screenshot or host-validation artifact.
The adapter combines an external DCC-MCP service with a small Krita Python extension. The extension accepts authenticated loopback JSON-lines requests, queues every LibKis call onto Krita's UI main thread, and exposes only a fixed typed command catalog. It never evaluates caller-provided Python or action IDs.
Capabilities
- discover the live bridge and list or inspect open documents;
- create bounded RGBA/U8 documents or open supported files under allowed roots;
- inspect layer hierarchy and create, activate, rename, lock, hide, fade, or delete paint layers;
- write bounded typed-color rectangles directly to paint-layer pixels;
- preserve layered work as
.kraand export PNG, JPEG, WebP, or TIFF artifacts; - return artifact size and SHA-256 for downstream Blender, Godot, or engine import validation;
- flatten or discard modified documents only with explicit typed confirmation.
The bundled krita-document-authoring Skill exposes 16 tools. Freehand brush
simulation, arbitrary Python, generic menu actions, and unrestricted filesystem
access are intentionally outside the contract.
Install
pip install dcc-mcp-krita
dcc-mcp-krita install --dcc-path /path/to/krita --yes
Restart Krita, open Settings → Configure Krita → Python Plugin Manager, and enable DCC MCP Krita. Configure allowed file roots before starting both Krita and the adapter:
$env:DCC_MCP_KRITA_ALLOWED_ROOTS = "C:\art\textures;D:\project\sprites"
krita.exe
dcc-mcp-krita
On POSIX systems, separate roots with : instead of ;. The bridge defaults
to 127.0.0.1:3848; DCC_MCP_KRITA_BRIDGE_PORT changes it for both processes.
The extension and adapter share a random token through the current user's
~/.dcc-mcp/krita-bridge-token; set DCC_MCP_KRITA_BRIDGE_TOKEN or
DCC_MCP_KRITA_BRIDGE_TOKEN_FILE when deployment policy requires another
secret source.
Inspect installation state without revealing the token:
dcc-mcp-krita status --dcc-path /path/to/krita --json
dcc-mcp-krita verify --dcc-path /path/to/krita --json
See the installation and lifecycle guide for platform paths,
upgrade/uninstall, stable exit codes, recovery, and troubleshooting. The legacy
dcc-mcp-krita-install and dcc-mcp-krita-doctor commands remain compatible.
Safety model
- loopback-only authenticated transport with bounded requests and responses;
- a bounded main-thread queue; socket workers never call Krita APIs;
- workspace-root, suffix, file-size, pixel-count, layer-count, and timeout limits;
- instance-scoped document and layer IDs instead of caller-provided expressions;
- explicit overwrite, flatten, and discard opt-ins;
- batch-mode export with bounded format options and artifact hashing;
- staged extension installation with rollback if replacement fails.
See Architecture for the runtime and failure contracts.
Development
python -m pip install -e ".[dev]"
python -m pytest -q
python -m ruff check src tests tools bridge
python -m ruff format --check src tests tools bridge
python tools/lint_skills.py
python -m build
python -m twine check dist/*
The host implementation follows Krita's official Python plug-in guide and LibKis API.
Metadata
Release files for dcc-mcp-krita 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dcc_mcp_krita-0.4.0.tar.gz | 42.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dcc_mcp_krita-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.2 kB
Release files / dcc_mcp_krita-0.4.0.tar.gz
| Download URL | dcc_mcp_krita-0.4.0.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
012b4850c2b794b4061656048d2699e1d61ddf3b5c1716d8570200d2dee685c0
|
|
BLAKE2b-256 checksum How to use checksums |
a1e8b2186dad274964776bcc0f62062133c1860e90609204c90788e14ff9e5d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / dcc_mcp_krita-0.4.0-py3-none-any.whl
| Download URL | dcc_mcp_krita-0.4.0-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
288b307aea00d98242ce3c20c377cdd825eab785a6ffc33ba6af08e893e5314a
|
|
BLAKE2b-256 checksum How to use checksums |
fddf661059ce16a97350fa8fd9837707f2061a1712c36fa3acdf1e083899aa51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency log