nakkas

v0.5.0
io.github.arikusi/nakkas Checked 3 days ago Published 4 months ago

MCP server that turns AI into an SVG artist.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

render_svg Render SVG

Render animated SVG from JSON config. AI controls all design parameters. **Workflow:** render_svg returns a PNG preview of the result plus an artifact id — critique the image, revise the config, render again. Iterate at least 3 times before finalizing. The SVG text stays on the server: pass the artifact id to save (and to preview for a different width). **output options (response shape, not content):** {"svg":false,"preview":true,"previewWidth":800,"minify":false,"frames":4} — all optional. minify:true collapses whitespace in the stored/saved SVG. frames:N (2-10) replaces the static prev…

ParameterTypeDescription
canvas *object
elements *array
animationsarray
defsobject
outputobject

preview Preview SVG

Render SVG content to a PNG image so the AI can visually inspect the output. **When to use:** - render_svg already returns a preview image by default; call this tool to re-preview a stored artifact at a different width, or to preview SVG that did not come from render_svg - Stop iterating when the visual result matches the intent **Input:** pass EITHER artifact (id from render_svg, e.g. "art-1" — preferred, no SVG resend) OR content (raw SVG string). **Behavior:** - Returns a PNG image (base64) rendered from the SVG - Background is transparent by default - CSS animations and SMIL are rende…

ParameterTypeDescription
artifactstringArtifact id returned by render_svg (e.g. "art-1"). Preferred over content.
contentstringSVG string to render as PNG. Only needed when no artifact id exists.
formatstringContent format; auto-detected from content if omitted
widthnumberRender width in pixels; defaults to SVG's own declared width

save Save Content

Save rendered content to disk. Format-aware: can save as text or render to raster image. IMPORTANT: Use this only AFTER iterating on the design with render_svg's preview images. Do not save on the first render. Preview and refine your work first. **Input:** pass EITHER artifact (id from render_svg, e.g. "art-1" — preferred, no SVG resend) OR content (raw string). **Format detection:** - 'auto' (default): infers format from file extension. .svg saves as text, .png renders to image. - 'svg': saves content as a UTF-8 text file - 'png': renders the content (assumed SVG) to a PNG image, then s…

ParameterTypeDescription
outputPath *stringFile path to save to. The directory must already exist. If the file already exists, a numeric counter is appended before the extension: design.svg becomes design-1.svg, then design-2.svg, and so on. T…
artifactstringArtifact id returned by render_svg (e.g. "art-1"). Preferred over content.
contentstringRaw content to save. Only needed when the content did not come from render_svg.
formatstringOutput format. 'auto' infers from file extension (.svg saves as text, .png renders to image). 'svg' saves content as a UTF-8 text file. 'png' renders SVG content to a PNG image before saving.
widthnumberFor raster formats (png): render width in pixels. Defaults to the source content's own declared dimensions.