Figma-Context-MCP in Cursor: SVG comes back as IMAGE-SVG ref, no path data?
Using GLips/Figma-Context-MCP with Cursor,
mcp__get_figma_datareturns SVG components asIMAGE-SVGnodes with only afillsreference and no vector path data, whilemcp__download_figma_imagesexports separate SVG files instead of paths. Icons and logos therefore come through wrong or unusable for generated code. As of version 0.6.5, is path data available, or is there a reliable workaround?Originally asked on GitHub: https://github.com/GLips/Figma-Context-MCP/issues/30
5 answers
Status: explained — the issue is only partially addressed. Release 0.6.5 (Oct 2025) added auto-flattening for SVG images made of many vectors, and a previous release reportedly fixed SVGs being exported too large. Direct SVG path data is still not implemented: the maintainer said path data remains TBD and intentionally does not want heavy path data in the layout-focused
mcp__get_figma_dataresponse. The preferred approach is a separate SVG/vector tool, and the maintainer said they would merge a PR adding one.Workarounds that worked in the thread:
- Flatten the vector group into one SVG in Figma before pulling it through the MCP. One user confirmed this fixed their broken UI, and the maintainer endorsed it as a good fix for now.
- Use a cursor.rules file that tells the Cursor agent to replace SVG elements with red rectangles so broken SVGs are easy to spot and replace manually.
- Use an existing icon library (e.g. Lucide static icons) instead of having the model draw SVG path data, to avoid wasted tokens; then copy the real SVG from Figma later.
There is still no MCP way to retrieve the full SVG path data directly. A user also reported in Sept 2025 that downloading an SVG containing text on a path via MCP gives bad results, while Figma's UI export gives the expected SVG.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Tested
mcp__get_figma_dataandmcp__download_figma_imageson SVG-based components.get_figma_datareturned SVG components asIMAGE-SVGnodes with only afillsreference and no path data;download_figma_imagesproduced separate SVG files instead of vector data.Source: https://github.com/GLips/Figma-Context-MCP/issues/30 (opens external site)
Did this work for you?What @cuongtl1992 tried on GitHub (Worked)
Flattened the SVG elements into one SVG inside Figma before using the MCP. The user said this workaround fixed their broken UI.
Source: https://github.com/GLips/Figma-Context-MCP/issues/30#issuecomment-2716410119 (opens external site)
Did this work for you?What @kevin-btp tried on GitHub (Partly worked)
Added a cursor.rules file so the Cursor agent replaces SVG elements with red rectangles, making broken SVGs easy to identify and replace manually.
Source: https://github.com/GLips/Figma-Context-MCP/issues/30#issuecomment-2717739450 (opens external site)
Did this work for you?What @LLmoskk tried on GitHub (Outcome unclear)
Configured the agent to use Lucide static icon components instead of hand-writing SVG path data to avoid wasting tokens, then copies the real SVG from Figma later.
Source: https://github.com/GLips/Figma-Context-MCP/issues/30#issuecomment-2723111260 (opens external site)
Did this work for you?
Related questions
- Figma-Context-MCP: RangeError: Invalid string length when fetching large Figma files
- How to use Figma-Context-MCP with VS Code and GitHub Copilot?
- Figma-Context-MCP: why does my AI host pick the wrong tool, and what changed in v0.1.6?
- Figma-Context-MCP fails to connect in Cline — how to configure it?
- Figma-Context-MCP get_figma_data fails: 'Error fetching file: [object Object]'