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 分