extract_svg
Extract SVG components from React/TypeScript/JavaScript files into individual .svg files, preserving structure and attributes. Automates migration by updating source files with migration paths for easy tracking.
Instructions
Extract SVG components from React/TypeScript/JavaScript files into individual .svg files. This tool will preserve the SVG structure and attributes while removing React-specific code. By default, the source file will be replaced with "MIGRATED TO <target absolute path>" and a warning message after successful extraction, making it easy to track where the SVGs were moved to. This behaviour can be disabled by setting the DISABLE_SOURCE_REPLACEMENT environment variable to 'true'. The warning message can be customized by setting the WARNING_MESSAGE environment variable.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
sourcePath | Yes | Path to the source file containing SVG components | |
targetDir | Yes | Directory where the SVG files should be written |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from mcp-data-extractor
Related Tools
- @bsmi021/mcp-node-omnibus-server
- @kalivaraprasad-gonapa/react-mcp
- @kalivaraprasad-gonapa/react-mcp
- @umshere/uiflowchartcreator
- @hugeicons/mcp-server