> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spurtest.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Spur is an AI-powered QA engineer that lets teams create and run automated end-to-end tests for web and mobile apps using natural language.
> When answering questions about Spur, cite the relevant page from docs.spurtest.com.

# Figma in Spur AI

> Connect Figma to Spur AI with a personal access token so it can read your designs, screenshots, comments, and design system.

## Overview

Connect Figma to [Spur AI](https://docs.spurtest.com/analysing-tests/spur-ai-chat.md) so it can read your design files while it helps you with a test. Paste a Figma link into chat, then ask Spur AI to check a page against the design or to write tests from it.

To connect, click the **MCP** button below the message box in Spur AI, open the **Explore** tab, select **Figma**, and paste a Figma personal access token. If Figma sits under **Needs admin approval**, an admin has to allow it first. [Connect Figma](#connect-figma) has the full steps.

> [card] Check a Page Against Its Design
>
> Ask Spur AI to compare a Figma frame with a screenshot from your latest run.

> [card] Write Tests From a Design
>
> Share a frame and ask Spur AI to write tests for the flow it shows.

> [card] Read Design Feedback
>
> Ask Spur AI what the open comments on a file say.

What to know before you connect:

* Spur AI can only read from Figma. It can't edit files, add comments, or create designs.
* You connect with a Figma personal access token. There's no Figma sign-in page.
* The connection is yours alone. Spur AI reads the files that your own Figma account can open.
* An admin allows Figma for the Application before anyone can connect it.

## Connect Figma

Connecting takes three parts. An admin allows Figma once for the Application. Then each person creates their own token and adds it in Spur AI.

You add the token yourself in the **MCP servers** dialog. Spur AI can't connect Figma for you, so don't paste a token into a chat message.

### Allow Figma for your team

Only an admin can do this, once for each Application. If you're a member, ask an admin.

**1. Open the Explore tab**

In Spur AI, click the **MCP** button below the message box, then open the **Explore** tab.

**2. Add Figma**

Find Figma under **Needs admin approval** and click **Add**. Then click **Add for your team**.

Figma now sits under **Team approved MCPs**. Everyone in the Application can connect it with their own token. See [Allow servers for your team](https://docs.spurtest.com/analysing-tests/spur-ai-mcp-servers.md#allow-servers-for-your-team) for how to review or remove what your team can connect.

### Create a Figma personal access token

You create the token in Figma. See Figma's guide to [personal access tokens](https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens) if these steps have changed.

**1. Open your Figma settings**

In Figma's file browser, click the account menu in the top-left corner and select **Settings**.

**2. Start a new token**

Select the **Security** tab. Scroll to **Personal access tokens** and click **Generate new token**.

**3. Choose the scopes**

Name the token, set when it expires, and give it the scopes below. Each scope only reads.

| Scope | What it turns on in Spur AI |
| - | - |
| `file_content:read` | Required. Designs and screenshots. |
| `file_comments:read` | Comments. |
| `library_content:read` | Design system search. |
| `file_variables:read` | Variable names. Figma offers this scope on Enterprise plans only. |
| `current_user:read` | Checking whose token it is. |

Only `file_content:read` is required. Without one of the other scopes, Spur AI can't use the tools that need it.

**4. Copy the token**

Generate the token and copy it. Figma shows the token only once.

### Add the token in Spur AI

**1. Open the MCP servers dialog**

In Spur AI, click the **MCP** button below the message box. The **MCP servers** dialog opens.

**2. Select Figma**

Open the **Explore** tab and select **Figma**. Spur shows **Connect to Figma**.

If Figma sits under **Needs admin approval**, you can't select it yet. Ask an admin to [allow Figma for your team](#allow-figma-for-your-team).

**3. Paste your token**

Paste the token into **API token**. The scopes are listed under the field, and **Open Figma settings** takes you to Figma if you still need a token.

**4. Continue**

Click **Continue**. Spur checks the token with Figma, then shows Figma on the **Connected** tab with a **Connected** badge.

If Figma doesn't accept the token, Spur says that Figma refused the API token and doesn't connect. Check that you copied the token in full and that it hasn't expired.

## Use Figma in chat

Paste a Figma link into your message and say what you need. Spur AI reads the file and the frame from the link. A link to one frame works better than a link to a whole file, because Spur AI reads less and sees more detail.

Spur AI reads links to Figma design files and FigJam boards. For example:

* "Compare this frame with the checkout page in my latest run: \[link]"
* "Write tests for the sign-up flow in this design: \[link]"
* "What are the open comments on this file? \[link]"
* "Which components and colors does this frame use? \[link]"

Every Figma tool is read-only, so Spur AI runs each one straight away without an approval card.

## What Spur AI can read

Spur AI picks the tool for you. This table shows what each tool reads and the scope it needs on your token.

| Tool | What it reads | Scope |
| - | - | - |
| `get_design_context` | A frame or layer and everything inside it: layout, sizes, colors, typography, text, and components, with a screenshot. | `file_content:read` |
| `get_metadata` | The pages in a file, or the layers under a frame, with their names, positions, and sizes. | `file_content:read` |
| `get_screenshot` | An image of a frame or layer. | `file_content:read` |
| `get_figjam` | A FigJam board: its sticky notes, shapes, connectors, and text, with a screenshot. | `file_content:read` |
| `get_variable_defs` | The variables and styles that a frame uses, with their values. | `file_content:read`, and `file_variables:read` for variable names |
| `get_comments` | The comments on a file, with each author, date, where it's pinned, and whether its thread is resolved. | `file_comments:read` |
| `search_design_system` | The components, styles, and variables published from a library file, by name. | `library_content:read`, and `file_variables:read` for variables |
| `download_assets` | Temporary download links for a frame as PNG, JPG, SVG, or PDF, and for the original images used inside it. | `file_content:read` |
| `whoami` | The name and email of the Figma account behind your token. | `current_user:read` |

Spur AI can't edit a file, add or resolve comments, generate designs, or use Code Connect.

## How the connection works

Figma's own Model Context Protocol (MCP) server only accepts the AI clients that Figma has approved, so Spur AI can't connect to it. Spur built its own Figma tools instead. They read your files through Figma's public REST API, with your personal access token.

This means:

* The tools run inside Spur. They cover what Figma's server can read from a file.
* Spur stores your token encrypted and sends it only to Figma.
* The token acts as you. Spur AI can read any file that your Figma account can open, and no others.
* Your teammates can't use your connection. Each person adds their own token.
* Figma's **Details** page in Spur shows Spur under **Made by**, because Spur built the tools.

## Replace an expired token

A Figma token stops working on the expiry date you set, or when you revoke it in Figma. Spur finds out the next time Spur AI uses Figma in chat. Spur then shows a notice that Figma needs a new API token and turns Figma off in chat until you add one.

**1. Create a new token**

Follow [Create a Figma personal access token](#create-a-figma-personal-access-token).

**2. Open the replace form**

Click **Replace token** on the notice. You can also click the **MCP** button, find Figma on the **Connected** tab with a **New token needed** badge, and click **Replace token** there.

**3. Save the new token**

Spur shows **Replace your Figma token**. Paste the new token into **API token** and click **Save**.

## Troubleshooting

| Problem | Likely cause | What to do |
| - | - | - |
| Figma is dimmed under **Needs admin approval** on the **Explore** tab. | An admin hasn't allowed Figma for this Application. | Ask an admin to [allow Figma for your team](#allow-figma-for-your-team). |
| Spur says Figma refused the API token when you connect. | The token is incomplete, expired, or revoked. | Copy the token again, or create a new one. |
| Figma shows a **New token needed** badge. | The saved token expired or was revoked. | [Replace the token](#replace-an-expired-token). |
| Figma shows a **Not allowed** badge. | Figma isn't on this Application's allowed list. An admin removed it, or this Application never allowed it. Your connection follows you to every Application, but each Application has its own allowed list. | Ask an admin to [allow Figma](#allow-figma-for-your-team) for this Application. |
| Spur AI says Figma refused the request. | The token is missing the scope the tool needs, or your Figma account can't open the file. | Create a token with the scope, or ask the file's owner to share the file with you. |
| Spur AI says Figma found no such file or node. | The link is wrong, or your Figma account can't open the file. | Open the link in Figma with the same account, then copy it again. If Figma won't open the file, ask the file's owner to share it with you. |
| Spur AI says Figma's rate limit is used up. | Figma limits how often a token can read files. View and Collab seats get a small monthly allowance. | Wait for the limit to reset. See Figma's [rate limits](https://developers.figma.com/docs/rest-api/rate-limits/). |
| Spur AI reads styles but no variable names. | Figma serves variables to Enterprise plans only, and the token needs `file_variables:read`. | On an Enterprise plan, create a token with that scope. |
| Spur AI says a frame is too large to read. | The frame has more layers than Spur AI can read at once. | Share a link to a smaller frame inside it. |
| Design system search finds nothing. | The link points to a file that uses the library, not the library file. | Share a link to the library's own file. |

To check which Figma account Spur AI is using, ask it "Which Figma account are you connected as?" This needs the `current_user:read` scope on your token.

## Limits

* Spur AI reads from Figma only. It can't change your files.
* Spur AI leaves hidden layers out when it reads a design.
* Screenshots reach Spur AI scaled down, with a longer edge of at most 2,048 pixels. For fine detail, share a smaller frame.
* Screenshot and download links from Figma are temporary. Open or save them soon after Spur AI shares them.
* Figma counts toward the 10 MCP servers you can connect. See [MCP Servers in Spur AI](https://docs.spurtest.com/analysing-tests/spur-ai-mcp-servers.md) to turn Figma off, view its tools, or remove it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.