Skip to main content
Glama
grab

Talk to Figma MCP

by grab

clone_node

Clone a Figma design node by specifying its ID and positioning the duplicate at new X and Y coordinates programmatically via natural language commands.

Instructions

Clone an existing node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to clone
xNoNew X position for the clone
yNoNew Y position for the clone

Implementation Reference

  • MCP tool registration and handler for 'clone_node'. Registers the tool with Zod schema for inputs (nodeId required, x/y optional) and implements the handler that forwards the clone_node command to the Figma plugin via WebSocket, handles the response, and returns formatted content or error.
    server.tool(
      "clone_node",
      "Clone an existing node in Figma",
      {
        nodeId: z.string().describe("The ID of the node to clone"),
        x: z.number().optional().describe("New X position for the clone"),
        y: z.number().optional().describe("New Y position for the clone")
      },
      async ({ nodeId, x, y }: any) => {
        try {
          const result = await sendCommandToFigma('clone_node', { nodeId, x, y });
          const typedResult = result as { name: string, id: string };
          return {
            content: [
              {
                type: "text",
                text: `Cloned node "${typedResult.name}" with new ID: ${typedResult.id}${x !== undefined && y !== undefined ? ` at position (${x}, ${y})` : ''}`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error cloning node: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/grab/cursor-talk-to-figma-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server