Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ASEPRITE_MCP_PORTNoWebSocket port for the Aseprite extension.9123
ASEPRITE_MCP_TOKENNoShared pairing token.Token file
ASEPRITE_MCP_LIB_DIRNoDirectory where lib(name, code) saves helper code.~/.config/aseprite-mcp/lib
ASEPRITE_MCP_TIMEOUTNoTimeout in milliseconds per command (at least 60000 for snapshot and commit).15000
ASEPRITE_MCP_AUTOSAVENoAutosave directory, or off.~/.config/aseprite-mcp/autosave, or off
ASEPRITE_MCP_FILE_DIRSNoAllowed folders for file read/write. Defaults to the sprites folder and the temporary directories.The sprites folder and the temporary directories
ASEPRITE_MCP_HTTP_PORTNoHTTP port for the daemon MCP server.9124
ASEPRITE_MCP_VIEWS_DIRNoDirectory for view images.The user cache directory
ASEPRITE_MCP_TOKEN_FILENoPath to the token file.~/.config/aseprite-mcp/token
ASEPRITE_MCP_AUTOSAVE_MBNoMaximum total size of backups in MB.200
ASEPRITE_MCP_SPRITES_DIRNoDirectory where s.save("name") writes.~/Pictures/aseprite-mcp
ASEPRITE_MCP_PALETTE_FILENoPath to the palettes file.~/.config/aseprite-mcp/palettes.json
ASEPRITE_MCP_AUTOSAVE_DAYSNoNumber of days to keep backups.14
ASEPRITE_MCP_AUTOSAVE_KEEPNoNumber of backup copies per sprite.5

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Draw in the user's running Aseprite: send a JavaScript program to execute; help() inside it explains the API.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
executeA

Draw pixel art live in the user's Aseprite by running a JavaScript program. Coordinates are 0-based, (0,0) top-left; frames are 0-based.

Globals: sprite(o?: { new?: [w, h]; colorMode?: "rgb"|"indexed"|"gray"; open?: path; id?: number; name?: string }): Promise // no args = the active sprite sprites(): Promise<{ id, name, width, height, frames, active }[]> image(path): Promise // load a PNG reference: Image { image, width, height, read(o?), colors(max = 32), downscale(factor) } ramp(base: string, keys: string, o?: { hueShift?: number }): Record<string, string> // OKLCH shades, dark to light, one per key palette(name, colors?): Promise<Record<string, string>> // load, or save with colors, a named palette lib(name?, code?): Promise<string[] | string> // save helper code: lib(name, code); read: lib(name); list: lib() use(name): void // top-level use("style") puts a saved library's functions in scope; see help("lib") help(topic?): string // topics: maps, animation, critique, conflicts, files, export, lib

Sprite { id, name, width, height, colorMode layers(): string[] // paths, bottom to top; "group/child" frames(): number; selection(): Rect | null cel(layer, frame = 0): Cel; cels(layer): Cel[] // one per frame layer(name, o?: { below?, visible?, opacity? (0-255), rename?, remove? }): void // unknown name = new layer setFrames(count, o?: { duration?: ms | ms[] }): void // new frames copy the last frame tag(name, from, to, o?: { direction?: "forward"|"reverse"|"pingpong" }): void view(o?: { frame?: number | "all"; rect?: Rect; scale?: number; critique?: boolean; background?: "#080707" }): Promise<{ path, width, height }> // background replaces the checkerboard resize(w, h, o?: { x?, y? }): Sprite // canvas size, not scale; art moves by (x, y), default bottom-centred; use the returned handle commit(label?): Promise<{ label, cels, pixels, merged, lost }> // checkpoint now undo(n = 1): Promise; redo(n = 1): Promise changes(): Promise<{ layer, frame, rect, palette, rows }[]> // the artist's edits since you last looked save(nameOrPath?): Promise // save("slime") -> ~/Pictures/aseprite-mcp/slime.aseprite export(name, o?: { scale?, tag?, sheet? = true, gif?, columns? }): Promise<{ sheet?, json?, gif?, frames, width, height }> } // sprite sheet PNG + JSON, GIF Cel { layer, frame map(palette, rows, o?: { x?, y?, flip?: "h"|"v"|"hv" }): number // one char per pixel; "." and " " skip; "#00000000" erases px(points: [x, y, color][]): number; line(x0, y0, x1, y1, color): number rect(r, color, o?: { fill? }): number; ellipse(r, color, o?: { fill? }): number; fill(x, y, color): number outline(color?, o?: { mode?: "selective"|"outside"|"inside"; rect? }): number // selective needs no colour shift(dx, dy, o?: { rect? }): number copy(from: Cel | Image | { layer, frame?, sprite? } | { image }, o?: { rect?, x?, y?, flip? }): number recolor(map: { "#from": "#to" }, o?: { rect? }): number; clear(r?): number bounds(): Rect | null // [x, y, w, h] of the non-transparent pixels; null when empty read(o?: { rect?; palette? }): { palette, rows } } // same format as map; pass your palette to keep its keys Rect = [x, y, w, h] | "selection". Colours are "#rgb", "#rrggbb" or "#rrggbbaa". Drawing methods return pixels changed.

Rules:

  • Edits go to a draft. When the program returns, each touched sprite commits as ONE undo step ("MCP: program").

  • A throw or timeout commits nothing; the result lists the discarded cels. await s.commit("label") is a checkpoint that survives a later throw.

  • Pixel loops belong in methods: map/rect/fill/shift run natively; a JS loop per pixel is slow.

  • Return only what you need (counts, a few rows), never whole sprites or handles.

  • view() writes a PNG and returns its path; open the file to look. Use critique: true to judge colour, values and silhouette in one image.

  • The result's warnings name each drawing call that dropped pixels outside the canvas; move the art or s.resize().

  • The result's commit list reports merged and lost: if the artist drew on the same cels meanwhile, both edits are kept and the artist wins where you overlap.

Example: const s = await sprite({ new: [32, 32] }) const P = { k: "#1a1c2c", ...ramp("#b13e53", "rst") } const c = s.cel("Layer 1") c.ellipse([8, 8, 16, 16], P.s, { fill: true }) c.map(P, ["..tt", ".tsst"], { x: 12, y: 10 }) c.outline() return await s.view({ critique: true })

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no possibility of misselection between tools. The single entry point cleanly routes all capability through a documented JavaScript API.

Naming Consistency4/5

With a single tool there is no pattern to violate, so consistency is trivially satisfied. The name 'execute' is generic and doesn't convey the pixel-art domain, though the description compensates immediately.

Tool Count3/5

A single tool is a deliberate design choice here — it exposes an entire scripting API (sprite, cel, palette, export, help) rather than a thin capability. Still, one tool is on the thin side and offers no discoverability of operations without reading a long description.

Completeness4/5

The surface covers creation, layers, frames, tags, drawing primitives, palettes, libraries, view/critique, save/export, and undo/redo — a genuinely broad lifecycle. Minor gaps exist, such as no way to set the selection (only read it) and no explicit tilemap or slice operations.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues