aseprite-mcp
Provides tools for creating and editing pixel-art sprites and animations in Aseprite, including drawing, palettes, previews, and exporting spritesheets and tilesets to Godot.
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 16x16 slime sprite with a looping idle animation and export it to Godot"
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
An MCP server that lets AI agents create pixel-art game assets in Aseprite and export them straight into Godot 4 projects.
Sprites, animations, palettes, palette-swapped variants and tilesets, driven from any MCP-capable client: Claude Code, OpenAI Codex, Google Antigravity, LM Studio with local models, and others.

Built entirely through MCP tool calls by examples/showcase.py.
Features
Pixel-level drawing with an ASCII grid op that language models handle reliably, plus rectangles, lines, circles and individual pixels
Animation: duplicate frames, set per-frame timing, tag named animations with forward / reverse / ping-pong playback and one-shot or looping behaviour
Palettes: apply hex palettes or palette files (e.g. from Lospec), convert to indexed color, and generate recolored variants
Image import: bring in concept art or generated images, downscale with nearest-neighbor sampling and quantize to a palette
Visual feedback: a
previewtool returns rendered PNGs so multimodal models can check their own workGodot 4 export:
SpriteFramesresources with timing preserved, and extruded tilesets with a matchingTileSetresource, ready to drop into a sceneSafe by default: file access is limited to configured folders, and arbitrary Lua execution is disabled unless explicitly enabled
Related MCP server: aseprite_mcp
How it works
flowchart LR
A["MCP client<br/>(Claude Code, Codex,<br/>Antigravity, LM Studio)"] -- "stdio" --> B["aseprite-mcp<br/>(Python)"]
B -- "aseprite -b --script tool.lua" --> C["Aseprite<br/>(headless)"]
C --> D[".aseprite sources"]
B --> E["Godot project<br/>PNG + .tres"]Each tool call runs a separate headless Aseprite process (aseprite -b) with a bundled Lua
script. Arguments and results travel as JSON. Because nothing runs inside the editor, the
server never interferes with an Aseprite window you have open; use File > Revert to
reload a file after an agent has changed it.
Requirements
Aseprite 1.3 or newer (Steam or standalone)
uv, which also installs a suitable Python (3.11+)
Any MCP client
Installation
git clone https://github.com/ObsidianTrove/aseprite-mcp.git
cd aseprite-mcp
uv syncCheck that everything works against your Aseprite installation:
uv run pytestConfiguration
The server is configured through environment variables, set in your MCP client's server entry.
Variable | Default | Purpose |
| auto-detected | Path to the Aseprite executable. Standard Steam and standalone locations on Windows, macOS and Linux are checked, then |
| your home folder | Folders the server may read and write, separated by |
| disabled | Set to |
|
| Seconds before a single Aseprite invocation is aborted. |
Connecting a client
Every client launches the same command:
uv run --directory /absolute/path/to/aseprite-mcp aseprite-mcpDesktop apps may not seeuv on their PATH, especially if it was installed after the
app was opened. Restart the app, or use the absolute path to uv
(where uv on Windows, which uv elsewhere) as the command.
Claude Code
claude mcp add aseprite --scope user \
-e ASEPRITE_MCP_ROOTS=/path/to/game/projects \
-- uv run --directory /absolute/path/to/aseprite-mcp aseprite-mcpVerify with claude mcp get aseprite, or /mcp inside a session.
OpenAI Codex
Add the contents of examples/clients/codex.toml to
~/.codex/config.toml. This applies to both the CLI and the IDE extension. Verify with
codex mcp list.
Google Antigravity
In the Agent panel, open … > MCP Servers > Manage MCP Servers > View raw config and merge
in examples/clients/mcp.json. The file lives at
~/.gemini/antigravity/mcp_config.json.
LM Studio
Open Program > Install > Edit mcp.json (~/.lmstudio/mcp.json), merge in
examples/clients/mcp.json, then enable the mcp/aseprite
integration in the chat sidebar.
Other clients
Cursor, Cline, Continue, Claude Desktop and most other clients accept the same
mcpServers JSON shown in examples/clients/mcp.json.
Tool approval
Tools carry standard MCP annotations: sprite_info and preview are read-only; every other
tool writes files. Clients use these hints when deciding what to run without asking. The
Codex example auto-approves the read-only tools; in Claude Code you can allow
mcp__aseprite__* in your permission settings for unattended runs.
Tools
Tool | Description |
| Create an |
| Size, color mode, frames and durations, layers, tags and palette. |
| Add a layer or layer group, optionally inside a group. |
| Append empty or copied frames and set frame durations. Existing tags are preserved. |
| Name a frame range as an animation with a playback direction and repeat count. |
| Apply drawing ops ( |
| Set the palette from hex colors or a palette file; optionally convert to indexed color. |
| Recolor exact colors across all layers and frames, in place or into a new file. |
| Import a PNG/JPG/GIF, resize with nearest-neighbor sampling and reduce colors. |
| Render the sprite (all frames, or one) as a PNG image. |
| Export a sprite sheet PNG with optional Aseprite JSON metadata. |
| Export PNG + |
| Export an extruded tileset PNG, optionally with a Godot |
| Re-export every |
| Run arbitrary Aseprite Lua. Disabled by default. |
Conventions: paths are absolute; frames are 1-based, matching the Aseprite UI; colors are
#rrggbb or #rrggbbaa.
The rows drawing op describes pixel art as text, one character per pixel:
{
"op": "rows", "x": 4, "y": 2,
"rows": ["..kk..",
".kggk.",
"kggggk"],
"key": { "k": "#1a1c2c", "g": "#38b764" }
}Example prompts
Create a 16×16 knight sprite using the Sweetie 16 palette in
C:\Games\Quest\art\knight.aseprite. Add a four-frame walk cycle taggedwalk, preview it, and fix anything that looks off.
Make red and blue variants of
C:\Games\Quest\art\enemies\slime.asepritewithpalette_swap, then export all three to my Godot project atC:\Games\Questas SpriteFrames.
Slice
C:\Games\Quest\art\terrain.asepriteinto 16×16 tiles with 1 px extrusion and create a Godot TileSet inC:\Games\Quest\assets\tiles.
Using the assets in Godot
Export with
export_godot_spriteframes(orbatch_exportfor a whole folder).Add an
AnimatedSprite2Dnode, set Sprite Frames to the generated.tres, and play an animation by its Aseprite tag name.For tilesets, use
export_tilesetwithgodot_projectand assign the generated.tresto aTileMapLayer. The atlas margins and separation already account for the extrusion.
Recommended project settings for crisp pixel art on desktop and mobile:
Setting | Value |
Rendering > Textures > Default Texture Filter | Nearest |
Display > Window > Stretch > Mode |
|
Display > Window > Stretch > Scale Mode |
|
Base resolution | e.g. 320×180 or 480×270, which scale cleanly to common displays |
Keep exports at scale 1 and let the viewport do the scaling.
Security model
Every path must be absolute and inside a folder listed in
ASEPRITE_MCP_ROOTS; relative paths and..traversal outside a root are rejected.Godot exports are confined to the given project folder.
run_luacan execute arbitrary code with your user's permissions and is off unlessASEPRITE_MCP_ALLOW_LUA=1is set.The server makes no network requests.
Local models
Tool-calling quality matters more than model size, but very small models struggle with multi-step workflows. Models from roughly 14B parameters up with dependable tool calling work well. Give the model at least 16k tokens of context; the tool definitions alone use a few thousand.
For speed, make sure the model and its context fit entirely in GPU memory. In LM Studio, an oversized context length or several parallel slots can push the KV cache into system memory and cut throughput by an order of magnitude; a 32k context, a single slot, flash attention and a quantized KV cache are good starting points.
Development
uv sync # install runtime and dev dependencies
uv run pytest # unit + integration tests
uv run pytest tests/unit # tests that need no Aseprite installation
uv run ruff check . # lint
uv run ruff format . # formatIntegration tests start the server as a subprocess and exercise every tool over the MCP protocol against a real Aseprite installation, checking pixel values, image dimensions, generated Godot resources and error messages. They are skipped automatically when Aseprite is not found, which is the case in CI.
Project layout
src/aseprite_mcp/
server.py MCP tool definitions
aseprite.py Aseprite CLI and Lua bridge
godot.py Godot .tres generation
paths.py path validation
config.py environment configuration
lua/ one script per tool, plus shared helpers in common.lua
tests/
unit/ pure-Python tests
integration/ end-to-end tests over MCP stdio
examples/ client configuration and a scripted showcaseAdding a tool
Add
src/aseprite_mcp/lua/<tool>.luafollowing the pattern insprite_info.lua: callC.run(function(p) ... end)and return a table.Add a function decorated with
@tool()inserver.pythat validates paths and callsaseprite.lua("<tool>", ...). Its docstring becomes the description the model sees.Add an integration test in
tests/integration/test_tools.py.
The Aseprite scripting API is documented at https://aseprite.org/api.
Troubleshooting
Symptom | Fix |
| Set |
| Add the folder to |
Client cannot start the server | Use the absolute path to |
Changes do not appear in the open editor | Use File > Revert in Aseprite. |
Tool calls time out on large batches | Increase |
License
Acknowledgements
Aseprite is a trademark of Igara Studio S.A. Godot is a trademark of the Godot Foundation. This project is not affiliated with or endorsed by either.
Available Tools
15 toolsadd_framesADestructive
Append count frames, either empty or copied from frame copy_from.
Copying a frame and then editing the copy is the simplest way to animate. Optionally
sets duration_ms on frames duration_from..duration_to (default: all frames); use
count=0 to change durations only. Existing animation tags are left unchanged.
Inputs: path (required), count, copy_from, duration_ms, +2 more.
add_layerBDestructive
Add a layer (or a layer group when group=True) on top. parent places it inside an
existing group.
Inputs: name (required), path (required), group, parent.
batch_exportBDestructiveIdempotent
Re-export every .aseprite/.ase file under src_dir (recursively) into the Godot
project as SpriteFrames, mirroring the folder structure. Failures are reported per
file without stopping the batch.
Inputs: src_dir (required), godot_project (required), target_dir.
create_spriteCDestructive
Create a new .aseprite file.
palette is a list of '#rrggbb' colors; using one fixed palette keeps an asset set
consistent. background fills the first layer; omit it for a transparent sprite.
Inputs: path (required), width (required), height (required), frames, +5 more.
drawBDestructive
Draw on a layer (default: the topmost image layer) at frame, or on every frame
listed in frames. Ops are applied in order; colors are '#rrggbb' or '#rrggbbaa'.
{"op":"rows","x":0,"y":0,"rows":["..kk..",".kssk."],"key":{"k":"#1a1c2c","s":"#f4b41b"}} Pixel-art grid: one character per pixel, '.' or ' ' leaves the pixel unchanged. Best suited to sprites. {"op":"pixels","points":[[x,y],...],"color":"#ffffff"} or points [[x,y,"#rrggbb"],...] {"op":"rect","x":0,"y":0,"w":8,"h":8,"color":"#000000","fill":true} {"op":"line","x1":0,"y1":0,"x2":7,"y2":7,"color":"#000000"} {"op":"circle","cx":8,"cy":8,"r":4,"color":"#000000","fill":false} {"op":"clear"} or {"op":"clear","color":"#00000000"}
Inputs: ops (required), path (required), frame, layer, +1 more.
export_godot_spriteframesBDestructiveIdempotent
Export a sprite into a Godot 4 project as .png plus .tres (SpriteFrames).
Each Aseprite tag becomes an animation with per-frame timing preserved; reverse and ping-pong directions are baked into the frame order, and tags with a repeat count do not loop. Assign the .tres to an AnimatedSprite2D.
Inputs: path (required), godot_project (required), name, padding, +1 more.
export_spritesheetBDestructiveIdempotent
Export a sprite sheet PNG, plus optional Aseprite JSON (frame rectangles, durations,
tags). Filter by tag or layer. Keep scale=1 for Godot and scale the viewport
instead.
Inputs: path (required), out_png (required), tag, trim, +6 more.
export_tilesetADestructiveIdempotent
Export a tileset PNG with extrude pixels of edge padding around each tile, which
prevents seams when tiles are scaled.
The source is a tilemap layer's tileset (pass layer), or the flattened frame
sliced into a tile_w x tile_h grid. When godot_project is given, out_png must be
inside it and a matching TileSet .tres is written next to the PNG.
Inputs: path (required), out_png (required), frame, layer, +5 more.
import_imageBDestructive
Import a PNG, JPG or GIF as an .aseprite file.
Resizes with nearest-neighbor sampling (give only width or height to keep the aspect
ratio), then snaps to a fixed palette (colors) or quantizes to max_colors.
Inputs: src (required), out_path (required), width, colors, +3 more.
palette_swapADestructive
Recolor exact colors across all layers and frames, e.g. {"#38b764": "#b13e53"}.
Writes to out_path, or overwrites the source when omitted. Useful for character
variants, team colors and seasonal tilesets.
Inputs: path (required), mapping (required), out_path.
previewARead-onlyIdempotent
Render the sprite as a PNG image. frame=None shows all frames side by side. Use it after drawing to check the result.
Inputs: path (required), frame, scale.
run_luaADestructive
Run arbitrary Aseprite Lua. Disabled unless ASEPRITE_MCP_ALLOW_LUA=1.
code is the body of function(params) and may return a JSON-serializable value,
which is returned as {"result": value}. The full Aseprite scripting API is available:
https://aseprite.org/api
Inputs: code (required), params.
set_paletteADestructive
Replace the palette from a list of hex colors or a palette file (.gpl, .pal, .png, .aseprite). With to_indexed=True the sprite is converted to indexed mode and every pixel snaps to its nearest palette color.
Inputs: path (required), colors, dithering, to_indexed, +1 more.
sprite_infoBRead-onlyIdempotent
Describe a sprite: size, color mode, frames (1-based, with durations), layers (bottom to top), animation tags and palette.
Inputs: path (required).
tag_animationBDestructive
Tag a frame range as a named animation such as 'idle', 'walk' or 'attack'.
Tag names become animation names in Godot. repeat=0 loops forever; a positive value makes the animation play through and stop. A tag with the same name is replaced.
Inputs: name (required), path (required), to_frame (required), from_frame (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools target clearly distinct stages: sprite creation, frame/layer/tag editing, palette operations, preview, and different export formats. The multiple export tools and set_palette vs palette_swap could initially look similar, but their descriptions make the boundaries clear. run_lua is a general escape hatch that overlaps all operations, but it is disabled by default and reads as a separate advanced tool.
The set is mostly readable but mixes conventions: create_sprite, add_layer, add_frames, set_palette, import_image, and export_* follow verb_noun, while sprite_info and palette_swap are noun-first and draw/preview are bare verbs. export_godot_spriteframes also deviates by embedding a brand and resource name. The pattern is understandable but not consistently predictable.
Fifteen tools is at the upper end of the typical range but is justified by the broad asset pipeline: creation, editing, palette management, import, preview, several export targets, batch processing, and an optional Lua escape hatch. Each tool maps to a concrete workflow rather than feeling redundant or padded.
The surface covers core creation, animation tagging, drawing, palette work, preview, sprite sheet export, Godot SpriteFrames export, tileset export, and batch export. The main gaps are destructive/lifecycle operations such as deleting layers, frames, or tags, plus layer properties like visibility or opacity. These are noticeable but can be worked around by recreating assets or using Lua when enabled.
Maintenance
Related MCP Connectors
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.
Generate sprites, animations, tilesets, 3D models, VFX and game audio, and export them.
1Pixel art for AI agents: free image to pixel art, plus sprite generation and animation.
Search, generate, refine, and export pixel art VFX for games, including sprite sheets and Godot 4.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI assistants to automate Aseprite tasks such as sprite sheet export, frame extraction, and Lua scripting for sprite manipulation.2134 npm1MIT
- AlicenseAqualityDmaintenanceEnables AI sprite generation and semantic tools for Aseprite, allowing LLMs to create pixel art, add animations, and manage projects with visual feedback.61GPL 3.0
- 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
- AlicenseAqualityBmaintenanceEnables AI agents to create and edit pixel art in a live Aseprite window, with tools for drawing, selection, transformation, and animation.181,115 npm705MIT