shotluma-design-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SHOTLUMA_LOG_LEVEL | No | Log level written to stderr: debug, info, warn or error. | info |
| SHOTLUMA_ALLOWED_DIRS | No | Readable/writable roots (path-delimited). Equivalent to the repeatable --allow DIR flag. Defaults to the working directory. | |
| SHOTLUMA_BROWSER_PATH | No | Path to a Chromium/Chrome/Edge executable. Equivalent to the --browser EXE flag. Defaults to auto-detection. | |
| SHOTLUMA_MAX_OPERATIONS | No | Maximum number of operations per batch. | 500 |
| SHOTLUMA_MAX_ASSET_BYTES | No | Maximum asset size in bytes. | 50 MB |
| SHOTLUMA_MAX_CANVAS_SIDE | No | Maximum canvas side length in pixels. | 8192 |
| SHOTLUMA_MAX_ASSET_PIXELS | No | Maximum asset pixel count. | 100 MP |
| SHOTLUMA_PREVIEW_MAX_SIDE | No | Size of returned preview images. | 1024 |
| SHOTLUMA_MAX_CANVAS_PIXELS | No | Maximum canvas pixel count. | 40000000 |
| SHOTLUMA_RENDER_TIMEOUT_MS | No | Per-render timeout in milliseconds. | 60000 |
| SHOTLUMA_MAX_LAYERS_PER_PAGE | No | Maximum number of layers per page. | 500 |
| SHOTLUMA_DISABLE_IMAGE_RETURN | No | Set to 1 to never return image content. Equivalent to the --no-image-return flag. Defaults to off. | |
| SHOTLUMA_MAX_PAGES_PER_EXPORT | No | Maximum number of pages per export. | 50 |
| SHOTLUMA_MAX_ASSETS_PER_IMPORT | No | Maximum number of assets per import. | 100 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
shotluma-design-mcp is a local design engine. You make every design decision (concept, palette, typography, copy, composition); the server stores the editable project, renders it deterministically in a local headless browser, measures it, validates it and exports exact-size PNG/ZIP.
Workflow: create_project or open_project → import_assets → (optional) list_layout_styles / generate_layout → apply_operations → render_preview → inspect_design / validate_design → fix with apply_operations → export_design.
Hard rules enforced by the server (not optional):
Screenshots and logos are protected by default: original bytes only, uniform scaling, upright, fully on-canvas, nothing painted over them, fully opaque. Never ask the server to stretch, crop, recolor, redraw or "fix" them.
Rotation, perspective, crop, occlusion and larger corner rounding of a protected asset need the user's explicit authorization, recorded with apply_operations → set_asset_protection (grant + quoted authorization).
All coordinates are canvas pixels of the page. Layer paint order = array order (later = on top).
render_preview writes PNGs to the project folder and returns measurements; it returns image content only when asked, and a full (unmasked) image only with the user's explicit consent, because the client may forward images to a remote model.
Read the resource shotluma://guidelines (or call list_layout_styles) for the design guide.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_projectB | Create a local design project folder (design.json + assets/ + previews/ + exports/). Give one canvas size (width/height) or several pages. An optional brand configuration (object or path to brand.json) applies to this project only. |
| open_projectA | Open an existing project: validates design.json against the schema, checks every asset file exists and matches its recorded SHA-256, and returns pages, assets and brand. |
| import_assetsA | Copy local files byte-for-byte into the project (no re-encoding) and record id, size, aspect ratio, MIME type and SHA-256. Screenshots and logos are content-protected by default. Image bytes are never returned. Supports PNG, JPEG, WebP, GIF, SVG (scripts/external references rejected) and TTF/OTF/WOFF/WOFF2 fonts (purpose "font"). |
| list_layout_stylesA | List the optional composition starting points, device frames and composition notes. They are suggestions, not templates: apply_operations can build any layout. |
| generate_layoutA | Compute one or more editable layout variants (operations for apply_operations) for a canvas and a set of screenshots. Pure geometry: no remote model, no pixel generation. Placements keep protected screenshots fully visible, upright and unobstructed unless the user granted otherwise. Optionally apply a variant directly to a page. |
| apply_operationsA | Apply a batch of structured operations atomically: everything is validated (schema, references, content protection) before anything is saved; on any error nothing changes. No scripts or code are executed. apply_operations referenceAll coordinates are canvas pixels. Omitted ids are generated. Patches deep-merge (objects merge, arrays replace, null deletes). Pages: add_page {page:{id?,name?,width,height,background?},index?} · duplicate_page {pageId,newPageId?,name?} · update_page {pageId,name?,width?,height?,background?} · remove_page {pageId} · move_page {pageId,index} · set_background {pageId,background} Layers: add_layer {pageId,layer,parentId?,index?} · update_layer {pageId,layerId,patch} · remove_layer {pageId,layerId} · reorder_layer {pageId,layerId,position:"front"|"back"|"forward"|"backward"|index} · group_layers {pageId,layerIds,groupId?,name?} · ungroup {pageId,groupId} Assets/brand: replace_asset {fromAssetId,toAssetId,pageIds?} · set_asset_protection {assetId,enabled?,grant?:{effect,authorization},revoke?,authorization?} · set_brand {brand|null} · rename_project {name} Background: {type:"solid",color} | {type:"gradient",gradient:{type:"linear",angle,stops:[{color,at}]}|{type:"radial",cx,cy,stops}} | {type:"image",assetId,fit:"cover"|"contain",position:{x,y},overlay?,overlayOpacity?} | {type:"none"} (transparent). Any of them may add pattern:{kind:"dots"|"grid"|"diagonal"|"waves",color,size}. Common layer fields: id?, name?, x, y, width, rotation=0, opacity=1, visible=true, shadow?:{x,y,blur,spread,color}.
|
| inspect_designA | Read the current design: canvas, layer tree in paint order, real (browser-measured) bounds, text line counts and overflow, font usage, overlaps, screenshot display scale and asset status, plus validation issues. Measures with a layout render that never includes protected pixels. |
| render_previewA | Render pages with the same local renderer used for export, save the PNGs to the project previews/ folder and return their paths, measurements, font report and validation issues. By default NO image content is returned. returnImage "layout" returns a preview with protected screenshots/logos replaced by placeholders. returnImage "full" returns the complete image and requires userConsent quoting the user, because a local MCP server does not mean the client or its model is local: returned images may be uploaded to a remote model. |
| validate_designA | Quality gate: schema and references, asset existence and SHA-256 integrity, protected content (stretch, crop, rotation, occlusion, opacity — including a pixel comparison against an isolated reference render), text clipping/overflow/overlap, font availability, empty zones and contrast. Issues are graded error (blocks export) / warning / suggestion / info. Intentional decorative bleed is not an error. |
| export_designA | Export pages as exact-size PNGs, a ZIP of them, and/or a re-editable project copy. Runs the integrity gate (asset hashes, protected-pixel fidelity) first and refuses on errors. Writes to a new timestamped folder under exports/ unless outputDir is given; never overwrites files unless overwrite is true (only when the user asked). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| design_workflow | Guide an assistant through a complete design → preview → fix → export loop. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guidelines | Composition, copy, typography, series consistency and protection rules. |
| operations | Every apply_operations op and layer field. |
TDQS
Scored across 10 tools
The mutation/creation tools (create_project, open_project, import_assets, export_design, apply_operations) and the generation tools (list_layout_styles, generate_layout) have clearly distinct roles. The main soft spot is the read-side trio inspect_design, render_preview and validate_design, which all report measurements and validation issues, so an agent must read descriptions carefully to pick the right one. The descriptions do clarify the split (structure read vs raster output vs gating), so it is manageable but not perfectly crisp.
Every tool follows the same verb_noun snake_case pattern: list_layout_styles, generate_layout, apply_operations, inspect_design, render_preview, validate_design, create_project, open_project, import_assets, export_design. No camelCase or naming-style deviations anywhere in the surface.
Ten tools is well within the sweet spot for a design-authoring server. Deliberately funneling all mutations through a single atomic apply_operations keeps the surface small while the remaining tools each own a distinct lifecycle stage (create/open/import/layout/edit/inspect/validate/preview/export). No tool looks redundant.
Coverage is strong end to end: project creation and opening, asset import, generation of layouts, full layered mutation via apply_operations (including page/layer add, update, remove, reorder, grouping, brand, asset protection), inspection, validation, preview and export. Minor gaps remain: there is no way to list or delete existing projects, and no targeted single-layer query, so an agent must call the broader inspect_design to read a small piece of the design.