pixelduet

io.github.kimjungminn24由 GitHub 帳號 kimjungminn24 發布v1.0.0更新於 Nov 3, 2026

一個你與模型共享的畫素畫布:即時觀看它作畫、暫停、編輯,再把畫筆交還給它。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

A pixel canvas you share with the model: watch it draw live, pause, edit, and hand the brush back.

已驗證STDIO僅桌面媒體與設計

概覽

pixelduet 的本機 MCP 服務;無需登入;STDIO;18 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

pixelduet

한국어

A pixel canvas shared by a model and a person. The model draws stroke by stroke while you watch in the browser. Pause it, take the brush, change things, leave a note, and hand the brush back. The reply to its next stroke tells it what you did.

[The model draws a potion flask stroke by stroke, the person pauses it, fills the liquid pink and leaves a note, and the model shades around the change and finishes]

Install

npx -y pixelduet version

or

go install github.com/kimjungminn24/pixel-duet@latest

or download a binary from the Releases page. Linux, macOS and Windows.

Quick start

npx -y pixelduet

starts the canvas server and the browser viewer and opens the viewer.

The browser is your side. Claude can't look at a web page, so it gets its own way in: the bridge, an MCP server that hands it tools like draw_line and read_pixels. Both reach the same canvas, and a stroke from one side shows up on the other.

    you, in the browser             Claude Code             |                           |           HTTP                   MCP (pixelduet bridge)             |                           |             `-----> canvas server <-----'

Connect Claude Code once:

claude mcp add -s user pixelduet -- npx -y pixelduet bridge

-s user makes it available in every project. Without it the bridge is only there in the folder you ran the command in.

If nothing is running when a session starts, the bridge starts the servers itself. Then ask Claude for a drawing:

Draw a frog on pixelduet.

Claude tells you the viewer's address if your browser is not open on it yet.

In a checkout of this repository, go run . replaces npx -y pixelduet and Claude Code picks the bridge up from .mcp.json.

Other MCP clients

The bridge is an MCP server over stdio. Codex CLI:

codex mcp add pixelduet -- npx -y pixelduet bridge

or in ~/.codex/config.toml:

[mcp_servers.pixelduet]command = "npx"args = ["-y", "pixelduet", "bridge"]

On Windows use command = "cmd" and args = ["/c", "npx", "-y", "pixelduet", "bridge"].

Two things to check with a new client:

  • The drawing rules are sent as the server's instructions. If the client drops them, npx -y pixelduet rules >> AGENTS.md restores them.
  • get_canvas returns a PNG. A client that does not pass images through leaves the model with read_pixels digits only.

Without MCP, anything that can open a TCP socket can draw. The protocol is in internal/proto/proto.go.

The handoff

  1. The model draws one stroke per call and narrates in the log.

  2. You press pause. The model's next stroke is held.

  3. You edit pixels, pick colors, leave a note. Your edits never wait.

  4. You press resume. The held stroke lands and its reply says:

    ok changed=1 waited=12s edits=5 box=9,8-13,10 note=make the eyes bigger
  5. The model reads the canvas, keeps your edits, and continues.

Talking

Type into the box under the log at any time.

  • While the model is drawing, your words arrive on the reply to its next stroke.
  • When it has nothing to draw, it calls listen, which returns when you say something.

Notes queue up in order. The model answers in the same log with say.

The viewer

Toolspen B, eraser E, line L, rect R, circle O, filled rect U, filled circle P, fill F, pick I
Canvaszoom slider, fit, pan H or Space+drag, pixel grid G, undo Ctrl+Z, size 32/64/128
Palette32 DB32 slots; edit a slot and every pixel using it changes
Modelplay/pause, a speed slider that adds up to 3s between strokes
Saveto the server's gallery folder, or to a folder you pick (Chrome, Edge)
LanguageKorean or English, following the browser; a header button switches; ?lang=en forces one

What the model gets

  • get_canvas: the canvas as a PNG, whole or a region, plus a count of pixels that differ from their mirror image.
  • read_pixels: a region as digits, or as run-length rows when shorter.
  • draw_pixels, draw_line, draw_rect, draw_ellipse, fill_area, each with mirror to paint the reflection across the center line.
  • shade, highlight, outline, dither: finishing passes on what is already painted.
  • list_sprites, view_sprite, save_sprite, stamp: a gallery of saved grids in sprites/.
  • say, listen: the chat.
  • Drawing rules, sent on connect: plan proportions in numbers, silhouette first, check the picture after every step, one light source, ask before going on. See internal/bridge/rules.go.

Keeping it small

  • read_pixels compresses with run-length encoding when that comes out shorter: a run of one color becomes 4*16, and identical rows fold into y3-9:. The 128x128 frog goes from 16,512 characters to 3,760, under a quarter.
  • Lines, rectangles and ellipses take two corners or a center and two radii. A filled circle can cover hundreds of pixels and the model still sends four numbers.

How it fits together

pixelduet serve            owns the canvas  |- pixelduet web         browser <-> HTTP/SSE <-> line protocol  `- pixelduet bridge      MCP client <-> tools <-> line protocol

