image2svg-mcp is an MCP (Model Context Protocol) server whose main purpose is to convert raster images into SVG vector graphics. It was developed by botmonster and is licensed under Apache 2.0.
Main capabilities
- Accepts base64-encoded image data or a URL as input.
- Supports PNG, JPG, JPEG, WEBP, TIFF, and other common raster formats.
- Provides full control over vectorization parameters, including color precision (color_precision), speckle filtering (filter_speckle), tracing mode (colormode), and more.
- Automatically handles the data:image/...;base64, URI prefix.
- Supports streaming download of URL images, with a size limit of 5 MB.
- Optionally supports file:// URLs to access local images, which must be enabled via the --allow-local-files-path flag.
Usage
This tool can be integrated into Claude Code and Claude Desktop. It can be used by adding configuration to settings.json. For Claude Code, it can be added via the command line; it can also be configured to run as an HTTP server. After enabling local file access, prompts such as file://logo.png can be processed. Only files within the specified directory and its subdirectories are accessible, and paths are normalized to prevent directory traversal. When this flag is not enabled, file:// URLs are rejected.
Use cases
- Convert generated bitmap images into clean vector versions.
- Perform fine-grained conversions using specific parameters, for example using binary color mode to obtain crisp edges, setting filter_speckle to 10 to remove noise, suitable for logos and icons.
- Convert images from a URL and apply a minimalist style, for example using color_precision: 3 to greatly reduce the number of colors, producing an artistic posterized vector effect.
- Convert base64 images directly, without a URL, for easy testing.
Limitations
- URL downloads have a 5 MB size limit.
- Local file access is disabled by default, must be explicitly enabled, and is limited to the specified directory.
- Other limitations are not provided for now.