file-systems

SVG Converter

surferdot

by surferdot

Convert SVG to PNG or JPG with customizable quality, scale, and background. Fast image processing using TypeScript and S

Converts SVG files to PNG and JPG formats with customizable parameters like scale factor, quality, and background color using TypeScript and the Sharp library for high-quality image processing.

github stars

3

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

High-quality Sharp library processingConfigurable output parametersSecure file system access controls

best for

  • / Web developers converting SVG assets to raster formats
  • / Designers creating multiple image formats from SVG graphics
  • / Automated workflows requiring SVG to bitmap conversion

capabilities

  • / Convert SVG code to PNG images with transparency
  • / Convert SVG code to JPG images with quality control
  • / Scale images to higher resolutions
  • / Customize background colors
  • / Detect and preserve original SVG dimensions
  • / Save files to specified directories

what it does

Converts SVG code to PNG or JPG images with customizable scaling, quality, and background color options. Uses the Sharp library for high-quality image processing.

about

SVG Converter is a community-built MCP server published by surferdot that provides AI assistants with tools and capabilities via the Model Context Protocol. Convert SVG to PNG or JPG with customizable quality, scale, and background. Fast image processing using TypeScript and S It is categorized under file systems.

how to install

You can install SVG Converter in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

SVG Converter is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

MCP SVG Converter

npm version Downloads License

English | 中文

<a name="english"></a>

English

A Model Context Protocol (MCP) server that provides tools for converting SVG code to high-quality PNG and JPG images with detailed customization options.

Features

  • Convert SVG code to high-quality PNG images with transparency support
  • Convert SVG code to high-quality JPG images with customizable quality settings
  • Automatic dimension detection and preservation from original SVG
  • Support for scaling to higher resolutions
  • Background color customization
  • Intelligent path handling with automatic redirection to allowed directories
  • Secure file system access with configurable permissions

Installation

Quick Install with npx

npx mcp-svg-converter /path/to/allowed/directory

Global Installation

npm install -g mcp-svg-converter
mcp-svg-converter /path/to/allowed/directory

From Source

Prerequisites
  • Node.js 16 or higher
  • npm or yarn
Installation Steps
  1. Clone this repository

    git clone https://github.com/surferdot/mcp-svg-converter.git
    cd mcp-svg-converter
    
  2. Install dependencies

    npm install
    
  3. Build the project

    npm run build
    

Usage

As a standalone server

Run the server by specifying one or more allowed directories where the converted images can be saved:

node build/index.js /path/to/allowed/directory1 /path/to/allowed/directory2

With Claude Desktop

  1. Download and install Claude Desktop

  2. Create or confirm you have access to an output directory:

    # macOS/Linux
    mkdir -p ~/Desktop/svg-output
    
    # Windows
    mkdir "%USERPROFILE%\Desktop\svg-output"
    
  3. Configure Claude Desktop by editing the configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  4. Open the Claude app, click on the Claude menu in your system menu bar and select "Settings..."

  5. Click on "Developer" in the left sidebar

  6. Click "Edit Config" to open the configuration file

  7. Add this server configuration:

