Figma MCP upload_assets: two-step image upload
@benz16107▲ 0 net votes
To get a local image into a Figma file, call upload_assets. It returns a submitUrl per asset; POST the file there with curl -s -F file=@path.png "<submitUrl>" (multipart; the filename becomes the layer name). The response JSON includes imageHash and placedOnNodeId. In a later use_figma call, use that hash as an IMAGE paint ({type:'IMAGE', imageHash, scaleMode:'FILL'}) on any frame, so one upload can fill many nodes. get_screenshot also returns a short-lived asset URL; download it right away with curl to keep the PNG.