Skip to main content
Glama
Aseprite Studio MCP

Aseprite Studio MCP

by Irmiyaa

Aseprite Studio MCP

English | Bahasa Indonesia

A dual-mode (Live GUI Bridge + Safe Staged CLI) Model Context Protocol (MCP) server that lets AI assistants draw, animate, inspect, and export pixel art in Aseprite — either live on your canvas in real time or safely headless with automatic undo history, conflict detection, and backups.

Animated 32x32 Knight sprite sheet preview built with Aseprite Studio MCP

The 8-layer, 12-frame Knight (idle, walk, attack) above was created and exported entirely through aseprite-studio-mcp — see examples/knight/.


Why Aseprite Studio MCP?

Most Aseprite MCP servers force you to pick between live editing (requires Aseprite open) or CLI scripts (blind edits with no undo safety). Aseprite Studio MCP gives you both in a single server powered by one shared Lua engine (lua/ops.lua):

Feature

Live Bridge Mode (Aseprite Open)

Staged CLI Mode (Headless Fallback)

How it runs

WebSocket extension inside Aseprite GUI (~1–20 ms)

Headless aseprite --batch on an isolated copy

See edits live?

Yes — watch every brushstroke appear on canvas

Inline PNG preview returned in chat

Undo / Redo

Native Aseprite Ctrl+Z / Ctrl+Y (app.transaction)

Multi-step snapshot journal (undo_redo)

File safety

Automatic pre-save disk backup + rollback

Original file untouched until commit_changes + disk conflict guard + backup/rollback

Target active tab?

Yes (@active, @index:1, @name:Sprite-0001)

Works on any .aseprite path on disk

By default (ASEPRITE_MCP_MODE=auto), the server automatically switches to Live Mode the moment Aseprite connects, and falls back to Staged CLI Mode when Aseprite is closed.


Related MCP server: aseprite-mcp

Quick Start (5 Minutes)

Prerequisites

  • Node.js 20+

  • Aseprite 1.3+ (built-in Lua WebSocket & json support)

1. Clone & Build

git clone https://github.com/Irmiyaa/aseprite-studio-mcp.git
cd aseprite-studio-mcp
npm install
npm run build

Windows PowerShell note: If npm is blocked by execution policy, use npm.cmd (e.g., npm.cmd install and npm.cmd run build).

2. Install the Aseprite Live Bridge Extension (Optional — enables Real-Time Live Mode)

npm run install:extension

This automatically copies the extension into your Aseprite user extensions folder and also creates a standalone package at dist/aseprite-studio-bridge.aseprite-extension.

Then in Aseprite:

  1. Restart Aseprite.

  2. Open File → Scripts → Aseprite Studio MCP: Live Bridge Panel... (or click Live Bridge Connected to toggle).

  3. On first connection, Aseprite asks for script permission — click "Give full trust to this script" so it auto-connects on every future launch.

(You can skip Step 2 if you only want headless Staged CLI Mode.)

3. Add to Your MCP Client

Add the entry from mcp-config.example.json to your MCP client configuration (Antigravity, Claude Desktop, Cursor, Windsurf, VS Code, etc.):

{
  "mcpServers": {
    "aseprite-studio": {
      "command": "node",
      "args": [
        "/absolute/path/to/aseprite-studio-mcp/dist/index.js"
      ],
      "env": {
        "ASEPRITE_PATH": "/path/to/aseprite",
        "ASEPRITE_MCP_MODE": "auto",
        "ASEPRITE_MCP_WS_PORT": "49210"
      }
    }
  }
}

Tip: Replace /absolute/path/to/aseprite-studio-mcp/dist/index.js with your actual cloned path. ASEPRITE_PATH is optional if Aseprite is installed in a standard location (Program Files, Steam, /Applications/Aseprite.app, or in PATH).


Example Prompts to Try

Once connected, just ask your AI assistant in plain language:

  • "Check aseprite_status to confirm whether Live Bridge is connected."

  • "Create a 32x32 RPG slime sprite with PICO-8 palette, 4-frame bounce animation, dark outline, and show me a preview."

  • "Draw a glowing sword on a new layer in my @active Aseprite tab."

  • "Export knight.aseprite as a horizontal PNG spritesheet with JSON metadata and separate GIFs for each tag."

  • "Undo the last change and restore the previous backup."