Using npm package with npx (recommended)
{
  "mcpServers": {
    "svg-converter": {
      "command": "npx",
      "args": [
        "mcp-svg-converter",
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
Using global installation

If you've installed the package globally:

{
  "mcpServers": {
    "svg-converter": {
      "command": "mcp-svg-converter",
      "args": [
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
Using local build

If you've built from source:

{
  "mcpServers": {
    "svg-converter": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-svg-converter/build/index.js",
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
  1. Save the file and restart Claude Desktop

Verifying the Setup

When Claude Desktop restarts, if configured correctly:

  1. You should see a hammer icon <img src="https://mintlify.s3.us-west-1.amazonaws.com/mcp/images/claude-desktop-mcp-hammer-icon.svg" style="display: inline; height: 1.3em; vertical-align: middle"> at the bottom right of the input box indicating MCP tools are available.
  2. Clicking the hammer icon should show the svg-to-png and svg-to-jpg tools.

Examples in Claude Desktop

Example 1: Converting a Simple SVG to PNG

In Claude Desktop, send a message like:

Please convert this SVG to PNG and save it to my output directory:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100" width="200" height="100">
  <rect x="10" y="10" width="80" height="80" fill="#4285f4" />
  <circle cx="140" cy="50" r="40" fill="#ea4335" />
  <path d="M10 50 L90 50 L50 90 Z" fill="#fbbc05" />
  <text x="100" y="20" font-family="Arial" font-size="12" text-anchor="middle" fill="#34a853">SVG Example</text>
</svg>

Example 2: High-Quality JPG Conversion

Please convert this SVG to a JPG with 95% quality and 2x scaling:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
  <rect width="200" height="200" fill="#f0f0f0" />
  <circle cx="100" cy="100" r="80" fill="#ff6b6b" />
  <path d="M100 50 L130 150 L70 150 Z" fill="white" />
</svg>

Tools

svg-to-png

Converts SVG code to a high-quality PNG image with transparency support.

Parameters:

  • svgCode (string, required): The SVG code to convert
  • outputPath (string, required): Path where the PNG file should be saved
  • backgroundColor (string, optional): Background color (default: transparent)
  • scale (number, optional): Scale factor for higher resolution (default: 1)

svg-to-jpg

Converts SVG code to a high-quality JPG image.

Parameters:

  • svgCode (string, required): The SVG code to convert
  • outputPath (string, required): Path where the JPG file should be saved
  • backgroundColor (string, optional): Background color (default: white)
  • quality (number, optional): JPEG quality from 1-100 (default: 90)
  • scale (number, optional): Scale factor for higher resolution (default: 1)

Advanced Usage Tips

Specifying Multiple Output Directories

You can specify multiple allowed output directories for more flexible file saving:

{
  "mcpServers": {
    "svg-converter": {
      "command": "npx",
      "args": [
        "mcp-svg-converter",
        "/Users/yourusername/Desktop/svg-output",
        "/Users/yourusername/Documents/svg-images",
        "/Users/yourusername/Downloads"
      ]
    }
  }
}

Using Custom Output Filenames

Specify detailed file paths in your request:

Please convert this SVG to PNG, and save it as "colorful_shapes.png" in my output directory.

<svg>...</svg>

Automatic Path Redirection

If you request saving to a non-allowed directory, the converter automatically redirects to an allowed directory and informs you of the actual save location.

Troubleshooting

Claude Doesn't Show MCP Tools Icon

  1. Verify the configuration file has correct JSON syntax
  2. Ensure all paths are absolute paths
  3. Make sure output directories exist and are writable
  4. Completely exit and restart Claude Desktop
  5. Check Claude logs:
    • macOS: ~/Library/Logs/Claude/mcp*.log
    • Windows: %APPDATA%\Claude\logs\mcp*.log

Tool Execution Fails

  1. Ensure mcp-svg-converter is correctly installed
  2. Check output directory permissions
  3. Verify the SVG code is valid
  4. Check Claude logs for detailed error messages

"Command Not Found" Error

  1. Ensure mcp-svg-converter is globally installed or correctly reference npx
  2. Confirm npm's global bin directory is in your PATH
  3. Try using full paths in configuration

Debugging

You can use the MCP Inspector to debug and test the server directly:

npx @modelcontextprotocol/inspector npx mcp-svg-converter /path/to/allowed/directory

This opens an interactive interface where you can test all available tools without going through Claude Desktop.

Security Considerations

  • The server will only write files to the directories specified when starting the server
  • If a user attempts to save to a non-allowed directory, the file will be automatically redirected to an allowed directory
  • Path traversal attacks are prevented by proper path validation

License

MIT


<a name="中文"></a>

中文

MCP SVG 转换器是一个基于模型上下文协议 (MCP) 的服务器,提供将 SVG 代码转换为高质量 PNG 和 JPG 图像的工具,支持详细的自定义选项。

特点

  • 将 SVG 代码转换为支持透明度的高质量 PNG 图像
  • 将 SVG 代码转换为可定制质量设置的高质量 JPG 图像
  • 自动检测并保留原始 SVG 的尺寸
  • 支持缩放到更高分辨率
  • 可自定义背景颜色
  • 智能路径处理,自动重定向到允许的目录
  • 可配置权限的安全文件系统访问

安装

使用 npx 快速安装

npx mcp-svg-converter /path/to/allowed/directory

全局安装

npm install -g mcp-svg-converter
mcp-svg-converter /path/to/allowed/directory

从源代码安装

前提条件
  • Node.js 16 或更高版本
  • npm 或 yarn
安装步骤
  1. 克隆此仓库

    git clone https://github.com/surferdot/mcp-svg-converter.git
    cd mcp-svg-converter
    
  2. 安装依赖

    npm install
    
  3. 构建项目

    npm run build
    

使用方法

作为独立服务器运行

通过指定一个或多个允许存储转换后图像的目录来运行服务器:

node build/index.js /path/to/allowed/directory1 /path/to/allowed/directory2

与 Claude Desktop 一起使用

  1. 下载并安装 Claude Desktop

  2. 创建或确认你有权限访问的输出目录:

    # macOS/Linux
    mkdir -p ~/Desktop/svg-output
    
    # Windows
    mkdir "%USERPROFILE%\Desktop\svg-output"
    
  3. 配置 Claude Desktop:

    • 打开 Claude 应用程序
    • 点击系统菜单栏中的 Claude 图标
    • 选择"Settings..."(设置)
    • 在左侧菜单中选择"Developer"(开发者)
    • 点击"Edit Config"(编辑配置)按钮
  4. 编辑配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  5. 添加服务器配置:

使用 npm 包与 npx(推荐)
{
  "mcpServers": {
    "svg-converter": {
      "command": "npx",
      "args": [
        "mcp-svg-converter",
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
使用全局安装

如果你已全局安装了此包:

{
  "mcpServers": {
    "svg-converter": {
      "command": "mcp-svg-converter",
      "args": [
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
使用本地构建

如果你从源代码构建:

{
  "mcpServers": {
    "svg-converter": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-svg-converter/build/index.js",
        "/absolute/path/to/output/directory"
      ]
    }
  }
}
  1. 保存文件并重启 Claude Desktop

验证设置

当 Claude Desktop 重启后,如果配置正确:

  1. 你应该在输入框

FAQ

What is the SVG Converter MCP server?
SVG Converter is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for SVG Converter?
This profile displays 75 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.8 out of 5—verify behavior in your own environment before production use.

Use Cases

Code & Document Analysis

Read, analyze, and understand files in your project

Example

Summarize README, analyze code structure, find TODO comments across codebase

Navigate large codebases 5x faster, understand projects quickly

Automated File Operations

Create, move, rename, and organize files based on natural language instructions

Example

Organize downloads by file type, rename files following convention, batch process images

Save hours on manual file organization

Content Search & Extraction

Search files for patterns, extract data, find information across directories

Example

Find all config files with API keys, extract emails from documents, search logs for errors

Find information instantly instead of manual grep/find

File Generation & Templates

Generate boilerplate files, apply templates, create project structures

Example

Create React component with tests and styles, generate OpenAPI spec, scaffold new project

Eliminate repetitive file creation work

Implementation Guide

Prerequisites

  • Claude Desktop or Cursor with MCP support
  • File system permissions for directories you want to access
  • Understanding of file paths and directory structure
  • Backup of important files before bulk operations

Time Estimate

10-20 minutes including configuration

Installation Steps

  1. 1.Install filesystem MCP server (often built-in with Claude Desktop)
  2. 2.Configure allowed directories in MCP config for security
  3. 3.Test read: 'Show me contents of ~/Documents/test.txt'
  4. 4.Test write: 'Create a new file notes.md in current directory'
  5. 5.Test search: 'Find all .js files containing TODO'
  6. 6.Test batch operations: 'Rename all .jpeg files to .jpg'
  7. 7.Verify file permissions and access controls

Troubleshooting

  • Permission denied: Check file/directory permissions, run with appropriate user
  • Path not found: Verify path is absolute or relative to working directory
  • MCP server can't access directory: Add to allowed directories in config
  • File already exists: Use overwrite flag or check before writing
  • Operation failed: Check disk space, file locks, antivirus interference

Best Practices

✓ Do

  • +Configure allowed directories explicitly—don't grant full filesystem access
  • +Back up important files before bulk operations
  • +Use dry-run mode for risky operations when available
  • +Validate file paths before operations
  • +Set appropriate file permissions on created files
  • +Log file operations for audit trail
  • +Test operations on sample files first

✗ Don't

  • Don't grant MCP access to system directories (/etc, /System)
  • Don't allow write access to production config files
  • Don't skip backup before bulk delete/move operations
  • Don't use for sensitive files (passwords, keys) without encryption
  • Don't ignore file permission errors—investigate root cause
  • Don't expose personal documents without considering privacy

💡 Pro Tips

  • Use .gitignore patterns to exclude sensitive files from AI access
  • Create sandboxed working directory for file experiments
  • Combine with version control (git) for easy rollback
  • Use file watching for real-time monitoring and reactions
  • Create templates for common file generation tasks
  • Leverage file metadata (timestamps, size) for smart organization

Technical Details

Architecture

MCP server provides file I/O operations (read, write, search, metadata) as tools Claude can invoke with natural language instructions.

Protocols

  • Local file system API
  • Glob patterns for search
  • File streams for large files

Compatibility

  • macOS
  • Linux
  • Windows
  • Local files only (no remote filesystems by default)

When to Use This

✓ Use When

Use for code analysis, file organization, content search, template generation, and automating repetitive file operations. Best for local development workflows.

✗ Avoid When

Avoid for system-critical files, sensitive credentials, production environments, or when file integrity is paramount. Don't use on files you can't afford to lose.

Integration

  • Combine with git for version-controlled file operations
  • Integrate with code editors for seamless workflow
  • Use with backup tools for safety net
  • Pair with file watchers for automated reactions

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.875 reviews
  • Xiao Rao· Dec 28, 2024

    I recommend SVG Converter for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Amina Jackson· Dec 24, 2024

    SVG Converter is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Henry Ghosh· Dec 24, 2024

    SVG Converter reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Shikha Mishra· Dec 20, 2024

    I recommend SVG Converter for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Lucas Kapoor· Dec 20, 2024

    Useful MCP listing: SVG Converter is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Michael Srinivasan· Dec 16, 2024

    SVG Converter has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Henry Dixit· Dec 8, 2024

    We evaluated SVG Converter against two servers with overlapping tools; this profile had the clearer scope statement.

  • Amina Verma· Dec 4, 2024

    According to our notes, SVG Converter benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Lucas Malhotra· Nov 23, 2024

    SVG Converter is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Xiao Gill· Nov 19, 2024

    Strong directory entry: SVG Converter surfaces stars and publisher context so we could sanity-check maintenance before adopting.

showing 1-10 of 75

1 / 8