A Model Context Protocol (MCP) server for automating Aseprite with Lua scripts. This project provides a FastMCP server that exposes Aseprite functionality to Claude Desktop and other MCP clients, enabling AI-assisted pixel art creation and sprite automation.
- Canvas Management: Create new canvases, add layers and frames
- Drawing Tools: Draw pixels, lines, rectangles, circles with customizable colors and styles
- Fill Operations: Paint bucket tool for area fills
- Export Capabilities: Export sprites to PNG, GIF, and other formats
- Lua Script Generation: Dynamically generates and executes Aseprite Lua scripts
- FastMCP Integration: Seamless integration with Claude Desktop and MCP clients
- Install Aseprite: Download and install Aseprite from aseprite.org
- Download from the official website or Steam
- Default installation path:
C:\Program Files\Aseprite\Aseprite.exe - Or install via Chocolatey:
choco install aseprite
- Download from the official website or Steam
- Default path:
/Applications/Aseprite.app/Contents/MacOS/aseprite
- Install via package manager (varies by distribution)
- Ubuntu/Debian: Available in some PPAs
- Arch Linux:
pacman -S asepriteoryay -S aseprite - Flatpak:
flatpak install flathub org.aseprite.Aseprite - Or compile from source following official instructions
coming soongit clone https://github.com/rkdfx/aseprite-mcp.git
cd aseprite-mcp
pip install -e .git clone https://github.com/rkdfx/aseprite-mcp.git
cd aseprite-mcp
pip install -e ".[dev]"- Automatic Detection: The server will automatically try to find Aseprite in common installation paths
- Manual Configuration: If Aseprite isn't found automatically, set the
ASEPRITE_PATHenvironment variable:
# Copy the example environment file
cp .env.example .env
# Edit .env and set your Aseprite path
# Windows: ASEPRITE_PATH=C:\Program Files\Aseprite\Aseprite.exe
# macOS: ASEPRITE_PATH=/Applications/Aseprite.app/Contents/MacOS/aseprite
# Linux: ASEPRITE_PATH=/usr/bin/aseprite# Run as a module
python -m aseprite_mcp
# Or use the installed script
aseprite-mcpAdd to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"aseprite": {
"command": "python",
"args": ["-m", "aseprite_mcp"],
"env": {
"ASEPRITE_PATH": "/path/to/your/aseprite"
}
}
}
}create_canvas(width, height, filename)- Create new Aseprite canvasadd_layer(filename, layer_name)- Add new layer to existing fileadd_frame(filename)- Add new animation frame
draw_pixels(filename, pixels)- Draw individual pixels with colorsdraw_line(filename, x1, y1, x2, y2, color, thickness)- Draw linesdraw_rectangle(filename, x, y, width, height, color, fill)- Draw rectanglesdraw_ellipse(filename, center_x, center_y, width, height, color, fill)- Draw ellipsesdraw_circle(filename, center_x, center_y, radius, color, fill)- Draw circlesdraw_polygon(filename, points, color, fill)- Draw polygons with multiple verticesdraw_triangle(filename, x1, y1, x2, y2, x3, y3, color, fill)- Draw trianglesdraw_arc(filename, center_x, center_y, radius, start_angle, end_angle, color, thickness)- Draw arcsfill_area(filename, x, y, color)- Fill areas with paint bucket
export_sprite(filename, output_filename, format)- Export to PNG, GIF, etc.
The server includes instructional prompts that guide LLMs on how to create complex artwork:
draw_cloud_example()- Instructions for creating a fluffy cloud using overlapping shapesdraw_tree_example()- Guide for drawing a tree with trunk and leafy crowndraw_house_example()- Steps to create a house using geometric shapesdraw_star_example()- Method for drawing a five-pointed star with precise coordinatesdraw_flower_example()- Instructions for creating a flower with petals, stem, and leaves
These prompts return detailed instructions that help AI agents understand how to combine the basic drawing tools to create complex, recognizable objects.
The project uses a modular architecture:
core/commands.py- Aseprite command execution and Lua script managementtools/canvas.py- Canvas creation and layer/frame managementtools/drawing.py- Drawing operations and pixel manipulationtools/export.py- Export functionality for various formats
All tools are automatically exposed as MCP tools through the FastMCP decorator system.