All 33 MCP Tools (83 Lua Operations)

Tools are intentionally grouped by domain using an action parameter to keep LLM token usage low and tool selection accurate, while exposing 83 shared operations across both Staged CLI and Live GUI modes (plus built-in MCP workflow instructions).

Category

Tools

What They Do

Live Bridge & Status

aseprite_live, aseprite_status

Switch mode (auto/live/staged), check connection & latency (ping), list/open/activate/save/close open tabs in Aseprite GUI

Safety, Undo & Batch

commit_changes, discard_changes, undo_redo, manage_backups, batch_ops

Atomic multi-op batches, staged commit with conflict check (or live save with backup), undo/redo (snapshot journal or native Ctrl+Z), pre-save backup listing & rollback

Sprite & Inspection

create_sprite, inspect_sprite, render_preview, get_pixels, transform_sprite

Create sprites with presets, full metadata inspection, inline PNG previews (zoom, region crop, grid, onion skin, single layer), ASCII pixel readout, resize/crop/expand/flip/rotate/color-mode

Layers & Cels

manage_layer, manage_cel

Add layers/groups, rename, opacity, blend mode, visibility, lock, reorder, duplicate, merge down, flatten, clear/move/copy cels

Animation

manage_frames, manage_tags, animate_cels

Frame add/delete/durations, animation tags, plus propagate cels, duplicate/reverse frame ranges, batch offset, eased position/opacity tweening, sinusoidal/triangle oscillate, ensure missing cels

Drawing & Text

draw_pattern, draw_pixels, draw_shapes, draw_text, fill_area, replace_color, add_outline, edit_region

ASCII grids, exact pixels, line/rect/ellipse/filled polygon/isometric 3D box, built-in 5×7 pixel bitmap text (with shadow/outline & measure), flood fill, color swap, outlines, move/copy/erase region & erase color

Effects & Shading

apply_effect

HSL adjustment, brightness/contrast, invert, ordered Bayer dithering (checker, 2x2, 4x4, 8x8) gradients & patterns, smooth/banded gradients (maskToSolid), and 3×3 convolution filters

Palettes

manage_palette

Inspect/edit palettes, retro presets (pico-8, gameboy, sweetie-16, db16, db32, endesga-32, grayscale-8), hue-shifted generate_ramp, extract from pixels, and quantize with optional Bayer dithering

Visual Analysis & QA

analyze_sprite

compare_frames diff, per-frame get_bounds, lint (lone stray pixels, detached islands, empty cels), color_stats (histogram + near-duplicate drift), audit_animation

Slices & Tilemaps

manage_slices, manage_tilemap

Named slices with 9-patch center & pivot, plus tilemap layers, tileset slot creation, tile drawing, grid placement with flipX/flipY/flipD, tile queries

Export & Import

export_asset, import_asset

Export PNG, GIF (full/tag), spritesheet (PNG+JSON), separate per-layer PNGs (format='layers'); import external images (PNG/GIF/BMP) or copy layers across .aseprite files

Custom Scripting

run_lua

Run custom Aseprite Lua scripts safely inside a staged snapshot or live app.transaction

Special Live Mode Targets (file parameter)

When Live Bridge is connected, every tool accepts:

  • A regular file path (e.g. sprites/hero.aseprite) — edits the already-open tab, or opens it automatically in Aseprite.

  • "@active" — targets the currently active tab in Aseprite (even unsaved new sprites).

  • "@index:1" — targets open tab #1.

  • "@name:Sprite-0001" — targets an open tab by filename/title.


Configuration (Environment Variables)

Variable

Default

Description

ASEPRITE_PATH

Auto-detected

Path to the Aseprite executable

ASEPRITE_MCP_MODE

auto

auto (Live when connected, else Staged), live, or staged

ASEPRITE_MCP_WS_ENABLED

true (unless staged)

Enable/disable the local WebSocket Live Bridge server

ASEPRITE_MCP_WS_HOST

