Table of Contents

Figma + Claude Code Setup Guide

Get a new machine set up to clone the repo, connect Figma to Claude Code, and turn a Figma screen into real code

  • Install Node.js, set up your git identity, then clone the repo.
  • Generate a Figma personal access token (read-only) and register the Figma MCP server with Claude Code.
  • Day to day: give Claude Code a Figma frame URL plus a description. It reads the design via MCP and writes code into frontend/ (or backend/).
  • Pushing finished frontend work follows the same rule as everywhere else in this project: push directly to staging, never to main.

1. Prerequisites

node --version
npm --version

Both commands should print a version number. If they say “not recognized,” your terminal session is stale. Open a brand new one.

2. Set your git identity (one-time)

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

This is local identity only. It is separate from logging into GitHub, which happens in the next section.

3. Clone the repo and log into GitHub

git clone https://github.com/testing-22487/test.git
cd test
git checkout staging

Do not overwrite the original(from Github) CLAUDE.md after cloning. It's the project's real, git-tracked rules file covering roles, branching, and security. It does not need editing as part of this setup.

4. Generate a Figma personal access token

Never paste this token into a chat with Claude, a Slack message, or commit it to git. Anything pasted into a chat can end up logged permanently. If a token is ever exposed, treat it as compromised: revoke it on Figma's Personal access tokens page and generate a new one.

5. Connect the Figma MCP server to Claude Code

claude mcp add figma --env FIGMA_API_KEY=YOUR_TOKEN_HERE -- npx -y figma-developer-mcp --stdio
Added stdio MCP server figma for project path

If the project path shown is wrong (for example, system32), your terminal wasn't in the repo folder when you ran the command. Fix it by running cd into the repo folder first, then re-running the claude mcp add command above.

6. Restart and verify

claude mcp list

If it says “Failed to connect” on the very first check, it's usually just npx downloading the package for the first time. Wait a few seconds and run the list command again.

7. Day-to-day workflow

Once connected, the loop is:

Never push or merge into main. Only the project admin or owner promotes staging into main, via a pull request, once staging has been tested.

8. Pushing completed frontend work back to GitHub

Figma is a frontend/UI-only tool, so the backend dev never touches the Figma MCP connection. This section covers getting finished frontend/ work from your machine back onto GitHub.

git status
git pull origin staging
git add frontend/
git commit -m "what you did"

Replace “what you did” with your own plain description of the change, e.g. “Add login screen component from Figma design.” Git stores whatever text you put after -m as-is; it's a label for humans reading history later, not something git parses or validates.

git push origin staging

If the pull in the second step reports a conflict, stop and resolve it manually. Don't force-push. Since frontend/ and backend/ are separate folders, conflicts should be rare; if one shows up, check with the backend dev before resolving.

Reference: roles and branches

Branch Who touches it How
staging Frontend + backend devs Push directly, no PR needed
main Admin/owner only PR from staging, after testing

See CLAUDE.md at the repo root for the full project rules: team roles, security notes on payment/client data, and tech stack once decided.