drawing-mcp
A Procreate-inspired paint studio for AI agents over MCP with 25 brushes, RGBA layers, pressure, symmetry, live browser preview, layered SVG export, animation and global typography (zero dependencies).
Dokumentasi
๐จ drawing-mcp
Give your agents a canvas and a brush.
Nine 1024ร1024 pictures, each painted stroke by stroke by an agent through drawing-mcp ยท see the prompts
Layers, pressure, a palette and undo โ the same tools people draw with.
Watch it paint stroke by stroke, then export PNG, SVG, stickers or video.
Works with Claude ยท Codex ยท Antigravity ยท Grok ยท Muse ยท OpenClaw ยท Hermes โ and any MCP client
Quick Start ยท Showcase ยท Why drawing-mcp? ยท How It Works ยท Brushes ยท Tools ยท Benchmark ยท License
Why drawing-mcp?
When people draw, they don't get the picture in one go. They sketch, block in color, add detail on a new layer, step back, and fix what looks off. drawing-mcp started from a simple idea: let an agent use a drawing app the way a person does. Every brush stroke is a tool call you can watch, point at, and undo โ so the finished piece comes with editable layers and a replayable history, not just pixels.
| ๐๏ธ Real Studio Brushes & Pressure | 25 painterly brushes (ink, oil, watercolor, charcoal, neon, smudgeโฆ) with [x, y, pressure] curves and symmetry guides. Shapes are painted by hand, not stamped. |
| ๐ Live Preview & Visual Feedback | Every stroke streams live to a browser canvas over SSE. Click a spot or drag a box to leave feedback; the agent fixes it and returns before/after crops. |
| ๐ Pure Vector SVG & Global Text | Export layered, zero-raster scalable SVGs (save_svg, live /canvas.svg) and render typography in any script โ Latin, CJK, Arabic/RTL, Hindi, Thai, Cyrillic, Greek & Emoji. |
| โจ Lighting, Textures & 3D Pose Guides | Paint luminous additive glows, beams, halos & lens flares (draw_light), FBM organic textures (draw_texture), seeded petals/snow/rain/bokeh/branches and anime cumulus clouds (draw_scatter), and 3D-to-2D articulated character mannequin guides (set_pose_guide). |
| ๐ฌ Frame Animation & 2K Video | Build multi-layer animations with tween_frames (punchy easings, motion trails, camera shake), per-frame durationMs holds, onion skinning, and allFrames effects. Export transparent WebP/APNG stickers, looping GIFs, or 2K H.264 MP4 shorts. |
| โก Zero Runtime Dependencies | Plain ES modules on Node โฅ 18 with pure-JS PNG, APNG, GIF & SVG encoders. Only optional ffmpeg (MP4) and img2webp (WebP). |
| ๐ Works With Any MCP Client | Plug into Claude, Codex, Antigravity, Grok, Muse, OpenClaw, Hermes, Cursor, or any other Model Context Protocol host. |
Quick start
git clone https://github.com/gogoymh/drawing-mcp.git
Claude Code ยท Codex
claude mcp add drawing -- node /path/to/drawing-mcp/src/server.js
codex mcp add drawing -- node /path/to/drawing-mcp/src/server.js
Antigravity ยท Grok ยท Muse ยท OpenClaw ยท Hermes ยท any MCP client
Add the server to the agent's MCP config:
{
"mcpServers": {
"drawing": {
"command": "node",
"args": ["/path/to/drawing-mcp/src/server.js"]
}
}
}
[!TIP] Try your first prompt: "Paint a cozy red fox asleep in fresh snow under a pine tree at dusk, and save it as both PNG and SVG."
The built-in
drawprompt guides the agent through layers, lighting, self-critique withview_canvas, and export.
Showcase
Every artwork below was painted directly by an agent through drawing-mcp tool calls โ no scripts, no image-gen models, no post-processing. Unless a model is named, the painter was Claude Fable 5.2 in Claude Code.
1. Scalable Vector SVG & Global Unicode Typography
[!TIP] Prompts used
- Native vector SVG (
save_svg): "Paint a symmetrical glowing golden luna moth hovering above a blooming pink lotus flower under a crescent moon and stars, Art Nouveau botanical style โ export as pure layered vector SVG."- Global typography (
draw_text): "Design a gallery-quality Global Art Studio poster with a painterly aurora backdrop and crisp multilingual typography across Latin diacritics, Korean, Japanese, Chinese, Arabic (RTL), Hindi, Thai, Cyrillic, Greek & Emoji."
Native Vector SVG (save_svg) | Global Unicode Typography (draw_text) |
|---|---|
![]() 768ร768 ยท 17 layers ยท 245 vector paths ยท 36 gradients ยท 0 raster vector-studio.svg ยท png | ![]() 960ร540 ยท 11 layers ยท live <text> in Latin, CJK, Arabic RTL, Hindi, Thai, Cyrillic, Greek & Emoji ยท 0 rasterglobal-typography.svg ยท png |
2. Animated Stickers (360ร360 Transparent WebP & APNG)
[!TIP] Prompts used
01-cheer: "Paint a fluffy, expressive hand-drawn watercolor & ink Red Fox cub cheering joyfully โ organic variable-pressure brush strokes, seamless 24-frame loop at 12 fps with a crisp white sticker halo."02-heart: "Paint a fluffy, expressive hand-drawn watercolor & ink Red Fox cub hugging a hand-painted glowing heart โ organic brush strokes, seamless 24-frame loop with a crisp white sticker halo."03-sleepy: "Paint a fluffy hand-drawn watercolor & ink Red Fox cub curled up asleep on a cozy leaf cushion with a breathing sleep bubble and floating Zzz โ seamless 24-frame loop with a white sticker halo."
webp ยท apng | webp ยท apng | webp ยท apng |
360ร360 ยท transparent RGBA ยท WebP (โค 650 KB) & APNG ยท 24 frames ยท 12 fps ยท 2 s ยท ready for Telegram, LINE, Discord, WhatsApp & KakaoTalk
3. Animated Short (2K Vertical Video ยท 9:16 MP4)
[!TIP] Prompt used "Paint a 2K vertical looping animation: glowing paper sky lanterns and fireflies drifting upward over a moonlit mountain lake with a hand-painted wooden boat gently rocking on shimmering water โ painterly night illustration, 120 frames at 24 fps, seamless 5-second loop."
Watch full 2K MP4 (reel.mp4) ยท 1440ร2560 (9:16) ยท H.264 ยท 24 fps ยท 120 frames ยท 5 s ยท ready for YouTube Shorts, Instagram Reels & TikTok
4. Anime Illustration Timelapse (one prompt, two models)
[!TIP] Same prompt, two models. Both agents got only "Try drawing something in Japanese anime style." and painted through
drawing-mcp; every step was recorded withDRAWING_MCP_RECORD.
| Gemini 4 Neon ยท Antigravity | Claude Fable 5.2 ยท Claude Code |
|---|---|
![]() | ![]() |
| 768ร1024 ยท 351 steps ยท 15 tool calls ยท gif ยท png | 1280ร720 ยท 212 steps ยท 29 tool calls ยท gif ยท png |
5. 256ร256 Quick Gallery

