Figma MCP Setup
Prerequisites
Section titled “Prerequisites”- A Figma account with a file you want to use for prototyping
- A Figma personal access token
- Claude Code with MCP support
Step 1: Get a Figma access token
Section titled “Step 1: Get a Figma access token”- Go to Figma > Settings > Account
- Scroll to “Personal access tokens”
- Click “Generate new token”
- Give it a descriptive name (e.g., “s2s”)
- Copy the token
Step 2: Set the environment variable
Section titled “Step 2: Set the environment variable”export FIGMA_ACCESS_TOKEN="your-token-here"Add this to your shell profile (.zshrc, .bashrc, etc.) for persistence.
Step 3: Find your Figma file key
Section titled “Step 3: Find your Figma file key”Open your Figma file in a browser. The URL looks like:
https://www.figma.com/design/ABC123XYZ/My-File-NameThe file key is ABC123XYZ — the string between /design/ and the next /.
Step 4: Update the s2s config
Section titled “Step 4: Update the s2s config”Edit config/figma.mcp.json:
{ "fileKey": "ABC123XYZ", "accessTokenEnvVar": "FIGMA_ACCESS_TOKEN"}Step 5: Configure the MCP server
Section titled “Step 5: Configure the MCP server”Add a Figma MCP server to your Claude Code MCP settings. The exact configuration depends on which Figma MCP server you’re using. A common setup in .claude/settings.json or Claude Desktop config:
{ "mcpServers": { "figma": { "command": "npx", "args": ["-y", "@anthropic/figma-mcp-server"], "env": { "FIGMA_ACCESS_TOKEN": "your-token-here" } } }}How Claude Code uses Figma MCP
Section titled “How Claude Code uses Figma MCP”When s2s’s design stage runs, Claude Code will:
- Read the
FigmaLink.jsonartifact to know what frames to create - Use MCP tools to create/update a page and frames in your Figma file
- Save the frame IDs and metadata to
FigmaSnapshot.json
When you run pullFromFigma:
- Claude Code reads frames from Figma via MCP
- Extracts text layers and frame metadata
- Saves to
FigmaSnapshot.json - The iteration loop can then diff changes
Troubleshooting
Section titled “Troubleshooting”- “Missing API key”: Ensure
FIGMA_ACCESS_TOKENis set in your environment - “File not found”: Double-check the file key in
figma.mcp.json - MCP not available: Ensure your MCP server is configured and running
- Without Figma: s2s works fine without Figma — design artifacts are still generated as markdown specs