ssyubix-pixelart-mcp

io.github.syuaibsyuaib由 GitHub 帳號 syuaibsyuaib 發布v0.1.1更新於 Oct 24, 2026

Draw pixel-art tiles and tilesets for 2D games, with PNG+metadata export for Unity.

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

讓助理繪製 2D 遊戲的像素圖磚與圖磚集,並匯出附 JSON 中繼資料的 PNG 供 Unity 使用。

可以做什麼
這是一個本機 Python MCP 伺服器,提供 24 個像素繪製與圖磚集組裝工具。它能建立與編輯畫布,支援設定像素、直線、矩形、圓形、多邊形與填滿等基本操作,並可管理畫布、產生或擷取調色盤、建議圖磚尺寸與圖磚地圖版面。圖磚集工具可建立網格圖集、把圖磚放入插槽,並匯出 PNG 與 JSON 中繼資料(圖磚尺寸、網格、PPU)以便匯入 Unity。
適用情境
適合讓助理製作像素風遊戲素材:單一圖磚、圖磚集圖集或完整圖磚地圖版面。它設計為與 Unity MCP 伺服器搭配使用,以便自動切割並匯入匯出的圖集;若沒有該伺服器,則需手動匯入 PNG 與 JSON。
執行需求
以 Python 套件形式透過 stdio 在本機執行,可從 PyPI 或原始碼安裝;清單未宣告驗證、環境變數或標頭。僅限桌面端,無法在網頁中執行。匯入 Unity 需要 Unity 專案,若要自動切割還需要另一個 Unity MCP 伺服器。
安裝前請注意
此伺服器會把匯出的 PNG 與 JSON 檔案寫入磁碟,並可刪除畫布與圖磚集。它在技術上不依賴 Unity MCP 伺服器,但沒有它時匯出結果需手動匯入 Unity。未宣告需要憑證、付款或向第三方分享資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ssyubix-pixelart-mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

ssyubix-pixelart-mcp

[GitHub Downloads] [PyPI Downloads] [Python]

MCP server (Python) for drawing pixel art and assembling 2D game tilesets. Built with MCP Python SDK v1.x (stable), stdio transport, designed to be used alongside unity-mcp-server in a single agent session.

Installation

From PyPI:

bash
pip install ssyubix-pixelart-mcp

Or from source:

bash
git clone https://github.com/syuaibsyuaib/ssyubix-pixelart-mcpcd ssyubix-pixelart-mcppython3 -m venv venvsource venv/bin/activate   # Windows: venv\Scripts\activatepip install -e .

Running

bash
python -m pixelart_mcp.server# or, if installed from PyPI:ssyubix-pixelart-mcp

Connecting to Claude Desktop / Claude Code

Add to claude_desktop_config.json (Claude Desktop) or via claude mcp add (Claude Code):

json
{  "mcpServers": {    "pixelart": {      "command": "/path/to/ssyubix-pixelart-mcp/venv/bin/python",      "args": ["-m", "pixelart_mcp.server"]    }  }}

Tools List (24)

Drawing

  • pixelart_create_canvas, pixelart_import_canvas, pixelart_set_pixel, pixelart_draw_line, pixelart_draw_rect, pixelart_draw_circle, pixelart_draw_polygon, pixelart_flood_fill

Canvas Management

  • pixelart_clear_canvas, pixelart_flip_canvas, pixelart_duplicate_canvas, pixelart_get_canvas_info, pixelart_get_canvas_preview, pixelart_delete_canvas, pixelart_list_canvases

Color Palette

  • pixelart_generate_palette, pixelart_extract_palette

Size Suggestion

  • pixelart_suggest_tile_size, pixelart_suggest_tilemap_layout

Tileset

  • pixelart_create_tileset, pixelart_set_tile, pixelart_export_tileset, pixelart_delete_tileset, pixelart_list_tilesets

Terminology: Tile vs Tileset vs Tilemap

