Prerequisites
Before you begin, ensure you have:- Access to Claude Code
- Bun runtime installed
- A Figma account with editor access
Quick Setup (Recommended)
The fastest way to get started is using the automated setup script:Run automated setup
Execute the setup script which will install dependencies and configure the MCP server:This command will:
- Install all required dependencies
- Create
.mcp.jsonin your project root with the MCP server configuration - Also create
.cursor/mcp.jsonfor Cursor compatibility
Start the WebSocket server
Launch the WebSocket relay server that connects Claude Code to Figma:The server will start on port 3055. Keep this terminal window open.
Install the Figma plugin
See the Figma Plugin Setup guide for detailed instructions on installing and configuring the Figma plugin.
Manual Setup
If you prefer manual configuration:Add MCP server via CLI
Use the Claude Code CLI to add the MCP server:Alternatively, create
.mcp.json in your project root manually:Configuration Files
The setup creates a.mcp.json configuration file:
- Uses
bunxto run the MCP server package - Always fetches the latest version from npm
- Works with both Claude Code and Cursor IDE
Architecture Overview
Understanding the communication flow helps with troubleshooting:- Claude Code: Issues commands via MCP protocol over stdio
- MCP Server: Translates commands and manages communication
- WebSocket Relay: Routes messages between server and plugin (port 3055)
- Figma Plugin: Executes commands in Figma and returns results
Verification
To verify your setup is working:Check MCP server status
The TalkToFigma MCP server should be available to Claude Code. You can verify by asking Claude about available MCP tools.
Common Workflows
Starting a session
Troubleshooting
MCP server not found
- Ensure
.mcp.jsonexists in your project root - Verify the JSON syntax is valid
- Check that
bunxis available in your PATH - Try adding the server via CLI:
claude mcp add TalkToFigma -- bunx cursor-talk-to-figma-mcp@latest
Connection timeouts
- Confirm the WebSocket server is running (
bun socket) - Check that port 3055 is not blocked by a firewall
- Ensure the Figma plugin is active and connected to the same channel
Commands fail silently
- Always call
join_channelbefore issuing any Figma commands - Verify you’re in the same channel in both Claude Code and the Figma plugin
- Check the WebSocket server logs for error messages
Best practices
- Always start with
join_channelto establish connection - Use
get_document_infoto understand the design structure before making changes - Use
get_selectionorread_my_designbefore modifying elements - Prefer batch operations for better performance
Next Steps
Figma Plugin Setup
Install and configure the Figma plugin
Local Development
Set up a local development environment
Advanced Configuration
Using a specific version
To lock to a specific version:Custom WebSocket port
If you need to use a different port for the WebSocket server:Environment variables
The WebSocket server supports these environment variables:PORT: WebSocket server port (default: 3055)