
Image to SVG
io.github.botmonster由 GitHub 账号 botmonster 发布v1.0.1更新于 Oct 24, 2026
MCP server that converts raster images (PNG/JPG/WEBP) to SVG vector format
概览
将 PNG、JPG、WEBP 等位图图像转换为可缩放的 SVG 矢量图形,并可调整描摹参数。
- 可以做什么
- 提供 convert_image_to_svg 工具,接收 base64 数据或 URL 形式的图像,返回 SVG 矢量版本。支持 PNG、JPG、JPEG、WEBP、TIFF 等常见位图格式,并允许调用方控制颜色模式、描摹模式、杂点过滤、颜色精度、图层合并、角点与拼接阈值、路径精度以及曲线拟合迭代次数。可自动处理 data URI 前缀,并以 5 MB 为上限流式下载 URL 图像。
- 适用场景
- 适合助手需要把生成或提供的位图转成矢量文件的场景,例如标志、图标或海报风格的艺术图。也适合需要针对清晰边缘、简化颜色或去除噪点来调优 SVG 输出,而非使用默认转换的工作流。
- 运行要求
- 以本地 stdio 进程运行,通常用 uvx image2svg-mcp 启动,因此需要 Python/uv 运行时。也可通过 Docker 以 HTTP 服务器方式运行在 8000 端口。未声明任何账号、API 密钥或环境变量。访问本地文件需要 --allow-local-files-path 参数。
安装
在 SourceWeft 中
- 打开 控制台中的 Image to SVG,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
image2svg-mcp
[PyPI] [Docker] [License] [Tests]
An MCP server that converts raster images (PNG, JPG, WEBP) to scalable SVG vector graphics.
Features
- Accepts images as base64-encoded data or URL
- Supports PNG, JPG, JPEG, WEBP, TIFF, and other common raster formats
- Full control over vectorization parameters (color precision, speckle filtering, tracing mode, etc.)
- Handles
data:image/...;base64,URI prefixes automatically - Streams URL downloads with a 5 MB size limit
- Optional
file://URL support for local images (opt-in via--allow-local-files-path)
Usage
To see it in action check converting image to svg online.
Claude Code & Claude Desktop
Add to your settings.json:
for Claude Code add using command line:
with access to local files:
Docker
Run as an HTTP server:
With local file access:
This enables prompts like:
Convert this local file to SVG: file://logo.png
Only files inside the specified directory (and its subdirectories) are accessible. Paths are normalized to prevent directory traversal. Without this flag, file:// URLs are rejected.
Example Prompts
Here are some examples of what you can tell an LLM to do with this tool:
1. Simple image-to-SVG conversion
Generate an image of a sunset over mountains, then convert it to SVG.
The LLM will generate a raster image and then use the convert_image_to_svg tool with default settings to produce a clean vector version.
2. Fine-tuned conversion with specific parameters
Create a logo with a blue circle and a white star inside it. Now convert it to SVG using binary colormode for crisp edges and set filter_speckle to 10 to remove noise.
This uses colormode: "binary" for black/white line art style output, which works great for logos and icons. The higher filter_speckle value removes small artifacts.
3. Convert from URL with minimalist style
Convert this image to a simplified SVG with low color precision for a minimalist poster look: https://example.com/photo.png
Using color_precision: 3 reduces the number of colors dramatically, producing an artistic posterized vector effect. Great for stylized illustrations.
4. Convert a base64 image directly
Convert this base64 image to SVG: iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAO0lEQVR4nGP8z8Dwn4EIwESMIqwKGRn+MzBisYQJXRE2NopCbKYgi5Huxv8MjBiSyGJMuCTQNTJSPRwBCjYOD5JU5rIAAAAASUVORK5CYII=
This is a 10x10 red square with a blue circle in the middle. Useful for testing the tool with inline image data — no URL needed.
Tool Parameters
Development
Installation
Run tests
Run the MCP Inspector
License
Apache 2.0 - see LICENSE
来源:README.md,提交 2c855cc
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分