127.0.0.1

WebSocket server bind host

ASEPRITE_MCP_WS_PORT

49210

WebSocket server port (0 for ephemeral OS port)

ASEPRITE_MCP_WS_TOKEN

(empty)

Optional shared auth token between Aseprite extension & server

ASEPRITE_MCP_LIVE_TIMEOUT_MS

30000

Timeout per Live Bridge RPC (ms)

ASEPRITE_MCP_DATA_DIR

~/.aseprite-studio-mcp

Storage for staged sessions, undo snapshots, and backups

ASEPRITE_MCP_WORKDIR

process.cwd()

Base directory for resolving relative paths

ASEPRITE_MCP_ALLOWED_DIRS

(empty = unrestricted)

Allowed workspace directories (; on Windows, : on macOS/Linux)

ASEPRITE_MCP_AUTOCOMMIT

false

Automatically save/commit after each mutation (still creates backups)

ASEPRITE_MCP_HISTORY_LIMIT

50

Max undo/redo snapshots kept per staged session

ASEPRITE_MCP_BACKUP_LIMIT

20

Max rollback backups kept per file

ASEPRITE_MCP_TIMEOUT_MS

120000

Timeout per headless CLI run (ms)


Troubleshooting

  • Live Bridge shows "Connecting..." in Aseprite: Make sure your MCP client has started aseprite-studio-mcp and both use the same port (49210 by default). Check aseprite_status in your AI client to verify live.listening: true.

  • Permission popup in Aseprite: Click "Give full trust to this script" once so Aseprite allows WebSocket communication and temp PNG previews without interrupting future requests.

  • Uncommitted staged edits error when switching to Live: Run commit_changes or discard_changes on that file first so your staged edits and live canvas never diverge silently.


Running Tests

# Stage 1 E2E test suite (Staged CLI mode, 14 checks across 33 tools + schema audit)
npm run test:e2e

# Stage 2 E2E test suite (Real Aseprite extension.lua + WebSocket Live Bridge + HybridBackend)
npm run test:live

# Stage 3 E2E test suite (Effects, dithering, ramps, text, tweening, analysis, slices, tilemaps, import)
npm run test:stage3

# Run all 3 suites
npm run test:all

Ringkasan Cepat (Bahasa Indonesia)

Aseprite Studio MCP memungkinkan AI menggambar, menganimasikan, mengecek, dan mengekspor pixel art di Aseprite dalam dua mode otomatis:

  • Mode Live Bridge: Perubahan langsung tampil real-time di kanvas Aseprite GUI dengan native Ctrl+Z, target tab aktif (@active), dan backup otomatis sebelum simpan.

  • Mode Staged CLI: Jika Aseprite tidak terbuka, server otomatis beralih ke mode headless yang aman (file asli tidak tersentuh sebelum commit_changes, lengkap dengan undo/redo, deteksi konflik disk, dan rollback backup).

👉 Baca panduan lengkap berbahasa Indonesia di README.id.md.


Contributing & License

Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.

Licensed under the MIT License © 2026 Fadhil Muzaffar.

Available Tools

33 tools
add_outlineB

Add a crisp 1px pixel-art outline (outside or inside, 4-way or 8-way diagonal) around non-transparent pixels.

Inputs: file (required), mode, color, frame, +3 more.

analyze_spriteA

Inspect & critique pixel art quality: diff two frames (compare_frames), measure drawn bounding boxes & ground line (get_bounds), detect orphan/lone pixels & detached islands & empty cels (lint), compute color histogram & near-duplicate palette drift (color_stats), or audit animation layer coverage & tag overlaps (audit_animation).

Inputs: file (required), action (required), x, y, +11 more.

animate_celsB

High-level animation tools: propagate cels across frames, duplicate (and optionally reverse) a frame range, batch offset cels, tween cel position or opacity with easing, oscillate/bob cels for idle loops, or ensure missing cels exist.

Inputs: file (required), action (required), dx, dy, +24 more.

apply_effectC

Apply pixel-art shading & color effects: HSL adjustment, brightness/contrast, color invert, ordered Bayer dithering gradient/pattern, smooth/banded gradient rect, or 3x3 convolution filter.

