Skip to main content

dcc-mcp-krita

DCC-MCP · KRITA

Typed document, layer, painting, save, and export automation for Krita.

Krita game-art workflow

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 .kra and 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

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-doctor

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcc_mcp_krita-0.3.0.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcc_mcp_krita-0.3.0-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file dcc_mcp_krita-0.3.0.tar.gz.

File metadata

  • Download URL: dcc_mcp_krita-0.3.0.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dcc_mcp_krita-0.3.0.tar.gz
Algorithm Hash digest
SHA256 99909d783728141c4673a52da1bb3de5669e39ebfb60b75729de3567310ec20a
MD5 a0994385d49769b33abf04c36b056ed2
BLAKE2b-256 301164a78325e4a09b715a8578ec0c67a043efdd643175d3678e959ae8a5af90

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_krita-0.3.0.tar.gz:

Publisher: release.yml on dcc-mcp/dcc-mcp-krita

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dcc_mcp_krita-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dcc_mcp_krita-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dcc_mcp_krita-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d9f14012a07a9cec6c16fb4f796c2356bf08a968444d04c3b2688bd0ae5a5e4
MD5 84ea5fdb3aae31fab5d3621afb55856d
BLAKE2b-256 358fb8c0dadfebf4601663bbb4dbef2fe438f764d19d45dc3b8581d3f798c7ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_krita-0.3.0-py3-none-any.whl:

Publisher: release.yml on dcc-mcp/dcc-mcp-krita

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page