Skip to main content
Glama
lentera-aseprite-mcp

lentera-aseprite-mcp

# Lentera Aseprite MCP Server

Custom Model Context Protocol (MCP) Server yang dirancang khusus untuk mengotomatisasi manipulasi pixel art, layer, frame animasi, quantize palet, slicing, dan ekspor spritesheet pada Aseprite untuk proyek Lentera Pudar.


Arsitektur Sistem

Server ini menghubungkan AI Agent ke Aseprite Editor secara real-time melalui WebSocket dan Lua Extension Bridge:

  • AI Agent / Antigravity <--> (Stdio / MCP Protocol) <--> Lentera Aseprite MCP Server (TypeScript)

  • Lentera Aseprite MCP Server <--> (WebSocket Bridge) <--> Aseprite Lua Extension (lua-extension/bridge.lua)

  • Aseprite Lua Extension <--> (Aseprite Lua API pp.)* <--> Aseprite Canvas Engine


Related MCP server: aseprite-mcp

Fitur & Kategori Tool

Server ini menyediakan lebih dari 40 tools otomasi pixel art yang dikelompokkan ke dalam beberapa modul:

Modul

File Handler (src/tools/)

Deskripsi Kemampuan

Drawing & Canvas

drawing.ts, sprite.ts

Menggambar pixel, garis, kotak, elips, fill area, outline, flip, rotate, resize kanvas, dan zoom fit.

Layers & Cels

layer.ts

Menambah/menghapus layer, mengatur opacity, visibility, blend mode, merge layers, dan navigasi active cel.

Frames & Animation

rame.ts, ag.ts

Menambah frame, mengatur durasi frame (ms), membuat tag animasi (idle_south, walk_north), dan navigasi frame.

Palette Management

palette.ts

Load palet resmi Lentera Pudar (load_palette_lentera), replace color, color quantization, dan resize palet.

Exporting

export.ts

Ekspor frame tunggal, ekspor spritesheet horizontal/vertikal, ekspor Godot SpriteFrames (.tres), dan ekspor Godot TileSet.

Scripting & Visual

misc.ts

Eksekusi script Lua dinamis via

un_lua_script, capture screenshot Aseprite, dan canvas preview.


Cara Instalasi & Menjalankan

1. Build Server MCP

Pastikan Anda memiliki Node.js (v18+) terinstal: ash npm install npm run build

2. Pasang Lua Extension ke Aseprite

Buka Aseprite, pilih Edit -> Preferences -> Extensions -> Add Extension, lalu arahkan ke folder lua-extension/ di dalam repo ini (atau salin ke direktori ekstensi Aseprite Anda).

3. Konfigurasi di Antigravity IDE (mcp_config.json)

json { mcpServers: { lentera-aseprite: { command: node, args: [D:/GodotProjects/lentera-aseprite-mcp/build/index.js] } } }


Lisensi

Dibuat secara kustom untuk ekosistem game Lentera Pudar.

Available Tools

51 tools
add_frameB

Add a new frame to the active sprite.

Inputs: position, duration_ms.

add_layerA

Add a new layer to the active sprite.

Inputs: name, type, position.

clear_celC

Clear (erase) the content of a cel.

Inputs: frame, layer.

close_spriteB

Close the active sprite.

Inputs: save.

create_spriteA

Create a new sprite in Aseprite. Opens it in the GUI.

Inputs: name, width, height, color_mode.

create_tagA

Create an animation tag for a frame range. Used for walk/attack/idle/dodge cycles in Lentera Pudar.

Inputs: name (required), to_frame (required), from_frame (required), loop, +1 more.

draw_circleB

Draw a circle (outline or filled) on the canvas.

Inputs: cx (required), cy (required), color (required), radius (required), +3 more.

draw_ellipseB

Draw an ellipse on the canvas.

Inputs: x (required), y (required), color (required), width (required), +4 more.

draw_lineB

Draw a line between two points using Bresenham algorithm.

Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +3 more.

draw_pixelsA

Draw individual pixels on the canvas. Use for precise pixel-art placement.

Inputs: pixels (required), frame, layer.

draw_rectC

Draw a rectangle (outline or filled) on the canvas.

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

export_animation_tagA

Export all frames from a specific animation tag as individual PNGs or a GIF.

Inputs: tag_name (required), output_dir (required), scale, format.

export_frameB

Export a single frame as PNG.

Inputs: path (required), frame, layer, scale.

export_godot_spriteframesA

Generate a Godot 4 SpriteFrames .tres resource from a sprite sheet. Ready to use with AnimatedSprite2D.

Inputs: output_path (required), sprite_sheet_path (required), fps, frame_width, +1 more.

export_godot_tilesetA

Generate a Godot 4 TileSet .tres resource from a tile sheet. For use with TileMapLayer.

Inputs: output_path (required), sprite_sheet_path (required), tile_width, tile_height.

export_layersB

Export each layer as a separate PNG file.

