image2svg-mcp: an image to SVG converter MCP server for AI agents
image2svg-mcp is a free, open-source (Apache 2.0) MCP server that converts raster images (PNG, JPG, WEBP, TIFF) to scalable SVG vector graphics. Add it to Claude Code, Claude Desktop, Cursor, or any other MCP client and your assistant gets a convert_image_to_svg tool, the same conversion this page does, to use when a task needs a vector: a generated logo, a sketch, a batch of icons.
It runs on your own machine with the engine behind the converter above. Other hosted conversion APIs charge per image and need a key; this needs neither, and your images stay on your computer.
This page also registers convert_image_to_svg as a WebMCP tool (Chrome origin trial), so AI agents running in the browser can convert images on this page without a server.
Install uv first
Every setup below starts the server with uvx, which comes with uv, the Python package manager from Astral. On first run, uvx downloads image2svg-mcp into its own environment.
pip install uvInstall in Claude Code
claude mcp add image2svg --scope user -- uvx image2svg-mcpTo let it read local images, allow a directory:
claude mcp add image2svg --scope user -- uvx image2svg-mcp --allow-local-files-path /home/user/imagesInstall in other MCP clients
The server runs with uvx image2svg-mcp (bundled with uv), so any MCP client can use it. Pick yours:
Claude Desktop
Add to claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}Cursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in your project):
{
"mcpServers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}VS Code (GitHub Copilot)
One command:
code --add-mcp '{"name":"image2svg","command":"uvx","args":["image2svg-mcp"]}'Or add to .vscode/mcp.json:
{
"servers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}Cline
MCP Servers icon > Configure MCP Servers, then add to cline_mcp_settings.json:
{
"mcpServers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}Google Antigravity
In the Agent panel open MCP Servers > Manage MCP Servers > View raw config, then add:
{
"mcpServers": {
"image2svg": {
"command": "uvx",
"args": ["image2svg-mcp"]
}
}
}Codex CLI
codex mcp add image2svg -- uvx image2svg-mcpRun with Docker
The server can also run as an HTTP service:
docker run -p 8000:8000 ghcr.io/botmonster/image2svg-mcp
claude mcp add image2svg --transport http --scope user http://localhost:8000/mcpWhat you can ask your AI agent
- “Generate a logo with a blue circle and a white star, then convert it to SVG using binary colormode for crisp edges.”
- “Convert this image to a simplified SVG with low color precision for a minimalist poster look: https://example.com/photo.png"
- “Convert this local file to SVG: file://logo.png” (with local file access enabled)
Conversion parameters
The convert_image_to_svg tool accepts an image as base64 data or a URL, plus the same vectorization parameters as the sliders above. Dial in the settings visually on this page, then reuse them in your prompts.
| Parameter | Default | Description |
|---|---|---|
image_base64 / image_url | - | The input image, as base64 data or an http(s):// or file:// URL |
colormode | color | Full color or binary (black and white line art) |
mode | spline | Tracing mode: spline, polygon, or none (pixel-perfect) |
filter_speckle | 4 | Remove speckles of N pixels or fewer |
color_precision | 6 | Color quantization bits; lower means fewer colors and a simpler SVG |
layer_difference | 16 | Color difference for merging gradient layers |
corner_threshold | 60 | Angle threshold for corner detection (degrees) |
length_threshold | 4.0 | Minimum path segment length |
splice_threshold | 45 | Angle threshold for splicing splines (degrees) |
path_precision | 8 | Decimal precision of SVG coordinates |
hierarchical | stacked | Layer arrangement: stacked or cutout |
max_iterations | 10 | Maximum curve fitting iterations |
Source and docs: GitHub · PyPI · Docker image
Botmonster Tech