Inputs: file (required), action (required), x, y, +22 more.

aseprite_liveB

Control the real-time Aseprite Live WebSocket Bridge: switch server mode (auto/live/staged), inspect bridge connection, ping latency, or list/open/activate/save/close open sprites in Aseprite GUI. In Live mode, any tool also accepts '@active', '@index:N', or '@name:Sprite-0001' as 'file'.

Inputs: action (required), file, mode, force, +1 more.

aseprite_statusB

Inspect server mode (auto/live/staged), Live WebSocket Bridge connection & open sprites in Aseprite GUI, Aseprite binary path, active staged sessions, undo/redo journal, and disk conflict status.

Inputs: file.

batch_opsA

Run multiple Aseprite operations atomically in a single Aseprite invocation and single undoable journal step. Ideal for drawing sprites, adding layers/frames/tags, and previewing in one call.

Inputs: ops (required), file (required), label, preview, +1 more.

commit_changesA

Persist changes to disk with automatic pre-save rollback backup. In Staged mode: commits staged copy atomically with external disk conflict detection. In Live mode: saves the open sprite in Aseprite to disk (accepts path or '@active').

Inputs: file (required), force, keepSession.

create_spriteA

Create a new .aseprite sprite in a staged session (call commit_changes to write to disk, or set autoCommit=true).

Inputs: file (required), width (required), height (required), frames, +8 more.

discard_changesA

Discard uncommitted changes. In Staged mode: drops staged edits and journal without modifying disk. In Live mode: closes unsaved modifications and reloads the sprite cleanly from disk.

Inputs: file (required).

draw_patternB

Draw pixel art from ASCII rows + a single-character color legend. Characters matching skipChar (default '.') and spaces leave existing pixels unchanged.

Inputs: file (required), rows (required), legend (required), x, +5 more.

draw_pixelsC

Plot individual pixels at exact (x, y) coordinates.

Inputs: file (required), pixels (required), color, frame, +2 more.

draw_shapesC

Draw pixel-perfect line/polyline, rectangle, ellipse, filled polygon, or shaded isometric 3D box.

Inputs: file (required), shape (required), x, y, +18 more.

draw_textB

Draw or measure crisp pixel-art text using a built-in cross-platform 5x7 ASCII bitmap font (no external font files needed; supports drop shadow & 1px outline).

Inputs: file (required), text (required), x, y, +12 more.

edit_regionC

Move, copy, or erase rectangular pixel regions, or erase all pixels matching a color.

Inputs: file (required), action (required), x, y, +16 more.

export_assetB

Export a sprite to PNG frame(s), animated GIF, Sprite Sheet (PNG + optional JSON data), or separate per-layer PNGs (format='layers').

Inputs: file (required), format (required), output (required), tag, +15 more.

fill_areaC

Flood-fill an area (contiguous bucket fill or global color fill) with optional color tolerance.

Inputs: x (required), y (required), file (required), color (required), +5 more.

get_pixelsB

Read pixels from a sprite region as an ASCII character grid + color legend (max 16,384 pixels).

Inputs: file (required), x, y, frame, +4 more.

import_assetB

Import an external image file (PNG/GIF/BMP) onto a new or existing layer, or copy named image layers from another .aseprite file into this sprite.

Inputs: file (required), action (required), sourceFile (required), x, +9 more.

inspect_spriteB

Get full metadata for a sprite: dimensions, color mode, layers, cels, frames, durations, tags, slices, and palette size.

Inputs: file (required), source.

manage_backupsA

List automatic pre-commit backups for a sprite or roll back the file on disk to a previous backup.

Inputs: file (required), action (required), backupId.

manage_celB

Clear, move (relative dx/dy or absolute x/y, plus opacity), or copy cels between frames and layers.

Inputs: file (required), action (required), x, y, +10 more.

manage_framesB

Add frames (copied or empty), delete frames, or set frame durations (ms).

Inputs: file (required), action (required), copy, after, +5 more.

manage_layerC

Add, delete, update, duplicate, merge down, or flatten layers and layer groups.

Inputs: file (required), action (required), name, type, +11 more.

