Piskel MCP Server

Create and manipulate pixel art via the Model Context Protocol.

README.md

Piskel MCP Server

Piskel 像素画编辑器的 MCP(Model Context Protocol)服务器,让 AI 助手能够通过 MCP 协议创建和操作像素画。

English | 简体中文

功能特点

  • 创建和管理像素画项目
  • 绘制像素、线条、矩形、圆形
  • 洪水填充工具
  • 图层管理
  • 导出为 PNG、GIF 和雪碧图
  • 动画帧支持

安装

git clone https://github.com/yafeiaa/piskel-mcp-server.git
cd piskel-mcp-server
npm install
npm run build

快速开始

接入 Agent

服务器使用 stdio 传输协议。将以下配置添加到你的 Agent 设置中:

{
  "mcpServers": {
    "piskel": {
      "command": "node",
      "args": ["/path/to/piskel-mcp-server/dist/index.js"]
    }
  }
}

请将 /path/to/piskel-mcp-server/ 替换为你实际的克隆路径。

开始创作!

连接后,你可以用自然语言创建像素画:

"创建一个 32x32 的红色爱心精灵图"
"在中心画一个蓝色圆形"
"用绿色填充左半边"
"导出为动画 GIF"

MCP 工具

项目管理

  • piskel_create_project - 创建新像素画项目
  • piskel_list_projects - 列出所有项目
  • piskel_get_project_info - 获取项目详情
  • piskel_delete_project - 删除项目

图层管理

  • piskel_add_layer - 添加新图层
  • piskel_remove_layer - 移除图层

帧管理

  • piskel_add_frame - 添加新帧
  • piskel_remove_frame - 移除帧
  • piskel_duplicate_frame - 复制帧

绘图工具

  • piskel_draw_pixel - 绘制单个像素
  • piskel_draw_pixels - 绘制多个像素
  • piskel_draw_line - 绘制线条
  • piskel_draw_rectangle - 绘制矩形
  • piskel_draw_circle - 绘制圆形
  • piskel_fill_area - 洪水填充
  • piskel_erase_pixel - 擦除像素
  • piskel_clear_frame - 清空帧

数据读取

  • piskel_get_pixel - 获取像素颜色
  • piskel_get_frame_data - 获取帧像素数据

导出

  • piskel_export_png - 导出为 PNG
  • piskel_export_gif - 导出为 GIF
  • piskel_export_sprite_sheet - 导出为雪碧图

贡献指南

开发和 Pull Request 规范请查看 CONTRIBUTING.md

许可证

Apache-2.0

致谢

基于 Julian Descottes 创建的 Piskel

Tools 8

piskel_create_projectCreates a new pixel art project.
piskel_draw_pixelDraws a single pixel at specified coordinates.
piskel_draw_lineDraws a line between two points.
piskel_draw_rectangleDraws a rectangle.
piskel_draw_circleDraws a circle.
piskel_fill_areaPerforms a flood fill operation.
piskel_export_gifExports the current project as a GIF.
piskel_add_layerAdds a new layer to the project.

Try it

Create a new 32x32 pixel art project for a character sprite.
Draw a blue circle in the center of the current frame.
Add a new layer and fill it with a green background color.
Export the current animation as a GIF file.
Draw a red heart icon using the pixel drawing tools.

Frequently Asked Questions

What are the key features of Piskel MCP Server?

Create and manage pixel art projects. Support for drawing tools including pixels, lines, rectangles, and circles. Layer management and animation frame control. Flood fill tool for area coloring. Export capabilities for PNG, GIF, and sprite sheets.

What can I use Piskel MCP Server for?

Generating game assets like character sprites or item icons via AI prompts. Automating the creation of pixel art animations for web or game projects. Programmatically editing existing pixel art files using natural language instructions. Batch processing pixel art frames for sprite sheet generation.

How do I install Piskel MCP Server?

Install Piskel MCP Server by running: git clone https://github.com/yafeiaa/piskel-mcp-server.git && cd piskel-mcp-server && npm install && npm run build

What MCP clients work with Piskel MCP Server?

Piskel MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Piskel MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare