aseprite-mcp
Drives a local Aseprite instance to create, edit, inspect, animate, and export pixel-art sprites from an MCP client.
Create and manage sprites, layers/groups, frames/tags, cels, slices, and tilemaps.
Draw with pixels, lines, rectangles, ellipses, polygons, gradients, patterns, ASCII art, isometric boxes, and text/fonts.
Edit color modes/palettes, ramps, color replacements, adjustments, outlines, convolution, and quantization.
Animate cels with tweens/oscillation/copying, and audit or repair animation structure.
Read pixels, bounds, color stats, frame differences, and stray pixels; view PNG previews.
Import images; export PNG/GIF/WebP/etc., spritesheets with JSON, and per-layer PNGs.
Run many edits in one atomic batch with safe saves and optional sandboxing.
Serve exported files via a localhost preview server and optionally run Lua when explicitly enabled.
Drives a local Aseprite installation in headless/batch mode to create, edit, inspect, and export pixel-art sprites, including layers, frames, tags, cels, drawing, text, palettes, slices, tilemaps, animation checks, and import/export operations.
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., "@aseprite-mcp create a 32x32 sprite of a red potion and export it as PNG"
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.
aseprite-mcp
Pixel art for your AI assistant, made in a real Aseprite.
An MCP server that drives a local
Aseprite in batch mode: create sprites, draw, animate, fix
palettes, look at the result and export it. Everything lands in ordinary .aseprite
files you can open in the editor.
Quick start
You need Python 3.12+ and your own copy of Aseprite 1.3 or newer.
1. Install.
uvx --from git+https://github.com/anhiiro/aseprite-mcp aseprite-mcp --checkor pipx install git+https://github.com/anhiiro/aseprite-mcp (Python 3.12 or newer; uvx
fetches one for you). --check finds Aseprite and runs a tiny script in it; set
ASEPRITE_PATH if it cannot.
2. Add it to your MCP client.
{
"mcpServers": {
"aseprite": {
"command": "uvx",
"args": ["--from", "git+https://github.com/anhiiro/aseprite-mcp", "aseprite-mcp"],
"env": {
"ASEPRITE_PATH": "/path/to/aseprite",
"ASEPRITE_MCP_ROOT": "/home/me/pixel-art"
}
}
}
}3. Ask.
Create a 32x32 sprite called
slime.aseprite, draw a small green slime with a dark outline, then show it to me.
More in Getting started.
Related MCP server: aseprite-mcp
Highlights
Feature | What it gives you |
Batch |
|
Safe saves | Edits go to a temporary file and replace the sprite only on success. An optional sandbox keeps every path inside one folder. |
Native image ops | Colour adjustment, convolution, outlines and sprite sheets run on Aseprite's own filters and exporter. |
Cross-platform | Linux, macOS and Windows; CI runs the unit tests on all three. |
Preview |
|
Opt-in Lua |
|
Tools
72 tools, plus run_lua when enabled. Full parameters in docs/tools.md.
Group | Examples |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
There is also a pixel_art_guide prompt and an aseprite://palettes resource with the
palette presets set_palette accepts.
Documentation
Getting started: install, find Aseprite, client setup, first prompt
Concepts: 1-based frames, colours, layer paths, locks, file formats, limits
Batch: many edits in one Aseprite run
Fonts: system fonts and Aseprite's pixel fonts
Configuration: every environment variable
Security: sandbox,
run_lua, preview server, atomic savesTroubleshooting: error messages and fixes
Tool reference: every tool with its parameters
Fan art
Showcase sprites are unofficial fan art, see assets/NOTICE.md. They are not covered by the MIT license. This project is not affiliated with Aseprite or its authors.
Contributing
Issues and pull requests are welcome; start with CONTRIBUTING.md. To report a vulnerability, see SECURITY.md. Changes are listed in CHANGELOG.md.
License
MIT, see LICENSE. Copyright (c) 2026 HoangAnh.
Available Tools
72 toolsadd_framesA
Insert frames, empty unless copy_content is true. Returns the new frame numbers.
copy_content copies every layer's cel of the frame before the new ones (the old first frame when after=0) as independent cels. Without duration_ms the new frames take the duration of that same frame.
Inputs: path (required), after, count, duration_ms, +1 more. Returns: object
add_layerB
Add a layer, group or tilemap layer on top of its parent's stack.
Returns the new layer's path. Names do not have to be unique.
Inputs: name (required), path (required), kind, parent, +1 more. Returns: object
adjust_colorsA
Adjust the colours of a layer with Aseprite's filters; alpha is never changed.
They run in this order: hue/saturation/lightness (HSL, as percentages), then brightness/contrast, then invert.
Every requested frame must have a cel. A filter removes a cel it leaves fully transparent, so a later op on that frame in the same batch finds no cel. Linked cels change once; one also linked to frames outside the list always gets its own copy, even when nothing changes. Indexed sprites only support invert (each pixel gets the palette entry nearest to its inverted colour): the other adjustments would rewrite the shared palette.
Inputs: path (required), layer (required), hue, frames, +6 more. Returns: object
apply_convolutionA
Run one of Aseprite's convolution matrices (blur, sharpen, edges...) on a layer.
Alpha is filtered too, except on a background layer, which stays opaque. Indexed pixels are filtered through their palette colours and get the nearest entry. A cel left fully transparent is removed, so a later op on that frame in the same batch finds no cel. Every requested frame must have a cel; linked cels are handled like adjust_colors.
Inputs: path (required), layer (required), matrix (required), frames, +1 more. Returns: object
batchA
Run several single-step tools on one sprite in one go and return their results in order.
The ops run in a single Aseprite process and are saved once at the end. If any op fails, nothing is saved and the error names the failing op. create_sprite and other multi-step tools are not accepted. One call takes at most 1000 ops by default.
Inputs: ops (required), path (required). Returns: result
check_animationARead-only
Audit the animation without changing it; every layer is checked, nested ones too.
Each finding is {kind, severity, message} plus layer and frame where they apply.
Errors: missing_layer (a named layer does not exist), out_of_range (a layer has
pixels in a frame outside its layer_frame_ranges entry), overlap (an overlap_pairs
pair has pixels on the same canvas spot; with pixels and bounds).
Warnings: missing_in_range (no pixels in a frame inside its range), ambiguous_layer
(a bare name matches several layers; the shallowest is used), empty_frame (no
visible pixels), cel_off_canvas, frame_duration (under 10 ms or over 10 s).
Ranges and overlaps look at a layer's own pixels, hidden or not; tilemap layers are
left out of overlap checks. The overlap scan covers where the pairs' cels meet, summed
over pairs and frames; past ASEPRITE_MCP_MAX_SCAN_PIXELS (default 16777216) the call
fails before scanning, so check fewer frames or pairs. ok is true when there is no
error. At most 200 findings are listed (truncated says so; finding_count is the
total). Only frames are checked.
Inputs: path (required), frames, overlap_pairs, required_layers, +1 more. Returns: object
clear_celsA
Delete a layer's cels in the given frames; frames without a cel are skipped.
Linked cels in other frames keep their image. Returns how many cels were removed. The layer must not be locked.
Inputs: path (required), layer (required), frames (required). Returns: object
compare_framesARead-only
Count the pixels that differ between two frames and box them in.
A pixel differs when its RGBA differs; two fully transparent pixels are equal. bounds is the canvas box around the differences, null when the frames are identical. Without layer the visible composites are compared.
Inputs: path (required), frame_a (required), frame_b (required), layer, +1 more. Returns: object
copy_framesA
Copy the cels of one frame into other frames, layers inside groups included.
replace makes each target cel equal to the source: image, position, opacity and z-index, and a target is cleared where the source frame has no cel. missing_only only fills targets where the layer has no cel yet. link=true makes the copies linked cels that share the source's image. The source frame itself is skipped if listed in targets. Frame durations are not copied. A locked layer (or one in a locked group) that the copy would change is refused.
Inputs: path (required), source (required), targets (required), link, +2 more. Returns: object
copy_layersA
Copy layers from another sprite into the target, on top of its top level.
A group comes with all its layers, nested groups included. Cels keep their frame number, position, opacity and z-index; linked cels stay linked. Layer name, visibility, opacity, blend mode, colour and user data are copied. Both sprites must have the same colour mode (indexed copies palette indices as they are, so give both the same palette). A name already used at the target's top level is an error unless replace is true, which puts the copy in the old layer's place. Without create_missing_frames, cels past the target's last frame are skipped and counted. Tilemap layers cannot be copied. Source and target must be different files.
Inputs: layers (required), source (required), target (required), replace, +1 more. Returns: object
create_sliceB
Add a named slice over rect (canvas pixels); names must be unique.
The slice covers every frame (per-frame slice keys are not supported).
Inputs: name (required), path (required), rect (required), color, +2 more. Returns: object
create_spriteA
Create a sprite file with one layer and one frame and return its info.
The format follows the extension: .aseprite keeps layers, frames, tags and slices; other formats hold one flat layer (.gif also keeps frames), and later edits they cannot store are refused. The folder must already exist. Without a background the layer is transparent.
Inputs: path (required), width (required), height (required), overwrite, +2 more. Returns: object
crop_spriteA
Crop the canvas to rect in every layer and frame; rect must overlap the canvas.
Inputs: path (required), rect (required). Returns: object
delete_framesA
Delete frames; later frames and tags move up. At least one frame must remain.
Inputs: path (required), frames (required). Returns: object
delete_layerA
Delete a layer; deleting a group deletes everything in it.
The sprite must keep at least one layer. A locked layer, a layer in a locked group and a group holding a locked layer are refused.
Inputs: path (required), layer (required). Returns: object
delete_sliceC
Delete the slice with this name.
Inputs: name (required), path (required). Returns: object
delete_tagB
Delete the tag with this exact name (the first one if several share it).
Inputs: name (required), path (required). Returns: object
draw_asciiA
Draw pixel art written as text; the first character of the first row is at (x, y).
Each character is one pixel in its legend colour; '.' and ' ' leave the pixel as it is and cannot be legend keys. Keys are single characters (any Unicode character). Rows may differ in length. outline paints every pixel next to (left, right, above, below) a non-transparent art pixel that is not part of the art itself. Pixels off the canvas are skipped and counted in skipped_outside; painted counts art and outline pixels.
Inputs: x (required), y (required), path (required), rows (required), +6 more. Returns: object
draw_ellipseA
Draw an ellipse centred on (cx, cy), 2rx+1 pixels wide and 2ry+1 tall.
rx == ry draws a circle; a zero radius gives a line, both zero a single pixel. The outline is exactly the border of the filled shape. Clipped to the canvas.
Inputs: cx (required), cy (required), rx (required), ry (required), +7 more. Returns: object
draw_gradientA
Fill rect with a linear gradient through evenly spaced colour stops.
The first column (or row, for vertical) gets the first colour and the last one the last colour, measured over the whole rect even where it leaves the canvas; only the part on the canvas is painted and the rest is counted in skipped_outside. dither="none" mixes the two neighbouring stops per channel, alpha included, rounding halves up; indexed sprites then get the nearest palette entry for each mix. A bayer dither uses only the stop colours: each pixel takes the next stop when its position in the segment (0..1) is above the matrix threshold at its canvas position.
Inputs: path (required), rect (required), colors (required), blend, +5 more. Returns: object
draw_isometric_boxB
Draw a 2:1 isometric box: a top face over a left and a right side face.
(x, y) is the top corner of the top face, the point where pixel (x, y)'s top-left corner is; the two topmost pixels are (x - 1, y) and (x, y). From there the top face runs w tiles down-right and d tiles down-left, each tile step moving 2 px sideways and 1 px down. The left face hangs h px below the lower-left edge (2w px wide), the right face below the lower-right edge (2d px wide). The box covers columns x - 2d .. x + 2w - 1 and rows y .. y + w + d + h - 1. A pixel belongs to the face that contains its centre, so faces never overlap and leave no gaps. outline paints the pixels just outside the box (left, right, above, below). Pixels off the canvas are skipped and counted; painted includes the outline.
Inputs: d (required), h (required), w (required), x (required), +10 more. Returns: object
draw_lineB
Draw a polyline through the points, clipped to the canvas.
The brush is a thickness x thickness square on every line pixel. Odd sizes are
centred; even sizes reach one pixel further right and down (thickness 2 covers the
pixel and its right/lower neighbours), so a horizontal line is exactly thickness
rows tall.
Inputs: path (required), color (required), points (required), blend, +5 more. Returns: object
draw_pixelsA
Set individual pixels to exact colours (no blending; a later entry wins).
Pixels outside the canvas are skipped and counted in skipped_outside. The cel grows to take in pixels outside it; content beyond the canvas is kept. Works on every colour mode: indexed sprites get the nearest palette entry, 'transparent' writes the transparent index. A background layer stays opaque: alpha is ignored there, so 'transparent' paints opaque black (the nearest palette colour on indexed sprites).
Inputs: path (required), pixels (required), frame, layer, +1 more. Returns: object
draw_polygonA
Draw a closed polygon through the points: filled (with its outline) or outline only.
Filling uses the even-odd rule, so self-intersecting shapes leave the overlapping parts empty. Clipped to the canvas.
Inputs: path (required), color (required), points (required), fill, +4 more. Returns: object
draw_rectA
Draw a rectangle outline (growing inwards with thickness) or a filled rectangle.
Clipped to the canvas.
Inputs: path (required), rect (required), color (required), fill, +5 more. Returns: object
draw_textA
Render text with a font and paint it onto a layer.
The text's bounding box is the smallest box around every painted pixel (glyphs, outline and shadow); anchor picks which of its pixels is placed at (x, y). For an even width or height the centre pixel is the one left of or above the middle. measure_text gives the box size. Without antialias every pixel gets exactly color (or outline/shadow); with it, edge pixels are partly transparent: blend=false stores them as they are, blend=true mixes them over the layer. Indexed sprites take the nearest palette colour (partly transparent edges become opaque there, so keep antialias off). Pixels off the canvas are skipped and counted in skipped_outside. Text is at most 2000 characters and 2048x2048 px. Colour emoji are not supported; characters the font lacks show its fallback glyph.
Inputs: x (required), y (required), path (required), text (required), +17 more. Returns: object
draw_tileA
Set pixels of one tile in the layer's tileset; x and y are inside the tile.
Pixels get exactly the given colour (no blending; a later entry wins). Every placement of the tile changes, in every tilemap layer sharing the tileset. Tile 0 is the empty tile and cannot be painted; passing tile_count appends a new tile.
Inputs: path (required), layer (required), pixels (required), tile_index (required). Returns: object
duplicate_layerA
Copy a layer (a group with all its children) right above the original.
The copy is named new_name, or " copy". Returns the copy's path.
Inputs: path (required), layer (required), new_name. Returns: object
erase_regionA
Make the pixels of a layer inside rect transparent in each of the frames.
On the background layer, which cannot be transparent, they turn opaque black. Cel content beyond the canvas edge inside rect is erased too. Frames where the layer has no cel are skipped and counted. Linked cels in other frames keep their pixels.
Inputs: path (required), rect (required), layer (required), frames. Returns: object
exportA
Render the sprite to .png, .gif, .webp, .bmp, .tga or .qoi; the sprite is not changed.
.gif and .webp hold an animation: by default every frame, with the frame durations (gif loops forever, alpha is 1-bit). The other formats hold one image: by default frame 1; when several frames are exported each goes to its own file named after the frame number, e.g. walk.png with frames "1-3" writes walk_1.png, walk_2.png and walk_3.png (no walk.png). Pass frames or tag, not both; a tag's frames are exported in order whatever its direction. Hidden layers are left out; with layer, only that layer (or group) is shown, even when it is hidden, with its opacity and blend mode. The output folder must exist; existing files are refused unless overwrite is true. Files are written completely or not at all. One call writes at most 67108864 pixels, all frames and the scale counted. Not available in batch. Returns the files written, the frames, the image size and total bytes.
Inputs: path (required), output (required), tag, layer, +4 more. Returns: object
export_layersA
Write one canvas-sized PNG per layer of one frame; the sprite is not changed.
Every layer that holds pixels is exported, layers inside groups too; groups themselves get no file. Each layer is shown alone with its opacity and blend mode. Files are named after the layer path ("arms/left" -> arms_left.png) with characters Windows does not allow replaced by _, reserved names such as CON prefixed with _, and _2, _3... added to repeated names. Hidden layers (or layers in hidden groups) are skipped and listed unless include_hidden is true. Existing files are refused unless overwrite is true. Not available in batch.
Inputs: path (required), output_dir (required), frame, overwrite, +1 more. Returns: object
export_spritesheetA
Lay the frames out in one image with Aseprite's sprite sheet exporter.
horizontal puts all frames in one row, vertical in one column, rows and columns make a grid, packed fits frames tightly. Hidden layers are left out. data_output gets Aseprite's JSON: frames (an object keyed by frame name for "hash", a list for "array"; frame names count from 0) with each frame's rectangle and duration, and meta with the image path (relative to the JSON file), size and tags. The sprite is not changed; existing files are refused unless overwrite is true. Not available in batch.
Inputs: path (required), output (required), tag, scale, +5 more. Returns: object
extract_paletteARead-only
Find up to max_colors colours that best represent the visible sprite.
Uses Aseprite's colour quantization over all visible layers and frames. Its palettes hold a transparent entry, which is left out of the result but takes one of the 256 slots, so max_colors=256 gives at most 255 colours. The sprite and its palette are not changed: pass the result to set_palette to use it.
Inputs: path (required), max_colors, with_alpha. Returns: object
fill_areaA
Flood-fill the area around (x, y) whose colour matches the seed pixel's.
Neighbours are the 4 pixels left, right, above and below. Only the layer itself is looked at (not the composited image); outside its cel the layer counts as transparent, so filling an empty area covers it up to the canvas edges. The seed must be on the canvas. Pixels get exactly the colour, without blending.
Inputs: x (required), y (required), path (required), color (required), +5 more. Returns: object
fill_patternA
Fill rect with an ordered dither of two colours (clipped to the canvas).
A pixel gets color_b when the Bayer threshold (v + 0.5) / n^2 at its canvas position is below density, color_a otherwise: 0 is all color_a, 1 all color_b. The matrix is anchored at canvas (0, 0), so separate fills tile seamlessly; with bayer2 and density 0.5, color_b lands where x + y is even.
Inputs: path (required), rect (required), color_a (required), color_b (required), +6 more. Returns: object
find_stray_pixelsARead-only
Find specks: non-transparent pixels cut off from the rest of the art.
Pixels touching on a side or a corner (8 neighbours) belong together. lone_pixels are groups of one pixel, small_clusters groups of two or three, each with its box and pixels. Both lists are in reading order and hold at most 50 entries; the counts give the totals. Without layer the visible composite is checked.
Inputs: path (required), frame, layer. Returns: object
flatten_spriteA
Flatten all visible layers into a single layer; hidden layers are dropped.
Like every whole-sprite change, it ignores layer locks.
Inputs: path (required). Returns: object
flipA
Mirror a layer, or every layer, across the canvas centre.
horizontal mirrors left and right: pixel x goes to width - 1 - x, whatever the cel's size and position, and cel content beyond the canvas edge is mirrored along. Without a layer every image layer is flipped, nested ones and locked ones included (as in the editor); this is refused when any of them is a tilemap. A named layer must not be locked. Linked cels are flipped once when all their frames are in the list and get their own copy otherwise. Slices are not moved.
Inputs: axis (required), path (required), layer, frames. Returns: object
generate_color_rampARead-only
Shades of base_color from dark to light as '#rrggbb', for set_palette or drawing.
The base colour itself is one of the steps, placed where its HSL lightness falls in lightness_range (the range widens to reach it); the other steps are evenly spaced in lightness on each side and keep its saturation. With hue_shift, darker steps turn towards blue and lighter ones towards yellow, as pixel artists do for shadows and highlights. Alpha in base_color is ignored.
Inputs: base_color (required), steps, hue_shift, lightness_range. Returns: result
get_boundsARead-only
The box around the non-transparent pixels of each frame, and around all of them.
Bounds are {x, y, w, h} in canvas coordinates, clipped to the canvas; null for an empty frame. Without layer the visible composite is measured, with layer that layer's own pixels.
Inputs: path (required), layer, frames. Returns: object
get_color_statsARead-only
The most used colours of the visible composite of one frame.
Colours are told apart by their full RGBA, so the same RGB at another alpha is a separate entry. Fully transparent pixels are only counted in transparent; unique and percent cover the other pixels; percent has 4 decimals. Ties are ordered by red, green, blue, then alpha. A frame with more than 1048576 different colours is refused (use extract_palette for such images).
Inputs: path (required), top, frame. Returns: object
get_paletteARead-only
The sprite's palette as '#rrggbb' colours ('#rrggbbaa' when not opaque).
Indexed sprites also report transparent_index, the 1-based entry that is transparent on normal layers.
Inputs: path (required). Returns: object
get_sprite_infoCRead-only
Size, color mode, palette size, frames with durations, layer tree, tags and slice count.
Inputs: path (required). Returns: object
get_tilemap_infoARead-only
Describe a tilemap layer and read the tile indices placed in a frame.
The grid is the layer's own tileset grid: tile_size, origin, and the columns and rows that cover the canvas. tile_count includes tile 0, the empty tile. cel gives the frame's tilemap cel in cells (null without one). tiles holds one list of indices per row of the region (0 where nothing is placed); flags lists flipped cells. At most 4096 cells per call.
Inputs: path (required), layer (required), rect, frame. Returns: object
import_imageA
Draw an image file into a layer at (x, y), over the pixels already there.
Transparent pixels of the image leave the layer as it is; a GIF gives its first frame. Parts outside the canvas are dropped: placed and clipped count the image's non-transparent pixels drawn and dropped. The cel is created or grown as needed (a linked cel is unlinked first). Indexed sprites get the nearest palette entry for each colour (partly transparent pixels become opaque), grayscale ones the luma. For indexed sprites, the number of different RGB colours drawn times the palette size may be at most 67108864 (reduce the colours of photo-like images first); nothing changes when it is more. Locked layers, groups and tilemap layers are refused. Images up to 4096x4096. Not available in batch.
Inputs: path (required), image (required), layer (required), x, +2 more. Returns: object
list_fontsARead-only
List installed fonts usable as draw_text's font, sorted by name.
Searches the system font folders and ASEPRITE_MCP_FONT_DIRS (folders separated
like PATH). total counts every match, fonts holds the first limit of them.
Inputs: limit, query. Returns: object
list_slicesARead-only
List the slices: name, bounds, 9-slice center, pivot, colour and user data.
center and pivot are relative to the slice and null when not set.
Inputs: path (required). Returns: object
measure_textARead-only
Size in pixels that draw_text would paint for this text, without a sprite.
outline_width 0 means no outline, shadow offsets 0, 0 no shadow. Antialiasing can change the size by a pixel, so this matches draw_text with antialias=false.
Inputs: text (required), bold, font, size, +5 more. Returns: object
merge_layer_downA
Merge a layer into the one below it in the same group, in every frame.
Both must be image layers (not groups or tilemaps) and neither may be locked. The layer is merged even when hidden. Returns the path of the merged layer.
Inputs: path (required), layer (required). Returns: object
move_regionA
Move (or with copy, duplicate) the pixels of a layer inside rect by (dx, dy).
rect is in canvas coordinates and is clipped to the canvas first; outside its cel the layer counts as transparent. The source area is cleared unless copy is true, then the block is drawn at the destination, so overlapping moves work. Pixels whose destination is off the canvas are dropped and counted in clipped. With target_layer or target_frame the block lands there (the cel is created or grown as needed). Indexed and grayscale pixel values are copied as they are. A background layer stays opaque: its cleared source turns black and a block from another layer is blended onto it. Linked cels get their own copy first, so other frames never change.
Inputs: dx (required), dy (required), path (required), rect (required), +6 more. Returns: object
oscillate_celsA
Swing a layer's cels along a sine wave across the frames (a bob or sway loop).
Frame i of n is placed at base + amplitude * sin(2Ï€(cycles * i/n + phase)), rounded, so the last frame leads back into the first. The base is chosen so the first frame keeps its current position: running the tool again with the same arguments gives the same result. An axis with amplitude 0 is left as it is. Every frame needs a cel. The layer must not be locked.
Inputs: path (required), layer (required), frames (required), phase, +3 more. Returns: object
outlineA
Draw a one-pixel outline around the non-transparent shapes of a layer.
Uses Aseprite's Outline filter; the cel grows to make room. With region only pixels inside it change. Background layers are refused (nothing is transparent there). Every requested frame must have a cel; an emptied cel (inside outline with a transparent color) is removed, and linked cels are handled like adjust_colors. Indexed sprites use the palette entry nearest to color.
Inputs: path (required), color (required), layer (required), place, +3 more. Returns: object
pixel_art_guideCRead-only
Short practical notes on drawing or animating pixel art with this server's tools.
Topics: basics, animation, idle, walk, attack, effects.
Inputs: topic. Returns: result
quantize_to_paletteA
Snap every visible pixel of a layer of an RGB sprite to its nearest palette colour.
Nearest is by RGB distance among the palette's non-transparent entries; each pixel keeps its alpha. Indexed sprites (pixels are palette entries already) and grayscale sprites (their palette is always the 256 grays) are refused. Frames without a cel are skipped. Linked cels are handled like replace_colors. changed counts the pixels that got a new value.
Inputs: path (required), layer (required), frames. Returns: object
read_pixelsARead-only
Read the pixels in rect; parts outside the canvas read as transparent.
rows: one character per pixel with a legend of character -> colour, '.' for transparent; x, y, rows and legend can be passed to draw_ascii as they are when the rect is at most 256 pixels wide and tall and the legend has 1 to 256 keys (draw_ascii refuses an empty legend, so an all-transparent read cannot go back). hex: rows of space-separated '#rrggbb'/'#rrggbbaa', '.' for transparent. json: pixels as a list of rows of colours or 'transparent'. Without layer, the visible layers are composited (layer opacity and blend modes applied, hidden layers and groups left out). With layer, that layer's own pixels are read, even when it is hidden, without its opacity. Indexed and grayscale sprites give their RGBA colours. At most ASEPRITE_MCP_MAX_READ_PIXELS pixels (default 65536) per call; use view_sprite to look at larger areas.
Inputs: path (required), rect (required), frame, layer, +1 more. Returns: object
repair_animationA
Fix the structure of an animation; everything is checked before anything changes.
ensure_layers adds missing layers as empty image layers on top of their parent.
layer_order puts the listed layers (all in the same group, or all top level) in that
order, bottom first, in the stack slots they already hold; unlisted layers stay put.
layer_frame_ranges finds layers with pixels in frames (within frames) outside their
range (it may name a layer ensure_layers creates, by path or bare name);
out_of_range decides what happens to them: "report" only lists them and
changes nothing, "hide" makes each such layer invisible (its cels stay), "delete"
deletes the out-of-range cels. Locked layers are refused for hide, delete and moves.
changed is false when nothing needed fixing; the file is then not rewritten. When
any step fails, nothing is saved.
Inputs: path (required), frames, layer_order, out_of_range, +2 more. Returns: object
replace_colorsA
Replace colours in a layer, all mappings at once (A->B with B->A swaps them).
A pixel matches a mapping when each of r, g, b and alpha is within tolerance of
from; fully transparent pixels count as 'transparent' whatever their colour. The
first matching mapping wins. to='transparent' erases, except on a background layer,
which ignores alpha and gets opaque black. On indexed sprites pixels are matched by
their palette colour and get the palette entry nearest to to (exactly to when
the palette has it); the palette is not changed. On grayscale sprites pixels compare
as (v, v, v), so a coloured from only matches within tolerance, and to is
stored as its gray value.
Frames without a cel are skipped. Linked cels change once; one also linked to
frames outside the list gets its own copy, only when some of its pixels change.
replaced counts the pixels that matched.
Inputs: path (required), layer (required), mappings (required), frames, +2 more. Returns: object
resize_spriteA
Scale the whole sprite (every layer and frame) to a new size, nearest-neighbour.
Inputs: path (required), width (required), height (required). Returns: object
rotateA
Turn the whole sprite, or one layer, clockwise by 90, 180 or 270 degrees.
Without a layer the canvas turns too (90 and 270 swap width and height) along with every layer in every frame; frames must then cover all frames. With a layer its cels turn about the canvas centre and the canvas keeps its size: on a non-square canvas, content that ends up off the canvas stays in the cel. With ox = floor((w - h) / 2) and oy = floor((h - w) / 2), 90 maps pixel (x, y) to (ox + h - 1 - y, oy + x) and 270 maps it to (y - oy, oy + w - 1 - x): an odd w - h rounds the half pixel of a 90 turn towards the top-left and 270 undoes 90 exactly. A background layer turns by 90/270 only on a square canvas. Slices are not moved. The whole-sprite turn ignores layer locks; a named layer must not be locked.
Inputs: path (required), angle (required), layer, frames. Returns: object
save_copyA
Write a copy of the sprite to another file, leaving the source untouched.
The format follows the output extension (.aseprite, .png, .gif, ...); a multi-frame sprite needs .aseprite or .gif. The output folder must exist.
Inputs: path (required), output (required), overwrite. Returns: object
set_celA
Set the position, opacity and/or z-index of a layer's cels in the given frames.
The position is the sprite coordinate of the cel image's top-left corner; an axis left out keeps its value. A frame without a cel is an error unless create is true, which adds an empty cel at (0, 0) first. Linked cels get their own copy before they move or fade, so frames outside the list never change. The layer must not be locked.
Inputs: path (required), layer (required), frames (required), x, +5 more. Returns: object
set_color_modeA
Convert the sprite to rgb, grayscale or indexed.
Indexed uses the sprite's current palette without dithering; colours missing from the palette map to the nearest entry. Index 0 becomes the transparent colour: when the palette is full, its least used entry is dropped to make room and reported in dropped_palette_entries.
Inputs: mode (required), path (required). Returns: object
set_frame_durationB
Set how long frames are shown, in milliseconds.
Inputs: path (required), duration_ms (required), frames. Returns: object
set_paletteA
Replace the palette with the given colours or a preset; pass exactly one of them.
Colours may carry alpha and may be 'transparent'. RGB pixels do not change. Indexed pixels keep their indices, so each shows the new colour at its entry; the palette must stay large enough for every index in use, and the transparent index stays the same. Grayscale sprites are refused: Aseprite always gives them the 256 grays, so convert to rgb or indexed with set_color_mode first.
Inputs: path (required), colors, preset. Returns: object
set_tagA
Create a tag over frames from_frame..to_frame, or update the tag with that name.
If several tags share the name, the first one is updated.
Inputs: name (required), path (required), to_frame (required), from_frame (required), +2 more. Returns: object
set_tilesA
Place tiles in grid cells (col, row from 0 at the grid origin) of one frame.
The cel is created or grown as needed. Cells must lie on the canvas grid and indices below the tileset's tile_count. A later entry for the same cell wins. A cel linked to other frames gets its own copy first.
Inputs: path (required), frame (required), layer (required), tiles (required). Returns: object
start_previewA
Serve a folder over HTTP on 127.0.0.1 so exported images can be opened in a browser.
Export into the folder, then open the returned URL exactly as given: its first path segment is a secret token, and file URLs are the URL plus the file's path inside the folder (e.g. url + "walk.gif"). The URL itself lists the folder. Only this machine can connect, and only with 127.0.0.1 or localhost as the host name. Only .png, .gif, .webp, .bmp, .tga, .qoi and .json files are served; dotfiles, other files and anything outside the folder are not, and nothing can be uploaded. One preview runs at a time: starting it again for the same folder returns the running URL; for another folder call stop_preview first. The server stops when this program exits.
Inputs: directory (required), port. Returns: object
stop_previewA
Stop the preview server; stopped is false when none was running.
Inputs: no named parameters. Returns: object
tween_celsA
Animate a layer's cels from start to end across the frames, in frame order.
position: start/end are {x, y} absolute cel positions (top-left of the cel image in sprite coordinates). opacity: numbers 0..255. scale: a factor, or {x, y} factors, 0.05..16 of the source_frame cel, resized nearest-neighbour around the anchor and written as a new cel in every frame (created where missing). position and opacity need a cel in every frame. Values round to the nearest integer, halves away from zero. Needs at least 2 frames; frame i of n gets t = i/(n-1), or i/n with loop. easing: ease_in t², ease_out 1-(1-t)², ease_in_out quadratic in/out, ease_out_back overshoots past end then settles, bounce bounces into end. The layer must not be locked.
Inputs: end (required), path (required), layer (required), start (required), +6 more. Returns: object
update_layerA
Rename, show/hide, lock/unlock, restyle or move a layer; only the given fields change.
The layer is moved first (parent, then stack_index), then its properties are set. All of this works on locked layers too. Groups have no opacity or blend mode. Returns the layer's new path and stack index.
Inputs: path (required), layer (required), locked, parent, +5 more. Returns: object
update_sliceB
Move or resize a slice, or set its 9-slice centre or pivot; other fields stay.
A centre that no longer fits the new rect is an error.
Inputs: name (required), path (required), rect, pivot, +1 more. Returns: object
view_spriteARead-only
Look at the sprite: a PNG of the requested frames plus a short description.
Frames are laid out left to right, then down, over a grey checkerboard that marks transparency. Without scale, the largest that keeps the image within 512 px is used. The image never exceeds 2048 px per side: a larger scale is reduced, and when even scale 1 is too big every n-th pixel is shown; the text says so. Up to 64 frames per call. Without layer the visible layers are composited; with layer only that layer's own pixels are shown. onion_skin shows each frame's previous frames beneath it, the nearest at 50% opacity and each older one at half the one after. Nothing is saved. Not available in batch.
Inputs: path (required), grid, layer, scale, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 72 tools
Most tools have a clear action+resource purpose, and the detailed descriptions distinguish similar-sounding operations such as export, save_copy, export_layers, and export_spritesheet. Some drawing primitives and color/palette tools naturally overlap in domain, but their boundaries are generally explained well enough to avoid most misselection.
The names are overwhelmingly snake_case and follow a verb_noun pattern such as add_layer, set_palette, draw_rect, and export_spritesheet. A few single-word commands (flip, rotate, outline, export, batch) and noun-like entries (pixel_art_guide) are minor deviations but remain readable and predictable.
72 tools is far beyond a typical agent-friendly tool surface, even for a full-featured pixel-art editor. While the breadth reflects Aseprite's complexity, the set is heavy enough that discovery and correct tool selection become burdensome.
The surface is very broad: layers, frames, tags, slices, palettes, drawing, tilemaps, import/export, previews, batch operations, and animation validation are all covered. Minor gaps such as undo/redo, explicit frame reordering, or selection/mask operations remain, but core workflows have no obvious dead ends.
Related MCP Connectors
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Game-dev sprite tools: PNG/GIF to spritesheet, split, trim, animate. OAuth-authenticated MCP server.
Generate and edit images and generate videos with Nanobananana's remote MCP server.
Turn images into pixel art, extract and remap palettes, and upscale sprites without blur.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Python MCP server enabling programmatic interaction with Aseprite for pixel art creation and manipulation with features like drawing operations, palette management, and batch processing.1927MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for programmatically creating and editing Aseprite sprites, enabling AI agents to draw, manage layers and frames, and iterate until the desired result is achieved.MIT
- FlicenseBqualityCmaintenanceMCP server for controlling Aseprite from Codex, wrapping its native CLI and Lua scripting to enable pixel art creation, sprite editing, animation, file inspection, and export.8-
- AlicenseNot gradedqualityDmaintenanceMCP server for safe local automation of Aseprite, providing tools to create, inspect, edit, save, and export pixel art documents through the official Aseprite CLI and controlled Lua scripts.MIT