Svg Tracer

com.pulsemcp由 pulsemcp.com 发布v0.1.3更新于 Oct 24, 2026

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

已验证STDIO仅桌面文件与存储媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,使用 potrace 描摹把 PNG、JPG、WebP 等位图转换为 SVG 矢量图形。

可以做什么
  • 用 potrace 把位图文件转换为 SVG 矢量图形
  • 通过阈值、杂点抑制和曲线优化参数调整描摹效果
  • 按目标宽高缩放输出,例如生成小尺寸图标
  • 自定义填充色与背景色,把 SVG 写入磁盘并返回 SVG 字符串
适用场景
适合让助手在本机把标志、图标或其他位图转成可编辑的 SVG 矢量图,或按指定尺寸和颜色重新生成图标时使用。
运行要求
通过 npx 以本地进程方式运行 npm 包,需要 Node.js 与 npm。它读取本地文件并把 SVG 输出写入本地文件系统,输入路径需为绝对路径。未声明认证、API 密钥或环境变量。
安装前请注意
该工具会读取本地文件并向本地文件系统写入 SVG,输出路径默认取输入路径并改为 .svg 扩展名,因此可能创建或覆盖磁盘上的文件。只应指向你确实希望它读写的路径。

安装

在 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

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

Manual Setup

git clone https://github.com/pulsemcp/mcp-servers.git
cd mcp-servers/productionized/svg-tracer
npm install
npm run build
npm 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

npm install
npm run build
npm run dev          # Development mode with auto-reload
npm test             # Run functional tests
npm run test:run     # Run tests once
npm run test:integration  # Run integration tests
npm run test:all     # Run all tests

License

MIT

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

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分