Svgr MCP Server

MCP server for converting SVG to React components using SVGR

Local serverstdioTypeScript

What is the Svgr MCP MCP server?

MCP server for converting SVG to React components using SVGR. That is what the svgr mcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A Model Context Protocol (MCP) server that exposes SVGR functionality to convert SVG content into React components.

  • SVG to React Conversion — Transforms raw SVG strings into valid React components
  • Configurable Output — Supports extensive SVGR configuration options including TypeScript generation, React Native support, and Prettier formatting
  • Optimization — Optional SVGO integration for optimizing SVG content before conversion

The tools it exposes

The server publishes 4 tools. What each one is for:

  • Tools — The Tools tool exposed by this server
  • convert_svg_to_react — Returns a text content block containing the generated React component code
  • Prompts — The Prompts tool exposed by this server
  • svg_to_react_native — A convenience prompt that converts SVG to a React Native component with recommended settings

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

How it compares

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Svgr MCP's toolset — Tools, convert_svg_to_react, Prompts and 1 more — is a fair guide to whether it matches your workflow. It is maintained by pchalupa; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Svgr MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
ToolsThe Tools tool exposed by this server.
convert_svg_to_reactReturns a text content block containing the generated React component code.
PromptsThe Prompts tool exposed by this server.
svg_to_react_nativeA convenience prompt that converts SVG to a React Native component with recommended settings.

How to install the Svgr MCP MCP server

{
  "mcpServers": {
    "svgr": {
      "command": "npx",
      "args": ["svgr-mcp@latest"],
      "type": "stdio"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Svgr MCP to Tools.
  • Use Svgr MCP to convert svg to react.
  • Use Svgr MCP to Prompts.

Frequently asked questions

It connects Svgr MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (Tools, convert_svg_to_react, Prompts, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Svgr MCP directly.