Skip to main content
Yehor Korniienko
New Member
July 23, 2025
Question

get_code method on MCP server does not return expected results for Android (Jetpack Compose)

  • July 23, 2025
  • 11 replies
  • 684 views

I’m sending a get_code request to the Figma MCP server via Cursor AI.
Here is the request body I’m using:

{ "nodeId": "XXXX:XXXX", "clientLanguages": "kotlin", "clientFrameworks": "android,compose", "clientName": "cursor" }

However, the response I receive is in JSX (JavaScript XML) format with Tailwind CSS classes, not Kotlin.
I would expect either Kotlin code (Jetpack Compose) or at least a clean JSON representation of the selected frame.

Question:
How can I retrieve Kotlin code or a raw JSON object for the selected frame?

This topic has been closed for replies.

11 replies

Adam_Butterfield
New Participant
December 16, 2025

Just figured out our iOS issue. We were publishing with the wrong label….
Now using “SwiftUI” as label, MCP is returning the correct code after setting language preference to iOS/SwiftUI. Seems like the label we publish with needs to match the language preference labels in Figma. 

 

Would also be really nice if this was documented as well.