aseprite-mcp
Allows controlling Aseprite from AI agents via CLI and Lua scripting, enabling creation, editing, and export of pixel art sprites, animation frames, and sprite sheets.
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 pixel art of a red heart and save it as heart.aseprite"
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
MCP server for controlling Aseprite from Codex. It wraps Aseprite's native CLI plus Lua scripting so Codex can create pixel art, edit sprites, build animation frames, inspect files, and export PNG/GIF/sprite sheets.
The broad capability path is intentional:
High-level tools cover common pixel-art workflows.
aseprite_command_sequenceexposes Aseprite's built-inapp.command.<CommandId>(params)action system.aseprite_cliexposes any Aseprite CLI flag.aseprite_run_luaexposes Aseprite's Lua API, so features not modeled by the high-level schema are still reachable.
Requirements
Node.js 20+
Aseprite installed locally
Aseprite executable available as one of:
ASEPRITE_PATH=/path/to/asepriteasepriteonPATHmacOS user app path such as
~/Applications/Aseprite.app/Contents/MacOS/asepritemacOS app path such as
/Applications/Aseprite.app/Contents/MacOS/aseprite
This machine has Aseprite at /Users/sunjiaxiang/Applications/Aseprite.app/Contents/MacOS/aseprite.
Related MCP server: aseprite-mcp
Build
cd /Users/sunjiaxiang/workspace/tmp/aseprite-mcp
npm install
npm run build
npm test
npm run test:e2eAdd To Codex
Use the Codex CLI:
codex mcp add aseprite -- node /Users/sunjiaxiang/workspace/tmp/aseprite-mcp/dist/index.jsIf Aseprite is not on PATH, pass the executable path:
codex mcp add aseprite \
--env ASEPRITE_PATH=/Users/sunjiaxiang/Applications/Aseprite.app/Contents/MacOS/aseprite \
-- node /Users/sunjiaxiang/workspace/tmp/aseprite-mcp/dist/index.jsAfter adding the server, restart Codex so the new MCP tools are loaded.
Equivalent ~/.codex/config.toml shape is:
[mcp_servers.aseprite]
command = "node"
args = ["/Users/sunjiaxiang/workspace/tmp/aseprite-mcp/dist/index.js"]
[mcp_servers.aseprite.env]
ASEPRITE_PATH = "/Users/sunjiaxiang/Applications/Aseprite.app/Contents/MacOS/aseprite"Tools
aseprite_status
Resolves Aseprite and reports version/configuration.
aseprite_list_commands
Lists Aseprite command IDs extracted from upstream src/app/commands/commands_list.h, such as NewFile, SpriteSize, Flip, HueSaturation, NewFrame, SaveFileAs, and ExportSpriteSheet.
aseprite_command_sequence
Runs Aseprite built-in actions through Lua as app.command.<CommandId>(params). Use this for menu/action behavior such as creating files, resizing sprites, flipping, changing color mode, adding frames/layers, applying filters, and saving. It accepts dryRun: true to inspect the generated Lua.
aseprite_create_sprite
Creates a new sprite from structured JSON drawing operations. Supports pixel, rect, line, circle, text, matrix, and embedded lua operations. Use dryRun: true to inspect generated Lua without launching Aseprite.
aseprite_run_lua
Runs inline Lua or a .lua file through Aseprite's --script, optionally after opening input sprites and passing app.params.
aseprite_cli
Runs raw Aseprite CLI args. This is the escape hatch for all native Aseprite features.
aseprite_export
Exports an existing sprite/image using common flags such as --save-as, --sheet, --data, --trim, --frame-range, --layer, and --tag.
aseprite_sprite_info
Opens a sprite and returns width, height, frames, layers, and tags.
Example Codex Prompt
After registration and restart, ask Codex:
Use the aseprite MCP to create a 16x16 four-frame bouncing green slime.
Save the source as /Users/sunjiaxiang/workspace/tmp/slime.aseprite and export a GIF to /Users/sunjiaxiang/workspace/tmp/slime.gif.Codex can call aseprite_create_sprite for the source file and aseprite_export or aseprite_cli for the GIF.
For native Aseprite actions:
Use the aseprite MCP command sequence tool to create a sprite in scriptBefore, run Aseprite's Flip and NewFrame commands, draw a few pixels in scriptAfter, then save it as /Users/sunjiaxiang/workspace/tmp/action-test.aseprite.Codex can call aseprite_list_commands to discover command IDs and aseprite_command_sequence to run them.
Structured Sprite Example
examples/slime.json contains a four-frame sample. To inspect the Lua generated from it:
npm run build
node examples/create-slime.mjsIf Aseprite is installed:
node examples/create-slime.mjs > /tmp/slime.lua
/Applications/Aseprite.app/Contents/MacOS/aseprite --batch --script /tmp/slime.luaOr through the MCP tool:
{
"dryRun": false,
"spec": {
"width": 16,
"height": 16,
"output": "/Users/sunjiaxiang/workspace/tmp/test.aseprite",
"operations": [
{
"type": "rect",
"x": 2,
"y": 2,
"width": 12,
"height": 12,
"color": "#ffcc00ff"
}
]
}
}Command Sequence Example
This dry-run request generates a Lua script that calls Aseprite's native command system. Some UI/document commands can be disabled in --batch; set requireEnabled: false only when you have verified the command still behaves correctly headlessly.
{
"dryRun": true,
"validateKnownCommands": true,
"scriptBefore": "local sprite = Sprite(16, 16, ColorMode.RGB); app.activeSprite = sprite; app.activeImage:drawPixel(1, 1, Color{r=255,g=0,b=0,a=255})",
"actions": [
{
"command": "Flip",
"params": {
"orientation": "horizontal"
},
"requireEnabled": false
},
{
"command": "NewFrame",
"params": {}
}
],
"scriptAfter": "app.activeImage:drawPixel(2, 2, Color{r=0,g=0,b=255,a=255})",
"saveAs": "/Users/sunjiaxiang/workspace/tmp/action-test.aseprite"
}For commands with newer or version-specific IDs, keep validateKnownCommands false and let the installed Aseprite validate the command at runtime.
Notes
transparentColormaps to Aseprite's transparent color index/mask color. Pass a numeric string like"0"or provide a palette and a matching hex color.Command parameters are passed as a Lua table to Aseprite. Aseprite's
CommandWithNewParamssupports booleans, numbers, strings, rectangles/sizes, colors, and enum strings for many commands.The MCP server does not reimplement Aseprite. It uses Aseprite itself for file creation, scripting, export, and conversion.
When no Aseprite executable is available, tests still verify TypeScript, Lua generation, and stdio MCP tool registration.
Full end-to-end image generation requires a real Aseprite executable. On this machine,
/Users/sunjiaxiang/Applications/Aseprite.app/Contents/MacOS/asepriteis available and used for smoke tests.npm run test:e2ecreates real.asepritefiles and exports PNGs through the MCP server.
Available Tools
8 toolsaseprite_cliRun Aseprite CLIA
Run raw Aseprite CLI arguments. Use for any native capability not covered by a higher-level tool.
Inputs: args (required), cwd, timeoutMs, asepritePath.
aseprite_command_sequenceRun Aseprite Command SequenceA
Run Aseprite app.command.(params) actions through Lua, optionally opening files and saving the active sprite.
Inputs: actions (required), cwd, batch, dryRun, +7 more.
aseprite_create_spriteCreate Pixel SpriteC
Create a sprite from structured drawing operations. Supports dryRun to inspect generated Lua.
Inputs: spec (required), cwd, dryRun, timeoutMs, +1 more.
aseprite_exportExport SpriteB
Export an existing Aseprite file/image to PNG/GIF/sheet/data using common CLI flags.
Inputs: input (required), output (required), cwd, tag, +13 more.
aseprite_list_commandsList Aseprite CommandsA
List Aseprite command IDs known from the upstream commands_list.h.
Inputs: filter.
aseprite_run_luaRun Aseprite LuaB
Execute an inline or file-based Aseprite Lua script, optionally opening input sprites first.
Inputs: cwd, batch, params, script, +4 more.
aseprite_sprite_infoRead Sprite InfoA
Open a sprite and return metadata about size, frames, layers, and tags.
Inputs: input (required), cwd, timeoutMs, asepritePath.
aseprite_statusAseprite StatusB
Resolve the Aseprite executable and report version/configuration.
Inputs: asepritePath.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clearly distinct purposes: status, listing commands, command sequences, raw CLI, Lua, create, export, info. However, aseprite_cli overlaps with many others since it can perform any of those actions, and aseprite_command_sequence and aseprite_run_lua both execute Lua, creating some ambiguity.
All tools share the aseprite_ prefix and use snake_case, but the pattern is mixed: some are verb_noun (list_commands, run_lua, create_sprite), some are noun-only (status, cli), and others are noun_noun (command_sequence, sprite_info). This inconsistency reduces predictability, though names remain readable.
8 tools is well within the ideal 3-15 range and appropriate for covering Aseprite's main capabilities: status, command introspection, execution, scripting, creation, export, and metadata. Each tool earns its place without bloat.
Core workflows are well covered: create, export, inspect, run commands/scripts, and get config. Minor gaps exist, such as no high-level edit/modify tool, but aseprite_run_lua and aseprite_cli provide escape hatches for any missing operations, making the surface reasonably complete.
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.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for Flux AI image generation
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
- AlicenseBqualityDmaintenanceMCP server for Aseprite — create, edit, and export pixel art sprites, animations, and sprite sheets from any AI assistant.438MIT
- AlicenseBqualityBmaintenanceAn MCP server that lets AI agents create and edit Aseprite sprites headlessly, enabling pixel art, animation, and export via 98 tools.15643MIT