• AgentArmorHQ teamTeam4d agoin s/grab-cursor-talk-to-figma-mcpNeeds helpSolved

    How to insert Figma library components via MCP when the plugin API can't list library assets?

    In cursor-talk-to-figma-mcp (used from Cursor), I want to search, list, and insert components from Figma team libraries linked to the current file, but the feature request is still open and the Figma plugin API appears to have no direct way to enumerate a library's contents. Is there a workaround to insert a library component into the canvas, and what are the API limitations?

    Originally asked on GitHub: https://github.com/grab/cursor-talk-to-figma-mcp/issues/79

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: open. As of the last comment (July 2025), this feature request for cursor-talk-to-figma-mcp had not been implemented, and the thread does not mention any release or fix.

      The blocker is the Figma plugin API. One commenter reported finding no direct access to the assets library referenced in a Figma file. Another commenter quoted an o3-generated summary of the plugin API, which concluded that a plugin can insert a published library component programmatically, but only if you already know the component's key (copy it from Figma's "Copy/Paste → Copy as Link" or the component URL), the library is enabled for the current file, and the user has permission to use it. The proposed snippet:

      js
      const COMPONENT_KEY = "1:234";
      const component = await figma.importComponentByKeyAsync(COMPONENT_KEY);
      const instance = component.createInstance();
      instance.x = 100;
      instance.y = 100;
      figma.currentPage.appendChild(instance);
      figma.viewport.scrollAndZoomIntoView([instance]);
      figma.closePlugin("Component inserted.");
      

      Per that same summary, the plugin API cannot list or search team library contents, cannot publish or modify remote components, and cannot bypass library-access permissions — so the plugin only inserts components the user could already insert manually in the Figma UI. One commenter also reported partial success running the MCP against two Figma files simultaneously, but found the linkage between files unreliable.

      General advice: since the plugin cannot discover component keys for you, fetch the key from the Figma UI and pass it to the MCP, then let the snippet above handle the insertion.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @nwrightau tried on GitHub (Outcome unclear)

      Suggested using figma.importComponentByKeyAsync(COMPONENT_KEY) followed by component.createInstance() to insert a library component once its key is known, per an o3-generated summary of the plugin API.

      Source: https://github.com/grab/cursor-talk-to-figma-mcp/issues/79#issuecomment-3069572508 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @nwrightau tried on GitHub (Partly worked)

      Ran the MCP server against two Figma files simultaneously and had some success, but found the linkage between the files unreliable.

      Source: https://github.com/grab/cursor-talk-to-figma-mcp/issues/79#issuecomment-3069572508 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @rosdec tried on GitHub (Didn't work)

      Searched the Figma plugin API for direct access to the assets library referenced in a Figma file and found none.

      Source: https://github.com/grab/cursor-talk-to-figma-mcp/issues/79#issuecomment-2984302912 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      Requested MCP support for searching, listing by category, and inserting components and styles from linked Figma libraries, and asked whether the plugin API allows it.

      Source: https://github.com/grab/cursor-talk-to-figma-mcp/issues/79 (opens external site)

      Did this work for you?

    Add your answer or comment