
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.
概覽
本機 MCP 伺服器,使用 potrace 描摹把 PNG、JPG、WebP 等點陣圖轉換為 SVG 向量圖形。
- 可以做什麼
- 用 potrace 把點陣圖檔案轉換為 SVG 向量圖形
- 透過閾值、雜點抑制與曲線最佳化參數調整描摹結果
- 依目標寬高縮放輸出,例如產生小尺寸圖示
- 自訂填色與背景色,把 SVG 寫入磁碟並回傳 SVG 字串
- 適用情境
- 適合讓助理在本機把標誌、圖示或其他點陣圖轉成可編輯的 SVG 向量圖,或依指定尺寸與顏色重新產生圖示時使用。
- 執行需求
- 透過 npx 以本機程序方式執行 npm 套件,需要 Node.js 與 npm。它會讀取本機檔案並把 SVG 輸出寫入本機檔案系統,輸入路徑須為絕對路徑。未宣告驗證、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Svg Tracer,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
input_path | string | Yes | Absolute path to the input bitmap image file |
output_path | string | No | Path for the output SVG (defaults to input path with .svg extension) |
threshold | number | No | Black/white threshold 0-255 (default: 128) |
turd_size | number | No | Suppress speckles up to this many pixels (default: 2) |
opt_tolerance | number | No | Curve optimization tolerance 0-1 (default: 0.2) |
color | string | No | Fill color for traced paths (default: "#000000") |
background | string | No | Background color (default: "transparent") |
target_width | number | No | Target SVG width in pixels |
target_height | number | No | Target 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
- Read input - Loads the bitmap image (PNG, JPG, BMP, GIF, TIFF, WebP)
- Preprocess - Handles transparency by converting alpha channel to a black-on-white grayscale mask
- Trace - Uses potrace to convert the bitmap to SVG vector paths
- Scale - Optionally wraps paths in a transform group to fit target dimensions
- 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版本歷史
1- v0.1.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分