Figma personal access tokens are created under Settings → Security → Personal access tokens in Figma, with chosen scopes and an expiry of at most 90 days, and are sent in the X-Figma-Token header to the Figma REST API. Organization and Enterprise admins can instead create plan access tokens, which are not tied to a person and last up to a year. Figma's official MCP server at https://mcp.figma.com/mcp signs in with your Figma account in the browser, so it does not need a personal access token.
Figma key types
| Type | Prefix | Secret? | Scope | Expiry |
|---|---|---|---|---|
| Personal access token Shown once. Figma says one token should be used for a single integration. | — | Yes | The scopes chosen at creation, never more than your own access to files, teams and projects | Chosen at creation, at most 90 days; non-expiring tokens can no longer be created (since April 28, 2025) |
| Plan access token Created by organization admins at figma.com/developers/tokens; creation requires two-factor authentication unless the organization enforces SSO. | — | Yes | API access to an Organization or Enterprise plan, not tied to an individual user | Up to 365 days; can be refreshed while active |
| OAuth access token Used by apps acting on behalf of other Figma users, and by the Figma MCP server sign-in. | — | Yes | The scopes the user granted to your OAuth app | — |
How to create a Figma key
- In the Figma file browser, open the account menu in the top-left corner and choose Settings.
- Open the Security tab and find Personal access tokens.
- Click Generate new token, enter a name, and set the expiration and scopes.
- Press Return to create the token, then copy it at once; Figma shows it only once.
Limiting what the key can do
Pick the narrowest Figma scopes: file_content:read to read file contents, file_comments:read or file_comments:write for comments, file_variables:read for variables, file_dev_resources:read for Dev Mode resources and webhooks:write for webhooks. The broad files:read scope is deprecated, and projects:read and project_metadata:read are deprecated too. Scopes never exceed what the organization or the owner of a file, folder or team allows you to do. The Security tab shows each token's scopes and when it was last used, which helps spot a token that is being misused.
How to rotate a Figma key
- Generate a new personal access token with the same scopes and an expiry of up to 90 days.
- Update the integration or environment variable (for Code Connect CI,
FIGMA_ACCESS_TOKEN) to the new token. - Revoke the old token in Settings → Security.
- For plan access tokens, use refresh instead; the previous secret keeps working for 24 hours.
The 90-day cap means every personal access token needs a rotation plan. Figma suggests plan access tokens for CI because they can last up to a year; a refreshed plan token gets a new expiry based on its original lifetime.
How to revoke a Figma key
- Open the account menu, choose Settings and open the Security tab.
- Under Personal access tokens, select the token and click Revoke access; Figma says revocation is instant.
- Admins revoke plan access tokens from the developer hub; that is immediate and cannot be undone.
If your Figma key leaked
- Revoke the token in Settings → Security immediately.
- Check the token's last-used time and the files it could reach for activity you did not start.
- Generate a replacement with fewer scopes and a short expiry, and update the integration.
Environment variables and CLI
Figma's SDKs and docs read the key from FIGMA_ACCESS_TOKEN.
Code Connect CLI (npx figma connect): Reads a personal or plan access token from FIGMA_ACCESS_TOKEN, for example in npx figma connect publish
Things that catch people out
- Personal access tokens expire after at most 90 days, so integrations built on one break on a schedule unless the token is rotated.
- A token is shown only once; leaving the page before copying it means generating another.
- The
files:readscope is deprecated; new tokens should use granular scopes such asfile_content:read. - Government accounts use a separate MCP endpoint,
https://mcp.figma-gov.com/mcp.
Common Figma authentication errors
403 - The request was valid, but the server is refusing action
The token lacks a scope or file permission the endpoint needs, or the request used HTTP instead of HTTPS.
429 - Rate limit
Too many requests; Figma rate limits per user, and for OAuth tokens per user tied to the token.
Using your Figma key with AI agents
A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.
BotPassword works this way. For a Figma key, these intents fit:
| Intent | What BotPassword does |
|---|---|
run_with | Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output. |
http_request | Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused. |
Figma also publishes its own MCP server. Whatever server the agent uses, keep the credential it authenticates with out of the agent's context.
Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents
Frequently asked questions
Where do I find my Figma API key?
Figma calls it a personal access token. Create one in Settings → Security → Personal access tokens → Generate new token and copy it when shown.
Do I need a Figma API key for the Figma MCP server?
No. Add https://mcp.figma.com/mcp to your MCP client (for Claude Code, claude mcp add --transport http figma https://mcp.figma.com/mcp), choose Authenticate, and click Allow access in the browser. The sign-in replaces a personal access token.
How long does a Figma personal access token last?
You set the expiry when you create it, up to 90 days. Figma stopped allowing non-expiring tokens in April 2025.
Which header does the Figma API use for tokens?
Send a personal or plan access token in the X-Figma-Token header on every REST API request.
What token should Figma Code Connect use in CI?
Code Connect reads FIGMA_ACCESS_TOKEN. Figma suggests a plan access token for CI because it lasts up to a year, against the 90-day maximum of a personal token.
Can an AI agent use my Figma key without seeing it?
Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a .env file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with run_with, http_request, so the agent gets the result and never the value.