MCP server that turns AI into an SVG artist.
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
One rendering engine. AI decides everything.
Officially listed on the MCP Registry , Glama , LobeHub , and PulseMCP .
Both drawn by an AI through nakkas, one JSON config each, iterated against its own PNG previews. Pure CSS animation, no JavaScript.
Nakkas is an MCP (Model Context Protocol) server that lets AI assistants like Claude create animated SVG graphics from a declarative JSON config: logos, icons, loading spinners, GitHub README banners, badges, and generative art. It renders CSS @keyframes and SMIL animations with no JavaScript, so the output works inside GitHub READMEs and anywhere an tag renders SVG. Every render comes back as a PNG preview plus a server-side artifact id, so the AI sees its own work immediately and iterates without the SVG text ever passing through its context window.
> *nakkaş* means painter/artist in Turkish (old).
Why
* **One tool, infinite designs.** render_svg takes a JSON config. AI fills in everything.
* **The AI sees its own work.** Every render returns a PNG preview, so the model critiques and revises instead of designing blind.
* **Token-cheap iteration.** The SVG stays on the server as an artifact; preview and save address it by id, so revision loops don't pay for the SVG text.
* **Pure declarative SVG.** CSS @keyframes + SMIL animations, no JavaScript. Survives GitHub's camo proxy.
* **Zero external deps.** No cloud API, no API keys. Runs locally.
Install
Claude Desktop
Add to your config file:
* macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
* Linux: ~/.config/Claude/claude_desktop_config.json
* Windows: %APPDATA%\Claude\claude_desktop_config.json
Claude Code (CLI)
Cursor / Zed / Other MCP clients
Local Development
Quick Start
Ask your AI (with Nakkas connected):
> "Make an animated SVG: dark terminal frame (800×200), glowing cyan text 'NAKKAS', neon glow filter, fade-in on load."
> "Create a loading spinner: a circle with a draw-on stroke animation that loops every 1.5 seconds."
> "Data visualization: animated bar chart, 5 bars, each fading in with a staggered delay, gradient fills."
> "Profile badge (400×120): blue-to-purple gradient, white username text, drop shadow, subtle pulse animation."
Tools
Nakkas provides three tools:
| Tool | Purpose |
|---|---|
| render_svg | Takes SVGConfig JSON, returns a PNG preview + artifact id (+ design analysis warnings) |
| preview | Re-renders a stored artifact (or raw SVG) to PNG at any width |
| save | Saves a stored artifact (or raw content) to disk as SVG (text) or PNG (raster) |
The intended workflow: render → look at the returned preview → revise the config → render again → save. The rendered SVG stays on the server as an **artifact**: render_svg answers with the preview image and an id like art-1, and preview/save accept that id directly. The SVG text never has to travel back through the model's context window, which cuts the token cost of an iteration loop to a fraction of pasting SVG around. Artifacts live for the server process lifetime (capped at 32, oldest evicted).
The save Tool
Pass either artifact (id from render_svg, preferred) or content (raw string). Formats: auto (infers from extension), svg (text file), png (renders to raster first). If the file exists, a numeric counter is appended to prevent overwriting. The actual saved path is returned.
The render_svg Tool
**Input:** SVGConfig JSON object
**Output:** PNG preview image + a summary naming the artifact id, plus optional design analysis notes
The response shape is controlled by an optional output block in the config:
* svg: true includes the full SVG text in the response (off by default; the artifact id covers preview and save)
* preview: false skips the PNG image
* previewWidth scales the preview
* minify: true collapses whitespace in the stored and saved SVG
* frames: N (2 to 10) replaces the static preview with one filmstrip image sampling the CSS animations at N points in time — the way to verify motion, since a single preview only shows the starting state