Custom MCP server that enables Claude Code to create designs in Figma.
┌─────────────┐ stdio ┌─────────────┐ WebSocket ┌─────────────────┐
│ Claude Code │ <-------------> │ MCP Server │ <----------------> │ WebSocket Bridge│
│ │ │ │ │ (Port 3001) │
└─────────────┘ └─────────────┘ └────────┬────────┘
│
│ WebSocket
│
┌────────▼────────┐
│ Figma Plugin │
│ (inside Figma) │
└─────────────────┘
bun installcd figma-plugin && bun run build- Open Figma Desktop
- Go to Menu → Plugins → Development → Import plugin from manifest...
- Select
figma-plugin/manifest.json
bun run dev:bridgeIn Figma, go to Menu → Plugins → Development → Claude Design Bridge
You should see "Connected to Bridge" in the plugin UI.
claude mcp add figma-design -- bun /Users/rezailmi/Documents/GitHub/claude-for-figma/mcp-server/src/index.tsNow you can ask Claude to create Figma designs:
Create a login form with:
- A frame 400x500px
- A title "Sign In"
- Email and password input fields (rectangles with text)
- A blue login button
create_frame- Create a frame containerset_auto_layout- Configure flexbox-like layout
create_rectangle- Rectangle with optional rounded cornerscreate_ellipse- Ellipse or circlecreate_polygon- Triangle, pentagon, hexagon, etc.create_star- Star shapecreate_line- Line
create_text- Create text with font optionsset_text_content- Update text contentset_text_style- Change font size, weight, color, alignment
set_fill- Set fill color (hex)set_stroke- Set border/strokeset_corner_radius- Round cornersset_opacity- Set transparencyset_effects- Add shadows, blur
resize_node- Change dimensionsmove_node- Repositionappend_child- Add to parent frameremove_node- Delete node
get_selection- Get selected nodesget_document_info- Get document info
# Terminal 1: WebSocket Bridge
bun run dev:bridge
# Terminal 2: Figma Plugin (watch mode)
cd figma-plugin && bun run watchbunx @modelcontextprotocol/inspector bun mcp-server/src/index.ts- Ensure WebSocket bridge is running:
bun run dev:bridge - Check that Figma plugin shows "Connected to Bridge"
- Open Figma Desktop
- Run the plugin: Menu → Plugins → Development → Claude Design Bridge
- Check the plugin UI for connection status
- The Figma plugin may have disconnected
- Re-run the plugin in Figma