# svg-tracer

Vectorizes raster graphics into SVG files using potrace directly on your filesystem. Useful for turning PNG or JPG icons into vector assets.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 81
- Author: pulsemcp
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pulsemcp/mcp-servers/tree/HEAD/productionized/svg-tracer
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/svg-tracer

## What it does

The server exposes a single tool named `trace_bitmap_to_svg`. It takes local raster files like PNG, JPEG, WebP, BMP, GIF, or TIFF and turns them into SVG paths. For PNGs with transparency, it converts the alpha channel into a monochrome mask before tracing.

Relative paths will fail. The `input_path` parameter demands an absolute path on disk. Callers can adjust the black-and-white cutoff via `threshold` (default 128), remove speckles with `turd_size` (default 2), and tune curve fitting with `opt_tolerance`. You can also set output dimensions with `target_width` and `target_height`, or pick custom fill and background colors.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add svg-tracer -- npx -y @pulsemcp/svg-tracer-mcp-server
```

### Codex

**Platform CLI**
```bash
codex mcp add svg-tracer -- npx -y @pulsemcp/svg-tracer-mcp-server
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "svg-tracer": {
            "command": "npx",
            "args": [
                "-y",
                "@pulsemcp/svg-tracer-mcp-server"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "svg-tracer": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@pulsemcp/svg-tracer-mcp-server"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add svg-tracer npx -y @pulsemcp/svg-tracer-mcp-server
```

## When to use it
- trace raster logos into clean vector SVG files
- generate sized vector icons from bitmap sketches
- suppress speckles and noise during image tracing
- convert transparent PNG silhouettes into vectors

## Example prompts
- Convert /tmp/logo.png to an SVG file in the same directory
- Create a 50x50 icon from /tmp/icon.png with fill color #FF5733
- Trace /tmp/sketch.webp with a threshold of 150 and speckle suppression

## Similar
- [Image to SVG](https://affpapa.org/en/nevibecode/mcp/image-to-svg.md) — MCP server · ★ 11
- [svg-animations](https://affpapa.org/en/nevibecode/skills/svg-animations.md) — skill · 2600 installs
- [svg-animation](https://affpapa.org/en/nevibecode/skills/svg-animation.md) — skill · 2500 installs
- [svg-icon-generator](https://affpapa.org/en/nevibecode/skills/svg-icon-generator.md) — skill · 1300 installs
- [svg-art](https://affpapa.org/en/nevibecode/skills/svg-art.md) — skill · 510 installs
- [Svg/icons MCP](https://affpapa.org/en/nevibecode/mcp/svgicons-mcp.md) — MCP server

From the same set: [pulsemcp/mcp-servers](https://affpapa.org/en/nevibecode/by/pulsemcp/mcp-servers.md) — 28 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
