paint-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PAINT_MCP_ROOT | No | Where canvases and exports live; paths are confined to it. | ./canvases |
| PAINT_MCP_SERVE | No | Localhost live preview page port; off to disable. | off |
| PAINT_MCP_HISTORY | No | Undo steps per canvas. | 24 |
| PAINT_MCP_PREVIEW | No | Image reply mode: auto/thumb/full/none. | auto |
| PAINT_MCP_TOOLSET | No | Set to compact to expose only batch + utility tools. | full |
| PAINT_MCP_AUTOSAVE | No | Set to 1 to write the .paint file after every draw call. | off |
| PAINT_MCP_MAX_PIXELS | No | Canvas size guard. | 40000000 |
| PAINT_MCP_PREVIEW_SIZE | No | Longest edge of the returned thumbnail. | 640 |
| PAINT_MCP_ALLOW_ABSOLUTE | No | Set to 1 to let paths leave the paint root. | off |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| paint_canvasA | Create, list, inspect, open, save or close canvases. Actions: create {name, width, height, background} new canvas; background is a colour or null for transparent. Layers start as ["background"? , "layer N"]. info {name} size, layers, active index, undo depth, pixel statistics list {} every open canvas open {path} load a .paint / png / jpg / bmp file from the paint root save {name, path?} write the layered .paint document close {name} drop it from memory (files stay on disk) files {} what is on disk in the paint root history {name} undo/redo stack labels A canvas must be created (or opened) before any drawing tool can be used. |
| paint_opsA | Run many drawing operations in ONE call and get ONE picture back — the cheapest way to build a whole scene. ops is a list of {op: "", ...that op's parameters}. Available ops: rect, ellipse, line, polygon, path, brush, text, pixel_grid, pixels, fill, gradient, stamp, clear, filter, transform, layer. Every op also exists as its own tool (paint_rect, paint_brush, …) with the same fields. Optional per-item "layer" picks the layer; add layers first with paint_layer or inline via {op:"layer", action:"add"}. Example: ops: [ {op:"gradient", type:"linear", colors:["#0b1d3a","#3b6fb5"]}, {op:"ellipse", cx:600, cy:120, radius:46, fill:"#ffe27a"}, {op:"path", d:"M0 300 L120 220 L260 300 Z", fill:"#233"}, {op:"text", text:"NIGHT RUN", x:320, y:40, scale:6, color:"#fff"} ] Returns a summary line per operation plus one preview of the result. Undo rolls back the whole batch step by step. |
| paint_previewA | Return the current picture without changing anything — use it to check your work, compare against a reference, or re-read a canvas after a long session. Set layer:true to see only the active layer. |
| paint_inspectA | Ask exact questions about the picture: colour at points, statistics and bounding box of painted pixels, or a colour histogram of a region. Cheaper than a thumbnail when you only need numbers. |
| paint_undoA | Roll a canvas back or forward. Each drawing operation is one step (a paint_ops batch rolls back one step per op). Use action:'steps' to see the stack without changing anything. |
| paint_exportA | Write the canvas out: png, jpg, bmp, svg (rebuilt from recorded vector operations) or .paint (layered, re-openable). Returns the path under the paint root plus a preview of exactly what was written. svg keeps rect/ellipse/line/polygon/path/text/gradient operations; raster-only steps (brush, fill, pixels, filters, stamps) cannot be vectorised and are reported. Set embed_raster_fallback to also place the current PNG behind them. |
| paint_importA | Bring a picture in: |
| paint_helpA | In-server documentation, no round trip to GitHub. Topics: ops (every operation and its fields), colors (formats and the named palette), blend, filters, svg, limits, workflow (how to plan a drawing), examples (copy-paste batches). |
| paint_serveA | Start/stop a localhost page that shows every open canvas and repaints once a second, so a human can watch the drawing happen. Only 127.0.0.1 is bound. action:'status' reports the URL. |
| paint_rectB | Filled and/or outlined rectangle. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_ellipseA | Circle ( Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_lineB | One segment, with optional Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_polygonB | Any many-sided shape from [x,y] points — stars, arrows, speech bubbles. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_pathB | Draw SVG path Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_brushA | Mouse-drag feel: soft stamps along a polyline. Each point may carry a third value 0..1 as pressure. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_textA | Writes text with the built-in 5x7 pixel font (ASCII). Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_pixel_gridA | Draws a sprite where each character of Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_pixelsA | Exact pixel writes (no blending): pixels=[{x,y,color}, {x,y,width,height,color}, or [x,y,0xRRGGBB]]. Use for pixel art and small fixes. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_fillA | Paint bucket. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_gradientA | Linear or radial gradient over the canvas or an Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_stampA | Places another canvas or an image file onto this layer. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_clearA | Wipes a rectangle (whole layer when Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_filterA | Filters a layer: blur, sharpen, edge_detect, brightness, contrast, gamma, saturation, hue_rotate, grayscale, sepia, invert, threshold, posterize, pixelate, noise, vignette, chroma_shift, dither. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_transformA | scale | rotate | flip | translate on one layer; crop | resize | trim on the whole canvas. Bilinear resampling; Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
| paint_layerA | list | add | remove | select | move | merge | set (rename, opacity, blend, visible). Layers stack bottom→top; index 0 is the bottom one. Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Each tool targets a clearly distinct drawing operation or canvas/layer management function. paint_ops batches existing ops but is explicitly differentiated as a batch tool. Minor overlaps like paint_pixels vs paint_pixel_grid are resolved by descriptions.
All tools use the paint_ prefix with consistent snake_case verb/noun naming. No deviations or mixed conventions.
25 tools is heavy for a drawing server, exceeding the typical 3-15 range. While each drawing primitive is distinct, paint_ops already batches all operations, making many individual tools potentially redundant.
Covers canvas lifecycle, layers, drawing primitives, filters, transforms, undo, import/export, preview, and help. No obvious gaps for a 2D drawing domain.