Svg Tracer

com.pulsemcpv0.1.3更新於 Sep 29, 2026

MCP server for converting bitmap images to SVG vector graphics using potrace tracing.

已驗證STDIO僅桌面Cloud & Infrastructure

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Svg Tracer,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

SVG Tracer MCP Server

An MCP server that converts bitmap images (PNG, JPG, BMP, GIF, TIFF, WebP) to SVG vector graphics using potrace tracing.

Features

  • Converts any common bitmap format to clean SVG vector paths
  • Automatic preprocessing of transparent PNGs (alpha channel to black-on-white mask)
  • Customizable tracing parameters (threshold, speckle suppression, curve optimization)
  • Target size scaling for generating icons (e.g., 50x50 Dewey icons)
  • Custom fill color and background support
  • Works with the local filesystem by default (reads input, writes output to disk)

Quick Start

Using npx

json
{  "mcpServers": {    "svg-tracer": {      "command": "npx",      "args": ["-y", "@pulsemcp/svg-tracer-mcp-server"]    }  }}

Manual Setup

bash
git clone https://github.com/pulsemcp/mcp-servers.gitcd mcp-servers/productionized/svg-tracernpm installnpm run buildnpm start

Tools

trace_bitmap_to_svg

Convert a bitmap image to an SVG vector graphic using potrace tracing.

Parameters:

ParameterTypeRequiredDescription
input_pathstringYesAbsolute path to the input bitmap image file
output_pathstringNoPath for the output SVG (defaults to input path with .svg extension)
thresholdnumberNoBlack/white threshold 0-255 (default: 128)
turd_sizenumberNoSuppress speckles up to this many pixels (default: 2)
opt_tolerancenumberNoCurve optimization tolerance 0-1 (default: 0.2)
colorstringNoFill color for traced paths (default: "#000000")
backgroundstringNoBackground color (default: "transparent")
target_widthnumberNoTarget SVG width in pixels
target_heightnumberNoTarget SVG height in pixels

Example usage:

Convert /tmp/logo.png to SVG:trace_bitmap_to_svg(input_path="/tmp/logo.png")
Create a 50x50 icon with brand color:trace_bitmap_to_svg(  input_path="/tmp/logo.png",  output_path="/tmp/logo-icon.svg",  target_width=50,  target_height=50,  color="#FF5733")

How It Works

  1. Read input - Loads the bitmap image (PNG, JPG, BMP, GIF, TIFF, WebP)
  2. Preprocess - Handles transparency by converting alpha channel to a black-on-white grayscale mask
  3. Trace - Uses potrace to convert the bitmap to SVG vector paths
  4. Scale - Optionally wraps paths in a transform group to fit target dimensions
  5. Output - Writes the SVG to disk and returns the SVG string with metadata

Supported Formats

  • PNG (including transparent PNGs with alpha channel)
  • JPEG / JPG
  • WebP
  • BMP
  • GIF
  • TIFF

Development

bash
npm installnpm run buildnpm run dev          # Development mode with auto-reloadnpm test             # Run functional testsnpm run test:run     # Run tests oncenpm run test:integration  # Run integration testsnpm run test:all     # Run all tests

License

MIT

來源:productionized/svg-tracer/README.md,提交 0ed34de

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.1.3最新Sep 16, 2026