imagetosvg-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@imagetosvg-mcp Convert this logo.png to SVG and optimize it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
imagetosvg-mcp
A local Model Context Protocol server that gives AI agents full control over images — vectorize a raster image, import a vector file (PDF/AI/EPS), then inspect, edit, render, and optimize the SVG. No API keys, no cloud; everything runs locally.
The idea: an SVG is just text, and the agent is already the intelligence. So this server only does what an agent can't do on its own — turn pixels into editable paths and render SVG back to a picture for visual verification — plus a set of structured edit operations for the parts of SVG editing that are tedious by hand. The agent does the rest with its own file tools.
Why
Agents normally treat an image as opaque pixels they can't change. Convert it to SVG and the agent can recolor a logo, delete a layer, resize, restyle, or simplify it — then render the result and see whether the edit worked, all deterministically.
Related MCP server: inkscape-mcp
Tools
Tool | Purpose |
| Raster → SVG (hybrid: clean trace for simple graphics, layered color trace for complex ones) |
| PDF / AI / EPS → SVG (paths preserved, no tracing) |
| List addressable layers (id, tag, fill, stroke, bbox) without parsing path strings |
| Structured edits by layer id (recolor, remove, isolate, transform, resize, set attribute) |
| Rasterize SVG → PNG so the agent can verify visually |
| Clean up with svgo while preserving layer ids and viewBox |
Supported raster inputs: PNG, JPG, WebP, GIF, BMP, TIFF, AVIF. Supported vector inputs: PDF, PDF-compatible AI, and EPS (EPS requires Ghostscript).
Install
git clone https://github.com/ujo78/imagetosvg-mcp.git
cd imagetosvg-mcp
npm install # builds automatically (prepare hook)Requires Node.js >= 20. All native dependencies ship prebuilt binaries — no system toolchain required.
Connect it to an agent
Claude Code
User scope (available in every project):
claude mcp add -s user imagetosvg -- node "/absolute/path/to/imagetosvg-mcp/dist/index.js"Or per-project, commit a .mcp.json at the repo root:
{
"mcpServers": {
"imagetosvg": {
"command": "node",
"args": ["/absolute/path/to/imagetosvg-mcp/dist/index.js"]
}
}
}Claude Desktop / Cursor / Windsurf
Add the same block to the client's MCP config (claude_desktop_config.json for
Claude Desktop; the MCP settings panel for Cursor/Windsurf). Use an absolute path
to dist/index.js.
On Windows, use forward slashes in the path, e.g.
C:/Users/you/imagetosvg-mcp/dist/index.js.
The workflow
The bundled Claude skill teaches agents this loop:
Look at the source image.
Convert (
convert_image_to_svg) or import (import_vector); check the returned PNG preview.Compare preview to the original; re-convert with a different
mode/max_colorsif needed.Inspect (
inspect_svg) to learn the layers.Edit with
edit_svg(structured) or the agent's own file tools (freeform).Verify with
render_svgand look. Iterate.Finalize with
optimize_svgand use the.svgin place of the image.
edit_svg operations
setFill{id,color}, setStroke{id,color}, removeNode{id}, isolateNode{id},
transform{id,translate?,scale?,rotate?}, setDimensions{width?,height?},
setAttribute{id,name,value}. Layer ids (layer-N) are assigned in document
order and survive optimize_svg.
Optional: EPS support
EPS import requires Ghostscript on PATH
(gswin64c on Windows). PDF and AI work without it; if Ghostscript is missing,
import_vector returns a clear error for EPS only.
Development
npm run dev # run the server from source via tsx
npm run typecheck # tsc --noEmit
npm test # vitest
npm run build # tsc -> dist/See CONTRIBUTING.md for the full guide.
How it works
Hybrid conversion: a unique-color heuristic classifies an image as simple (vtracer binary trace → clean paths) or layered (vtracer color trace → stacked, individually addressable color layers). Override with
mode/max_colors.Vector import: PDF/AI go through
mupdf(WASM, no system deps) with paths preserved; EPS is converted via Ghostscript when available.Stack: TypeScript (ESM) ·
@modelcontextprotocol/sdk·@neplex/vectorizer(vtracer) ·sharp·@resvg/resvg-js·svgo·svgson.
License
MIT © Rakshit Raj
Available Tools
6 toolsconvert_image_to_svgConvert image to SVGB
Vectorize a raster image (PNG/JPG/WebP/GIF/BMP/TIFF/AVIF) into an editable SVG. mode=auto picks simple vs layered by image complexity. Returns a summary and an inline PNG preview.
Inputs: input_path (required), mode, max_colors, output_path.
edit_svgEdit SVGB
Apply structured edits to an SVG by layer id: setFill, setStroke, removeNode, isolateNode, transform, setDimensions, setAttribute. Writes back to svg_path (or output_path) and returns the updated summary.
Inputs: svg_path (required), operations (required), output_path.
import_vectorImport vector file to SVGA
Import a vector file (PDF, PDF-compatible AI, or EPS) into an editable SVG with paths preserved. EPS requires Ghostscript on PATH. page selects a PDF page (default 0).
Inputs: input_path (required), page, output_path.
inspect_svgInspect SVGA
Return SVG dimensions, viewBox, and the list of addressable layers (id, tag, fill, stroke, pathCount, bbox).
Inputs: svg_path (required).
optimize_svgOptimize SVGA
Run svgo to clean up an SVG while preserving layer ids and viewBox. Writes back to svg_path (or output_path).
Inputs: svg_path (required), output_path.
render_svgRender SVG to PNGA
Rasterize an SVG to PNG for visual verification. Returns the PNG inline and writes a .preview.png next to the SVG.
Inputs: svg_path (required), width, scale.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct purpose: conversion, editing, importing, inspection, optimization, and rendering. There is no overlap or ambiguity between tool functions.
All tool names follow a consistent verb_noun pattern using snake_case, such as 'convert_image_to_svg' and 'edit_svg'. The naming is predictable and clear.
With 6 tools covering the full workflow of image-to-SVG conversion, editing, importing, inspection, optimization, and rendering, the count is well-scoped and each tool earns its place.
The tool set covers the entire lifecycle: converting from raster or vector, inspecting, editing layers, optimizing, and rendering previews. No obvious gaps exist for the server's stated purpose.
Related MCP Connectors
Create professional SVG artwork, icons and vector logos from a prompt, or vectorize any image.
Lets AI assistants draw: logos, posters, illustrations and scenes, as editable SVG and PNG.
Split images into editable layers (PSD/PNG), outpaint images, and generate clean vector SVGs.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to automate Adobe Illustrator, converting bitmap artwork into editable .ai files, running ExtendScript, and capturing the Illustrator window for visual QA.1-
- AlicenseAqualityBmaintenanceEnables AI agents to inspect, edit, validate, render, and export SVG/Inkscape documents safely with reversible operations and risk-classed tools.8711MIT

Rayzia MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to drive a live SVG/vector editor, allowing a full observe-and-act loop on a canvas with real tools, state reading, and PNG rendering.2MIT- AlicenseNot gradedqualityCmaintenanceEnables AI agents to generate professional SVG artwork, icons, and vector logos from text prompts, and to vectorize raster images into clean, editable SVG files.MIT