get_design_context
Fetch Figma node design context and return reference Flutter or React + Tailwind code, assets, screenshot, and variables for design-to-code workflows.
Instructions
Get design context for a Figma node — the primary tool for design-to-code workflows. Returns reference code (Flutter widgets for Flutter projects, React + Tailwind otherwise), the assets it uses, a screenshot and the variables in the node. The code must be adapted to the target project. Use the nodeId parameter to specify a node id; from a URL like https://figma.com/design/:fileKey/:fileName?node-id=1-2 the node id is 1:2. With no nodeId the current selection in Figma is used. Large nodes return metadata instead of code unless forceCode is set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | No | The ID of the node, eg. "123:456" or "123-456" (instance ids like "I1:2;3:4" work too). Omit it to use the current selection in Figma. | |
| screen | No | Flutter: draw the node as a phone screen that fills the screen and scrolls when tall (default: portrait frames 300-480 wide). | |
| fileKey | No | The key of the Figma file. Accepted for compatibility; the file open in Figma Desktop is always used. | |
| assetsDir | No | Flutter: folder of the asset paths in the code (default: the svg/png/images folders of the project's pubspec.yaml, else assets/figma). | |
| forceCode | No | Always return code, even for very large nodes. | |
| framework | No | Code to generate: flutter or react. Default: from clientFrameworks / clientLanguages, else FIGMA_LOCAL_MCP_FRAMEWORK, else flutter when the project has a pubspec.yaml, else react. | |
| screenUtil | No | Flutter: write lengths with flutter_screenutil (.w, .h, .r, .sp) so the layout scales from the design size (default: when the project's pubspec.yaml depends on flutter_screenutil). | |
| skillNames | No | Accepted for compatibility (logging only). | |
| clientLanguages | No | Comma separated languages of the client, e.g. "dart" (picks the framework). | |
| clientFrameworks | No | Comma separated frameworks of the client, e.g. "flutter" (picks the framework). | |
| excludeScreenshot | No | Leave the screenshot out of the response. | |
| disableCodeConnect | No | Draw mapped components from their layers instead of naming the code component. |