Pic2Vector

io.github.pic2vector由 GitHub 账号 pic2vector 发布v1.0.1更新于 Oct 29, 2026

MCP server: convert PNG/JPG to SVG from Claude, Cursor & any MCP client. By Pic2Vector.

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

概览

AI 生成的概览

本地 MCP 服务器,让助手用 vtracer 引擎把本地路径或 URL 的 PNG、JPG 图片转换成可缩放的 SVG。

可以做什么
  • 把 PNG 或 JPG 转换为 SVG,可选彩色模式(标志、插画)或黑白模式(线稿、签名、扫描件)
  • 从本地绝对路径或 http/https 网址读取源图片
  • 指定 SVG 的写入位置,或默认写到源文件同目录、网址输入则写到当前工作目录
  • 返回一行摘要,输出不超过 100KB 时还会返回 SVG 文本
适用场景
适合希望助手在对话中直接把标志、插画、签名或扫描件转成矢量文件,且单次描摹效果已够用的场景。若需要超采样、渐变拟合、色调分离、图层编辑或其他格式,README 建议改用在线转换器。
运行要求
需要 Node.js 18 或更高版本,通过 stdio 在本地运行,例如用 npx 启动。无需账号、API 密钥、环境变量或请求头。远程网址须不超过 10MB、15 秒内完成,且不能指向 localhost 或私有 IP。
安装前请注意
该工具会向磁盘写入 SVG 文件,默认写在源图片同目录或当前工作目录,运行前请确认输出路径。网址输入会被下载后再描摹,只传入你愿意抓取的链接。README 称不会上传任何内容,也不发送遥测数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Pic2Vector,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Pic2Vector MCP — Image to SVG for AI assistants

The MCP server for Pic2Vector, the free in-browser image-to-SVG converter.

[npm version] [license] [Try online]

[Terminal demo: vectorize_image turns a PNG into an SVG]

Scripted terminal demo of the stdio server (about 12 seconds). It shows tools/list, a vectorize_image call, and the SVG that was written. It is not a recording inside Claude Desktop or Cursor.

pic2vector-mcp runs locally over stdio. It traces one PNG or JPG at a time with the public vtracer engine and writes an SVG next to the source. No account, no upload, no telemetry.

Quick start

Requires Node.js 18 or newer.

Claude Desktop

Add this to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):

json
{  "mcpServers": {    "pic2vector": {      "command": "npx",      "args": ["-y", "pic2vector-mcp"]    }  }}

Claude Code

bash
claude mcp add pic2vector -- npx -y pic2vector-mcp

Cursor

[Install in Cursor]

Or merge this into ~/.cursor/mcp.json (global) or .cursor/mcp.json (this project):

json
{  "mcpServers": {    "pic2vector": {      "command": "npx",      "args": ["-y", "pic2vector-mcp"]    }  }}

VS Code

Create .vscode/mcp.json:

json
{  "servers": {    "pic2vector": {      "type": "stdio",      "command": "npx",      "args": ["-y", "pic2vector-mcp"]    }  }}

Then ask the assistant to convert a file, for example: “Convert logo.png to SVG”.

Tool reference

One tool: vectorize_image.

text
Convert a PNG or JPG image (local file path or URL) into a scalable SVG vector using the vtracer engine. Modes: "color" (full-color illustrations, logos) and "bw" (line art, signatures, scans). Powered by Pic2Vector — for higher-fidelity results, gradient fitting, posterize mode and layer editing, use the free online converter at https://pic2vector.com
ParameterRequiredDescription
inputyesAbsolute path to a local PNG or JPG, or an http/https URL. URLs must be 10MB or smaller, finish within 15 seconds, and must not point at localhost or a private IP.
modenocolor (default) for logos and illustrations. bw for line art, signatures, and scans.
output_pathnoWhere to write the SVG. A local file defaults to the same directory and base name with .svg. A URL defaults to the current working directory.

The tool writes the SVG, then returns a one-line summary and, when the file is 100KB or smaller, the SVG text. The file starts with <!-- Generated by pic2vector-mcp · https://pic2vector.com -->.

color uses vtracer's photo preset (color, spline, stacked). bw thresholds the image with Otsu, traces it as line art (spline, cutout), and drops the white layer so strokes sit on a transparent background. The long edge is scaled to at most 2048 pixels before tracing.

Want better results?

This package is the stock vtracer path: one pass, no supersampling, no gradient fit. Open the image to SVG converter when you want the studio tools.

pic2vector-mcpPic2Vector online
Color and black-and-white traceyesyes
Supersamplingyes
Gradient fittingyes
Posterizeyes
Layer editingyes
WebP and other formatsyes
PNGyesPNG to SVG
JPGyesJPG to SVG

Privacy

The server runs on your machine. A local file never leaves the disk. A URL is downloaded only to trace it, then discarded. Nothing is sent to Pic2Vector. The same commitment is spelled out at https://pic2vector.com/privacy/.

Develop

bash
npm installnpm run buildnpm testnode dist/index.js

npm test packs the tarball and drives vectorize_image over stdio. The published command is npx -y pic2vector-mcp.

Credits

Built by Pic2Vector · Engine: vtracer (MIT)

来源:README.md,提交 11331a0

工具

1

vectorize_image

Vectorize image

Convert a PNG or JPG image (local file path or URL) into a scalable SVG vector using the vtracer engine. Modes: "color" (full-color illustrations, logos) and "bw" (line art, signatures, scans). Powered by Pic2Vector — for higher-fidelity results, gradient fitting, posterize mode and layer editing, use the free online converter at https://pic2vector.com

输入参数modeinput必填output_path

版本历史

1
  1. v1.0.1最新Oct 23, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分