figma-mcp-hybrid
This server provides a hybrid approach to interact with Figma: a local plugin bridge for the currently open Figma Desktop file (no token needed), and REST API tools for any Figma file by key (requires FIGMA_TOKEN).
π Plugin Tools (Figma Desktop β current open file)
Read:
get_document_infoβ Overview of the current document/page treeget_selection/read_my_designβ Get currently selected nodes and their detailsget_node_info/get_nodes_infoβ Inspect nodes by IDget_local_componentsβ List all local componentsget_stylesβ Retrieve color, text, effect, and grid stylesget_annotationsβ Get annotations on a node or documentexport_node_as_imageβ Render a node to PNG/JPG/SVG/PDF (base64)scan_text_nodes/scan_nodes_by_typesβ Scan for text or typed child nodesget_reactionsβ Get prototyping reactions from nodesget_instance_overridesβ Get overrides from a component instance
Write/Edit:
create_frame,create_rectangle,create_textβ Create new nodescreate_component_instanceβ Instantiate a local or library componentset_fill_color,set_stroke_colorβ Set colorsset_text_content,set_multiple_text_contentsβ Update text nodesmove_node,resize_node,clone_nodeβ Transform nodesdelete_node,delete_multiple_nodesβ Remove nodesset_corner_radiusβ Set corner radius (per corner if needed)set_layout_mode,set_padding,set_axis_align,set_layout_sizing,set_item_spacingβ Auto-layout controlsset_instance_overridesβ Apply overrides to component instancesset_annotation,set_multiple_annotationsβ Create/update annotationscreate_connections,set_default_connectorβ Prototyping connectorsset_focus,set_selectionsβ Control viewport and selection
π REST API Tools (any Figma file, requires FIGMA_TOKEN)
get_figma_fileβ Fetch a file's full document tree by file keyget_figma_nodesβ Fetch specific nodes from any fileget_figma_componentsβ List published componentsget_figma_stylesβ List stylesget_figma_imagesβ Render nodes as image URLsget_figma_comments/post_figma_commentβ Read and post comments
π§ Channel Management
join_channelβ Switch the WebSocket communication channel (default:cursor-figma)
Provides tools to read Figma files (document tree, nodes, components, styles, comments, image exports) via REST API and to write to Figma canvas (create/edit/delete nodes, set fills, auto-layout, components, text, etc.) via a WebSocket bridge to the Figma plugin.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@figma-mcp-hybridlist components from the main Figma file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Figma MCP
A local Model Context Protocol server that connects Cursor (or any MCP client) to Figma through a Figma plugin over a local WebSocket bridge β no Figma REST API, no token, no rate limits.
Reads β inspect the file currently open in Figma Desktop: document tree, selection, nodes, local components, styles, image exports.
Writes β create/edit/delete nodes, set fills, auto-layout, components, text, and more.
Everything runs over the Figma Plugin API on the file you have open in Figma Desktop. Browser Figma is not supported.
Based on sonnylazuardi/cursor-talk-to-figma-mcp (MIT), ported to run entirely on Node (no Bun).
Desktop only β not browser
Figma Desktop | Figma in browser | |
Import a local dev plugin | Yes | No |
Connect to | Yes | No |
Read/write via Plugin API | Yes | No |
Works with this MCP | Yes | No |
You need Figma Desktop because this workflow imports a development plugin from manifest.json and connects it to a relay running on your machine. Browser Figma cannot do either of those things.
Related MCP server: MC Figma Bridge
What must be running
A working session needs three things at once:
Terminal Figma Desktop Cursor
ββββββββ βββββββββββββ ββββββ
relay running + file open + MCP server enabled
plugin connectedPiece | How to start it |
Relay |
|
Figma file + plugin | Open a file in Desktop, run the plugin, click Connect |
MCP server | Started automatically by Cursor from |
The plugin and the MCP server both default to the shared channel cursor-figma, so
there is no manual join_channel step in the common case. If any of the three
pieces above is missing, tools will hang or return connection errors.
Quick start
1. Install
git clone <this-repo>
cd figma-mcp
npm install2. Configure Cursor
Add to ~/.cursor/mcp.json. Use an absolute path to src/server.ts:
{
"mcpServers": {
"figma-mcp-mh": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/figma-mcp/src/server.ts"]
}
}
}A project-scoped equivalent is in .mcp.json (relative path β works when Cursor opens this repo as the workspace). No token or other env vars are required.
Restart Cursor (or reload MCP servers) after saving.
3. Start the relay
In a terminal, from the project root:
npm run socketListens on ws://localhost:3055 by default. Override with WS_PORT.
Leave this terminal running for the whole session.
4. Import and run the Figma plugin
All of this happens in Figma Desktop:
Open the design file you want to work on.
Plugins β Development β Import plugin from manifestβ¦
Select
src/manifest.json.Plugins β Development β figma mcp to run it.
In the plugin panel, click Connect (leave the channel as the default
cursor-figma).
Keep the plugin panel open and connected while you work.
5. Start using it
Once connected, ask Cursor to read or edit your open Figma file. Examples:
"What's in my current Figma document?" β
get_document_info"Read my current selection" β
read_my_design"Create a 400Γ300 frame called Hero" β
create_frame"Set the fill of node
1:234to blue" βset_fill_color
All tools operate on whatever file is open in Figma Desktop right now.
Architecture
Cursor (MCP host)
stdio / JSON-RPC
MCP server (src/server.ts, Node + tsx)
WebSocket client -> Relay (src/socket.ts) <-> Figma plugin (read + write the open file)Three independent processes connect over ws://localhost:3055:
The relay (
src/socket.ts) β a channel-based WebSocket broker. It does not understand Figma; it forwards messages between clients in the same named channel.The MCP server (
src/server.ts) β connects to the relay as a WebSocket client and to Cursor over stdio. Each MCP tool maps to asendCommandToFigma(...)call.The Figma plugin (
src/manifest.json,code.js,ui.html) β the iframe UI (ui.html) owns the WebSocket (the plugin sandbox cannot), and relays commands to the main thread (code.js), which calls the Figma Plugin API.
The MCP server and plugin must be on the same channel or commands go nowhere. Both default to cursor-figma and the server auto-joins it on startup, so they line up automatically; use join_channel only to switch to a custom channel.
How a command flows
Cursor calls create_frame
β server.ts sends { command, params, id } over WebSocket
β relay broadcasts to the plugin peer in the channel
β ui.html β code.js β figma.createFrame(), etc.
β result bubbles back with the same id
β Cursor receives the tool resultReads work the same way. The plugin calls figma.getNodeByIdAsync(), node.exportAsync({ format: "JSON_REST_V1" }), and similar β all local, no HTTP to Figma.
Requirements
Node.js 18+ (developed on Node 24). No Bun required.
Figma Desktop with a file open.
No Figma personal access token needed.
Tools
All tools need the relay running and the plugin connected. The server auto-joins the default channel, so join_channel is only needed for a custom channel.
Read tools
Tool | Purpose |
| Current document/page overview |
| Currently selected nodes |
| One or more nodes by ID |
| The current selection in detail |
| Components defined in the open file |
| Color/text/effect/grid styles |
| Render a node to PNG (returns base64 image bytes) |
Write tools
create_frame, create_text, create_rectangle, set_fill_color, set_stroke_color, move_node, resize_node, clone_node, delete_node, auto-layout (set_layout_mode, set_padding, set_item_spacing, ...), component instances, annotations, text scanning, and more β see src/server.ts.
Comments (unsupported)
get_figma_comments and post_figma_comment are stubs only. Figma comments are exposed exclusively through the REST API, and the Plugin API has no access to them. Use Figma directly for comments.
Troubleshooting
Tools hang or time out
Is
npm run socketstill running?Does the plugin show "Connected"?
Does the plugin's channel match the server's (both default to
cursor-figma)? If you changed the channel in the plugin, calljoin_channelwith that exact name.Is the plugin panel still open?
"Not connected to Figma" / connection errors
Start the relay first, then connect the plugin.
Check nothing else is blocking port 3055.
MCP server not appearing in Cursor
Confirm
~/.cursor/mcp.jsonuses an absolute path tosrc/server.ts.Restart Cursor or reload MCP servers.
Check MCP logs in Cursor settings.
Plugin not found in Figma
Re-import from manifest: Plugins β Development β Import plugin from manifestβ¦
Development plugins live under Plugins β Development, not the community list.
Wrong or empty data
Switch to the correct file in Figma Desktop β reads only see the open file.
There is no "read any file by URL/key" in this build.
Smoke test after connecting
get_document_infoβ should return your current page tree.create_framethenset_fill_colorβ should create something visible on the canvas.
Verify (developers)
npm run typecheck # tsc --noEmit
node scripts/relay-smoke.mjs # relay request/response round-trip
node scripts/mcp-smoke.mjs # boot server over stdio, list toolsFor a full end-to-end check: start the relay, connect the plugin (default channel), then call get_document_info and create_frame followed by set_fill_color. No join_channel needed unless you changed the channel.
Gotchas
stdio is sacred. The MCP server must never write to stdout except JSON-RPC. It logs to stderr. The relay is a separate process, so its stdout logging is fine.
WebSocket lives in the plugin UI. The Figma plugin sandbox has no
WebSocket; the iframe (ui.html) owns the socket and relays to the main thread.Channel mismatch = silence. If write/read tools hang, confirm the plugin and the server are on the same channel (both default to
cursor-figma) and the relay is running.File must be open. Reads and writes target the file open in Figma Desktop. You cannot read a closed or remote file by key without the REST API (removed in this build).
Comments are unavailable. The Plugin API cannot access comments.
Roadmap
The shared default channel (cursor-figma) already removes the manual join_channel step (Phase 0). An optional ~/.figma-mcp/state.json ({ "channel": "...", "port": ... }) can override the channel/port; the server reads it on startup and falls back to the defaults if it's absent.
See plan.md for a planned menubar companion app that would also auto-start the relay and show live connection status β removing the manual npm run socket step. That app does not exist yet; the flow above is the current setup.
Credits
Write/read bridge and plugin: sonnylazuardi/cursor-talk-to-figma-mcp (MIT). Node port and plugin-only refactor applied here.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/mhue26/figma-mcp-hybrid'
If you have feedback or need assistance with the MCP directory API, please join our Discord server