WP

willibrandon/pixel-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

157 stars 27 forks 质量 60 趋势 17MIT

Willibrandon/Pixel-MCP 是从 https://github.com/willibrandon/pixel-mcp. 导入的 MCP 服务器候选服务器。

概览

Willibrandon/Pixel-MCP 是从 https://github.com/willibrandon/pixel-mcp. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,向AI助手展示Aseprite的像素艺术和动画功能,使你能够使用自然语言创建和编辑精灵。

使用 pixel-mcp 创建的示例场景:64x64 索引精灵,配有自定义 16 色调色板,演示绘图基元(矩形、圆圈)和调色板管理。

特色

  • 画布与图层管理: RGB、灰度和索引色彩模式,支持多层和图层删除
  • 绘制原语: 像素、线条、矩形、圆、多边线、带有批处理操作的泛洪填充和调色板感知绘图
  • 选择工具: 矩形、椭圆、全部选择、复制、剪切、粘贴、移动选区,支持多种混合模式(替换/添加/减去/交叉)
  • 专业像素艺术工具:
  • 参考分析: 从图像中提取调色板、亮度图、边缘检测和构图指南
  • 色彩量化: 使用median_cut、k-均值或八叉树算法,并可选Floyd-Steinberg抖动,将图像减少为2-256色
  • 自动着色: 应用基于几何形状的着色,带有3种样式(单元/光滑/柔和)、8个光源方向和可调强度

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Aseprite MCP Server

A Model Context Protocol (MCP) server that exposes Aseprite’s pixel art and animation capabilities to AI assistants, enabling you to create and edit sprites using natural language.

Example scene created using pixel-mcp: 64x64 indexed sprite with custom 16-color palette, demonstrating drawing primitives (rectangles, circles) and palette management.

Features

  • Canvas & Layer Management: RGB, Grayscale, and Indexed color modes with multi-layer support and layer deletion
  • Drawing Primitives: Pixels, lines, rectangles, circles, polylines, flood fill with batch operations and palette-aware drawing
  • Selection Tools: Rectangle, ellipse, select all, copy, cut, paste, move selections with multiple blend modes (replace/add/subtract/intersect)
  • Professional Pixel Art Tools:
    • Reference Analysis: Extract palettes, brightness maps, edge detection, and composition guides from images
    • Color Quantization: Reduce images to 2-256 colors using median_cut, k-means, or octree algorithms with optional Floyd-Steinberg dithering
    • Automatic Shading: Apply geometry-based shading with 3 styles (cell/smooth/soft), 8 light directions, and adjustable intensity
    • Dithering: 16 patterns including Bayer matrices (2x2, 4x4, 8x8), Floyd-Steinberg, checkerboard, and textures (grass, water, stone, cloud, brick, dots, diagonal, cross, noise, lines)
    • Palette Management: Set custom palettes (1-256 colors), sort by hue/luminance, analyze color harmonies (complementary/triadic/analogous), and extract from reference images
    • Shading Tools: Apply palette-constrained shading with smooth, hard, or pillow styles and 8 light directions
    • Antialiasing: Detect jagged diagonal edges and suggest intermediate colors for smoother curves (manual or auto-apply)
    • Transform Operations: Flip, rotate, scale, crop, resize canvas, apply outlines, and downsample for pixel art conversion
    • Palette-Aware Drawing: All drawing tools support snapping to nearest palette color using LAB color space
  • Animation Tools: Frame durations, tags, frame duplication/deletion, linked cels
  • Inspection Tools: Read pixel data with pagination for verification and analysis
  • Export Formats: PNG, GIF, JPG, BMP, and spritesheet export (horizontal/vertical/grid layouts)
  • Cross-platform: Windows, macOS, Linux
  • MCP Integration: Works with Claude Desktop and other MCP clients

Requirements

  • Go 1.23+
  • Aseprite 1.3.0+ (1.3.10+ recommended)

Quick Start

1. Install

# Clone the repository
git clone https://github.com/willibrandon/pixel-mcp.git
cd pixel-mcp

# Build the server
make build

2. Configure

Create ~/.config/pixel-mcp/config.json:

{
  "aseprite_path": "/path/to/aseprite",
  "temp_dir": "/tmp/pixel-mcp",
  "timeout": 30,
  "log_level": "info",
  "log_file": "",
  "enable_timing": false
}
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "aseprite": { "command": "/absolute/path/to/pixel-mcp" } } }