# Figma MCP

A Figma REST API server with two tools: list a file's top-level frames, or pull one frame down as PNG plus node JSON. Useful when the agent needs the actual design file.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: scalably-io
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/scalably-io/figma-mcp
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/mcp/figma-mcp

## What it does

The server exposes `list_frames` and `fetch_frame`. The first walks the top-level FRAME nodes of a Figma file and returns page, name, node-id, dimensions and file metadata. The second grabs a single frame and writes three files into a subdirectory of `FIGMA_OUTPUT_ROOT` (default `./figma-output`, created on first use): `frame.png`, `node.json`, and `fills.json` holding a normalized map of image fills.

Only `fetch_frame` touches the disk, which is why it carries no read-only marking. Start the server without `FIGMA_TOKEN` and it still launches and lists its tools, yet every call answers `FIGMA_NOT_CONFIGURED`.

You need a personal access token from your Figma account settings, scoped to `file_content:read`. The file key is the segment after `/design/` or `/file/` in a Figma URL. Frames get rendered through Figma's image API, so a very large frame or a high `scale` value can hit the byte caps for JSON and PNG. Lower the scale or split the frame. URLs inside `fills.json` do not last.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `FIGMA_TOKEN`, `FIGMA_API_BASE_URL`, `FIGMA_REQUEST_TIMEOUT_MS`, `FIGMA_MAX_JSON_BYTES`, `FIGMA_MAX_FRAME_BYTES`, `FIGMA_OUTPUT_ROOT`, `FIGMA_ALLOW_HTTP_FOR_TESTS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Figma

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env FIGMA_TOKEN=<FIGMA_TOKEN> --env FIGMA_API_BASE_URL=<FIGMA_API_BASE_URL> --env FIGMA_REQUEST_TIMEOUT_MS=<FIGMA_REQUEST_TIMEOUT_MS> --env FIGMA_MAX_JSON_BYTES=<FIGMA_MAX_JSON_BYTES> --env FIGMA_MAX_FRAME_BYTES=<FIGMA_MAX_FRAME_BYTES> --transport stdio figma-mcp -- npx -y @scalably-io/figma-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add figma-mcp --env FIGMA_TOKEN=<FIGMA_TOKEN> --env FIGMA_API_BASE_URL=<FIGMA_API_BASE_URL> --env FIGMA_REQUEST_TIMEOUT_MS=<FIGMA_REQUEST_TIMEOUT_MS> --env FIGMA_MAX_JSON_BYTES=<FIGMA_MAX_JSON_BYTES> --env FIGMA_MAX_FRAME_BYTES=<FIGMA_MAX_FRAME_BYTES> -- npx -y @scalably-io/figma-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "figma-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@scalably-io/figma-mcp"
            ],
            "env": {
                "FIGMA_TOKEN": "<FIGMA_TOKEN>",
                "FIGMA_API_BASE_URL": "<FIGMA_API_BASE_URL>",
                "FIGMA_REQUEST_TIMEOUT_MS": "<FIGMA_REQUEST_TIMEOUT_MS>",
                "FIGMA_MAX_JSON_BYTES": "<FIGMA_MAX_JSON_BYTES>",
                "FIGMA_MAX_FRAME_BYTES": "<FIGMA_MAX_FRAME_BYTES>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "figma-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@scalably-io/figma-mcp"
            ],
            "env": {
                "FIGMA_TOKEN": "<FIGMA_TOKEN>",
                "FIGMA_API_BASE_URL": "<FIGMA_API_BASE_URL>",
                "FIGMA_REQUEST_TIMEOUT_MS": "<FIGMA_REQUEST_TIMEOUT_MS>",
                "FIGMA_MAX_JSON_BYTES": "<FIGMA_MAX_JSON_BYTES>",
                "FIGMA_MAX_FRAME_BYTES": "<FIGMA_MAX_FRAME_BYTES>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FIGMA_TOKEN=<FIGMA_TOKEN> -e FIGMA_API_BASE_URL=<FIGMA_API_BASE_URL> -e FIGMA_REQUEST_TIMEOUT_MS=<FIGMA_REQUEST_TIMEOUT_MS> -e FIGMA_MAX_JSON_BYTES=<FIGMA_MAX_JSON_BYTES> -e FIGMA_MAX_FRAME_BYTES=<FIGMA_MAX_FRAME_BYTES> figma-mcp npx -y @scalably-io/figma-mcp
```
Replace <…> with your own values. 2 more environment variables are in the server README

## When to use it
- list every frame in a Figma file with exact node ids
- export one frame to PNG without opening the editor
- hand the agent node JSON and the image-fill map
- pull the file key out of a Figma link
- cap Figma API response sizes via environment variables

## Example prompts
- List the top-level frames in file `AbC123xyz` using `list_frames`
- Fetch frame `12:34` from file `AbC123xyz` with `fetch_frame` into `./figma-output`
- Show me which image fills are in the `fills.json` for that frame

## Similar
- [Next AI Draw.io](https://affpapa.org/en/nevibecode/mcp/next-ai-drawio.md) — MCP server · ★ 36427
- [tldraw](https://affpapa.org/en/nevibecode/mcp/tldraw.md) — MCP server · ★ 51104
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16073
- [Agent-Native Assets](https://affpapa.org/en/nevibecode/mcp/agent-native-assets.md) — MCP server · ★ 7527
- [Remove AI Watermarks](https://affpapa.org/en/nevibecode/mcp/remove-ai-watermarks.md) — MCP server · ★ 6144
- [Dembrandt](https://affpapa.org/en/nevibecode/mcp/dembrandt.md) — MCP server · ★ 3851

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
