clear_canvas
Wipe the whole canvas back to transparent. Never use it to erase what the person drew.
无需输入参数。

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.
pixelduet 的本地 MCP 服务;无需登录;STDIO;18 个工具。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
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.
or
or download a binary from the Releases page. Linux, macOS and Windows.
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.
Connect Claude Code once:
-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:
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.
The bridge is an MCP server over stdio. Codex CLI:
or in ~/.codex/config.toml:
On Windows use command = "cmd" and args = ["/c", "npx", "-y", "pixelduet", "bridge"].
Two things to check with a new client:
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 model draws one stroke per call and narrates in the log.
You press pause. The model's next stroke is held.
You edit pixels, pick colors, leave a note. Your edits never wait.
You press resume. The held stroke lands and its reply says:
The model reads the canvas, keeps your edits, and continues.
Type into the box under the log at any time.
listen, which returns when
you say something.Notes queue up in order. The model answers in the same log with say.
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.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.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.
See CONTRIBUTING.md.
MIT. See LICENSE.
来源:README.md,提交 5611ba2
Wipe the whole canvas back to transparent. Never use it to erase what the person drew.
无需输入参数。
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必填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必填filledmirrorPaint 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必填mirrorPaint 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必填Paint a rectangle given two opposite corners, outline or filled.
x0必填x1必填y0必填y1必填color必填filledmirrorFlood fill from one pixel, replacing the connected patch of its color.
x必填y必填color必填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.
hwxyLighten 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.
hwxylightwidthList the gallery: pictures saved from earlier sessions because the person liked them.
无需输入参数。
Wait for the person to say something in the chat beside the canvas. It comes back empty if the wait window runs out.
无需输入参数。
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.
hwxyoffcolorThe 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.
hwxycompactSave the canvas, or a region of it, to the gallery under a name.
hwxyname必填Show one short line in the log panel beside the canvas. What the person types appears in the same place.
text必填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.
hwxylightwidthPlace a saved sprite with its top-left corner at (x,y). Its empty pixels leave what is under them alone.
x必填y必填name必填One saved sprite, as a picture and as digits.
name必填已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
npx -y pixelduet versiongo install github.com/kimjungminn24/pixel-duet@latestnpx -y pixelduet you, in the browser Claude Code | | HTTP MCP (pixelduet bridge) | | `-----> canvas server <-----'claude mcp add -s user pixelduet -- npx -y pixelduet bridgeDraw a frog on pixelduet.codex mcp add pixelduet -- npx -y pixelduet bridge[mcp_servers.pixelduet]command = "npx"args = ["-y", "pixelduet", "bridge"]ok changed=1 waited=12s edits=5 box=9,8-13,10 note=make the eyes biggerpixelduet serve owns the canvas |- pixelduet web browser <-> HTTP/SSE <-> line protocol `- pixelduet bridge MCP client <-> tools <-> line protocolgo test ./...node --test test/*.test.mjs