Skip to main content
Solved

Figma MCP's recommended usage practices (get_code getting stuck)


pedro.zaroni

I'm trying to use existing Figma layouts to generate code via Figma MCP and Cursor. In general it's working really well, but I've noticed that when I select the whole screen layout, the `get_code` tool from MCP simply gets stuck or takes minutes to run (but I can't know wether it's stuck or just slow).

 

Is there a recommended way to either make get_code run faster or to use the MCP in a more efficient way?

Best answer by Yarden K

Hi ​@pedro.zaroni,

Glad to hear it’s mostly working well! :) You’re right, get_code can hang on large selections, especially full and heavy screens. It usually depends on how big the frame is, how deep the nesting goes, and how much context is being passed.
 

Best move for now is to build your screen through multiple calls - break it into smaller chunks (like a section or component) instead of selecting the full screen. The context will be smaller, so it should run faster and be easier to work with.
 

We’re planning to make this easier to do directly in Figma (based on beta feedback), so stay tuned!

View original

4 replies

Yarden K
Figmate
  • Figmate
  • 10 replies
  • Answer
  • June 9, 2025

Hi ​@pedro.zaroni,

Glad to hear it’s mostly working well! :) You’re right, get_code can hang on large selections, especially full and heavy screens. It usually depends on how big the frame is, how deep the nesting goes, and how much context is being passed.
 

Best move for now is to build your screen through multiple calls - break it into smaller chunks (like a section or component) instead of selecting the full screen. The context will be smaller, so it should run faster and be easier to work with.
 

We’re planning to make this easier to do directly in Figma (based on beta feedback), so stay tuned!


David Furman

I have never gotten `get_code` to work. Unfortunately it always hangs.

 

This is the case both in my own Figma projects and public ones like this https://www.figma.com/design/uW8pdZQQXqqIqUMT6IUf9Y/iOS-Style-Pin-Lock-Screen-Prototype-%E2%80%93-Built-with-Figma-Variables--Community-?node-id=7-658&t=rOGAkyys7cuzmgqd-4

 

For additional info, I am running the Figma desktop app in the background, with it seeming to be properly configured.

Figma.app
Cursor’s mcp.json
It hangs here.

For what it’s worth, `get_image` does work. It’s just `get_code` that hangs.

I’d love to get this working, so any suggestions would be appreciated.
As this is still a beta, could we perhaps add a timeout to the command that indicates why it might get stuck?


NoahWang
  • New Member
  • 4 replies
  • July 30, 2025

I used MCP inspector for debugging.
The "get_code_connect_map" function indicated: "Code Connect is only available on the Organization and Enterprise plans";
The "get_code" function indicated: "MCP error -32001: Request timed out"


NoahWang
  • New Member
  • 4 replies
  • July 30, 2025

I attempted to debug the Figma MCP. Currently, only the functions "get_image" and "get_variable_defs" are working properly, but these two are of no use to me and do not provide any assistance to the entire Vibe Coding. Moreover, both "get_code" and "get_code_connect_map" always result in errors.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings