Reading from the open file, not the REST API
The Figma REST API can also return specific nodes if you pass their IDs. But that means picking the file key and node IDs out of URLs and setting up a personal token. And the REST API cannot tell what is selected on screen right now.
This tool reads from a Figma Desktop plugin instead. The AI editor launches the MCP server over stdio, and the server opens a WebSocket on port 3055. The plugin UI connects to it, forwards each request to the main thread with postMessage, and reads nodes through the plugin API.
That lets it answer "implement the element I have selected" without any node ID. Local color, text, and effect styles can be listed straight from the plugin API too. Reading the design needs no token.
The cost is that Figma Desktop must be open with the plugin running. Comments cannot be read or answered through the plugin API, so that part alone still uses the REST API and a token.
Matching replies to requests over one WebSocket
An AI editor may call several tools in a row, and the plugin's replies do not always come back in order. The MCP server gives each request a UUID and stores it in a pending table before sending it. The plugin replies with the same ID, and the server resolves the waiting call by that ID.
Timeouts differ by operation: 30 seconds for normal reads, 60 seconds for image exports, and 120 seconds for a full-page export. If the plugin disconnects, every pending request ends with an error, so the AI editor does not keep waiting after Figma is closed.
The amount of data has three levels: minimal returns only names and sizes, standard adds the fills, spacing, and text settings needed to implement, and full includes design-token bindings. Default values such as visible: true are dropped from the output.