pixelduet alone runs serve and web in one process. The bridge does the same when no server answers.

The canvas is a grid of palette indices, one character per pixel (0 empty, 1-w colors), the same on the wire, in save files, and in what the model reads. The viewer is HTML, CSS and ES modules under internal/web/static/, embedded in the binary.

Tests

go test ./...node --test test/*.test.mjs

See CONTRIBUTING.md.

License

MIT. See LICENSE.

來源:README.md,提交 5611ba2

工具

18

clear_canvas

Wipe the whole canvas back to transparent. Never use it to erase what the person drew.

無需輸入參數。

dither

Checker two colors inside a strip: every other pixel of from becomes to. It makes a tone between two palette colors.

輸入參數h必填w必填x必填y必填to必填from必填

draw_ellipse

Paint an ellipse given its center and radii, outline or filled. Centers take halves, so cx 15.5 is the middle of a 32 wide canvas, and rx=ry=3 gives a 7 wide circle.

輸入參數cx必填cy必填rx必填ry必填color必填filledmirror

draw_line

Paint a straight line of one color from (x0,y0) to (x1,y1), one pixel thick with no gaps. mirror also paints the reflection across the vertical center.

輸入參數x0必填x1必填y0必填y1必填color必填mirror

draw_pixels

Paint one stroke of a single color, pixel by pixel. mirror also paints the reflection across the vertical center. If the canvas is paused the call waits, and its reply says what the person changed and said.

輸入參數color必填mirrorpoints必填

draw_rect

Paint a rectangle given two opposite corners, outline or filled.

輸入參數x0必填x1必填y0必填y1必填color必填filledmirror

fill_area

Flood fill from one pixel, replacing the connected patch of its color.

輸入參數x必填y必填color必填

get_canvas

The canvas as a picture, with its size, whether it is paused, and how many pixels differ from their mirror image. Name a region with x,y,w,h to fill the same picture with just that part: a 14 wide face comes back at 36 screen pixels per canvas pixel instead of 8, which is the only way to judge an eye.

輸入參數hwxy

highlight

Lighten everything painted on the side facing the light, one step up the palette (green to yellow, navy to blue, grey to silver). The opposite of shade; give it the same light.

輸入參數hwxylightwidth

list_sprites

List the gallery: pictures saved from earlier sessions because the person liked them.

無需輸入參數。

listen

Wait for the person to say something in the chat beside the canvas. It comes back empty if the wait window runs out.

無需輸入參數。

outline

Ring everything painted with a one pixel border, or take the ring off with off. color 1 is the classic black border; no color at all gives each shape the darker shade of its own fill. It outlines against transparency, so it runs before any background fill, and calling it twice rings the first ring.

輸入參數hwxyoffcolor

read_pixels

The canvas as digits, for exact coordinates: a picture cannot tell you whether an eye is in column 11 or 12, this can. Name a region with x,y,w,h; none means the whole canvas. A wide read comes back as run-length rows unless you ask otherwise.

輸入參數hwxycompact

save_sprite

Save the canvas, or a region of it, to the gallery under a name.

輸入參數hwxyname必填

say

Show one short line in the log panel beside the canvas. What the person types appears in the same place.

輸入參數text必填

shade

Darken everything painted on the side facing away from the light, one step down the palette (green to dark green, blue to navy, orange to brown). Boundaries between two different fills are left alone, so a belly stays a belly.

輸入參數hwxylightwidth

stamp

Place a saved sprite with its top-left corner at (x,y). Its empty pixels leave what is under them alone.

輸入參數x必填y必填name必填

view_sprite

One saved sprite, as a picture and as digits.

輸入參數name必填

版本歷史

1
  1. v1.0.0最新Nov 3, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分