home / mcp / agent to figma mcp server
Provides an MCP server that enables AI agents to interact with Figma designs via a WebSocket relay and Figma plugin.
Configuration
View docs{
"mcpServers": {
"caelinsutch-agent-to-figma-mcp": {
"command": "node",
"args": [
"/path/to/agent-to-figma-mcp/apps/mcp-server/dist/index.js"
],
"env": {
"RELAY_URL": "ws://localhost:3055",
"CHANNEL_NAME": "figma"
}
}
}
}You run an MCP server that lets AI agents talk to and manipulate Figma designs through a dedicated WebSocket relay and a Figma plugin. This setup enables interactive design workflows where an agent can inspect, create, modify, and prototype design elements inside Figma via a stable MCP channel.
Install and run the MCP server components, then connect your MCP client (for example, Claude) to the relay channel. Use the Figma plugin to send commands for reading document information, creating and editing shapes, managing layouts, and working with components and variables. The server exposes a broad set of tools that you can invoke from your agent to drive design changes inside Figma.
Prerequisites: you need Bun v1.0+ installed and the Figma Desktop App available on your machine.
# Clone the repository
git clone https://github.com/anthropics/agent-to-figma-mcp.git
cd agent-to-figma-mcp
# Install dependencies
bun install
# Build all packages
bun run buildStart the WebSocket relay that connects to the Figma plugin.
bun run --filter=@caelinsutch/relay-server start
```
The relay server listens on ws://localhost:3055.Install and configure the Figma plugin in your Figma Desktop app.
1. Open Figma Desktop
2. Plugins ā Development ā Import plugin from manifest...
3. Select apps/figma-plugin/manifest.json
4. Run the plugin from Plugins ā Development ā Figma MCP PluginAdd the MCP server configuration to your Claude Desktop setup. This enables Claude to connect to the local MCP server via the relay.
{
"mcpServers": {
"agent-to-figma": {
"command": "node",
"args": ["/path/to/agent-to-figma-mcp/apps/mcp-server/dist/index.js"],
"env": {
"RELAY_URL": "ws://localhost:3055",
"CHANNEL_NAME": "figma"
}
}
}
}In the Figma plugin UI, enter the channel name (default: figma) and click Connect. Then start chatting with Claude about your Figma designs and start issuing commands through the MCP channel.
The MCP server is implemented as a stdio transport server. It runs a Node.js process that communicates with the Claude desktop client via a WebSocket relay. The plugin and the relay work together to execute commands that read, create, modify, and arrange Figma design elements.
Plugin not connecting: ensure the relay server is running, the channel name matches between the plugin and the MCP server, and that Figma has network access permissions.
Commands timing out: verify the plugin shows a connected indicator, confirm node IDs are valid, and try reconnecting the plugin.
Build or type errors: clean and rebuild, then re-run the build and start steps.
Get current document information from Figma to understand context.
Retrieve currently selected nodes in the document.
Fetch detailed information about a specific node.
Read and return data for the selected design nodes.
Create a new rectangle shape with specified properties.
Create a new frame with optional auto-layout support.
Create a new text node with content and styling.
Apply a fill color to a node.
Apply a stroke color to a node.
Set the corner radius for a shape.
Move a node to a new position.
Resize a node along width and/or height.
Remove a node from the canvas.
Create a clone of an existing node.
Switch a frame or group to an auto-layout mode.
Adjust padding for auto-layout frames.
Set axis alignment for auto-layout content.
Configure spacing between items in auto-layout.
List local components available in the document.
Instantiate a component at a specified location.
Retrieve overrides for a component instance.
Apply overrides to a component instance.
List variable collections defined locally.
Create a new variable collection.
Create a new variable within a collection.
Set a variable value for a given mode or state.
Bind a variable to a node property.
Remove a variable binding from a node.
Export a node as an image (PNG/JPG/SVG/PDF).
Query prototype reactions for a flow.
Create prototype connections between frames or nodes.