{
  "markdown": "<!-- mcp-name: io.github.botmonster/image2svg-mcp -->\n\n# image2svg-mcp\n\n[![PyPI](https://img.shields.io/pypi/v/image2svg-mcp)](https://pypi.org/project/image2svg-mcp/)\n[![Docker](https://github.com/botmonster/image2svg-mcp/actions/workflows/docker.yml/badge.svg)](https://github.com/botmonster/image2svg-mcp/actions/workflows/docker.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)\n[![Tests](https://github.com/botmonster/image2svg-mcp/actions/workflows/tests.yml/badge.svg)](https://github.com/botmonster/image2svg-mcp/actions/workflows/tests.yml)\n\nAn MCP server that converts raster images (PNG, JPG, WEBP) to scalable SVG vector graphics.\n\n## Features\n\n- Accepts images as **base64-encoded data** or **URL**\n- Supports PNG, JPG, JPEG, WEBP, TIFF, and other common raster formats\n- Full control over vectorization parameters (color precision, speckle filtering, tracing mode, etc.)\n- Handles `data:image/...;base64,` URI prefixes automatically\n- Streams URL downloads with a 5 MB size limit\n- Optional `file://` URL support for local images (opt-in via `--allow-local-files-path`)\n\n## Usage\n\nTo see it in action check [converting image to svg online](https://botmonster.com/image2svg/).\n\n### Claude Code & Claude Desktop\n\nAdd to your `settings.json`:\n\n\n```json\n{\n  \"mcpServers\": {\n    \"image2svg\": {\n      \"command\": \"uvx\",\n      \"args\": [\"image2svg-mcp\"]\n    }\n  }\n}\n```\nfor **Claude Code** add using command line:\n```bash\nclaude mcp add image2svg --scope user -- uvx image2svg-mcp\n```\nwith access to local files:\n```bash\nclaude mcp add image2svg --scope user -- uvx image2svg-mcp --allow-local-files-path /home/user/images\n```\n\n### Docker\n\nRun as an HTTP server:\n\n```bash\ndocker run -p 8000:8000 ghcr.io/botmonster/image2svg-mcp\n```\n\nWith local file access:\n\n```bash\ndocker run -p 8000:8000 -v /home/user/images:/images ghcr.io/botmonster/image2svg-mcp --allow-local-files-path /images\nclaude mcp add image2svg --transport http --scope user http://localhost:8000/mcp\n```\n\nThis enables prompts like:\n\n> Convert this local file to SVG: file://logo.png\n\nOnly files inside the specified directory (and its subdirectories) are accessible. Paths are normalized to prevent directory traversal. Without this flag, `file://` URLs are rejected.\n\n## Example Prompts\n\nHere are some examples of what you can tell an LLM to do with this tool:\n\n### 1. Simple image-to-SVG conversion\n\n> Generate an image of a sunset over mountains, then convert it to SVG.\n\nThe LLM will generate a raster image and then use the `convert_image_to_svg` tool with default settings to produce a clean vector version.\n\n### 2. Fine-tuned conversion with specific parameters\n\n> 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.\n\nThis 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.\n\n### 3. Convert from URL with minimalist style\n\n> Convert this image to a simplified SVG with low color precision for a minimalist poster look: https://example.com/photo.png\n\nUsing `color_precision: 3` reduces the number of colors dramatically, producing an artistic posterized vector effect. Great for stylized illustrations.\n\n### 4. Convert a base64 image directly\n\n> Convert this base64 image to SVG: iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAO0lEQVR4nGP8z8Dwn4EIwESMIqwKGRn+MzBisYQJXRE2NopCbKYgi5Huxv8MjBiSyGJMuCTQNTJSPRwBCjYOD5JU5rIAAAAASUVORK5CYII=\n\nThis is a 10x10 red square with a blue circle in the middle. Useful for testing the tool with inline image data — no URL needed.\n\n## Tool Parameters\n\n| Parameter | Type | Default | Range | Description |\n|---|---|---|---|---|\n| `image_base64` | string | - | - | Base64-encoded image data. Provide this OR `image_url`. |\n| `image_url` | string | - | - | URL to fetch the image from (`http://`, `https://`, or `file://` when enabled). Provide this OR `image_base64`. |\n| `colormode` | string | `\"color\"` | `color`, `binary` | Full color or black/white line art |\n| `mode` | string | `\"spline\"` | `spline`, `polygon`, `none` | Tracing mode: smooth curves, straight edges, or pixel-perfect |\n| `filter_speckle` | int | `4` | 0-128 | Remove speckles of N pixels or fewer |\n| `color_precision` | int | `6` | 1-12 | Color quantization bits. Lower = fewer colors, simpler SVG |\n| `layer_difference` | int | `16` | 0-128 | Color difference for merging layers |\n| `corner_threshold` | int | `60` | 0-180 | Angle threshold for corner detection (degrees) |\n| `length_threshold` | float | `4.0` | 3.5-10.0 | Minimum path segment length |\n| `splice_threshold` | int | `45` | 0-180 | Angle threshold for splicing splines |\n| `path_precision` | int | `8` | 1-12 | Decimal precision for SVG coordinates |\n| `hierarchical` | string | `\"stacked\"` | `stacked`, `cutout` | Layer arrangement mode |\n| `max_iterations` | int | `10` | 1-100 | Max curve fitting iterations |\n\n## Development\n\n### Installation\n\n```bash\ngit clone https://github.com/botmonster/image2svg-mcp.git\ncd image2svg-mcp\nuv sync\n```\n\n### Run tests\n\n```bash\nuv run pytest tests/ -v\n```\n\n### Run the MCP Inspector\n\n```bash\nuv run fastmcp dev inspector src/image2svg_mcp/server.py:mcp\n```\n\n## License\n\nApache 2.0 - see [LICENSE](LICENSE)\n",
  "bytes": 5358,
  "sha": "087f5e855372f84c354acb4df31741b8a728b300a1338e7c866196988c7bb7cb",
  "repo_slug": "botmonster/image2svg-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_botmonster_image2svg_mcp_54603950/readme"
}