Inputs: output_dir (required), frame, format.

export_sprite_sheetB

Export a sprite sheet (all frames as horizontal/vertical/packed strip).

Inputs: path (required), tag, scale, layout, +1 more.

fill_areaB

Flood fill an area starting from a point (like paint bucket tool).

Inputs: x (required), y (required), color (required), frame, +2 more.

flip_spriteB

Flip the active sprite (or a specific layer/frame) horizontally or vertically.

Inputs: frame, layer, direction.

get_active_layerA

Get the currently active/selected layer.

Inputs: no named parameters.

get_aseprite_versionA

Get the version of the connected Aseprite instance.

Inputs: no named parameters.

get_canvas_previewA

Get a PNG preview of just the canvas (active frame, all visible layers). Cleaner than take_screenshot.

Inputs: no named parameters.

get_paletteA

Get the current palette colors of the active sprite.

Inputs: no named parameters.

get_sprite_infoA

Get info about the active sprite (size, layers, frames, filename).

Inputs: no named parameters.

list_framesA

List all frames in the active sprite with their durations.

Inputs: no named parameters.

list_layersA

List all layers in the active sprite.

Inputs: no named parameters.

list_open_spritesA

List all open sprites in Aseprite.

Inputs: no named parameters.

list_tagsA

List all animation tags in the active sprite.

Inputs: no named parameters.

load_palette_from_fileB

Load a .gpl palette file into the active sprite.

Inputs: path.

load_palette_lenteraA

Load the official Lentera Pudar 8-color palette (#F4B860 warm yellow, #4A6FA5 cold blue, etc.). Use this always for Lentera Pudar art.

Inputs: no named parameters.

merge_layersB

Merge multiple layers into one.

Inputs: layers, into_name.

move_celB

Move a cel from one layer/frame to another.

Inputs: to_frame (required), to_layer (required), from_frame (required), from_layer (required).

open_spriteB

Open an existing sprite file in Aseprite.

Inputs: path (required).

outlineA

Add a pixel outline around non-transparent pixels. Default color is Lentera Pudar shadow (#2A211C).

Inputs: color, frame, layer, outside.

remove_frameA

Remove a frame from the active sprite.

Inputs: frame_number (required).

remove_layerA

Remove a layer by name from the active sprite.

Inputs: name (required).

remove_tagA

Remove an animation tag by name.

Inputs: name (required).

rename_tagB

Rename an animation tag.

Inputs: name (required), new_name (required).

replace_colorA

Replace one color with another across the entire sprite or a layer/frame.

Inputs: to_color (required), from_color (required), frame, layer, +1 more.

resize_paletteB

Resize the palette to a specific number of colors.

Inputs: size (required).

rotate_spriteB

Rotate the sprite 90, 180, or 270 degrees.

Inputs: angle, frame, layer.

run_lua_scriptA

Execute arbitrary Lua code inside Aseprite. Use for operations not covered by other tools.

Inputs: script (required).

save_spriteA

Save the active sprite. Optionally save to a new path.

Inputs: path.

set_active_frameB

Set the active frame (navigate to a specific frame).

Inputs: frame_number (required).

set_active_layerA

Set the active layer by name.

Inputs: name (required).

set_cel_opacityB

Set the opacity of a specific cel (layer+frame combination).

Inputs: opacity (required), frame, layer.

set_frame_durationA

Set the duration of a specific frame. Lentera walk=125ms (8fps), attack varies per frame.

Inputs: duration_ms (required), frame_number (required).

set_layer_propertiesC

Set properties of a layer (name, opacity, visibility, blend mode).

Inputs: name (required), locked, opacity, visible, +2 more.

set_palette_colorsB

Set specific palette colors by index.

Inputs: colors (required).

take_screenshotA

Capture the Aseprite window as an image. Use to visually verify pixel art results.

Inputs: no named parameters.

zoom_to_fitA

Zoom the Aseprite canvas to fit the window (for better screenshot visibility).

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 51 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action. Drawing tools are separated by shape, palette tools by operation, and export tools by format. Even similar tools like `get_canvas_preview` and `take_screenshot` are clearly differentiated by description.

    Naming Consistency5/5

    All tools follow a consistent `verb_noun` snake_case convention, making it easy to predict tool names. Verbs are action-oriented (open, get, set, add, remove, draw, export) and nouns clearly identify the target (sprite, layer, frame, tag, palette).

    Tool Count2/5

    At 51 tools, the server is heavily overloaded. While each tool is individually useful, the sheer number creates navigation burden and suggests excessive granularity (e.g., separate shape drawing tools, multiple export formats). This detracts from coherence.

    Completeness5/5

    The surface is extremely complete, covering sprite lifecycle, layers, frames, tags, palette, drawing, transformations, export, and cel operations. The inclusion of `run_lua_script` ensures no operation is impossible, making gaps moot.

    Related MCP Connectors

    Related MCP Servers