manage_paletteB

Inspect/edit palette, load retro presets, generate hue-shifted shading ramps (generate_ramp), extract unique colors from pixels (extract), or quantize RGB pixels to a palette with optional ordered dithering (quantize).

Inputs: file (required), action (required), to, from, +20 more.

manage_slicesC

List, create, update, or delete named sprite slices with optional 9-patch center rect and pivot point.

Inputs: file (required), action (required), x, y, +11 more.

manage_tagsC

Create, update, or delete animation tags (idle, walk, attack, etc.).

Inputs: file (required), name (required), action (required), to, +5 more.

manage_tilemapB

Create and edit Aseprite tilemap layers & tilesets: create_layer, inspect info, add_tile slots, draw_tile artwork (ASCII rows+legend or pixels), set_tiles on grid (with optional flipX/flipY/flipD), or get_tile.

Inputs: file (required), action (required), x, y, +18 more.

render_previewB

Render a crisp nearest-neighbor PNG preview of one or more frames directly as an image in the response (supports pixel grid, onion skin, single layer, and staged vs disk comparison).

Inputs: file (required), grid, frame, layer, +8 more.

replace_colorC

Swap one color for another across a single layer or all layers ('*') and chosen frames.

Inputs: to (required), file (required), from (required), frame, +3 more.

run_luaB

Execute custom Aseprite Lua code against a sprite inside a staged snapshot or live app.transaction (safe & undoable). Globals sprite, ops, and args are available; return any JSON-serializable value.

Inputs: code (required), file (required), label, params, +1 more.

transform_spriteC

Transform a sprite or cel: resize, crop, expand canvas, flip, rotate (90/180/270), or convert color mode.

Inputs: file (required), action (required), x, y, +16 more.

undo_redoB

Undo or redo recent edits. In Staged mode: steps through the snapshot journal. In Live mode: invokes Aseprite's native Ctrl+Z / Ctrl+Y undo stack directly on the open sprite.

Inputs: file (required), action (required), steps, preview.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 33 tools

    Disambiguation4/5

    Most tools target a clearly distinct operation: drawing primitives (draw_pattern vs draw_pixels vs draw_shapes), region edits, effects, and per-resource managers (layer/cel/frame/tag/slice/tilemap) are well separated by their descriptions. A few boundaries blur: batch_ops vs run_lua both run arbitrary multi-step logic, edit_region's move/copy overlaps manage_cel, and commit_changes/discard_changes partially duplicate aseprite_live/aseprite_status save-close behavior.

    Naming Consistency4/5

    The dominant convention is verb_noun (create_sprite, draw_shapes, manage_layer, export_asset, analyze_sprite) applied consistently across ~25 tools. Minor deviations exist: prefix-style aseprite_live/aseprite_status, the ambiguous verb_verb undo_redo, and noun-only batch_ops, but the overall pattern remains predictable.

    Tool Count3/5

    33 tools is heavy, but the domain (a full pixel-art editor with modes, layers, cels, frames, tags, slices, tilemaps, palettes, export, and analysis) is genuinely broad and the tools are dense multi-operation bundles rather than one-op wrappers. Still, the surface is large enough that an agent must scan a lot of vocabulary to pick correctly.

    Completeness5/5

    The surface covers the full sprite lifecycle: create/inspect, draw/fill/replace/outline, transform, layers/cels/frames/tags/slices/tilemaps, palette management, import/export, preview rendering, quality analysis, backups, undo/redo, commit/discard, and a run_lua escape hatch for anything missing. No obvious dead ends remain for a pixel-art workflow.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables AI assistants to automate Aseprite tasks such as sprite sheet export, frame extraction, and Lua scripting for sprite manipulation.
      21
      53 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables 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
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to draw live in Aseprite, creating and editing sprites, using drawing tools, managing layers and frames, and viewing results as images.
      23
      14
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI assistants to draw, animate, and export game-ready pixel art and sprite sheets through a local Aseprite installation, including palette work, layer rigging, and cleanup of AI-generated frames. It also offers a CLI for running the same animation recipes in a game asset pipeline.
      17
      MIT