Rebuild this gallery with node bench/run.js --agent claude --judge claude then node bench/examples.js bench/results/<run> --gif-only; the hero grid takes --queries bench/queries-hard.json --size 1024 and --out examples/hard --block hard --cell 384 --clips --hero.
How it works
flowchart LR
U["You (Prompt)"] --> A["AI Agent"]
A -- "MCP tools (stroke, layers, symmetry, tween)" --> S["drawing-mcp Studio"]
S -- "Live SSE updates + /canvas.svg" --> P["Browser Live Preview"]
P -- "Click / drag box comments" --> F["get_feedback / resolve_feedback"]
F --> A
S -- "PNG ยท SVG ยท WebP ยท APNG ยท GIF ยท 2K MP4" --> O["Finished Artwork"]
- Set the stage.
new_canvasnever stops to ask: leave out the size and it opens a 512ร512 canvas. - Watch live.
new_canvasreturns a local browser URL (http://127.0.0.1:<port>/) showing every stroke over SSE, the layer stack, active brush, and live/canvas.svg. - Paint in layers. Background, rough forms, details, and lighting โ with 25 brushes, pressure curves, symmetry & 3D pose guides, additive lighting, procedural textures, seeded scatter, alpha lock, clipping masks, and 17 blend modes.
- Critique & refine.
view_canvasreturns a PNG (with optionalcrop,grid,guides,onionSkin, orsheet) so the agent inspects its own work and refines witherase,adjust_layer,undo/redo. It never paints blind: after every 8 painting steps without a full look, and on export of unseen changes, the whole picture is attached to the reply at full resolution. - Point & collaborate. Click a spot or drag a box on the live preview to leave a comment. The agent reads it with
get_feedback, fixes it, and resolves it withresolve_feedbackโ complete with before/after crops and a Reopen flow. - Export anywhere.
save_canvas(PNG),save_svg(layered scalable SVG),save_animation(WebP / APNG / GIF),save_video(H.264 MP4), orsave_timelapse(GIF).
Live preview & environment variables
| Variable | Effect |
|---|---|
DRAWING_MCP_PREVIEW=0 | Disable the local live preview server |
DRAWING_MCP_AUTO_VIEW=8 | Painting steps between forced full-resolution views (0 turns it off) |
DRAWING_MCP_PREVIEW_PORT=4777 | Pin the preview port (default: automatic free port) |
DRAWING_MCP_RECORD=/some/dir | Record every drawing step to /some/dir/frames/ as numbered PNGs |
DRAWING_MCP_FFMPEG=/path/to/ffmpeg | Custom ffmpeg binary for save_video (default: ffmpeg on PATH) |
DRAWING_MCP_IMG2WEBP=/path/to/img2webp | Custom img2webp binary for .webp in save_animation (default: img2webp on PATH) |
DRAWING_MCP_RSVG=/path/to/rsvg-convert | Optional rsvg-convert (Pango/HarfBuzz) path for Unicode draw_text on Linux |
DRAWING_MCP_TEXT_ENGINE=vector | Force pure-JS fallback vector text instead of OS native text shaping |
Brushes
25 expressive brushes across five families โ all supporting inline size, opacity, hardness, taper, pressureOpacity, nib angle, and per-point [x, y, pressure] sensitivity.
Lines
| Sample | Brush | Feel |
|---|---|---|
![]() | pencil | Hard 1px line without anti-aliasing. Outlines and sketches. |
pixel | Square, aliased tip that fills whole pixels. Pixel art. | |
![]() | pen | Crisp anti-aliased ink line. |
![]() | ink | Ink brush that swells in the middle and thins to points at both ends. Hair, leaves, expressive lines. |
![]() | calligraphy | Flat nib at an angle: thick and thin strokes by direction. Lettering, elegant lines. |
![]() | dashed | Dashed line. Seams, paths, cut lines, motion. |
![]() | dotted | Row of round dots. Stitches, bead strings, trails. |
Paint
| Sample | Brush | Feel |
|---|---|---|
![]() | marker | Wide translucent stroke. Overlap within one stroke does not darken. |
![]() | highlighter | Chisel tip, very translucent. Glazes and color washes. |
![]() | brush | Soft-edged paint brush. |
![]() | oil | Thick paint with visible bristle streaks. Fur, wood, grass, painterly texture. |
![]() | dry_brush | Bristles that run out of paint and break up toward the end. Bark, rough stone, weathered surfaces. |
![]() | watercolor | Soft wash with a darker drying rim. Layer it for depth. |
![]() | crayon | Waxy stroke that skips over paper grain. |
![]() | charcoal | Dark, smudgy, heavily textured. Shading and drama. |
Effects
| Sample | Brush | Feel |
|---|---|---|
![]() | airbrush | Speckled soft spray for shading and gradients. |
![]() | splatter | Paint droplets flung around the path. Splashes, dirt, rain, texture. |
![]() | sparkle | Four-pointed stars along the path. Glints, stars, magic. |
![]() | neon | Bright white-hot core with a colored glow around it. Lights, signs, lasers. Best on dark backgrounds. |
![]() | rainbow | Six color bands side by side, red to purple. Ignores the selected color. |
Blend
| Sample | Brush | Feel |
|---|---|---|
![]() | smudge | Drags the paint already on the layer along the stroke. Soften edges, blend colors, smoke. |
![]() | blur | Blurs the paint under the stroke. Soft shadows, depth of field, smooth gradients. |
Erasers
| Sample | Brush | Feel |
|---|---|---|
![]() | eraser | Removes paint: transparent on upper layers, the background color on the background layer. With fill it clears an area. |
![]() | soft_eraser | Soft, partial eraser that fades paint out. Lighten or feather edges. |
pixel_eraser | Square, aliased eraser that clears whole pixels. Pixel art cleanup. |
Colors: Built-in palette names (red, sky, skin, โฆ), custom swatches saved via manage_palette / pick_color, #rgb, #rrggbb, #rrggbbaa, rgba(r, g, b, a), hsl(h, s%, l%) / hsla(h, s%, l%, a), or [r, g, b, a].
Tools
49 focused MCP tools covering the complete digital painting, lighting, procedural atmosphere, animation, collaboration, and export workflow.
| Category | Tools |
|---|---|
| Canvas & Animation | new_canvas ยท load_image ยท transform_canvas ยท new_animation ยท select_frame ยท next_frame ยท tween_frames ยท batch |
| Brushes, Lighting, Atmosphere & Guides | stroke ยท draw_gradient ยท draw_light ยท draw_texture ยท draw_scatter ยท draw_text ยท fill ยท erase ยท select_brush ยท select_color ยท pick_color ยท get_palette ยท manage_palette ยท set_symmetry ยท set_pose_guide ยท set_selection |
| Layers & Adjustments | add_layer ยท set_layer ยท select_layer ยท list_layers ยท get_layer ยท move_layer ยท duplicate_layer ยท copy_layer ยท transform_layer ยท merge_layers ยท delete_layer ยท layer_effect ยท adjust_layer ยท get_pixel ยท undo ยท redo |
| Inspect & Feedback | view_canvas ยท get_feedback ยท resolve_feedback |
| Export | save_canvas ยท save_svg ยท save_frames ยท save_animation ยท save_video ยท save_timelapse |
๐ Full 49-tool reference
| Tool | What it does |
|---|---|
new_canvas / load_image | Create an empty RGBA canvas (defaults to 512ร512) / load an existing PNG as a canvas or layer |
transform_canvas | Canvas actions: flip horizontal/vertical, rotate 90/180/270ยฐ, crop, or resize (scale artwork or canvas bounds) |
new_animation | Frame-by-frame mode: e.g. 24 or 30 frames at 12โ30 fps, each frame its own layered canvas |
select_frame / next_frame | Switch to a frame (copyFrom, clearLayers, per-frame durationMs hold timing) / advance to the next frame carrying unchanged layers forward |
tween_frames | Interpolate a layer across startFrame..endFrame with expressive easings (ease_out_quart, ease_out_expo, ease_out_back, ease_out_bounce, bump, ping_pong, sine), optional fading motion trail afterimages, and deterministic camera shake (seamless, wrap) |
batch | Run many drawing, layer or frame steps in one call to cut round-trips |
get_palette / manage_palette | Inspect brushes/state; save custom named swatches, mix colors, generate painter color harmonies (shading, hue_shifted, complementary, โฆ), and load curated shading & lighting color ramps (fire, sunset, ice, sakura, twilight, skin_warm, โฆ) |
select_brush / select_color / pick_color | Choose default brush/color, or eyedropper-sample (x, y) (with optional radius average) from the canvas or a layer |
set_symmetry | Symmetry guide (vertical, horizontal, quadrant, radial + kaleidoscope mirror) |
set_pose_guide | 3D-to-2D articulated character mannequin & proportion guide (realistic, anime, chibi, 10 poses, yaw, lean, crouch, 2-bone IK hand/foot targets); returns projected 2D joint coordinates, overlays in view_canvas({ guides: true }), or stamps onto a draft layer |
set_selection | Selection mask (shape, fromLayer, magicWand, feather, add/subtract/intersect, invert, clear) |
stroke | Drag a brush through [x, y] or pressure-sensitive [x, y, pressure] points (smooth splines with sharp corners where a point is given twice, closed loops, quadratic/cubic Beziers, multi-stroke batches), or once around a shape (ellipse, rectangle, rounded rectangle, arc); outline inks the stroke and join merges it into paint already there |
draw_gradient | Multi-stop smooth linear or radial gradient, or one flat color, across the canvas or clipped inside a shape (smooth polygons keep a sharp corner where a vertex is given twice) |
draw_light | Luminous painterly lighting (pool, beam, ring, sparkle, flare) with add/screen/normal blending, symmetry, and selection support |
draw_texture | Deterministic FBM procedural organic textures (clouds, watercolor, grain, wood, marble, foliage, ripples) with optional tileable seamless wrapping and shape clipping |
draw_scatter | Deterministic seeded organic scatter & branching (petals, leaves, snow, rain, sparks, bubbles, stars, bokeh, dust, branch lightning/twigs/cracks, cloud one-call anime cumulus with lit crown and shaded base, as a dome or filling the shape outline you give it) |
draw_text | Global Unicode typography โ renders any language & script (Latin, CJK, Arabic/RTL, Indic, Thai, Cyrillic, Greek, Emoji) with sans, round, bold, serif, mono, pixel, custom fontFamily, alignment, wrapping, rotation, and sticker outlineColor |
fill | Paint bucket with tolerance, referenceLayer / sampleAll lineart coloring, expand anti-alias gap fill, closeGaps for outlines whose lines do not quite meet, and a warning when the paint spills to the canvas edges |
erase | Erase a path (smooth/curve/pressure), a shape, or a whole layer in one call; the selected brush and color stay |
layer_effect / adjust_layer | Euclidean sticker outline, drop shadow, and outer glow (allFrames: true, replace to redraw a line layer after the part changed); adjustments (hue, saturation, lightness, brightness, contrast, temperature, Gaussian blur, noise, grayscale, invert, posterize, smooth gradientMap, allFrames) |
get_pixel | Read one RGBA pixel of the picture or of one layer |
add_layer / set_layer | Add or update layers: visibility, opacity, rename, 17 blendModes (normal, multiply, screen, overlay, add, darken, lighten, color_dodge, color_burn, soft_light, hard_light, difference, exclusion, hue, saturation, color, luminosity), alphaLock, clipToBelow |
move_layer / duplicate_layer | Reorder layers (up, down, top, bottom, above, below, index) / duplicate a layer with pixels, vector ops, and flags |
select_layer / list_layers / get_layer | Pick active layer / list stack / inspect held strokes and bounds |
copy_layer / transform_layer | Copy layers across frames / shift, scale, flipX/flipY, rotate or edge-wrap held strokes without blur |
merge_layers / delete_layer | Merge down (all: true to flatten) / drop a layer |
undo / redo | Step backward or forward (up to 30 levels, layer & canvas actions included) |
view_canvas | View picture or one layer as PNG, with crop zoom, coordinate grid, symmetry/selection/pose guides, animation onionSkin, multi-frame sheet, or side-by-side compare with a reference (same crop and grid on both halves; referenceOnly shows just the reference) |
save_canvas / save_svg | Write flattened PNG (or .svg automatically) / export scalable layered vector SVG (`mode: auto |
save_frames / save_animation | Write numbered RGBA PNGs / animated WebP (.webp), looping APNG (.png), or animated GIF (.gif) |
save_video | Write the animation as an H.264 MP4 for Shorts, Reels and TikTok (loops, scale, background, optional audio muxing; needs ffmpeg) |
save_timelapse | Write the whole process, blank canvas to last stroke, as an animated GIF |
get_feedback | Read the user's preview comments with their coordinates, plus the canvas with each spot outlined |
resolve_feedback | Mark comments handled, with an optional reply; the page shows a before/after crop and a Reopen button that asks for a reason |
Benchmark: watch an agent paint
Compare AI models head to head on the same drawing prompts โ every stroke is recorded into per-query timelapse GIFs, stats, and a side-by-side HTML report.
node bench/run.js --agent claude --query "a red apple on a wooden table"
node bench/run.js --agent codex --queries bench/queries.json --parallel 4
node bench/run.js --agent "gemini --mcp-config {mcp_config} -p {prompt}" # any CLI
node bench/run.js --agent claude --agent codex --judge claude # score and compare
node bench/run.js --rejudge bench/results/<run> --judge codex # rescore, no redraw
- Each query produces
timelapse.gif,final.png,calls.jsonl(every tool call), andstats.json(time, tool calls, steps, % painted, colors, errors, cost), aggregated intoindex.html. --agent scriptedpaints a deterministic scene without an LLM to validate the pipeline.--judge claude|codex|"cmd {image} {query}"runs a vision judge (1โ10 + one-line reason) intoresults.jsonandindex.html;--rejudgerescores existingfinal.pngoutputs without redrawing and computes inter-judge agreement.
Develop & Contributing
npm test
Logs go to stderr; stdout carries only JSON-RPC. See CONTRIBUTING.md for architecture notes and PR guidelines.
License
Released under the MIT License ยฉ 2026 gogoymh.



