These are easy to conflate and doing so produces broken/tiny output — a real bug that happened in production: an agent asked for a "tilemap" got back a single 32x32 canvas (that's a tile size) and shipped it as the whole map, which looked broken when used at real scale.

  • Tile: one small square (e.g. 16x16px) — pixelart_create_canvas.
  • Tileset: a sheet of many distinct tiles arranged in a grid (e.g. grass, path, water tile types) — pixelart_create_tileset + pixelart_set_tile + pixelart_export_tileset.
  • Tilemap: a full level/map, composed of many tiles placed across a grid (built the same way as a tileset, but every slot is filled to represent the actual level layout) — never a single tile-sized canvas.

Typical Workflow

For a single asset/tile:

  1. pixelart_suggest_tile_size (optional) — ask for ideal tile size based on object category or screen resolution.
  2. pixelart_generate_palette — create color palette according to style/mood.
  3. pixelart_create_canvas → pixelart_set_pixel / draw_line / draw_rect / draw_circle / flood_fill — draw a single tile.
  4. pixelart_get_canvas_preview — view the result (upscaled PNG) before proceeding.

For a tileset or a full tilemap/level: 5. pixelart_suggest_tilemap_layout — get the grid (columns/rows) and total pixel size needed, from either an explicit tile count or a target screen/level size. 6. pixelart_create_tileset with that grid → pixelart_set_tile for every slot → pixelart_export_tileset. 7. The result of export_tileset is PNG + JSON metadata (tile size, grid, PPU) — the agent can then call unity-mcp-server tools to slice/import into a Unity project.

Running Tests

bash
sh claude_tools/run_tests.sh

Structure

pixelart_mcp/  server.py      # entry point, registers 23 tools  canvas.py       # pixel drawing primitives  palette.py      # palette generator  sizing.py       # tile size heuristics  tileset.py      # tileset assembly & export  models.py       # Pydantic input models  tests/          # 58 unit testsclaude_tools/     # helper script (dump schema, run tests)task.md           # status & work notesPUBLISHING.md      # guide to publish to PyPI & official MCP Registry

If unity-mcp-server is Not Available

pixelart_mcp is not technically dependent on unity-mcp-server — all tools above work fully without it. The difference is only in the final step: without unity-mcp-server, the result of pixelart_export_tileset (PNG + JSON metadata) must be imported manually into Unity Editor. Here are the steps (based on official Unity Manual), to guide an AI when helping a non-technical user:

  1. Copy the exported PNG file to the Assets folder (or a subfolder like Assets/Sprites) within your Unity project.
  2. In the Project window, click on the PNG file. In the Inspector panel:
    • Texture Type → Sprite (2D and UI)
    • Sprite Mode → Multiple (because it contains many tiles in one sheet)
    • Pixels Per Unit → enter the ppu value from the JSON metadata file
    • Filter Mode → Point (no filter) — to keep pixel art sharp, not blurred
    • Compression → None — to prevent color corruption
    • Click Apply.
  3. Click the Sprite Editor button in the Inspector to open the Sprite Editor.
  4. In the Sprite Editor, click the Slice dropdown, select Grid By Cell Size, then enter the Pixel Size with tile_width x tile_height from the JSON metadata.
  5. Click Slice, then click Apply in the Sprite Editor toolbar.
  6. Done — each tile is now a separate sprite that can be dragged directly into the Scene or used in a Tilemap.

All required values (tile_width, tile_height, ppu) are automatically available in the .json file generated by pixelart_export_tileset — the AI does not need to calculate them, just read them and guide the user through the steps above.

For AI Agents Maintaining/Developing This Project

Read AGENTS.md first — it contains the architecture map, mandatory conventions, checklist for adding new tools, and the workflow for handling user feedback/feature requests.

License

Apache License 2.0 — see LICENSE and NOTICE files.

Publishing to PyPI & MCP Registry

See PUBLISHING.md for complete guide (exact commands, requires personal credentials — PyPI token & GitHub OAuth login).

SDK Version Notes

This server is built on top of v1.x MCP Python SDK (stable, recommended for production). SDK v2 is still pre-release as of July 2026 — not used here per policy of "only stable/current official references".

來源:README.md,提交 c92482f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分