aseprite-mcp-server
v0.3.0
Published
Model Context Protocol server for Aseprite: let Claude, Codex, Cursor and other MCP clients create and animate pixel art. Runs with npx, no Python required.
Maintainers
Readme
Aseprite MCP
Control Aseprite from Claude, Codex, Cursor and other MCP clients: create sprites, draw pixel art, animate, inspect and export, all through the Model Context Protocol.
No Python, no cloning, no virtualenv. If you have Node.js and Aseprite, it runs with npx.
Status: 0.3.0 (pre-release, all 116 tools implemented, plus pixel-art drawing aids and a PixelLab importer). All 116 tools of diivi/aseprite-mcp are available: canvas, layers, drawing, text (bitmap and TrueType fonts), selection, transform, animation (frames, cels, tweens, tags), palette (presets, ramps, quantize, color modes), effects (outline, dithering, HSL, Aseprite's native filters), slices (pivots, 9-patch), tilemaps, copying layers between sprites, inspection, visual feedback (previews returned as images, onion skin, frame diff), quality checks, export (sprite sheets + JSON with tags/slices, GIF, per-tag, per-layer), import, and the privileged
run_lua_scriptescape hatch. On top of those,draw_pixel_mapandget_pixel_maplet agents draw and read sprites as character grids, andimport_pixellab_characterturns a PixelLab 8-direction character export into a tagged.asepritewith aligned, unscaled cells. The API matches the reference tool for tool (one optional addition); see the generated parity report. Releases are tag-driven; see docs/publishing.md and the changelog. Runnpx -y aseprite-mcp-server toolsto list what your version ships.
Requirements
- Node.js 20+
- Aseprite 1.3+, full version (the free trial has no scripting and cannot save; source builds and Steam copies work)
Claude Code / Claude Desktop / Codex / Cursor
{
"mcpServers": {
"aseprite": {
"command": "npx",
"args": ["-y", "aseprite-mcp-server"]
}
}
}Then check your setup:
npx -y aseprite-mcp-server doctorAseprite is found automatically in standard locations (/Applications, Program Files, Steam libraries, PATH, …). If it is somewhere else, or you want to work in a specific folder:
{
"mcpServers": {
"aseprite": {
"command": "npx",
"args": ["-y", "aseprite-mcp-server"],
"env": {
"ASEPRITE_PATH": "/path/to/aseprite",
"ASEPRITE_MCP_WORKSPACE": "/path/to/MyGame/Assets"
}
}
}
}All file paths given to tools are relative to the workspace (default: the directory the client starts the server in).
Client-specific setup
claude mcp add aseprite -- npx -y aseprite-mcp-server
# with a workspace:
claude mcp add aseprite -e ASEPRITE_MCP_WORKSPACE=/path/to/Assets -- npx -y aseprite-mcp-serverOr commit a project-scoped .mcp.json with the JSON above.
Edit claude_desktop_config.json (Settings → Developer → Edit Config) and add the mcpServers block above. On Windows, if npx is not found, use "command": "npx.cmd".
~/.codex/config.toml:
[mcp_servers.aseprite]
command = "npx"
args = ["-y", "aseprite-mcp-server"]
env = { ASEPRITE_MCP_WORKSPACE = "/path/to/Assets" }.cursor/mcp.json in your project (or ~/.cursor/mcp.json globally), using the mcpServers JSON above.
.vscode/mcp.json:
{
"servers": {
"aseprite": {
"type": "stdio",
"command": "npx",
"args": ["-y", "aseprite-mcp-server"],
"env": { "ASEPRITE_MCP_WORKSPACE": "${workspaceFolder}" }
}
}
}Start npx -y aseprite-mcp-server as a stdio server. Or install it globally: npm install -g aseprite-mcp-server, then use the command aseprite-mcp.
Pixel-art skill (better sprites)
The server ships a pixel-art skill. It gives the agent concrete craft rules and a drawing procedure: colour budgets and hue-shifted ramps, one light source without pillow shading, clusters instead of noise, figures that aren't mirrored, walk cycles with bob and timing, seamless textures, materials such as metal and glass, a review checklist, and verified example sprites.
The rules summarise established pixel-art teaching (saint11, Slynyrd, Derek Yu, Cure, Tsugumo, Helm, Arne and others); see docs/research/pixel-art-techniques.md.
Claude Code / Cursor: install it into your game project (or into your home folder with
--user):npx -y aseprite-mcp-server skill installThis writes
.claude/skills/aseprite-pixel-art/and.cursor/skills/aseprite-pixel-art/. Pass--target claudeor--target cursorfor only one of them. An existing copy that differs is left alone unless you pass--force.Any other MCP client: the same content is served by the
pixel_art_guidetool (topics:overview,colour,light-and-shading,lines-and-edges,characters,animation,textures-and-tiles,materials,icons-and-items,review-checklist,examples) and asaseprite://skills/aseprite-pixel-art/…resources. The server's instructions tell the agent to read it before drawing.Sprites are drawn with
draw_pixel_map(character grids) and read back withget_pixel_map.
Quality is measured with a repeatable benchmark in evals/sprites: five sprite requests, a rubric and automatic metrics.
CLI
aseprite-mcp start the MCP server on stdio (default)
aseprite-mcp doctor diagnose Node, Aseprite and the workspace
aseprite-mcp tools list the available tools (derived from the registry)
aseprite-mcp skill install install the pixel-art skill into .claude/ and .cursor/ skills
aseprite-mcp --workspace D use D as the workspace
aseprite-mcp --help | --versionConfiguration
| Variable | Default | Purpose |
|---|---|---|
| ASEPRITE_PATH | auto-detect | Aseprite executable (a macOS .app path is accepted) |
| ASEPRITE_MCP_WORKSPACE | current directory | Root for every file path (--workspace overrides it) |
| ASEPRITE_MCP_TIMEOUT | 60000 | Per-call timeout in milliseconds |
| ASEPRITE_MCP_ALLOW_ABSOLUTE | false | Allow absolute paths outside the workspace |
| ASEPRITE_MCP_DISABLE_RAW_LUA | false | Hide the privileged run_lua_script tool |
| ASEPRITE_MCP_DEBUG | false | Debug logs on stderr |
| PIXELLAB_API_TOKEN | unset | Lets import_pixellab_character download a character by character_id (never a tool argument) |
Full reference: docs/configuration.md.
How it works
Each tool call validates its arguments, generates a small Lua script and runs aseprite --batch --script. The script's result comes back as a framed JSON envelope. Edits run inside an Aseprite transaction and are saved atomically: a failed call never leaves a half-written file. Calls on the same file are queued. Details: docs/architecture.md.
Security
- File access is sandboxed to the workspace:
..and symlink escapes are rejected, and absolute paths are opt-in. - The optional preview server (
start_preview_server) listens on 127.0.0.1 only and serves files inside the workspace. - The only network access is opt-in:
import_pixellab_characterwithcharacter_idcallsapi.pixellab.aiwith thePIXELLAB_API_TOKENfrom the server environment. The token is never logged or returned. run_lua_scriptis privileged: it executes arbitrary Lua through your local Aseprite with your user's permissions. Only use scripts from trusted sources, or disable it withASEPRITE_MCP_DISABLE_RAW_LUA=true.
See docs/security.md.
Troubleshooting
Start with npx -y aseprite-mcp-server doctor. Common issues: docs/troubleshooting.md.
Development
git clone <this repository> && cd aseprite-mcp
npm install
npm run build && npm testSee docs/development.md and docs/publishing.md.
Credits and license
MIT. Tool design follows diivi/aseprite-mcp (MIT, © 2024 Divyansh Singh); see NOTICE. Aseprite is a trademark of Igara Studio S.A.; this project is not affiliated with it and requires your own licensed copy of Aseprite.
