Aseprite MCP Server
Provides tools for pixel art creation in Aseprite, including pixel-level drawing, layer and frame management, palette editing, animation tags, image transforms, and canvas preview, enabling AI agents to create and edit sprites programmatically.
Click on "Install 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 Servercreate a 16x16 pixel art of a red apple"
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 Server
Let AI draw pixel art in Aseprite
A Model Context Protocol (MCP) server that enables AI to create pixel art in Aseprite through pixel-level drawing primitives, read canvas screenshots, and iterate until satisfied.
This project requires a local installation ofAseprite v1.3+. AI performs drawing via the MCP protocol by calling the Aseprite CLI + Lua scripts.
Two execution modes are supported:
CLI mode (default): Each tool call spawns a headless Aseprite process (
aseprite -b). No UI, state passed via.asefiles.Live mode (WebSocket): AI operates the running Aseprite instance directly through a WebSocket bridge. UI is visible, state is persistent, and you can watch AI draw in real time. See Live Mode Setup below.
Table of Contents
Related MCP server: pixel-mcp
How to Use
1. Environment Setup
Before configuring MCP, prepare your local development environment:
Dependency | Version | Download |
Python | 3.10+ | |
Aseprite | v1.3+ | aseprite.org (remember the install path) |
2. MCP Server Setup
git clone https://github.com/ZhangDongyang800/Aseprite_MCP.git
cd Aseprite_MCP
pip install -e .This installs fastmcp and websockets (the latter is required for optional Live Mode).
3. Client Configuration
Replace the paths below with your actual local paths:
Path to
server.pyinargsASEPRITE_PATHenvironment variable valuepythonpath incommand
TRAE:
Open TRAE β Settings β MCP β Add MCP Server, paste:
{
"mcpServers": {
"aseprite": {
"command": "python",
"args": ["C:\\path\\to\\Aseprite_MCP\\server.py"],
"env": {
"ASEPRITE_PATH": "C:\\Program Files\\Aseprite\\aseprite.exe"
}
}
}
}Codex CLI:
Config file: ~/.codex/config.toml
[mcp_servers.aseprite]
command = "python"
args = ["/path/to/Aseprite_MCP/server.py"]
[mcp_servers.aseprite.env]
ASEPRITE_PATH = "C:\\Program Files\\Aseprite\\aseprite.exe"After configuration, ask your AI tool to use Aseprite-related tools to start creating.
π₯ Live Mode (Optional, WebSocket)
Live mode lets AI operate your running Aseprite instance directly β you can watch every stroke happen in real time on your screen, and the sprite state persists across tool calls (no repeated file open/save overhead).
How It Works
βββββββββββ MCP (stdio) ββββββββββββββββ WebSocket ββββββββββββββββββββ
β AI/TRAE β ββββββββββββββββΊ β Python MCP β ββββββββββββββΊ β Aseprite Extensionβ
β β ββββββββββββββββ β Server β βββββββββββββ β (WebSocket client) β
βββββββββββ ββββββββββββββββ ββββββββ¬ββββββββββββ
β Lua app.* API
βΌ
ββββββββββββββββ
β Visible Aseprite β
β Sprite + UI β
ββββββββββββββββThe Python MCP server starts a WebSocket server on 127.0.0.1:9001. The Aseprite extension connects to it as a client. Each MCP tool call is forwarded to Aseprite over WebSocket, executed via the existing Lua scripts, and the result is sent back.
Setup
1. Install the Aseprite extension
The extension is in the extension/ folder of this repo. Install it via:
Open Aseprite β
File > Scripts > Open Scripts FolderCopy the entire
extension/folder contents into the scripts folder (or useEdit > Preferences > Extensions > Add Extensionand select theextension/folder)
2. Enable WebSocket mode in MCP config
Add ASEPRITE_MCP_MODE=ws to the env section of your MCP server config:
{
"mcpServers": {
"aseprite": {
"command": "python",
"args": ["C:\\path\\to\\Aseprite_MCP\\server.py"],
"env": {
"ASEPRITE_PATH": "C:\\Program Files\\Aseprite\\aseprite.exe",
"ASEPRITE_MCP_MODE": "ws",
"ASEPRITE_WS_HOST": "127.0.0.1",
"ASEPRITE_WS_PORT": "9001"
}
}
}
}3. Connect Aseprite
With the MCP server running, open Aseprite and click:
File > Scripts > MCP Bridge: Toggle Connection
You should see an alert: "MCP Bridge: Connected to ws://127.0.0.1:9001".
Now AI can operate Aseprite directly β create a sprite, draw pixels, and you'll see it happen live.
CLI vs Live Mode Comparison
Aspect | CLI Mode (default) | Live Mode (WebSocket) |
UI visibility | Headless ( | Full UI, watch AI draw |
State persistence | Per-call (file-based) | Persistent across calls |
Startup overhead | New process per call | Single running instance |
Setup complexity | None | Install extension + connect |
Aseprite focus required | No | Yes (callbacks delayed when unfocused) |
Fallback | N/A | Auto-falls back to CLI if extension not connected |
If the Aseprite extension is not connected, Live mode tools return a clear error message guiding you to connect. The existing CLI mode is always available as fallback by settingASEPRITE_MCP_MODE=cli (or removing the variable).
Environment Variables
Variable | Default | Description |
|
| Execution mode: |
|
| WebSocket server bind address |
|
| WebSocket server port |
What It Can Do
Let AI create pixel art in Aseprite like a human artist β with a complete workflow supporting pixel-level drawing, multi-layer management, animation frame editing, palette control, animation tags, image transforms, and canvas preview. 49 tools in total.
Pixel-Level Drawing
All drawing tools support layer and frame parameters, allowing drawing on a specific layer and frame (default: layer 1, frame 1).
Tool | Description |
| Draw a pixel at specified coordinates |
| Draw a straight line |
| Draw a rectangle (outline / filled) |
| Draw an ellipse (outline / filled) |
| Paint bucket fill a connected region |
| Clear a region to transparent |
| Clear the entire canvas |
Sprite Management
Tool | Description |
| Create a new canvas (supports |
| Open an existing |
| Save as |
| Close the session and clean up temporary resources |
| β
Recommendedβ
Import an image from a PNG file β the most token-efficient way to draw arbitrary shapes. Two modes: |
Animation & Frames
Tool | Description |
| Add a new frame (copy last or create empty) |
| Remove a specific frame |
| Set frame duration (seconds) |
| Get all frame info (count, duration per frame) |
| Export GIF animation (supports scaling) |
| Export sprite sheet (PNG + JSON data) |
Layer Management
Tool | Description |
| Create a new layer |
| Remove a layer (by name or index) |
| Set layer properties (name, visibility, opacity, blend mode) |
| Get info for all layers |
| Move a cel between layers / frames |
Palette
Tool | Description |
| Set the color at a specific palette index |
| Get all colors in the current palette |
| Resize the palette (number of colors) |
| Load a palette from a file ( |
Animation Tags
Tool | Description |
| Create an animation tag (supports playback direction, loop count) |
| Remove a tag by name |
| Get info for all tags |
Image Transforms
Tool | Description |
| Flip canvas (horizontal / vertical) |
| Resize the sprite |
| Rotate canvas (90Β° / 180Β° / 270Β°) |
| Crop sprite to a specified region |
| Invert all colors |
| Replace a specific color |
Palette Enhancements
Tool | Description |
| β Batchβ Apply a built-in preset palette (db16/db32/aap64/nes/gameboy) |
| Derive a three-step shading palette from a base color (with hue shift, auto-applied by default) |
| β Batchβ Append multiple colors to the palette |
Animation Helpers
Tool | Description |
| β Batchβ Set frame durations in bulk by animation type |
| β Batchβ Draw multiple animation frames in one call |
| Onion-skin overlay preview (compare adjacent frames) |
Tileset Tools
Tool | Description |
| Create a tileset canvas and set up the grid |
| Tiled layout preview (seam check) |
Quality Checks
Tool | Description |
| Export a solid black silhouette (silhouette test) |
| Auto-check canvas standards (size / colors / frame duration / pixel art) |
Canvas Inspection
Tool | Description |
| Export a PNG for AI visual analysis (core iteration tool) |
| Get canvas metadata (size, color mode, etc.) |
| Query the color of a pixel at specified coordinates |
Other Capabilities
MCP Resources β Session list, default palette, canvas metadata, blend mode list, animation direction list
MCP Prompts β Sprite creation guide, iteration review guide, animation creation guide, multi-layer workflow guide
get_canvas_preview is the core of the workflow: after drawing, AI calls it to "see" the canvas, analyze it, and decide whether to fix it, forming a draw β preview β analyze β fix loop.
CLI Mode Data Flow (default)
AI Request β MCP Tool Call β FastMCP (Python) β Aseprite CLI β Lua Script β .ase File
β
AI Visual Analysis β base64 PNG β Image Object β FastMCP β export_png.lua βββDemo
Example: Chibi Knight Walk Cycle
Four-Direction Walk Animation
β Down | β Up |
|
|
β Left | β Right |
|
|
Sprite Sheet
![]()
AI Prompt:
Use Aseprite MCP to generate a pixel art sprite sheet of a brave knight in silver armor holding a long sword. Four-direction walk cycle (down, up, left, right), 4 frames per direction, 32x32, flat colors, transparent background.
Example: Import a PNG (Recommended Workflow for Arbitrary Shapes)
When drawing complex or non-grid-friendly shapes, generating a PNG with Python/PIL and importing it is far more token-efficient than describing every pixel with draw_from_grid or hundreds of draw_pixel calls.
# Step 1: Generate a PNG with Python/PIL
from PIL import Image, ImageDraw
img = Image.new("RGBA", (32, 32), (0, 0, 0, 0)) # transparent background
d = ImageDraw.Draw(img)
d.ellipse([4, 4, 27, 27], fill=(231, 76, 60, 255)) # draw a red circle
img.save("circle.png")# Step 2: Import the PNG into a new Aseprite session
import_png(png_path="circle.png", mode="new")
# Returns: { "session_id": "...", "width": 32, "height": 32, ... }# Step 3: Refine with pixel-level tools if needed
draw_pixel(session_id="...", x=16, y=6, color="#FFFFFF") # add a highlightUse mode="stamp" to paste a PNG onto an existing session at a specific layer/frame/offset β handy for adding details, stamps, or compositing sub-images.
π€ Contributing
Issues and Pull Requests are welcome!
I've tried it, but I can't guarantee it works perfectly. It still needs more optimization.
License
This project is open-sourced under the MIT License.
Copyright Β© 2026 ZhangDongyang800
Built with β€οΈ for pixel art lovers
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZhangDongyang800/Aseprite_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server



