pixelworks
Provides tools for interacting with Aseprite, a pixel art editor, enabling creation and manipulation of sprites, layers, frames, palettes, animations, and exports via headless CLI.
Provides tools for interacting with Krita, a digital painting application, enabling canvas painting, layer management, image adjustments, selections, filters, and exports via its MCP plugin.
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., "@pixelworks Generate a 32x32 pixel art character and export it as a sprite sheet"
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.
pixelworks — MCP server for pixel-art toolchains
A single Model Context Protocol server (stdio transport) that consolidates three creative subsystems into one tool surface, so an LLM client can drive an entire pixel-art workflow:
Family | Count | Backing subsystem |
| 31 | Retro Diffusion — mostly the locally run Stable Diffusion finetuned model shipped inside the Retro Diffusion Aseprite extension (v15.0.0, WebSocket JSON on |
| 95 | Aseprite workbench driven through the headless CLI — pixel read/write, shapes, dithering, flood fill, selection + clipboard, outline/shading, palettes + retro presets/ramps/quantization, frames/layers/tags, layer management & blend modes, cel tweening/oscillation, slices (9-patch), tilemaps, onion-skin/frame-diff/color-stats analysis, transforms, color modes, sprite-sheet/per-layer/per-tag export, raw-Lua escape hatch |
| 39 | Krita over its MCP plugin HTTP API — painting (canvas, brushes, strokes, shapes, colors), layer tree management, pixel PNG bridge in/out, crash-free Pillow adjustments (invert/hsv/blur/…), filter catalog, selections, canvas transforms, per-layer export, view control, and QAction/run_python escape hatches |
| 4 | Capability/status probes and image-return helpers ( |
169 tools total. In MCP clients they surface as mcp__pixelworks__<tool>
(or just <tool>, depending on the client).
Each subsystem is independently gated: if one is unavailable, its tools
return {"available": false, "subsystem": ..., "error": ..., "hint": ...}
instead of raising, so the rest keeps working and the caller learns what to do
(e.g. run rd_start_backend). Call px_capabilities any time for a one-shot
overview of what is currently up.
Developed and tested on Windows 10/11 with Python 3.12, Aseprite 1.3.18 and Retro Diffusion extension 15.0.0. macOS and Linux are untested: the code has no Windows-only dependencies and the platform paths are handled, so it is expected to work — see macOS / Linux notes for what to adjust and what to watch for.
Prerequisites
Python 3.10+ (developed on 3.12). Download from python.org if you don't have it. Make sure to check "Add Python to PATH" during installation, or know where your Python executable lives.
Aseprite 1.3+ — required for the
ase_*tools. Note the path to the executable (Aseprite.exeon Windows;/Applications/Aseprite.app/Contents/MacOS/asepriteon macOS; theasepritebinary from Steam or your own build on Linux).Retro Diffusion Aseprite extension v15.0.0 — required for the local
rd_*tools. This is a paid product (purchase on itch.io) that ships the locally run Stable Diffusion finetuned pixel-art model, its own backend (image_server.py) and a private venv under<extension dir>\stable-diffusion-aseprite\. Install it through Aseprite normally; the default location is%APPDATA%\Aseprite\extensions\RetroDiffusionon Windows,~/Library/Application Support/Aseprite/extensions/RetroDiffusionon macOS and~/.config/aseprite/extensions/RetroDiffusionon Linux.Optional — the online version of Retro Diffusion (retrodiffusion.ai) is supported as an alternative to the local model: a retrodiffusion.ai API key enables the four cloud tools (
rd_api_txt2img,rd_api_img2img,rd_api_txt2anim,rd_api_img2anim). If you already entered the key in the Retro Diffusion dialog inside Aseprite, the server picks it up from there automatically (seeRD_API_KEYbelow).Optional — Krita 5.x with the bundled bridge plugin installed (
krita-plugin/in this repo; HTTP API onlocalhost:5678), only for thekrita_*tools.
You do not need the RD backend or Krita running to start the server — subsystems are probed lazily and gate themselves.
Related MCP server: aseprite-mcp
Installation
1. Get the code and set up a Python virtual environment
Either clone:
git clone https://github.com/jmorais1988/pixelworks-mcp.git pixelworks
cd pixelworksor download pixelworks-mcp-<version>.zip from the
Releases page,
extract it, and cd into the extracted folder (a .sha256 file is
published alongside each zip if you want to verify the download). The zip
contains exactly the files listed under Repository layout; the steps
below are identical for both.
A virtual environment (venv) keeps pixelworks' dependencies isolated from your system Python:
# Create the virtual environment
python -m venv .venv
# Activate it
# Windows (Command Prompt):
.venv\Scripts\activate
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtTroubleshooting: If
pythonis not recognized, either add Python to your system PATH (re-run the installer and check "Add Python to PATH"), or use the full path to your Python executable, e.g."C:\Users\YOU\AppData\Local\Programs\Python\Python312\python.exe" -m venv .venv.
requirements.txt pins fastmcp==4.0.3 (the standalone fastmcp 4 package —
the server uses its tool registry and fastmcp.utilities.types.Image) plus
websockets, pillow and httpx (upper-bounded to the majors that were
tested; the exact verified versions are listed in the file).
Alternative — pip install: the folder is also a package. Inside the
activated venv, pip install . installs the same dependencies and a
pixelworks console command (.venv\Scripts\pixelworks.exe on Windows)
that you can use as the MCP client's command instead of
python server.py. pip install -e . keeps it editable.
2. Configure paths (important)
server.py reads its configuration from environment variables. The defaults
match a standard Windows install (the RD extension under %APPDATA%); set the
variables when your layout differs — ase_status / px_capabilities tell you
which path failed to resolve.
Aseprite itself is discovered automatically, including installs outside the
system drive (a Program Files on D:, a Steam library on another disk).
Set ASEPRITE_EXE when you have several installs and want to pin one, or when
Aseprite lives somewhere unusual:
Variable | Default | Purpose |
| Auto-detected: first existing of the Windows uninstall registry entry, | Aseprite executable used for the headless CLI. Set it explicitly to pin a specific install when several are present |
| Windows: | Retro Diffusion extension folder (backend, venv, models, LoRAs) |
|
| Local RD backend WebSocket endpoint |
|
| Where generated images/sprites are saved |
|
| Preset store for |
|
| Generation timeout |
| (empty) | retrodiffusion.ai key for |
|
| Krita MCP plugin HTTP endpoint |
Alternatively, edit the configuration block near the top of server.py
(RD_URL, EXT_DIR, ASEPRITE_EXE, …) directly.
3. Apply the headless patch to the RD extension (once)
# Windows
.venv\Scripts\python reapply_headless_patch.py
# macOS/Linux (the script's built-in default is the Windows path, so point it explicitly)
RD_EXTENSION_DIR="$HOME/Library/Application Support/Aseprite/extensions/RetroDiffusion" .venv/bin/python reapply_headless_patch.py # macOS
RD_EXTENSION_DIR="$HOME/.config/aseprite/extensions/RetroDiffusion" .venv/bin/python reapply_headless_patch.py # LinuxThe RD extension shells out on every Aseprite start — including the headless
batch spawns this server performs — which flashes visible console windows on
Windows and prints harmless rm/del errors elsewhere. The patch prepends an env-guarded no-op for os.execute to extension.lua
(active only when RD_MCP_HEADLESS=1, which the server sets for its batch
spawns; interactive Aseprite sessions are unaffected). The script is idempotent.
Re-run it after every Retro Diffusion extension update.
4. Seed presets (optional)
copy presets.example.json presets.json # Windows
cp presets.example.json presets.json # macOS/Linuxpresets.json stores named generation presets for
rd_preset_save/list/apply/delete and rd_generate(preset=..., overrides=...).
It lives next to server.py and is created automatically on first save, so
this step is only a starting seed.
5. Install the Krita bridge plugin (optional, for krita_* tools)
Copy the bundled plugin into Krita's pykrita folder and enable it:
:: Windows
copy krita-plugin\kritamcp.desktop %APPDATA%\krita\pykrita\
xcopy krita-plugin\kritamcp %APPDATA%\krita\pykrita\kritamcp\ /E /I# Linux (also Flatpak: use ~/.var/app/org.kde.krita/data/krita/pykrita/)
mkdir -p ~/.local/share/krita/pykrita
cp -r krita-plugin/kritamcp krita-plugin/kritamcp.desktop ~/.local/share/krita/pykrita/
# macOS
mkdir -p ~/Library/Application\ Support/krita/pykrita
cp -r krita-plugin/kritamcp krita-plugin/kritamcp.desktop ~/Library/Application\ Support/krita/pykrita/Then start Krita → Settings → Configure Krita… → Python Plugin Manager →
tick Krita MCP Bridge → OK → restart Krita. The plugin serves
http://localhost:5678 (GET /health to verify). Every plugin change —
including updates of this repo — requires a Krita restart to load; until
then the v2 actions answer {"error": "Unknown action: ..."} while the
original painting actions keep working.
6. Start the RD backend (for rd_* tools)
Either:
open the Retro Diffusion dialog inside Aseprite once (this launches
image_server.pyon port 8765), orcall the
rd_start_backendtool — the server launches the backend headless from the extension's own venv and logs to<RD_EXTENSION_DIR>\stable-diffusion-aseprite\mcp-backend.log.
Check with rd_status (a plain socket probe by default).
Registering with an MCP client
The server speaks stdio: every client below simply spawns it with the venv's Python. Three rules apply to all of them:
Use absolute paths, and the venv interpreter — not
pythonfrom PATH.<PIXELWORKS>below stands for the folder you cloned into, e.g.C:\Tools\pixelworks. In JSON and TOML basic strings backslashes must be doubled (C:\\Tools\\pixelworks); YAML single-quoted strings and TOML literal strings ('...') take them as-is. On macOS/Linux the interpreter is<PIXELWORKS>/.venv/bin/pythonand paths use forward slashes with no escaping — e.g."command": "/Users/you/pixelworks/.venv/bin/python"; theenvvalue would be the Aseprite binary from the table above.envis optional — add only the variables whose default (see Configure paths) does not match your machine. The commonest one isASEPRITE_EXEwhen Aseprite is not under Program Files / Steam.RD_API_KEYgoes here too if you use the cloud tools.Raise the tool-call timeout where the client has one. Full-quality generations take minutes; the server's own limit is
RD_GEN_TIMEOUT(900 s), so give the client at least that. Clients without a per-tool setting (Claude Desktop, Antigravity) are fine — they wait for the server.
After editing a config, fully restart the client (Claude Desktop and
Antigravity keep running in the tray — quit them, don't just close the
window). The server name (pixelworks) becomes the tool prefix:
mcp__pixelworks__ase_status in Claude Code / Codex / DSH, or just
ase_status in clients that don't namespace.
Claude Desktop
Config file (create it if missing; Settings → Developer → Edit Config opens it):
Install | Path |
Windows (installer) |
|
Windows (Microsoft Store) |
|
macOS |
|
The Store build reads only its own file under Packages\...; editing the
%APPDATA% one has no effect on it. Use Edit Config if unsure — it opens
the right one.
{
"mcpServers": {
"pixelworks": {
"command": "<PIXELWORKS>\\.venv\\Scripts\\python.exe",
"args": ["<PIXELWORKS>\\server.py"],
"env": {
"ASEPRITE_EXE": "D:\\Games\\Aseprite\\Aseprite.exe"
}
}
}
}Keep any other servers already in the file — mcpServers is one object;
add pixelworks as another key. Then quit Claude from the tray and relaunch;
the tools icon under the prompt should list pixelworks with its tools. If
the server shows an error, Settings → Developer → Open Logs Folder has a
mcp-server-pixelworks.log with the Python traceback.
Claude Code
Register from a terminal (user scope makes it available in every project):
claude mcp add --scope user --transport stdio pixelworks \
-e ASEPRITE_EXE="D:\Games\Aseprite\Aseprite.exe" \
-- "<PIXELWORKS>\.venv\Scripts\python.exe" "<PIXELWORKS>\server.py"(-e is repeatable; drop it if the defaults fit. Use --scope project to
write a shareable .mcp.json next to your code instead.) Check with
claude mcp list — it should show pixelworks: ... - ✓ Connected — or
type /mcp inside a session. The equivalent JSON, if you prefer editing
~/.claude.json (mcpServers under the project or top-level key) or a
project .mcp.json:
{
"mcpServers": {
"pixelworks": {
"type": "stdio",
"command": "<PIXELWORKS>\\.venv\\Scripts\\python.exe",
"args": ["<PIXELWORKS>\\server.py"],
"env": { "ASEPRITE_EXE": "D:\\Games\\Aseprite\\Aseprite.exe" }
}
}
}Timeouts: stdio servers in Claude Code have no per-request timer and the
per-call limit (MCP_TOOL_TIMEOUT) defaults to ~28 h, so long generations
need no tuning. Only if you have lowered that variable globally, add
"timeout": 900000 to the server's JSON entry to override it for
pixelworks alone.
OpenAI Codex (CLI and desktop app)
Add to ~/.codex/config.toml (%USERPROFILE%\.codex\config.toml):
[mcp_servers.pixelworks]
command = '<PIXELWORKS>\.venv\Scripts\python.exe'
args = ['<PIXELWORKS>\server.py']
startup_timeout_sec = 120 # default is 10 s; the first import of fastmcp/pillow can exceed it
tool_timeout_sec = 900 # default is 60 s; full-quality generations take minutes
[mcp_servers.pixelworks.env]
ASEPRITE_EXE = 'D:\Games\Aseprite\Aseprite.exe'Single-quoted TOML strings are literal, so backslashes are not doubled.
Or use the CLI: codex mcp add pixelworks --env ASEPRITE_EXE=... -- <PIXELWORKS>\.venv\Scripts\python.exe <PIXELWORKS>\server.py, then verify
with codex mcp list. Restart Codex (the app fully; the CLI per session).
Antigravity (Google)
Antigravity reads ~/.gemini/config/mcp_config.json
(%USERPROFILE%\.gemini\config\mcp_config.json) globally, or
.agents/mcp_config.json inside a workspace. In the editor: ⋯ at the top
of the agent side panel → MCP Servers → Manage MCP Servers → View raw
config opens the same file:
{
"mcpServers": {
"pixelworks": {
"command": "<PIXELWORKS>\\.venv\\Scripts\\python.exe",
"args": ["<PIXELWORKS>\\server.py"],
"env": {
"ASEPRITE_EXE": "D:\\Games\\Aseprite\\Aseprite.exe"
}
}
}
}Save, then click Refresh in the MCP Servers panel (or restart Antigravity).
The server should list as pixelworks with its tools enabled. Antigravity
has no per-tool timeout setting; it waits for the server. Note this is
Antigravity's file, not the Gemini CLI's ~/.gemini/settings.json — the
Gemini CLI uses the same JSON shape under its own mcpServers key.
DeepSeek Harness (dsh) web profile
Add to ~/.dsh/profiles/web/cordis.patch.yml and restart dsh web:
- insert:
- id: mcp-pixelworks
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: pixelworks
transport: stdio
command: '<PIXELWORKS>\.venv\Scripts\python.exe'
args: ['<PIXELWORKS>\server.py']
env:
ASEPRITE_EXE: 'D:\Games\Aseprite\Aseprite.exe'
toolCallTimeoutMs: 900000serverName must be unique across the profile's MCP entries and becomes
the mcp__pixelworks__* prefix. Optional: failOnStartupError: true
makes a broken path fail loudly at startup instead of silently omitting the
tools.
Any other client
Everything above is the same three fields — command, args, optional
env — in the client's own container (mcpServers JSON for Cursor,
Windsurf, Cline, Gemini CLI, VS Code's .vscode/mcp.json under servers,
…). If a client offers a per-tool timeout, set it ≥ 900 s.
Verify the installation
After registering and restarting the client:
px_capabilities— should list the Aseprite/RD/Krita subsystems and their current availability.ase_status—available: truewhen Aseprite resolves and a probe batch runs. If it reportsavailable: false, the result also lists the locations that were probed (searched) — setASEPRITE_EXEto your executable when it lives somewhere unusual (a portable copy, a custom folder, any drive).rd_status— reachable once the RD backend listens on 8765.Smoke test:
rd_generatewith a tiny prompt, thenase_create_canvas+ase_draw_pixels_hex+ase_export_sprite.
Example: one object through all three subsystems
![]()
The examples/ folder holds a small end-to-end run that touches every
subsystem with a single object, a red-capped mushroom. Same prompt and seed
for the two Retro Diffusion steps, so the difference between them is exactly
what img2img inherits from the hand-drawn sprite. All outputs are first-try,
unedited.
Step | Subsystem | Calls | Result |
1 | Aseprite only |
|
|
2 | Retro Diffusion img2img |
|
|
3 | Retro Diffusion txt2img |
|
|
4 | Krita only |
|
|
Prompt used for steps 2 and 3: pixel art red mushroom with white spots, cream stem, green grass, game item sprite, clean outline.
Two things worth noticing when you reproduce it: size_preset means
output pixels (passing width=64 instead yields a 16px image, because
width is the RD canvas and pixel_size defaults to 8), and when you pass a
wrong argument name the gated ase_* tools answer with
accepted_params instead of failing, which is how the calls above were
corrected on the fly.
Artist credit. Every image in
examples/was created by an AI agent — Claude (modelclaude-fable-5-1) — operating this server's tools from a chat session: the sprite's pixels were placed by the agent, the Retro Diffusion prompts and settings were chosen by it, and the Krita scene was composed and painted by it, with a human only picking the subject and approving the result. No image was hand-edited afterwards.
Running the test suites
tests/ holds the batteries used during development. They import server.py
directly (no MCP client needed).
test_gates.py is headless: it covers the tool dispatch layer (argument
binding, parameter aliases, sprite pre-checks, gate coverage, availability
cache invalidation and Aseprite discovery) and needs no subsystem running, so
it is the one to run first:
.venv\Scripts\python tests\test_gates.py # 51 checks, no Aseprite/Krita/RD requiredThe remaining batteries drive the real subsystems, so each needs its own up:
.venv\Scripts\python tests\test_workbench.py # Aseprite basics (canvas, draw, palette, frames, export)
.venv\Scripts\python tests\test_v4_expansion.py # 40-step Aseprite suite (layers, cels, slices, tilemaps, ...)
.venv\Scripts\python tests\test_krita_v2.py # 32-step Krita battery (Krita running with the bridge plugin)
# macOS/Linux: .venv/bin/python tests/<suite>.pyEach prints PASS/FAIL per step and ends with ALL GREEN (exit 0) or a
FAILED: list (exit 1). Artifacts land under output/. See
DEVELOPMENT.md for protocol notes and known traps.
macOS / Linux notes
Untested. Everything below is what should work based on the code: the server is pure Python, all Windows-only calls (
CREATE_NO_WINDOW,STARTUPINFO) are guarded behindsys.platform == "win32", and the default paths above have macOS/Linux branches. It has simply never been run outside Windows. If you try it, please open an issue with the outcome either way.
Aseprite — the
ase_*tools only need a working<aseprite> --batch. SetASEPRITE_EXEto the real binary (the macOS default resolves inside the.appbundle; Steam on Linux puts it under~/.steam/steam/steamapps/common/Aseprite/aseprite).ase_statusruns a probe batch and tells you if it works.Retro Diffusion (local) — the extension is sold for Windows, macOS and Linux (its author notes Linux support is "not guaranteed" and tested only on Ubuntu, Mint and Fedora); the server launches its backend with
<extension>/stable-diffusion-aseprite/venv/bin/pythonand applies the same UTF-8 env. Therd_start_backend"no console window" behavior is a no-op there. If the extension's venv lives elsewhere on your platform, start the backend from the Retro Diffusion dialog in Aseprite instead — the WebSocket protocol is identical.Headless patch — needed on every platform (the extension's init shells out on each start); pass
RD_EXTENSION_DIRas shown in step 3.Krita — the bridge plugin is plain PyQt/libkis with no platform code; it binds
localhost:5678the same way. Flatpak Krita needs the plugin under~/.var/app/org.kde.krita/data/krita/pykrita/and may not seelocalhostfrom outside the sandbox without--share=network(the default permits it).Case-sensitive filesystems — the code opens files with the exact names it writes, and the repo's own filenames are consistent, so no issue is expected; but the RD extension's folder/model names must match what the extension itself uses.
Paths in client configs — forward slashes, no escaping, and
.venv/bin/python(see the client section). Claude Desktop's config on macOS is~/Library/Application Support/Claude/claude_desktop_config.json; the other clients use the same~/.codex,~/.gemini,~/.claude.json,~/.dshlocations as on Windows.
Troubleshooting
rd_*tools returnavailable: false— the backend is not listening. Open the RD dialog in Aseprite once or callrd_start_backend; inspectmcp-backend.login the extension'sstable-diffusion-asepritefolder. The handshake is version-pinned to extension 15.0.0 — other extension versions will refuse the connection.ase_*tools returnavailable: false—ASEPRITE_EXEis wrong or Aseprite is not installed.Console windows flash during batch operations — re-run
.venv\Scripts\python reapply_headless_patch.py(RD extension updates overwriteextension.lua).krita_*tools returnavailable: false— Krita is not running or its MCP plugin is not enabled; health probe isGET <KRITA_URL>/health.A v2
krita_*tool returnsUnknown action— the plugin loaded in the running Krita predatesactions_v2.py; restart Krita after (re)installing the bundled plugin.Native Krita filters:
Filter.apply()hard-crashes Krita 5.3.3 (a verified upstream bug), so it is quarantined — usekrita_adjust_pixels(Pillow over the pixel bridge) for invert/grayscale/hsv/blur/brightness- contrast/posterize, andkrita_list_filtersfor the native catalog.rd_api_*tools reportno Retro Diffusion API key— none of the three sources resolved: passapi_keyon the call, setRD_API_KEY, or enter the key once in the Retro Diffusion dialog inside Aseprite (stored asrdapikeyin<RD_EXTENSION_DIR>\data\settings.json; that lookup also fails silently ifRD_EXTENSION_DIRpoints to the wrong folder).Degenerate/garbled small sprites from raw RD usage — this server already normalizes onto RD's 8px latent grid internally.
Repository layout
server.py the MCP server (fastmcp 4, stdio) — everything lives here
reapply_headless_patch.py idempotent patcher for the RD extension's console flashing
requirements.txt pinned direct dependencies
pyproject.toml optional `pip install .` → `pixelworks` console command
tests/ headless dispatch battery (test_gates.py) + live integration
suites (Aseprite workbench, v4 expansion, Krita v2)
examples/ the mushroom walkthrough above: .aseprite, PNGs, .kra, pipeline.png
DEVELOPMENT.md protocol notes, headless behavior, known traps, libkis/Aseprite gotchas
presets.example.json optional seed for presets.json
krita-plugin/ the extended Krita MCP bridge plugin (kritamcp
package + .desktop manifest) — install into
%APPDATA%/krita/pykrita/ for the krita_* tools
README.md this file — installation & client setup
LICENSE MIT license
.gitignore ignores .venv/, output/, presets.json, logs
.github/workflows/ release.yml — builds the Releases zip on every v* tagRuntime artifacts are created on demand: output/ (generated files,
override with RD_OUT_DIR) and presets.json (on first preset save).
Acknowledgements
pixelworks consolidates and builds on three MIT-licensed open-source projects:
pixel-mcp by Brandon Williams (MIT, Copyright (c) 2025 Brandon Williams) — the Aseprite-through-AI-assistants concept and the original workbench toolset (animation, retro palettes, dithering, shading, spritesheet export) that this server consolidated and replaced.
krita-mcp by nanayax3 (MIT, Copyright (c) 2025) — the Krita painting tool surface reimplemented here as the
krita_*family over the same Krita plugin HTTP API. The bundledkrita-plugin/is a locally extended fork of that project's bridge plugin: the original 14 paint actions are unchanged, and anactions_v2.pymixin adds 24 more (layers, pixel bridge, filter catalog, selections, transforms, export, view, action/python escape hatches) built on Krita's libkis scripting API.aseprite-mcp by Divyansh Singh (MIT, Copyright (c) 2024 Divyansh Singh) — source of the workbench expansion: layer management, color effects, palette presets/ramps/ quantization, cel tweening & oscillation, slices, tilemaps, onion-skin/frame-diff/color-stats analysis, per-layer & per-tag export, and the raw-Lua escape hatch were ported from that project and reimplemented for this server's headless single-file architecture; shared Lua idioms (layer lookup, cel normalization, RGB↔HSL conversion, Bayer dithering) derive from its
core/lua.pyand tool modules.
Portions of server.py are therefore derived from MIT-licensed code; the
copyright notices above are retained here.
License
MIT — see LICENSE.
The example images under examples/ are released under the same MIT
terms. Note that otherwise this license covers this server's code only. It does not grant
rights to the third-party products it talks to: Aseprite, the Retro Diffusion
extension and its models (including .pxlm LoRAs), and Krita each remain
under their own licenses and terms.
Available Tools
169 toolsase_add_frameAse Add FrameB
Append a frame; returns the new frame count.
Inputs: sprite_path (required), duration_ms. Returns: object
ase_add_framesAse Add FramesA
Append each PNG as a new animation frame on a new layer of an .aseprite sprite.
Useful to turn RD generations into idle-animation frames. Optionally wraps the new frames in an animation tag. Saves in place, headless CLI.
Inputs: image_paths (required), sprite_path (required), tag_name, layer_name. Returns: object
ase_add_frames_blankAse Add Frames BlankA
Append N blank frames, each with the given duration. Returns the new frame count.
Inputs: count (required), sprite_path (required), duration_ms. Returns: object
ase_add_layerAse Add LayerC
Add a new image layer.
Inputs: layer_name (required), sprite_path (required). Returns: object
ase_add_palette_colorAse Add Palette ColorB
Append a color to the sprite palette (grows by one).
Inputs: color (required), sprite_path (required). Returns: object
ase_adjust_hslAse Adjust HslA
Shift hue (-360..360 deg), saturation (-100..100) and lightness (-100..100) of all opaque pixels: palette swaps, night scenes, shadow layers. layer None = all layers; frame=0 processes every frame.
Inputs: sprite_path (required), frame, layer, hue_shift, +2 more. Returns: object
ase_analyze_palette_harmoniesAse Analyze Palette HarmoniesB
Color-wheel analysis: complementary pairs, triads, analogous groups, temperature.
Inputs: palette (required). Returns: object
ase_apply_outlineAse Apply OutlineC
Draw an outline around non-transparent pixels of a cel.
Inputs: color (required), sprite_path (required), frame, layer, +1 more. Returns: object
ase_apply_palette_presetAse Apply Palette PresetA
Set the sprite palette to a built-in retro preset. Only the palette is changed; snap existing pixels with ase_quantize_to_palette afterwards.
Inputs: preset (required), sprite_path (required). Returns: object
ase_apply_shadingAse Apply ShadingB
Directional cell shading: recolor opaque pixels of the base color toward shadow/highlight depending on which way the silhouette faces the light.
Inputs: sprite_path (required), base, frame, layer, +3 more. Returns: object
ase_clear_celAse Clear CelA
Delete the cel on a layer/frame (makes it truly empty, unlike painting it transparent). layer None = first image layer.
Inputs: sprite_path (required), frame, layer. Returns: object
ase_color_modeAse Color ModeA
Convert color mode: rgb|grayscale|indexed, with optional ordered dithering (none|ordered) and bayer2x2|bayer4x4|bayer8x8 matrix.
Inputs: mode (required), sprite_path (required), matrix, dithering. Returns: object
ase_compare_framesAse Compare FramesA
Diff two frames of the flattened sprite: changed pixel count, percent, and the bounding box of the changed region. Use while animating to confirm a frame actually changed (or did not change too much).
Inputs: frame_a (required), frame_b (required), sprite_path (required). Returns: object
ase_copy_celAse Copy CelA
Copy a cel's image from one frame to another (independent clone, unlike ase_link_cel which shares the image). layer None = first image layer.
Inputs: sprite_path (required), source_frame (required), target_frame (required), layer, +1 more. Returns: object
ase_copy_selectionAse Copy SelectionA
Copy the selected pixels to the server clipboard (keeps sprite intact).
Inputs: sprite_path (required), frame, layer. Returns: object
ase_create_canvasAse Create CanvasC
Create a new .aseprite sprite (rgb|grayscale|indexed). Returns its path.
Inputs: width (required), height (required), out_path, color_mode. Returns: object
ase_create_celAse Create CelA
Create an empty canvas-sized cel on a layer/frame (no-op if one exists). layer None = first image layer.
Inputs: sprite_path (required), x, y, frame, +1 more. Returns: object
ase_create_sliceAse Create SliceC
Create a named slice (rectangular region exported for game engines).
Inputs: x (required), y (required), name (required), width (required), +2 more. Returns: object
ase_create_tagAse Create TagC
Create an animation tag (forward|reverse|pingpong).
Inputs: tag_name (required), to_frame (required), from_frame (required), sprite_path (required), +1 more. Returns: object
ase_create_tilemap_layerAse Create Tilemap LayerA
Create a tilemap layer with its own tileset: sets the sprite grid to the tile size and adds the layer. Tile index 0 is the reserved empty tile; draw real tiles with ase_draw_on_tile (which appends on demand).
Inputs: layer_name (required), tile_width (required), sprite_path (required), tile_height (required). Returns: object
ase_crop_spriteAse Crop SpriteC
Crop the sprite to a rectangle.
Inputs: x (required), y (required), width (required), height (required), +1 more. Returns: object
ase_cut_selectionAse Cut SelectionB
Copy the selection to the clipboard and clear it in the cel.
Inputs: sprite_path (required), frame, layer. Returns: object
ase_delete_frameAse Delete FrameC
Delete a 1-based frame.
Inputs: frame (required), sprite_path (required). Returns: object
ase_delete_layerAse Delete LayerC
Delete a layer by name.
Inputs: layer_name (required), sprite_path (required). Returns: object
ase_delete_sliceAse Delete SliceB
Delete a slice by name.
Inputs: name (required), sprite_path (required). Returns: object
ase_delete_tagAse Delete TagC
Delete an animation tag by name.
Inputs: tag_name (required), sprite_path (required). Returns: object
ase_deselectAse DeselectA
Clear the server-side selection.
Inputs: no named parameters. Returns: object
ase_dither_gradientAse Dither GradientA
Fill a rectangle with a two-color Bayer 4x4 ordered-dither gradient (the classic pixel-art blend: no new intermediate colors). Top-to-bottom by default; horizontal=true runs left-to-right. Coordinates are sprite-global (the cel is normalized to the canvas).
Inputs: x (required), y (required), width (required), height (required), +6 more. Returns: object
ase_downsampleAse DownsampleB
Box-ish downsample to target size (bilinear then nearest for pixel art).
Inputs: width (required), height (required), sprite_path (required), out_path. Returns: object
ase_draw_circleAse Draw CircleC
Draw a circle (filled or outline).
Inputs: color (required), radius (required), center_x (required), center_y (required), +4 more. Returns: object
ase_draw_contourAse Draw ContourC
Draw a polyline/polygon through points.
Inputs: color (required), points (required), sprite_path (required), frame, +3 more. Returns: object
ase_draw_lineAse Draw LineB
Draw a line (Bresenham, optional thickness).
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +5 more. Returns: object
ase_draw_on_tileAse Draw On TileA
Paint pixels into a tile of a tilemap layer's tileset. Coordinates are tile-local (0,0 = tile top-left); pixels are [{x, y, color: '#rrggbb'}]. tile_index 1 is the first real tile (0 is the reserved empty tile); passing tile_index == current tile count appends a new tile.
Inputs: pixels (required), layer_name (required), tile_index (required), sprite_path (required). Returns: object
ase_draw_pixelsAse Draw PixelsB
Draw individual pixels [{x,y,r,g,b,a}] (or hex via r/g/b/a ints) on a cel.
merge=True skips fully transparent pixels (sprite stamping); default replaces everything including alpha.
Inputs: pixels (required), sprite_path (required), frame, layer, +1 more. Returns: object
ase_draw_pixels_hexAse Draw Pixels HexC
Convenience: draw pixels given as [{x, y, color: '#rrggbb' or '#rrggbbaa'}].
Inputs: pixels (required), sprite_path (required), frame, layer, +1 more. Returns: object
ase_draw_rectangleAse Draw RectangleC
Draw a rectangle (filled or outline).
Inputs: x (required), y (required), color (required), width (required), +5 more. Returns: object
ase_draw_with_ditherAse Draw With DitherC
Fill a region with a dither pattern (bayer_2x2/4x4/8x8, checkerboard, noise).
Inputs: x (required), y (required), width (required), color1 (required), +7 more. Returns: object
ase_duplicate_frameAse Duplicate FrameC
Duplicate a frame; insert_after=0 appends at the end.
Inputs: sprite_path (required), source_frame (required), insert_after. Returns: object
ase_duplicate_layerAse Duplicate LayerA
Duplicate a layer with independent copies of all its cels, plus opacity and blend mode. The copy lands directly above the source; default name is the source name plus a copy suffix.
Inputs: layer_name (required), sprite_path (required), new_name. Returns: object
ase_erase_colorAse Erase ColorA
Magic eraser: make every pixel matching a color fully transparent (per-channel tolerance 0-255). layer None = all layers, frame=0 = every frame. Returns the number of pixels erased.
Inputs: color (required), sprite_path (required), frame, layer, +1 more. Returns: object
ase_export_layersAse Export LayersB
Export each visible layer as its own PNG named after the layer (--split-layers). out_dir defaults to output/layers_/. include_hidden also exports hidden layers.
Inputs: sprite_path (required), out_dir, include_hidden. Returns: object
ase_export_spriteAse Export SpriteB
Export sprite to png|gif|jpg|bmp; frame=0 exports the animation.
Inputs: output_path (required), sprite_path (required), frame, format. Returns: object
ase_export_spritesheetAse Export SpritesheetC
Export a spritesheet (horizontal|vertical|rows|columns|packed) with optional JSON metadata.
Inputs: output_path (required), sprite_path (required), layout, padding, +1 more. Returns: object
ase_export_tagAse Export TagA
Export an animation tag: .gif output gives an animation, .png a frame-numbered sequence. The tag is validated up front because Aseprite's --tag silently exports ALL frames for a missing tag. output_path defaults to output/_.gif.
Inputs: tag_name (required), sprite_path (required), scale, output_path. Returns: object
ase_fill_areaAse Fill AreaB
Flood fill from a point (paint bucket), RGBA tolerance 0-255.
Inputs: x (required), y (required), color (required), sprite_path (required), +3 more. Returns: object
ase_flatten_layersAse Flatten LayersA
Flatten all layers into one.
Inputs: sprite_path (required). Returns: object
ase_flip_spriteAse Flip SpriteC
Flip horizontally|vertically (sprite or active layer).
Inputs: sprite_path (required), target, direction. Returns: object
ase_generate_color_rampAse Generate Color RampA
Generate a dark-to-light shading ramp around a base color using the standard pixel-art hue-shift technique: shadows lean cooler, highlights lean warmer, saturation tapers toward the light end. Pure computation (no Aseprite needed); feed the result to ase_set_palette or shading ops.
Returns the ramp darkest-first.
Inputs: base_color (required), steps, lightness_range, hue_shift_degrees. Returns: object
ase_get_color_statsAse Get Color StatsB
Histogram the colors of a flattened frame: unique color count, opaque pixel count, and the most-used colors. Catches palette drift and near-duplicate colors.
Inputs: sprite_path (required), top, frame. Returns: object
ase_get_paletteAse Get PaletteC
Return the sprite palette as hex colors.
Inputs: sprite_path (required). Returns: object
ase_get_pixelsAse Get PixelsB
Read a rectangular region of a cel as {width,height,pixels:[{x,y,r,g,b,a,hex}]}.
Inputs: sprite_path (required), x, y, frame, +3 more. Returns: object
ase_get_selectionAse Get SelectionC
Current selection state.
Inputs: no named parameters. Returns: object
ase_get_tile_atAse Get Tile AtB
Read which tile occupies a grid cell (0 = empty).
Inputs: col (required), row (required), layer_name (required), sprite_path (required), +1 more. Returns: object
ase_get_tilemap_infoAse Get Tilemap InfoC
Tilemap layer info: tile size, real tile count (excluding empty tile 0), and map dimensions in cells.
Inputs: layer_name (required), sprite_path (required). Returns: object
ase_import_layerAse Import LayerA
Import a PNG (e.g. an RD generation) into an .aseprite sprite as a new layer.
The image cel is placed at (0,0) on the given 1-based frame. The sprite file is saved in place. Runs headless via the Aseprite CLI.
Inputs: image_path (required), layer_name (required), sprite_path (required), frame. Returns: object
ase_link_celAse Link CelC
Make a cel linked (shared image) with another frame's cel.
Inputs: layer_name (required), sprite_path (required), source_frame (required), target_frame (required). Returns: object
ase_list_palette_presetsAse List Palette PresetsA
List the built-in retro palette presets (gameboy, pico8, c64, cga, dawnbringer16/32, grayscale_4, monochrome) with their hex colors. Pure data: works without Aseprite.
Inputs: no named parameters. Returns: object
ase_list_slicesAse List SlicesB
List all slices with bounds, 9-patch centers and pivots.
Inputs: sprite_path (required). Returns: object
ase_merge_layer_downAse Merge Layer DownB
Merge a layer into the layer directly below it (must not be bottom).
Inputs: layer_name (required), sprite_path (required). Returns: object
ase_move_selectionAse Move SelectionB
Move the selection bounds (not pixels).
Inputs: dx (required), dy (required). Returns: object
ase_oscillate_cel_positionsAse Oscillate Cel PositionsA
Sine-wave cel motion across a frame range (bobbing, breathing, hovering). Offsets are applied relative to each cel's position at script start, so run once per animation pass. x follows sin, y follows cos. layer None = first image layer.
Inputs: end_frame (required), sprite_path (required), start_frame (required), layer, +5 more. Returns: object
ase_paste_clipboardAse Paste ClipboardC
Paste the server clipboard onto a cel at (x,y), respecting alpha.
Inputs: sprite_path (required), x, y, frame, +1 more. Returns: object
ase_propagate_celsAse Propagate CelsA
Copy the cels of a source frame across a frame range (per layer list; None = every image layer). The animation workhorse: draw once, propagate, then tween positions. replace=True overwrites existing cels.
Inputs: end_frame (required), sprite_path (required), start_frame (required), source_frame (required), +2 more. Returns: object
ase_quantize_to_paletteAse Quantize To PaletteA
Snap every opaque pixel to the nearest color in the sprite's own palette (RGB distance, cached per color). layer None = all layers, frame=0 = every frame. Run after ase_apply_palette_preset / ase_set_palette to make existing art conform. Returns the number of pixels changed.
Inputs: sprite_path (required), frame, layer. Returns: object
ase_rename_layerAse Rename LayerA
Rename a layer (accepts group/child paths).
Inputs: new_name (required), layer_name (required), sprite_path (required). Returns: object
ase_render_onion_skinAse Render Onion SkinA
Render a frame over translucent ghosts of neighboring frames (batch onion-skinning) to check motion continuity without opening Aseprite. The flattened frames are exported via the CLI and composited with Pillow over white, then nearest-neighbor scaled. Returns the PNG path.
Inputs: frame (required), sprite_path (required), after, scale, +3 more. Returns: object
ase_reorder_layerAse Reorder LayerB
Move a layer to a 1-based stack position (1 = bottom).
Inputs: position (required), layer_name (required), sprite_path (required). Returns: object
ase_replace_colorAse Replace ColorA
Replace one color with another across a layer (None = all layers), preserving alpha. frame=0 processes every frame. tolerance is per-channel 0-255. Returns the number of pixels replaced.
Inputs: to_color (required), from_color (required), sprite_path (required), frame, +2 more. Returns: object
ase_resize_canvasAse Resize CanvasA
Resize canvas without scaling content (anchor: center|top_left|top_right|bottom_left|bottom_right).
Inputs: width (required), height (required), sprite_path (required), anchor. Returns: object
ase_rotate_spriteAse Rotate SpriteB
Rotate 90/180/270 degrees clockwise (sprite or active layer).
Inputs: angle (required), sprite_path (required), target. Returns: object
ase_run_luaAse Run LuaA
Execute arbitrary Aseprite Lua in batch mode - the escape hatch when no dedicated tool fits (full API: https://www.aseprite.org/api/). One script can batch many operations into a single Aseprite launch.
Essentials: when sprite_path is given it is opened first and bound to a local 'spr' (also app.activeSprite); changes are NOT saved automatically - call spr:saveAs(spr.filename) at the end; print() is the only way to return data (captured in the result's output list); do NOT end the script with a top-level return (it skips the completion marker and the call is reported as failed). Cel-image coordinates are cel-local: offset sprite-global coordinates by cel.position.
WARNING: executes unrestricted Lua (including io/os access) on the host running Aseprite. Only pass scripts you trust.
Inputs: script (required), sprite_path. Returns: object
ase_save_asAse Save AsC
Save a sprite copy to a new path.
Inputs: out_path (required), sprite_path (required). Returns: object
ase_scale_spriteAse Scale SpriteC
Scale the whole sprite (nearest|bilinear).
Inputs: scale_x (required), scale_y (required), sprite_path (required), algorithm. Returns: object
ase_select_allAse Select AllD
Select the whole cel.
Inputs: sprite_path (required), frame, layer. Returns: object
ase_select_ellipseAse Select EllipseC
Set the server-side selection to an ellipse (bounding box).
Inputs: x (required), y (required), width (required), height (required). Returns: object
ase_select_rectangleAse Select RectangleB
Set the server-side selection to a rectangle.
Inputs: x (required), y (required), width (required), height (required). Returns: object
ase_set_cel_opacityAse Set Cel OpacityA
Set a single cel's opacity 0-255 (layer None = first image layer).
Inputs: opacity (required), sprite_path (required), frame, layer. Returns: object
ase_set_cel_positionAse Set Cel PositionA
Place a cel at sprite coordinates (x, y). layer None = first image layer; errors when the cel does not exist (create/draw one first).
Inputs: x (required), y (required), sprite_path (required), frame, +1 more. Returns: object
ase_set_frame_durationAse Set Frame DurationC
Set a frame's duration in ms.
Inputs: frame (required), duration_ms (required), sprite_path (required). Returns: object
ase_set_frame_duration_allAse Set Frame Duration AllA
Set every frame's duration in ms (unit-probed for Aseprite 1.3+).
Inputs: duration_ms (required), sprite_path (required). Returns: object
ase_set_layer_blend_modeAse Set Layer Blend ModeA
Set a layer's blend mode: normal, darken, multiply, color_burn, lighten, screen, color_dodge, addition, overlay, soft_light, hard_light, difference, exclusion, subtract, divide, hue, saturation, color, luminosity.
Inputs: mode (required), layer_name (required), sprite_path (required). Returns: object
ase_set_layer_opacityAse Set Layer OpacityB
Set layer opacity 0-255.
Inputs: opacity (required), layer_name (required), sprite_path (required). Returns: object
ase_set_layer_visibilityAse Set Layer VisibilityC
Show or hide a layer.
Inputs: layer_name (required), sprite_path (required), visible. Returns: object
ase_set_paletteAse Set PaletteC
Replace the sprite palette with the given hex colors.
Inputs: colors (required), sprite_path (required). Returns: object
ase_set_palette_colorAse Set Palette ColorC
Set one palette entry by index.
Inputs: color (required), index (required), sprite_path (required). Returns: object
ase_set_slice_centerAse Set Slice CenterC
Set a slice's 9-patch center rectangle (relative to the slice origin): the stretchable region for game-engine 9-patch scaling.
Inputs: x (required), y (required), name (required), width (required), +2 more. Returns: object
ase_set_slice_pivotAse Set Slice PivotC
Set a slice's pivot point (relative to the slice origin).
Inputs: x (required), y (required), name (required), sprite_path (required). Returns: object
ase_set_tilesAse Set TilesA
Place tiles on a tilemap layer by grid position. tiles are [{col, row, tile_index}] (col/row are 0-based grid coordinates; tile_index 0 clears the cell). The cel is (re)built at map size.
Inputs: tiles (required), layer_name (required), sprite_path (required), frame. Returns: object
ase_sort_paletteAse Sort PaletteC
Sort the sprite palette by hue|saturation|brightness|luminance.
Inputs: sprite_path (required), method, ascending. Returns: object
ase_sprite_infoAse Sprite InfoC
Sprite metadata: dimensions, color mode, frames (with durations), layers, tags.
Inputs: sprite_path (required). Returns: object
ase_statusAse StatusA
Check whether the headless Aseprite CLI is available (executable present and a probe batch run succeeds). Cached 60s; file-touching ase_* tools gate on this and report {available:false,...} instead of crashing when missing.
When the executable cannot be found the result also carries the locations that were probed, so an install in a custom folder can be pointed at directly instead of guessed.
Inputs: no named parameters. Returns: object
ase_suggest_antialiasingAse Suggest AntialiasingB
Detect jagged diagonal edges and suggest (or apply) 50% blend pixels.
Inputs: sprite_path (required), apply, frame, layer. Returns: object
ase_trim_spriteAse Trim SpriteA
Trim transparent borders (optionally by grid boundaries).
Inputs: sprite_path (required), by_grid. Returns: object
ase_tween_cel_positionsAse Tween Cel PositionsA
Tween a cel's position linearly across a frame range (movement arcs, attacks, slides). easing: linear | ease_in | ease_out | ease_in_out | smoothstep. Missing cels are cloned from the start frame when create_missing=true. layer None = first image layer.
Inputs: end_x (required), end_y (required), start_x (required), start_y (required), +6 more. Returns: object
ase_view_frameAse View FrameA
Render one cel of a sprite to PNG and return it as MCP image content so the caller can SEE the current sprite state (layer defaults to first).
Inputs: sprite_path (required), frame, layer, max_side, +1 more.
krita_adjust_pixelsKrita Adjust PixelsA
Crash-free image adjustments on a Krita layer region, computed with Pillow over the get_pixels/set_pixels PNG bridge (libkis Filter.apply() hard-crashes Krita 5.3.3, so native filters are quarantined; see krita_list_filters for names).
operation: invert | grayscale | hsv (hue_shift -360..360, saturation_shift/value_shift -100..100) | blur (radius px) | bright_contrast (brightness/contrast factors, 1.0 = unchanged) | posterize (bits 1-8). width/height 0 = to the canvas edge; layer=None targets the active layer. Alpha is preserved throughout.
Inputs: operation (required), x, y, bits, +9 more. Returns: object
krita_clearKrita ClearA
Clear the canvas to a solid color.
Inputs: color. Returns: object
krita_clear_selectionKrita Clear SelectionA
Deselect everything.
Inputs: no named parameters. Returns: object
krita_create_layerKrita Create LayerB
Create a paint or group layer. above = existing layer name to stack it over (default: top). The new layer becomes active.
Inputs: name (required), type, above, opacity, +1 more. Returns: object
krita_document_infoKrita Document InfoA
Active Krita document overview: name, filename, size, resolution, color model/depth, layer count, active layer, selection state, zoom, Krita version.
Inputs: no named parameters. Returns: object
krita_draw_shapeKrita Draw ShapeC
Draw rectangle|ellipse|line on the canvas; x2/y2 are line endpoints.
Inputs: x (required), y (required), shape (required), x2, +5 more. Returns: object
krita_duplicate_layerKrita Duplicate LayerA
Duplicate a layer with its full pixel content; the clone lands directly above the source and becomes active.
Inputs: name (required), new_name. Returns: object
krita_export_layersKrita Export LayersA
Export every top-level layer as its own PNG (trimmed to its bounds). Defaults to the plugin's canvas output dir; returns per-layer paths.
Inputs: output_dir. Returns: object
krita_fillKrita FillC
Fill a circle at (x, y) with the current color.
Inputs: x (required), y (required), radius. Returns: object
krita_flattenKrita FlattenA
Flatten all layers of the active document into one.
Inputs: no named parameters. Returns: object
krita_get_canvasKrita Get CanvasC
Export the current Krita canvas to PNG (plugin output dir).
as_base64=true returns the PNG bytes as a plain text png_base64 field for callers that decode/write themselves; otherwise returns the plugin result including the exported path.
Inputs: filename, max_side, as_base64.
krita_get_color_atKrita Get Color AtA
Sample the canvas color at (x, y) (eyedropper).
Falls back to exporting the canvas and reading the pixel locally when the Krita plugin's native action fails (older plugin builds crash on bytes formatting until Krita is restarted with the patched plugin).
Inputs: x (required), y (required). Returns: object
krita_get_pixelsKrita Get PixelsA
Export a canvas region as PNG (merged projection; layer=None reads the whole composite). width/height 0 = to the canvas edge. Returns the file path; as_base64 also returns the PNG bytes as a text field. Pair with px_view_image / read_image to LOOK at the canvas.
Inputs: x, y, layer, width, +3 more. Returns: object
krita_get_selectionKrita Get SelectionA
Current global selection: exists flag plus bounding box.
Inputs: no named parameters. Returns: object
krita_list_actionsKrita List ActionsA
List Krita QAction names runnable via krita_run_action (partial-name filter on name or display text).
Inputs: limit, filter. Returns: object
krita_list_brushesKrita List BrushesA
List Krita brush presets (partial-name filter).
Inputs: limit, filter. Returns: object
krita_list_filtersKrita List FiltersA
List Krita filter names usable with krita_apply_filter (partial-name filter).
Inputs: filter. Returns: object
krita_list_layersKrita List LayersA
Layer tree of the active document (top-of-stack first): name, type, visibility, lock, opacity, blending mode, bounds, nested children.
Inputs: no named parameters. Returns: object
krita_merge_layer_downKrita Merge Layer DownC
Merge a layer into the one below it.
Inputs: name (required). Returns: object
krita_modify_selectionKrita Modify SelectionB
Modify the current selection: invert | feather(radius) | grow(x_radius,y_radius) | shrink(x_radius,y_radius,edge_lock) | smooth | erode | dilate | border(x_radius,y_radius).
Inputs: op (required), radius, x_radius, y_radius, +1 more. Returns: object
krita_new_canvasKrita New CanvasC
Create a new canvas in Krita.
Inputs: name, width, height, background. Returns: object
krita_open_fileKrita Open FileB
Open a file in Krita (.kra, .png, .jpg, ...).
Inputs: path (required). Returns: object
krita_redoKrita RedoA
Redo the last undone action in Krita.
Inputs: no named parameters. Returns: object
krita_remove_layerKrita Remove LayerB
Delete a layer (refuses to delete the only top-level layer).
Inputs: name (required). Returns: object
krita_resize_imageKrita Resize ImageA
Resize the canvas without scaling content (crop or expand). x/y is the offset of the old canvas inside the new one (negative crops).
Inputs: x, y, width, height. Returns: object
krita_run_actionKrita Run ActionA
Trigger any named Krita action (e.g. flatten_image, mirror_canvas, view_zoom_in, selectiontool...). Unknown names return did_you_mean suggestions from krita_list_actions.
Inputs: name (required). Returns: object
krita_run_pythonKrita Run PythonA
Execute arbitrary Python inside Krita (escape hatch). The namespace provides: krita module, Krita/app, doc (active Document), view, InfoObject, Selection, QImage, os, json, math. print() is captured into the result's output field; assign to a variable named result to return a value (repr'd).
WARNING: executes unrestricted code inside the running Krita process. Only pass code you trust.
Inputs: code (required). Returns: object
krita_saveKrita SaveC
Save the current Krita document to path (.kra/.png/...).
Inputs: path (required). Returns: object
krita_scale_imageKrita Scale ImageA
Scale the whole image to new pixel dimensions (resampling strategy: Bilinear | NearestNeighbor | Lanczos3 ...). xres/yres 0 keeps the current resolution.
Inputs: width (required), height (required), xres, yres, +1 more. Returns: object
krita_set_active_layerKrita Set Active LayerA
Make a layer the active paint target (searched recursively by exact name).
Inputs: name (required). Returns: object
krita_set_brushKrita Set BrushB
Set brush preset and properties (preset partial name, size px, opacity 0-1).
Inputs: size, preset, opacity. Returns: object
krita_set_canvas_viewKrita Set Canvas ViewA
Control the active view's canvas: zoom level (1.0 = 100%), rotation degrees, mirror, wrap-around mode. Only provided fields change; returns the resulting zoom/rotation.
Inputs: zoom, mirror, rotation, wrap_around. Returns: object
krita_set_colorKrita Set ColorB
Set the foreground (paint) color (hex like #ff6b6b).
Inputs: color (required). Returns: object
krita_set_layer_propsKrita Set Layer PropsB
Change layer visibility/lock/opacity/blending mode/name. Only the provided fields are touched.
Inputs: name (required), locked, opacity, visible, +2 more. Returns: object
krita_set_pixelsKrita Set PixelsA
Stamp a PNG file into a layer at (x, y) - the bridge for bringing Aseprite sprites or Retro Diffusion generations into Krita. layer=None targets the active layer.
Inputs: image_path (required), x, y, layer. Returns: object
krita_set_selectionKrita Set SelectionC
Set the global selection to a rectangle, or the whole canvas (all=True).
Inputs: x, y, all, width, +1 more. Returns: object
krita_statusKrita StatusA
Check whether Krita is running with the MCP plugin active (forced probe).
Inputs: no named parameters. Returns: object
krita_strokeKrita StrokeB
Paint a stroke through [x, y] points; pressure 0-1.
Inputs: points (required), pressure. Returns: object
krita_undoKrita UndoB
Undo the last action in Krita.
Inputs: no named parameters. Returns: object
px_capabilitiesPx CapabilitiesA
One-call overview of what this server can currently do: Aseprite (primary subsystem) and Retro Diffusion (conditional) availability, the gating behavior, and how to fetch image content back to the caller.
Inputs: no named parameters. Returns: object
px_image_base64Px Image Base64A
Return a PNG file's bytes as a PLAIN TEXT base64 field in the JSON result ({"png_base64": "iVBORw0...", "mime": "image/png", "bytes": N, ...}) instead of an ImageContent block, so the caller can decode and write it themselves (e.g. into a sandboxed outputs directory). Transparency is preserved. max_side=0 keeps the original size; otherwise downscale before encoding.
Inputs: path (required), max_side. Returns: object
px_view_imagePx View ImageB
Return an image file as MCP image content so the caller can SEE it (downscaled to max_side for token sanity), preceded by an info dict.
Inputs: path (required), max_side.
px_view_imagesPx View ImagesC
Return several image files as MCP image content blocks (animation frames, before/after pairs), each preceded by its info dict.
Inputs: paths (required), max_side.
rd_api_img2animRd Api Img2AnimB
Retrodiffusion.ai cloud API: image to animation. Returns frame PNGs plus an assembled GIF (needs an API key).
Inputs: prompt (required), image_path (required), seed, style, +3 more. Returns: object
rd_api_img2imgRd Api Img2ImgC
Retrodiffusion.ai cloud API: image to image (needs an API key).
Inputs: prompt (required), image_paths (required), seed, rembg, +13 more.
rd_api_txt2animRd Api Txt2AnimA
Retrodiffusion.ai cloud API: text to animation. Returns frame PNGs plus an assembled GIF (needs an API key).
Inputs: prompt (required), seed, style, width, +2 more. Returns: object
rd_api_txt2imgRd Api Txt2ImgC
Retrodiffusion.ai cloud API: text to image (needs an API key: arg, RD_API_KEY env, or the extension's settings rdapikey).
Inputs: prompt (required), seed, rembg, style, +12 more.
rd_benchmarkRd BenchmarkC
Run the backend benchmark (throughput/consistency measurement).
Inputs: seed, pixelvae, time_limit, error_range, +1 more. Returns: object
rd_cn_img2imgRd Cn Img2ImgA
ControlNet Image to Image: same as rd_cn_txt2img plus a source image (appended after the ControlNet slots, resized to 512 like the UI) and strength 0-100.
Inputs: prompt (required), image_path (required), controlnets (required), control_images (required), +35 more.
rd_cn_txt2imgRd Cn Txt2ImgC
ControlNet Text to Image.
controlnets: list of {model: Composition|Depth|Pose|Sketch|Tile, weight: 0-100, process: bool (preprocess input), enabled: bool}; control_images: parallel list of input PNG paths (None for disabled slots). Palette constraint via palette_files (PNG palettes) or palette_url. Uses explicit steps (no quality).
Inputs: prompt (required), controlnets (required), control_images (required), seed, +33 more.
rd_color_transferRd Color TransferC
Color Style Transfer: recolor images to match a reference image's palette.
strict enforces the exact reference colors.
Inputs: image_paths (required), reference_path (required), strict. Returns: object
rd_generateRd GenerateA
Text to Image with the local Retro Diffusion pixel-art model.
Output pixels = width//pixel_size (or a size_preset like 64x64/160x144, swap=True transposes). Internally normalized onto RD's 8px latent grid so small sprites never degrade. quality ~1.6-6 drives steps; cfg_scale is the prompt scale; adherence 0-5 trades ELLA/CLIP guidance. Modifiers: comp_* (hue/tint/brightness/saturation/contrast/outline sliders), light_* (directional lighting leco). Rendering options: pixelvae (fast pixel decoder), rembg, post_process (auto reduce colors), tile_x/tile_y. Display: save_grid composes one grid PNG; save_progress stores intermediate previews. preset + overrides replays a saved preset (other args ignored).
Inputs: seed, swap, loras, model, +33 more.
rd_img2imgRd Img2ImgC
Image to Image: refine/repaint existing PNGs. strength 0-100.
Inputs are resized to max side 512 like the UI does. Same advanced options as rd_generate.
Inputs: prompt (required), image_paths (required), seed, swap, +33 more.
rd_kcentroidRd KcentroidB
K-Centroid Resize: downscale images with k-means palette preservation (centroids = target colors), optionally re-adding an outline.
Inputs: image_paths (required), width, height, outline, +1 more. Returns: object
rd_list_lorasRd List LorasA
List available Retro Diffusion style LoRAs (.pxlm) with their alias keys.
Inputs: no named parameters. Returns: result
rd_list_modelsRd List ModelsA
List selectable base models, ControlNet models, texture tiling modes and dimension presets.
Inputs: no named parameters. Returns: object
rd_neural_detailRd Neural DetailC
Neural Detail: add or remove detail (detail 0-100) on existing pixel art.
Inputs: image_path (required), blip, seed, loras, +20 more.
rd_neural_pixelateRd Neural PixelateB
Neural Pixelate: convert an image (photo/render) into pixel art.
blip auto-captions the input; color_map preserves the source palette.
Inputs: image_path (required), blip, seed, loras, +19 more.
rd_neural_resizeRd Neural ResizeC
Neural Resize: change pixel density/resolution of pixel art while keeping detail coherent.
Inputs: image_path (required), blip, seed, loras, +19 more.
rd_neural_transformRd Neural TransformC
Neural Transform: re-imagine the input image in a new style/pose from a prompt.
Inputs: prompt (required), image_path (required), seed, loras, +17 more.
rd_paletteRd PaletteA
Generate a color palette with Retro Diffusion's palette model.
Returns the swatch image path plus extracted hex colors (row-major, deduplicated).
Inputs: prompt (required), seed, colors. Returns: object
rd_palettizeRd PalettizeB
Palettize: reduce images to a palette (file/URL constrained or automatic).
dither: None | Bayer 2x2 | Bayer 4x4 | Bayer 8x8; dither_strength, denoise, smoothness, intensity are 0-100 sliders mirroring the UI.
Inputs: image_paths (required), colors, dither, denoise, +5 more. Returns: object
rd_preset_applyRd Preset ApplyA
Return a saved preset's settings so they can be passed to rd_generate.
Inputs: name (required). Returns: object
rd_preset_deleteRd Preset DeleteB
Delete a saved preset.
Inputs: name (required). Returns: object
rd_preset_listRd Preset ListA
List saved generation presets.
Inputs: no named parameters. Returns: object
rd_preset_saveRd Preset SaveA
Save a named generation preset (any rd_generate kwargs) to presets.json.
Inputs: name (required), settings (required). Returns: object
rd_prompt_extractRd Prompt ExtractA
Extract a text prompt/description from a reference image (BLIP captioning, optionally guided by a partial description).
Inputs: reference_path (required), description. Returns: object
rd_quantizeRd QuantizeA
Reduce a PNG to an indexed palette (GBA-friendly) and return the hex palette.
Pillow median-cut quantization; output is a P-mode PNG. Default out_path sits next to the input with a _q{colors} suffix.
Inputs: image_path (required), colors, out_path. Returns: object
rd_rembgRd RembgB
Remove Background: cut the background out of images (ISNET matting).
Inputs: image_paths (required). Returns: object
rd_start_backendRd Start BackendA
Start the Retro Diffusion local backend (image_server.py in the extension venv) if not already listening.
Headless: no console window, UTF-8 IO env, logs to mcp-backend.log.
Inputs: no named parameters. Returns: object
rd_statusRd StatusA
Check whether the Retro Diffusion local backend is reachable on ws://127.0.0.1:8765.
By default this only opens a socket (zero side effects). With handshake=True it also performs the version handshake, which makes the backend minimize its console window once - avoid unless diagnosing.
Inputs: handshake. Returns: object
rd_stop_backendRd Stop BackendA
Ask the Retro Diffusion backend to shut down (also closes its console window loop).
Inputs: no named parameters. Returns: object
rd_texture_genRd Texture GenB
Generate Textures: PBR maps (normal/roughness/displacement) from images.
tiling: none | seamless | mirror | replicate (extend).
Inputs: image_paths (required), tiling. Returns: object
rd_translateRd TranslateC
Translate/enhance prompts into model-friendly English prompt text.
Inputs: prompt (required), seed, negative, generations. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 169 tools
The subsystem prefixes (ase_, krita_, rd_, px_) separate concerns clearly, and most tools target a distinct resource or action. A few near-duplicates such as ase_draw_pixels vs ase_draw_pixels_hex, ase_add_frame vs ase_add_frames, and ase_dither_gradient vs ase_draw_with_dither create minor ambiguity, but the descriptions are detailed enough to resolve most confusion.
Names are uniformly snake_case and follow a recognizable verb_noun pattern within each subsystem. Minor inconsistencies exist, such as mixing add vs create, get vs list, and delete vs remove across tools, but the overall convention is predictable and readable.
169 tools is an extreme surface for any MCP server, even one spanning Aseprite, Krita, and Retro Diffusion. This volume will overwhelm context windows and make tool selection expensive and error-prone.
The tool surface is remarkably comprehensive, covering sprite/layer/frame/tag/palette/slice/tilemap operations, Krita document and layer workflows, image generation variants, and integration bridges between the subsystems. The escape hatches ase_run_lua and krita_run_python close almost any remaining gap.
Maintenance
Related MCP Connectors
Generate, edit, style-match, turn, and animate game-ready pixel art at exact sizes.
Generate sprites, animations, tilesets, 3D models, VFX and game audio, and export them.
Pixel art for your game, from your coding agent. Generate sprites, items and tiles in your game's style (64 to 1024 px), make variants, reskins and N/E/S/W directions, then edit everything in a full pixel art editor that syncs into your project. Works with Claude, Claude Code, Cursor and ChatGPT; sign in with OAuth, no API key.
Pixel art for AI agents: free image to pixel art, plus sprite generation and animation.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI assistants to control Aseprite for creating pixel art and animated sprites, with 104 tools covering canvas, drawing, animation, palettes, effects, and more.100MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to drive Aseprite for pixel-art creation, including sprite setup, grid-based drawing, layer/frame/tag management, reference image import, and export, with rendered previews after every mutation.MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to create and edit pixel art and animated sprites in Aseprite through 104 tools covering drawing, layers, animation, palettes, tilemaps, exports, visual analysis, and raw Lua scripting.116MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to create and revise editable pixel art in a running Aseprite editor, with live tools for sprites, layers, drawing, animation, palettes, selections, previews, saving, and exporting.MIT