krita-mcp
A Krita MCP server that lets an AI paint, edit photos, animate, render video and generate images inside a running Krita canvas — all through real, undoable Krita tools.
Documents & canvas: create/open/activate/close documents, inspect layer trees and selection bounds, save as .kra/.ora, export PNG/JPG/WebP/PSD regions or layers, resize, scale, crop, rotate, flip, flatten.
Layers: create paint/vector/group/fill/filter/clone/file layers, fill layers with SeExpr, screentone or gradient generators, masks, blend modes, opacity, clipping, alpha lock, colour labels, restack, merge, duplicate, delete, transform, import images (file, base64 or public URL).
Painting: real brush strokes with Krita's brush engine and presets (pressure, eraser, smoothing, fill), vector primitives and text, editable SVG vectors, colourise line art with Krita's Colourise Mask.
Selections: rectangle, ellipse, polygon, layer-based, magic-wand colour selection, plus invert, grow, shrink, feather, border, smooth, and filling/erasing selections.
Filters & photo editing: list/describe/apply any Krita filter; precise levels, curves, exposure, gamma, temperature/tint; hue/saturation, colour balance, sharpen, blur, denoise, posterize, emboss, oil paint and more — optionally non-destructive filter masks; auto-enhance, vignette, 16-bit colour space conversion, colour matching.
Seeing & measuring: canvas snapshots (zoom, single layer, animation frame, labelled grid), palette/brightness/contrast/sharpness analysis, exact pixel reads, colour region search, view an image file without importing it.
Animation & video: frame rate/range/keyframes, contact sheets, import image sequences, decode video into animated layers, grade every frame, render to mp4/webm/gif/ProRes via bundled ffmpeg, export frames.
Generative AI: check available backends; generate images (txt2img, img2img, inpaint, variations, ControlNet guides, styles) via ComfyUI, A1111, OpenAI, Gemini, Stability, Replicate, fal; outpaint, upscale, remove background, match colours, generate video (Sora, Veo, HeyGen talking avatars, Replicate/fal), AI camera moves rendered locally, and ask a vision model for critique or prompts.
Assets & skills: search Poly Haven CC0 textures/HDRI skies and Openverse photos and place them on layers, browse Krita presets/patterns/gradients/palettes, discover and load step-by-step skills.
Workflow & safety: status/doctor-style checks, batch up to 200 tool calls, apply operations to every animation frame, undo/redo with a history view, run ~70 curated Krita actions, guide lines, view control, canvas notifications, and read/set the user's brush and colours — scoped to one workspace folder with loopback-only, token-authenticated access.
Enables AI agents to create and edit art, photos, animation and video inside a running Krita instance. Provides 71 tools for painting with Krita's real brush engine and presets, vector/SVG and text layers, full layer and mask control, selections, photo adjustments (levels, curves, exposure, hue/saturation, filters, filter masks), image analysis and pixel reading, generative-model region export/composite, keyframe animation with onion skin, video import (mp4/mov/webm/gif) and rendering to mp4/webm/gif/ProRes, plus batch operations and real undo of AI edits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@krita-mcp Create a 1200×800 canvas and paint a sunset over mountains with brushes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
KritaPilot: Krita MCP server and AI assistant
Let AI create and edit art, photos, animation and video inside a running Krita. KritaPilot is a Krita MCP server for any MCP client - Claude, ChatGPT, Gemini, Cursor, VS Code Copilot, Codex and others - and an AI Chat inside Krita that works with 40+ AI providers, including free ones.
AI client ──MCP (stdio or HTTP)──▶ KritaPilot ──127.0.0.1 + token──▶ Krita plugin ──▶ your canvasWhy KritaPilot
It works where artists work. Everything happens in your open Krita document, on layers you can edit, with undo for every AI step. Nothing is a flat image you have to import.
Any AI, including free ones. Use it from Claude, ChatGPT, Gemini, Cursor or VS Code over MCP - or chat inside Krita with 40+ providers. Auto switches to the next provider when one runs out of credit, and free models with no account are built in.
Real tools, not just a prompt box. 98 tools cover Krita's brush engine, layers, selections, filters, animation and video, plus image models (ComfyUI, AUTOMATIC1111, OpenAI, Gemini, ...) when you want them.
Safe by design. Loopback only, a secret token, one workspace folder, no code execution, keys never shown, read-only and pause switches in the panel.
What the AI can do (98 tools + 7 workflow prompts)
Paint like an artist. It uses Krita's real brush engine with any preset, pressure and eraser, plus crisp shapes and gradients, editable SVG vectors and text, procedural SeExpr textures, screentones, and colourising line art with Krita's Colourise Mask.
Make game art and pixel art. Tapered, pressure-style
ink_strokeline art;outline_layerfor sprite and sticker outlines;quantize_layerto a palette (flat, retro ordered dither or smooth Floyd-Steinberg) andswap_colorsfor palette swaps;export_layerswrites a PNG per layer plus amanifest.jsonwith positions and order for game engines;slice_sheetcuts sprite sheets and tilesets.See and measure. Snapshots (zoomed in, a single layer, any animation frame, or a labelled coordinate grid), plus
analyze_image(palette, light, contrast, sharpness, layout), exactread_pixels, andfind_color.Edit photos. Exact levels, curves, exposure and temperature; hue/saturation, colour balance, sharpen, denoise, blur and about 25 more; auto-enhance; vignette; non-destructive filter masks; 16-bit colour spaces.
Chat with an AI inside Krita. The AI Chat docker lets you sign in to Gemini, Claude, OpenAI, OpenRouter (with your browser, no key to copy), Mistral, Groq, DeepSeek, xAI Grok, Together, Fireworks, Cerebras, Hugging Face, NVIDIA, Qwen, Moonshot, SambaNova, Cohere, Z.AI, DeepInfra, Vercel AI Gateway and about 20 more, or a local model (Ollama, LM Studio), or use it free with no sign-in (Pollinations, Kilo Gateway, OVHcloud, LLM7, or the OmniRoute gateway), type what you want and watch it work in your document.
Auto (the default) uses all your providers in turn - yours first, then the free ones - and when one runs out of credit, hits a quota, rejects its key or stops answering, the next one carries on with the same task.
It works like a coding assistant's chat: Enter sends, messages typed while the AI works are queued, Stop stops at once, and a status line shows what it is doing.
It keeps spending down (only the newest pictures are resent, Claude's prompt cache is used, repeated failures stop) and shows the tokens each answer used.
Skills (39 built in - photoreal images, retouching, pixel art, logos, comics, animation, saving credits, ... - plus any you add) are loaded only when a request needs them.
One Services list sets up every service the way it works: an API key, a browser sign-in, a server address with a connection test, or nothing at all for the free ones. Models are listed live from each provider, and AI apps connected through MCP use the same sign-in.
Real-world materials. CC0 photo textures and HDRI skies from Poly Haven, and openly licensed photos from Openverse (with attribution), tiled or placed on layers to make work look real.
Just give it a prompt.
create_artworkdecides: realistic or photographic requests are generated (with looks likephoto,cinematic,portraitorproduct, plus negative prompts that remove AI artefacts). Hand-made requests, or setups with no model connected, are painted in Krita, with prepared layers, guides and a painting plan.Edit by describing the change. "Make it night", "remove the person on the left", "turn it into a watercolour":
edit_imageuses models that edit by instruction (Gemini, OpenAI, Flux Kontext) on the selection or the whole picture, onto a new layer.Select by describing it. "The sky", "the red car":
select_by_descriptionmakes a real Krita selection - pixel-accurate with Gemini or fal, approximate but free with any vision model.Every generated picture is kept. History… in the AI Chat shows them all: add one back to your picture, or reuse its prompt.
Generate with any image model, right on the canvas. It works with ComfyUI (including your own workflows: Flux, ControlNet, IP-Adapter, …), AUTOMATIC1111/Forge, OpenAI, Gemini, Stability AI, Replicate and fal.ai. You can generate from text, rework a region (img2img), inpaint a selection, outpaint beyond the edges, upscale, and remove backgrounds. Several variations at once come with a numbered comparison sheet. You can also paint a sketch layer and let ControlNet follow it.
match_colorsblends a generated element into the scene. Results always land on new layers, cut to your selection, and each placement is one undo step.Video and a second opinion. Generate video with Sora, Veo, HeyGen talking avatars (they can even make your painted character talk) or any Replicate/fal video model. It opens in Krita as an animation you can edit. Cinematic camera moves (dolly, orbit, crane, FPV, crash zoom…) steer video models, and
camera_moveanimates any still inside Krita without AI.ask_visiongets a critique, caption or prompt from Claude, GPT or Gemini (or a local Ollama model).Animate and edit video. Keyframes, onion skin, frame contact sheets, importing video from mp4/mov/webm/gif, grading every frame (
for_each_frame), and rendering to mp4/webm/gif/ProRes with Krita's bundled ffmpeg.Full layer control. Paint, vector, group, fill, filter, clone and file layers; masks; clipping; blend modes; arranging; merging; transforms. About 70 of Krita's own commands via
krita_action.Real undo for AI edits, even for edits Krita itself doesn't record. It never overwrites your own work.
batchandfor_each_framelet the AI do many steps in one call.
Built-in prompts (create, generative_inpaint, concept_variations, retouch_photo, product_shot,
paint_scene, animate) appear as slash commands in clients that support MCP prompts.
The plugin updates itself from this project's GitHub releases: it tells you when a new version is out (or installs it automatically, if you choose), checks every download against GitHub's published checksum, and updates the KritaPilot server too.
An AI Bridge (MCP) panel inside Krita shows the status and a live activity log. From it you can
make the AI read-only or pause it, undo AI edits, set the workspace and token, and copy a ready-made
config for your AI client. Popups Krita opens while the AI works (such as "Missing Colour Profile") are
cancelled and reported to the AI instead of blocking it. Logs… follows every command, chat step,
setting change and error live, dated to the millisecond and with keys masked. If Krita ever freezes, the
plugin records where in ~/.kritapilot/hang.log.
Related MCP server: krita6-mcp
Quick start
Install from PyPI or straight from GitHub, then put the plugin in Krita (close Krita first, so it can also turn the plugin on):
pip install kritapilot # PyPI pip install "git+https://github.com/jowinjohnchemban/kritapilot" # GitHub (latest main) kritapilot install # the plugin, into Kritapipx install kritapilotworks too, and every release has the wheel and the plugin zip (in Krita: Tools ▸ Scripts ▸ Import Python Plugin from File…). (Notpip install krita-mcp: that is a different project.)Start Krita.
kritapilot doctorchecks every link - plugin, bridge, AI services - and says how to fix what is broken.Use it, either way:
Inside Krita, free: open Settings ▸ Dockers ▸ AI Chat, keep the provider on Auto and type. Free models need no account; sign in to any provider in Services… for faster, stronger results.
From your AI app: open Settings ▸ Dockers ▸ AI Bridge (MCP), pick your client and copy the snippet. For example, in Claude Code:
claude mcp add krita -- kritapilot
Ask: "Create a 1200×800 canvas, paint a sunset over mountains with real brushes, look at it and improve it."
Details: installation · clients · AI Chat · the panel
Commands for people and scripts
With Krita running:
kritapilot status # Krita, the plugin and the open documents
kritapilot chat "paint a misty forest" # ask the AI Chat assistant from a terminal
kritapilot snapshot canvas.png # save what the canvas shows
kritapilot tools selection # the tools (here: those about selections)
kritapilot call set_selection '{"kind": "all"}' # run any tool with JSON arguments
kritapilot history # recent generated pictures
kritapilot install # put the plugin into Krita and turn it on (Krita closed)
kritapilot doctor # check every link to Krita and the AI servicesCommand-line flags
kritapilot [--transport {stdio,http}] [--host HOST] [--port PORT] [--agent [--agent-port N]]
[--check-update | --update] [--version]Flag | Default | Meaning |
|
|
|
|
| HTTP bind address. Binding anything other than loopback requires |
|
| HTTP port (the endpoint is |
| Run the in-Krita assistant service for the AI Chat docker instead of an MCP server. The docker starts it by itself. | |
|
| Port of that service (loopback only, bridge-token auth). Also |
| Ask GitHub whether a newer release exists (prints JSON). | |
| Download, verify and install the newest release of the server. | |
| Print the version and exit. |
Environment variables:
Variable | Used by | Default | Meaning |
| server | random, printed at start | Bearer token HTTP clients must send ( |
| server + plugin |
| Port of the Krita bridge (not the HTTP port above) |
| server |
| Host of the Krita bridge |
| server + plugin |
| Folder holding the bridge token, saved keys, skills, |
| server | read from | Bridge token, instead of reading the file |
| plugin |
| The only folder the AI may read/write (overrides the panel setting) |
| plugin | on |
|
| plugin | Krita's bundled copy | Folder with |
| plugin |
| Popups during an AI command: |
| plugin |
| After this long frozen, every thread's stack goes to |
Plugin settings can also be changed in Krita's AI Bridge (MCP) panel; environment variables take priority. |
Generative services are configured with more server variables (KRITAPILOT_COMFYUI_URL,
KRITAPILOT_A1111_URL, KRITAPILOT_OPENAI_API_KEY, KRITAPILOT_GEMINI_API_KEY, KRITAPILOT_STABILITY_API_KEY,
KRITAPILOT_REPLICATE_API_TOKEN, KRITAPILOT_FAL_KEY, KRITAPILOT_HEYGEN_API_KEY,
KRITAPILOT_ANTHROPIC_API_KEY, KRITAPILOT_IMAGE_BACKEND, …). Cloud services are used only with a
KRITAPILOT_… key, so a key that happens to be in your environment never uploads your art by surprise.
See Connecting AI services.
Documentation
The chat docker, Auto and the provider menu, setting up services, free services, spending, skills, the queue, settings | |
Status, access modes, popups, workspace and token, updates, Logs and the freeze log | |
ComfyUI, A1111, OpenAI, Gemini, Stability, Replicate, fal, HeyGen, Sora, Veo, Claude | |
Painting, photo retouching, inpainting, line art, animation, video | |
All 86 tools, their parameters, and the prompts | |
How undo works, the security model, access modes | |
Architecture, tests, real-Krita smoke test, adding tools | |
Proposing the plugin for bundling with Krita itself | |
How plugin zips and wheels are published to GitHub releases |
Safety in one paragraph
The bridge listens on loopback only and requires a secret token. The AI can read and write files only
in one workspace folder (~/KritaMCP by default). There is no code-execution tool. You can switch
the AI to read-only or pause it from the panel at any time. Full details:
security model.
Status
The project is tested against Krita 5.3.4 on Windows. scripts/smoke_krita.py runs 56 end-to-end
checks against a running Krita, including an undo matrix over every kind of edit and the Quick start's
sunset prompt. scripts/paint_sunset.py paints the sunset with real brushes, looks at it, improves it and
checks the result. The AI Chat has been run end to end against real Krita on Auto with only the free
services (Pollinations, Kilo, AI Horde): a photoreal prompt was generated, compared and saved, with the
switch to the next provider happening on the way. Unit tests run on
Linux and Windows with PyQt5 and PyQt6 in CI. Krita 6 is covered by the PyQt6 unit tests but has not
yet been run end to end.
FAQ
Do I need a paid AI account? No. The AI Chat inside Krita works with free models and no account (Pollinations, Kilo Gateway, OVHcloud, LLM7), and AI Horde makes free pictures. They are slower and simpler than paid models; one paid provider (or a local model with Ollama) makes a big difference.
Do I need a GPU? No. Painting with Krita's brushes needs none, and cloud image models run elsewhere. If you have one, ComfyUI or AUTOMATIC1111 run image models locally for free.
Does it upload my artwork? Only to the services you set up, and only when a request uses them (for example, an image model reworking a region, or a snapshot shown to a chat model). Painting, editing and measuring happen in Krita on your computer. Cloud services are used only with keys you saved yourself.
Can the AI damage my files? It can read and write only inside one workspace folder, every edit is a separate undo step, it never overwrites your own layers unless asked, and you can switch it to read-only or pause it at any time.
Which Krita versions? Krita 5.3 is tested end to end on Windows; Linux and macOS use the same plugin. Krita 6 (PyQt6) is covered by the unit tests.
Where do I start? Follow the Quick start, then try the workflows. Something wrong? Open Logs… in the panel; it usually says why.
Contributing
Bug reports, ideas, new skills and pull requests are welcome - see CONTRIBUTING.md. What changed recently is in the changelog. Security problems: SECURITY.md.
pip install -e .[test] PyQt6
QT_QPA_PLATFORM=offscreen pytest
python scripts/smoke_krita.py # against a real running Krita with the plugin enabledSee development.
Available Tools
86 toolsadd_svgA
Add SVG elements as EDITABLE vector shapes: , , , , , ,
, gradients in , groups. Bare elements use canvas pixel coordinates. Goes onto layer
(a vectorlayer), the active vector layer, or a new vector layer called name.
No external references (href/url() only to #ids, images as data: URIs).
Inputs: svg (required), name, layer.
add_vignetteB
Darken (or tint) the edges on a new layer on top; adjust its opacity or delete it later.
Inputs: size, color, strength, blend_mode.
adjust_imageA
Photo adjustment on a paint layer (limited to the selection if any). operation + settings: exact tone tools (pixel-precise, channel = rgb|r|g|b): levels {in_black, in_white, gamma, out_black, out_white} · curves {points: [[in,out],...] 0-255} brightness_contrast {brightness, contrast -100..100} · exposure {stops} · gamma {gamma} temperature {temperature -100..100 (warm+), tint -100..100 (magenta+)} Krita filters (non_destructive=true adds them as an editable filter mask instead): hue_saturation {hue -180..180, saturation, lightness -100..100, colorize} color_balance {shadows_|midtones_|highlights_ + cyan_red|magenta_green|yellow_blue: -100..100} sharpen {amount 0-10, radius, threshold} · blur {radius} · motion_blur {angle, length} lens_blur {radius} · denoise {strength} · denoise_gaussian {threshold, window} desaturate {method} · auto_contrast · normalize · invert · posterize {steps} threshold {level} · pixelize {size} · oil_paint {brush_size, smooth} · emboss {depth} edge_detect {radius} · high_pass {radius} · noise {amount, opacity, grayscale} color_to_alpha {color, threshold} · dodge / burn {exposure 0-1, range 0 shadows|1 mid|2 highlights} wave {amplitude, wavelength} · round_corners {radius} Any other Krita filter: apply_filter.
Inputs: operation (required), layer, settings, non_destructive.
ai_backendsA
Which generative-AI services are connected: image backends (ComfyUI, AUTOMATIC1111/Forge, OpenAI, Gemini, Stability, Replicate, fal) with their models/samplers/upscalers, video backends (HeyGen, Sora, Veo, Replicate, fal; details=true lists HeyGen avatars and voices), vision models for ask_vision, and the ComfyUI workflows saved in /workflows. Call this before generate_image.
Inputs: details.
analyze_imageB
Numbers about the image (or a region / one layer): dominant palette with shares, mean colour, brightness, contrast, sharpness (0..1), coverage of non-transparent pixels, content bounds, and a grid x grid layout of mean colours (top row first). Use it to judge and match colours and lighting.
Inputs: x, y, grid, layer, +3 more.
animation_contact_sheetB
See many frames at once: a labelled grid of frames (max 48) to review motion and consistency.
Inputs: end, step, start, columns, +1 more.
animation_infoC
Frame rate, playback/clip range, current frame and animated layers.
Inputs: no named parameters.
animation_setC
Set frame rate, frame range (start..end) and/or go to frame (drawing then edits that frame).
Inputs: end, fps, frame, start.
apply_filterB
Apply a Krita filter (blur, levels, invert, ...) to a paint layer, restricted to the selection if any. params: filter properties from describe_filter (string/number/bool values only).
Inputs: name (required), layer, params, ignore_selection.
arrange_layerA
Restack a layer. to = top, bottom, up or down; or above = a sibling to sit directly over;
parent = a group to move the layer into (top of it unless to/above say otherwise).
Inputs: to, above, layer, parent.
ask_visionB
Ask another vision AI about the canvas and get its answer as text: a second opinion or critique, a caption, or a detailed prompt for an image model. provider: anthropic (Claude), openai (GPT, or any OpenAI-compatible server such as Ollama or LM Studio), gemini. Optionally a region or a single layer.
Inputs: question (required), x, y, layer, +5 more.
auto_enhanceC
One-click photo fix: stretch the tonal range (per channel also removes colour casts).
Inputs: layer, per_channel, clip_percent.
batchA
Run several tool calls in one go, in order: [{"tool": "draw_shapes", "args": {...}}, ...] (max 200). Any tool except batch itself. Returns one result per operation; images (canvas_snapshot, view_image) are returned after the summary. Much faster than one call per step.
Inputs: operations (required), stop_on_error.
brush_strokeA
Paint ONE stroke with Krita's real brush engine (texture, wet mixing, ... from the preset). points: [[x, y], ...] or [[x, y, pressure 0..1], ...] (pressure needs a pressure-sensitive preset). preset: brush preset name or unique part of it (see list_brush_presets; default: the current brush). size in px, opacity/flow 0..1, eraser=true erases with the brush. smooth=true curves through the points. closed/fill: close the path / fill it with the colour (outline=false for fill only). Painting respects the current selection. The user's own brush settings are restored afterwards.
Inputs: points (required), fill, flow, size, +8 more.
camera_moveA
Bring a still to life without any AI model: renders the current picture through a moving virtual camera into an animation (a new document by default). move: dolly_in, dolly_out, push_in, pull_back, zoom_in, zoom_out, crash_zoom, pan_left, pan_right, tilt_up, tilt_down, orbit_left, orbit_right, crane_up, crane_down, handheld, ken_burns, static. intensity 0.1-3. render_path = also render it, e.g. 'shot.mp4'.
Inputs: fps, move, width, seconds, +3 more.
canvas_snapshotA
Return the current composite image so you can SEE the canvas. Optionally zoom into a region
(x, y, width, height in canvas pixels). max_size caps the longest side (64-4096).
layer = show only that layer (transparent elsewhere).
grid = draw labelled canvas-coordinate lines every grid pixels, to read off exact positions.
frame = look at another animation frame (the current frame is restored).
Inputs: x, y, grid, frame, +4 more.
colorize_lineartC
Flat-colour line art with Krita's Colourise Mask: regions = [{"color": "#e0b090", "points": [[x,y],...] (a scribble inside the area)} or {"color": ..., "rect": [x,y,w,h]}]. Krita floods each scribble's colour up to the lines. transparent_color marks areas to leave empty.
Inputs: regions (required), name, layer, cleanup, +2 more.
convert_color_spaceB
Convert the image colour space, e.g. depth U16/F16/F32 for high-precision grading, back to RGBA/U8 for pixel tools. model: RGBA, GRAYA, CMYKA, LABA, XYZA. Profile defaults to sRGB.
Inputs: depth, model, profile.
create_artworkA
START HERE when the user asks you to make a picture from a prompt. Creates the document and either GENERATES it with an image model (realistic photos, cinematic stills, anything photographic) or sets it up for you to PAINT it with Krita's own brushes. approach: auto (decides: realism or a connected image model -> generate; hand-made / graphic requests or no model -> paint), generate, paint, or hybrid (generate, then add layers for you to paint over and refine). style: photo, cinematic, portrait, product, fashion, street, landscape, macro, food, architecture, drone, concept_art, illustration, anime, watercolor, oil_painting, 3d_render, pixel_art, comic, sketch (default: guessed from the prompt). aspect: 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 4:5, 5:4 (or width/height). count = variations to compare (generate; default 4 on a local GPU, 1 on paid cloud services, which charge per image). For painting it returns a plan; then use brush_stroke / draw_shapes / add_svg, look with canvas_snapshot, and iterate. To turn your painted sketch into a realistic image later: generate_image(control=[{"layer": "Sketch", "type": "scribble"}], style="photo").
Inputs: prompt (required), name, seed, count, +7 more.
create_layerA
Create a layer or mask; it becomes the active layer. type:
paintlayer (fill = optional solid colour), vectorlayer, grouplayer,
filllayer (fill = colour, or pattern = pattern resource name) - a non-destructive colour/pattern layer,
filterlayer (filter + filter_params) - non-destructive adjustment of everything below,
clonelayer (source = layer to mirror live),
filelayer (path = image in the workspace, kept as a live link),
filllayer with generator = seexpr | screentone | gradient | multigrid and generator_config, e.g.
seexpr {"script": "$c = noise(10*$u, 10*$v); [$c, $c*0.8, 1-$c]"} (procedural textures),
screentone {"pattern": 0, "shape": 0, "frequency_x": 30, "rotation": 45,
"foreground_color": "#000000", "background_color": "#ffffff"} (manga tones),
gradient {"shape": "radial", "start_position_x": 50, "start_position_y": 50,
"end_position_x": 100, "end_position_y": 50} (uses the user's fg/bg colours),
filtermask (filter + filter_params) / transparencymask - attached to parent (default: active layer),
limited to the current selection if there is one.
parent = group layer id/name (or the layer a mask attaches to); above = sibling to stack over.
Inputs: fill, name, path, type, +8 more.
crop_imageB
Crop the canvas to a rectangle, or to the current selection's bounds when no rectangle is given.
Inputs: x, y, width, height.
delete_layerC
Delete a layer (default: active layer).
Inputs: layer.
describe_filterB
Default parameters of a filter, so you know which params apply_filter accepts.
Inputs: name (required).
document_activateB
Switch the active document (index from krita_status).
Inputs: index (required).
document_closeA
Close the active document. Unsaved changes are discarded unless save=true.
Inputs: save.
document_infoA
Active document details including the full layer tree (listed bottom-to-top) and selection bounds.
Inputs: no named parameters.
document_newB
Create a new RGBA 8-bit sRGB document and make it active. background: colour or 'transparent'.
Inputs: name, width, height, background, +1 more.
document_openB
Open a .kra/.ora/.psd or image file from the workspace and make it active.
Inputs: path (required).
draw_shapesA
Draw vector-style primitives (anti-aliased) onto a paint layer, in order (max 5000 per call).
Every shape has "type" and optional "opacity" (0..1). Types:
line {x1,y1,x2,y2,color,stroke_width}
polyline {points:[[x,y],...],color,stroke_width}
bezier {points:[start, c1,c2,end, c1,c2,end ...],color,stroke_width} (1+3n points)
rect {x,y,width,height,radius?,fill?,stroke?,stroke_width?,gradient?}
ellipse {cx,cy,rx,ry,fill?,stroke?,stroke_width?,gradient?}
polygon {points:[[x,y],...],fill?,stroke?,stroke_width?,gradient?}
text {x,y,text,size(px),font?,bold?,color} (x,y = baseline-left)
For closed shapes color is the fill when neither fill nor stroke is given.
gradient: {"type":"linear","x1","y1","x2","y2","stops":[[0,"#fff"],[1,"#000"]]} or
{"type":"radial","cx","cy","r","stops":[...]}.
layer = id or name of a paint layer (default: active layer).
These are crisp geometric shapes; for painterly marks use brush_stroke.
Inputs: shapes (required), layer.
duplicate_layerB
Duplicate a layer directly above the original.
Inputs: name, layer.
export_animation_framesC
Render frames as numbered PNGs into a workspace folder.
Inputs: end, start, folder, prefix.
export_imageA
Export the flattened image to png/jpg/webp/bmp/tiff/psd/ora in the workspace (format from extension). layer = export only that layer (cropped to its content unless full_canvas). quality = 0-100 for jpg/webp. x/y/width/height = export just that region (e.g. the area to send to an inpainting model).
Inputs: path (required), x, y, layer, +4 more.
export_selection_maskB
Save the current selection as a greyscale PNG mask (white = selected) for inpainting models.
Inputs: path (required), invert.
fill_selectionA
Fill the current selection on a paint layer with a colour; omit colour to erase the selected pixels.
Inputs: color, layer.
find_colorB
Where does a colour occur? Returns connected regions (bbox, share, centroid), largest first, plus total coverage. Good for locating objects before editing them.
Inputs: color (required), x, y, layer, +4 more.
find_skillsA
Find skills - step-by-step know-how for kinds of Krita work (photoreal images, hand painting, retouching, video, and any the user installed). Search with a few words about the task; then load the one that fits with use_skill. Cheap: returns names and one-line descriptions only.
Inputs: limit, query.
flatten_imageB
Merge all layers into one.
Inputs: no named parameters.
flipB
Mirror the whole image (target=image) or one layer (target=layer). direction: horizontal or vertical.
Inputs: layer, target, direction.
for_each_frameA
Apply the same tool calls to every frame of an animation / imported video, e.g. colour-grade a clip: [{"tool": "adjust_image", "args": {"operation": "temperature", "settings": {"temperature": 30}}}]. Frames default to the playback range (max 1000 frames, 20 operations).
Inputs: operations (required), end, step, start.
generate_imageA
Generate pixels with an image model and place them as NEW layers (one undo step). mode: auto (inpaint if there is a selection, else txt2img), txt2img, img2img (rework the region; strength 0..1 = how much changes), inpaint (regenerate only the selected pixels; soft edges blend). The region is the selection's bounds + padding (or x/y/width/height, or region='canvas'); results are cut to the selection, so nothing outside it changes. count 1-8 = variations in a group plus a numbered comparison sheet (choose with pick_variation). backend: comfyui, a1111, openai, gemini, stability, replicate, fal (default: KRITA_MCP_IMAGE_BACKEND or the first available - see ai_backends). model = checkpoint / model id (Replicate 'owner/name', fal 'fal-ai/...'). size = longest side to generate at (default 1024). workflow = a ComfyUI API-format graph saved as /workflows/NAME.json using {{prompt}} {{negative}} {{seed}} {{image}} {{mask}} {{width}} {{height}} {{strength}} placeholders (ControlNet, IP-Adapter, Flux, ... anything ComfyUI can do). extra = provider-specific inputs. control = guide the composition with a layer, e.g. [{"layer": "Sketch", "type": "lineart", "strength": 0.8}] - paint a sketch / pose / depth layer and the model follows it. type: lineart, scribble, canny, softedge, depth, openpose, normal, seg, tile, ...; model = ControlNet model (default: the first installed whose name contains the type); preprocess = A1111 preprocessor (e.g. depth_midas when the layer is a photo); start/end 0..1; layer omitted = the whole picture. Real ControlNet on comfyui / a1111 (several guides at once; in workflows use {{control}} / {{control_1}}...); stability uses its sketch / structure control; openai and gemini receive the guide as the image to follow. style = a look recipe added to the prompt (with a matching negative prompt): photo, cinematic, portrait, product, fashion, street, landscape, macro, food, architecture, drone (realistic) or concept_art, illustration, anime, watercolor, oil_painting, 3d_render, pixel_art, comic, sketch.
Inputs: prompt (required), x, y, cfg, +20 more.
generate_videoA
Make a video with a video model, save it in the workspace and (by default) open it in Krita as an animation to paint over, grade or re-render. use_canvas=true sends the current picture as the start frame (image-to-video) or, for HeyGen, as the background behind the avatar. backend: heygen (talking avatar: script + avatar_id + voice_id; character='photo' makes the character painted on the canvas talk), openai (Sora), gemini (Veo), replicate / fal (any video model id). camera = a cinematic camera move written into the prompt: dolly_in, dolly_out, push_in, pull_back, crash_zoom, pan_left/right, tilt_up/down, orbit_left/right, crane_up/down, handheld, fpv_drone, whip_pan, bullet_time, ken_burns, static. style = a look (cinematic, photo, anime, ... as in generate_image). Generation can take several minutes. (No video model? camera_move animates the picture locally.)
Inputs: path, extra, model, style, +14 more.
historyC
Your undoable edits in the active document plus Krita's own undo stack (done=false = undone).
Inputs: limit.
import_assetA
Put a search_assets result on a new layer. Textures tile across the canvas by default (tile_size = px per tile; texture_map: diffuse, normal, roughness, ao, displacement); hdris and photos cover the canvas (fit: cover, contain, stretch, tile, none). To texture a painted shape: import it, then update_layer(clipped=true, blend_mode='overlay' or 'multiply') above the shape in the same group. Returns the layer and the attribution to credit (photos).
Inputs: id (required), fit, kind, name, +6 more.
import_framesB
Load image files from the workspace (in order) as frames of a new animated layer.
Inputs: paths (required), step, first_frame.
import_imageA
Put a raster image on a NEW paint layer. Provide path (inside the workspace) OR image_base64
(PNG/JPEG/WebP bytes). fit: contain (default), cover, stretch, none (natural size at x,y), or
selection (stretched over the selection and masked by it, soft edges included - for inpainting).
This is how images from an image-generation model get into Krita for further editing.
Inputs: x, y, fit, name, +5 more.
import_image_from_urlA
Download a PUBLIC http(s) image URL (no redirects, max 25 MB, private addresses blocked) and place it on a new layer. Same placement options as import_image.
Inputs: url (required), x, y, fit, +3 more.
import_videoA
Decode a video (mp4/mov/webm/mkv/avi/gif...) from the workspace into an animated layer so every frame can be painted, filtered or adjusted. Opens a new document sized to the video unless into_current. start/duration in seconds; fps resamples; width scales (keeps aspect). Max 1000 frames.
Inputs: path (required), fps, name, start, +4 more.
keyframeB
Keyframe operation on a paint layer at frame: blank (new empty drawing), duplicate (copy of the
previous drawing), remove, remove_and_pull (shift later frames back), hold (insert a hold frame,
shifting later ones), unhold. The layer becomes animated; draw on it while at that frame.
Inputs: frame (required), kind, layer.
krita_actionB
Run one of Krita's own commands on the active document/layer (curated, no dialogs): selection: select_all, deselect, reselect, invert_selection, select_opaque(_add|_subtract|_intersect), copy_selection_to_new_layer, cut_selection_to_new_layer, clear_selection_pixels, fill_with_foreground, fill_with_background, fill_with_pattern, selection_to_vector_shape layers: convert_to_paint_layer, convert_to_animated_layer, convert_group_to_animated, convert_to_transparency_mask, convert_to_selection_mask, alpha_into_mask, flatten_layer, isolate_layer, isolate_group, rotate_layer_90_cw|90_ccw|180, mirror_all_layers_horizontally|vertically image: rotate_image_90_cw|90_ccw|180, trim_to_image, trim_to_layer, trim_to_selection, duplicate_image_as_new_document, create_snapshot animation: next_frame, previous_frame, next_keyframe, previous_keyframe, first_frame, last_frame, toggle_onion_skin, play_pause, stop_playback view: zoom_to_fit, zoom_to_100, zoom_in, zoom_out, mirror_view, rotate_view_left|right, reset_view, toggle_wrap_around, toggle_grid, toggle_pixel_grid, toggle_guides, toggle_rulers, toggle_selection_display, toggle_canvas_only
Inputs: name (required), layer.
krita_statusB
Krita version, the sandboxed workspace folder, and the open documents (index, size, active).
Inputs: no named parameters.
list_brush_presetsC
Names of Krita's brush presets (optionally containing filter, e.g. 'ink', 'pencil', 'airbrush').
Inputs: limit, filter.
list_filtersA
Names of all Krita filters usable with apply_filter.
Inputs: no named parameters.
list_keyframesC
Frames at which a layer has keyframes.
Inputs: end, layer, start.
list_layersB
Layer tree of the active document (children bottom-to-top) and the active layer id.
Inputs: no named parameters.
list_resourcesC
Names of Krita resources: type = preset (brushes), pattern, gradient, palette, brush, workspace.
Inputs: type, limit, filter.
list_vector_shapesC
Shapes on a vector layer: name, type, bbox in pixels (optionally each shape's SVG).
Inputs: layer, include_svg.
list_workspaceC
Files in the workspace folder (path relative to it, size, modified time).
Inputs: limit, folder, recursive.
match_colorsA
Make a layer's colours sit in the scene: transfers the mean and contrast of each channel from a reference (another layer, an image file in the workspace, or a region [x,y,w,h] of the picture - by default the whole picture). Use after pasting or generating an element. Respects the selection.
Inputs: layer, strength, reference_path, reference_layer, +1 more.
merge_downC
Merge a layer (default: active) into the layer below it. Returns the merged layer.
Inputs: layer.
modify_selectionC
operation: invert, grow, shrink, feather, border or smooth. amount in pixels.
Inputs: operation (required), amount.
notify_userB
Show a short floating message on the user's Krita canvas.
Inputs: message (required), seconds.
outpaintB
Extend the picture beyond its edges: grows the canvas by left/right/top/bottom pixels, selects the
new border (reaching overlap px into the old image so it blends) and inpaints it.
Inputs: prompt (required), top, left, seed, +9 more.
palette_colorsC
The colours (name + hex) of a Krita palette resource, for a coherent colour scheme.
Inputs: name (required).
pick_variationA
Show variant index (1-based, as numbered on the sheet) of a generate_image variants group.
keep_only=true deletes the other variants and leaves just the chosen layer.
Inputs: group (required), index, keep_only.
read_pixelsC
Exact colours of a small block (max 1024 pixels), rows top to bottom.
Inputs: x (required), y (required), layer, width, +1 more.
redoC
Redo edit(s) undone with undo.
Inputs: steps, native.
remove_backgroundA
Cut the subject out of a layer. mode: mask (non-destructive transparency mask, default), erase, or
select (just select the subject). method: color (local, no AI: floods the plain background in from the
image border, within tolerance of the border colour or of color), ai (a segmentation model via
stability / replicate / fal / a1111 with the rembg extension), auto (ai if a capable backend answers,
else color).
Inputs: mode, color, layer, model, +4 more.
remove_vector_shapesB
Delete shapes by name from a vector layer (["all"] removes every shape).
Inputs: names (required), layer.
render_videoB
Render the animation (default: playback range) to .mp4 (H.264), .webm (VP9), .gif, .mov (ProRes), .mkv or .apng in the workspace, using the ffmpeg bundled with Krita. width scales the output.
Inputs: path (required), end, fps, start, +3 more.
resize_canvasB
Change the canvas size WITHOUT scaling content. Offsets shift existing content.
Inputs: width (required), height (required), x_offset, y_offset.
rotate_imageA
Rotate the whole image clockwise by any angle; the canvas grows to fit.
Inputs: degrees (required).
sample_colorB
Colour (rgba + '#rrggbbaa') of one pixel of the visible image, or of a single layer if given.
Inputs: x (required), y (required), layer.
save_documentA
Save the active document as native .kra/.ora in the workspace (omit path to re-save in place).
Inputs: path.
scale_imageB
Scale the whole image (all layers) to a new size. method: Bicubic, Bilinear, Lanczos3, Box, Hermite, Mitchell, BSpline or NearestNeighbor (pixel art).
Inputs: width (required), height (required), method.
search_assetsA
Find free real-world material to make work realistic. kind: textures - Poly Haven CC0 photo textures (rock, wood, bark, fabric, leather, skin, metal, ground, ...), hdris - Poly Haven CC0 HDRI panoramas as photographic skies and backdrops, photos - Openverse openly licensed photos for reference or compositing (licence: e.g. 'cc0,pdm' for no attribution, or 'by,by-sa'); results include the attribution text. Then import_asset(id, kind).
Inputs: kind, limit, query, licence.
set_guidesC
Set the document's guide lines (pixel positions), e.g. thirds or a layout grid the user can see.
Inputs: clear, visible, vertical, horizontal.
set_selectionA
Select: kind=rect or ellipse (x, y, width, height), polygon (points [[x,y],...]),
layer (the opaque pixels of layer), color (every pixel within tolerance 0-255 of color, or of the
colour at x,y; contiguous=true = magic wand from x,y), all, or none.
mode: replace, add, subtract, intersect. Later draw/brush/filter/fill operations are limited to it.
Inputs: x, y, kind, mode, +7 more.
transform_layerB
Scale (about the layer centre), rotate (degrees, clockwise) and/or shear a layer.
Inputs: layer, scale_x, scale_y, rotate_degrees, +2 more.
undoA
Undo your last edit(s) (each tool call is one step: pixels, layer changes, selection...). native=true steps through Krita's own undo stack instead (also covers edits made by hand).
Inputs: steps, native.
update_layerB
Change layer properties. layer = id or name (default: active layer). opacity is 0..1. blend_mode uses Krita ids such as normal, multiply, screen, overlay, add, color, hue. alpha_locked = only paint where the layer already has pixels; clipped = clip to the layers below in the group (Krita "inherit alpha"); color_label 0-8. x/y place the top-left of the layer's content (its "bounds"); dx/dy move it relative to where it is.
Inputs: x, y, dx, dy, +10 more.
upscale_imageA
AI super-resolution: scales the document by factor (all layers, Lanczos) and adds the model's
upscaled rendering of the whole picture as a new top layer. backend: a1111 / comfyui (their upscale
models), stability, replicate, fal. Without an AI backend use scale_image.
Inputs: model, factor, backend.
user_tool_stateC
Read (no arguments) or set the colours and brush the USER paints with next - e.g. hand them the palette colour or brush you used. Returns the current state.
Inputs: flow, size, eraser, preset, +4 more.
use_skillA
Load a skill's instructions (from find_skills) and follow them. file = one of the extra text files the skill lists (references, templates). Skills are text only; nothing in them is executed.
Inputs: name (required), file.
video_infoC
Size, fps, duration, frame count, codec and audio presence of a video in the workspace.
Inputs: path (required).
view_controlA
Move the user's view of the canvas (not the image): zoom (1.0 = 100%), rotation in degrees, mirror, fit to window, reset, or centre on a canvas point - e.g. to show the user what you changed.
Inputs: fit, zoom, reset, mirror, +3 more.
view_imageA
Look at an image file in the workspace (reference, generated output, export) without importing it.
Inputs: path (required), max_size.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 86 tools
Most tools target distinct resources or actions, but the 86-tool surface has several overlapping clusters: adjust_image vs apply_filter vs auto_enhance, view_control vs krita_action view commands, set_selection vs krita_action selection commands, and the create_artwork/generate_image split. The detailed descriptions clarify these boundaries, but an agent still has a realistic chance of choosing a redundant or lower-level tool.
The set is overwhelmingly snake_case and follows a predictable verb_noun or noun_info pattern across documents, layers, selections, animation, and media. A few names are noun-only or verb-less (keyframe, history, batch, outpaint, palette_colors), but they remain readable and do not break the overall convention.
At 86 tools, the surface is far beyond the well-scoped 3-15 range and crosses the extreme-mismatch threshold of 50+. Krita is broad, but this many tools creates a sprawling interface where the agent must navigate many specialized and partially overlapping operations.
The surface covers document lifecycle, layer CRUD and arrangement, selections, filters, drawing, vector shapes, animation, video import/render, AI generation, asset search, skills, undo/history, and batching. Only minor gaps such as direct editing of existing vector shapes exist, and those have practical workarounds.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
AI video editor for agents and humans: timeline, captions, color, audio and generation as MCP tools.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Direct AI video, image, music and storyboard production from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI models to directly control a local Krita instance by inspecting real canvas previews, managing documents and layers, importing and masking generated images, inpainting, painting with the brush engine, checkpointing, and exporting KRA/PNG files.MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to inspect and edit a live Krita 6 desktop session, create and modify documents and layers, paint with native brushes, and receive inline PNG previews.561MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI clients to control a running Krita instance, allowing them to create canvases, paint strokes, draw shapes, export images, and perform other painting tasks.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to create, paint, edit, inspect, and export images in a running GIMP 3.2 instance via MCP.199 PyPIGPL 3.0