mcp
v1.1.20Locofy MCP Server
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
getLatestComponentAndDependencyCode
Coding Editers leverages this MCP tool to scan directory structures with nested folders, files, and their contents. It then compares this information with the current code in the IDE to intelligently update components and their dependencies. If codeChanged is true, the tool will prompt the user to accept the changes before updating the component and its dependencies. If codeChanged is false, the tool will not update the component and its dependencies. The tool ensures that users are informed of the components retrieved and their relationships, providing a clear understanding of the updates bei…
| Parameter | Type | Description |
|---|---|---|
componentNames * | array | The list of component or screen names to be retrieved. Do not send a single string for this parameter. The values must be provided as a valid JSON array, with each string value enclosed in double quot… |
workspacePath * | string | The full path to the workspace. |
getLatestFileCode
Coding Editers uses this tool to retrieve individual file contents without component dependency management. Unlike the component tool that handles components and their dependencies as a unit, this tool focuses on specific files by name, retrieving only their content without dependency resolution. Use this tool when you need the raw content of specific files rather than complete components with their dependency trees. If codeChanged is true, the tool will prompt the user to accept the changes before updating the file. If codeChanged is false, the tool will not update the files. The response inc…
| Parameter | Type | Description |
|---|---|---|
fileNames * | array | The list of specific file names to be retrieved, without resolving their component dependencies. Do not send a single string for this parameter. The values must be provided as a valid JSON array, with… |
workspacePath * | string | The full path to the workspace. |
convertDesignToCode
Converts one or more Figma designs into production-ready code using Locofy's AI engine. Use this tool whenever the user provides one or more Figma URLs and wants to generate or convert designs into code. A Figma URL must be present in the user's message to trigger this tool. Example trigger phrases: - "convert this design to code" + Figma URL - "generate code from this design" - "convert Figma to code" - "convert this page / screen / frame to code" - "turn this design into code" - "build this from the Figma link" - "export code from Figma" Important: - A Figma URL is required — do not in…
| Parameter | Type | Description |
|---|---|---|
figmaUrls * | array | One or more Figma design URLs to convert to code. Example: ["https://www.figma.com/design/abc123/..."] |
workspacePath * | string | The full path to the workspace. |
get_design_context
Get design context for a Figma node — the primary tool for design-to-code workflows. Returns reference code, a screenshot, and contextual metadata that must be adapted to the target project. If the user wants Locofy to generate production-ready code (not just a reference), use convertDesignToCode instead. Pass the Figma URL the user pasted as figmaUrl, as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2. Do not extract fileKey or nodeId — this tool parses the URL. If the URL has no node-id, ask the user to right-click the frame in Figma and copy the link. The respons…
| Parameter | Type | Description |
|---|---|---|
figmaUrl * | string | The Figma URL the user pasted, passed as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2 |
clientFrameworks | string | Comma-separated frameworks in the current context, e.g. react, vue. Use unknown if unsure. |
clientLanguages | string | Comma-separated languages in the current context, e.g. javascript, html,css,typescript. Use unknown if unsure. |
disableCodeConnect | boolean | Unused. Kept for Figma MCP compatibility. |
excludeScreenshot | boolean | Exclude the screenshot from the response. Not recommended unless the user asked or you need to preserve context. |
forceCode | boolean | Always return code instead of metadata when the output is too large. Only set this when the user directly requests it. |
skillNames | string | Comma-separated skill names being followed, if any. Used for logging. |
get_screenshot
Generate a screenshot for a given node in a Figma design file. Works on Figma design files (URL path `/design/`), FigJam boards (`/board/`), and Figma Slides (`/slides/`). Pass the Figma URL the user pasted as figmaUrl, as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2. Do not extract fileKey or nodeId. If the URL has no node-id, ask the user to right-click the frame in Figma and copy the link. The optional `maxDimension` parameter (positive integer, max 65536, default 1024) caps the longer edge of the rendered PNG in pixels. By default this tool returns a short-lived U…
| Parameter | Type | Description |
|---|---|---|
figmaUrl * | string | The Figma URL the user pasted, passed as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2 |
contentsOnly | boolean | When true, renders the node in isolation. Defaults to false so the screenshot matches the canvas. |
enableBase64Response | boolean | When true, also include the screenshot inline as base64. Defaults to false. Set true only if the agent cannot fetch URLs. |
maxDimension | integer | Maximum pixel size of the longer edge of the rendered screenshot. Defaults to 1024. |
get_metadata
IMPORTANT: Always prefer to use get_design_context tool. Get metadata for a node or page in a Figma design file in XML format. Useful only for getting an overview of the structure; it only includes node IDs, layer types, names, positions and sizes. You can call get_design_context on the node IDs contained in this response. Pass the Figma URL the user pasted as figmaUrl, as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2. Do not extract fileKey or nodeId. If the URL has no node-id, the tool lists top-level pages instead of an XML dump.
| Parameter | Type | Description |
|---|---|---|
figmaUrl * | string | The Figma URL the user pasted, passed as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2. If the URL has no node-id, top-level pages are listed. |
get_variable_defs
Get variable definitions for a Figma node. E.g. {'icon/default/secondary': #949494}. Variables are reusable values that can be applied to all kinds of design properties, such as fonts, colors, sizes and spacings. Pass the Figma URL the user pasted as figmaUrl, as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2. Do not extract fileKey or nodeId. If the URL has no node-id, ask the user to right-click the frame in Figma and copy the link.
| Parameter | Type | Description |
|---|---|---|
figmaUrl * | string | The Figma URL the user pasted, passed as-is. Example: https://www.figma.com/design/abc123/My-File?node-id=1-2 |