Skip to content

Repository files navigation

BitByBit-B3

Frameworks/Technologies


About

The official Figma MCP server does not support reading comments. This tool fills that gap: it exports every comment thread from a Figma file — replies, resolved state, authors, and the node each comment is pinned to — as clean nested JSON, using only a Figma personal access token (PAT). Feed the output to your AI agent (Claude Code, Cursor, etc.) or any script that needs designer feedback.

  • Nested threads — replies grouped under their parent comment, sorted chronologically, newest thread first (matches the Figma sidebar)
  • Resolved state — know which feedback is done
  • Node IDs — map each comment back to the frame/layer it's attached to
  • Accepts URLs or file keys — paste any Figma file/design/board/proto/slides URL
  • Zero dependencies — a single TypeScript file, runs with Bun

Installation

No npm registry needed — install as a global CLI straight from GitHub:

bun install -g github:BitByBit-B3/figma-comments-export

That gives you a figma-comments command anywhere:

FIGMA_PAT=figd_your_token_here figma-comments "https://www.figma.com/design/AbC123xyz/My-File"

Or skip installing entirely — it's a single file, just download and run:

curl -fsSLO https://raw.githubusercontent.com/BitByBit-B3/figma-comments-export/main/figma-comments.ts
bun figma-comments.ts <figma-url>

Or clone the repo:

git clone https://github.com/BitByBit-B3/figma-comments-export.git
cd figma-comments-export

Set your Figma personal access token either as an environment variable (export FIGMA_PAT=...) or in a .env file in the directory you run from (Bun loads it automatically):

echo 'FIGMA_PAT=figd_your_token_here' > .env

To get a PAT: Figma → Settings → Security → Personal access tokens → generate a token with the Comments (read) scope.


Usage/Examples

figma-comments "https://www.figma.com/design/AbC123xyz/My-File"
# ✓ 12 threads, 34 comments → AbC123xyz-comments.json

A raw file key and an optional output path also work:

figma-comments AbC123xyz feedback.json

(If you downloaded or cloned instead of installing globally, run bun figma-comments.ts with the same arguments.)

Arguments

file - string (required): A Figma file URL (file/design/board/proto/slides) or a raw file key.

outfile - string: Output path. Defaults to <file-key>-comments.json.

Output

{
  "file_key": "AbC123xyz",
  "exported_at": "2026-07-25T12:00:00.000Z",
  "thread_count": 2,
  "comment_count": 5,
  "threads": [
    {
      "id": "123",
      "author": "jane.doe",
      "created_at": "2026-07-20T09:30:00Z",
      "resolved": false,
      "node_id": "12:345",
      "message": "Can we bump the contrast here?",
      "replies": [
        {
          "id": "124",
          "author": "john",
          "created_at": "2026-07-20T10:00:00Z",
          "resolved": false,
          "node_id": null,
          "message": "On it",
          "replies": []
        }
      ]
    }
  ]
}

Errors

Status Meaning
403 Token expired, or missing the Comments (read) scope
404 File doesn't exist, or your account can't access it

Use with AI agents (MCP workaround)

Since the Figma MCP server can't read comments, run this exporter first and hand the JSON to your agent:

bun figma-comments.ts <figma-url> comments.json
# then: "Read comments.json and address the unresolved design feedback"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Summary of the MIT License

The MIT License is a permissive open-source license that allows users significant freedom with minimal conditions.

Key Permissions:

  1. Freedom to Use: You can use the software for any purpose, including commercial use.
  2. Freedom to Modify: You are free to modify the software as needed.
  3. Freedom to Distribute: You can distribute copies of the software, whether in its original or modified form.
  4. Freedom to Sell: You can sublicense, distribute, and even sell the software.

Key Conditions:

  • Attribution: You must include the original copyright notice and the MIT license text in any copies or substantial portions of the software.

No Warranty:

  • The software is provided "as is," with no warranties or guarantees. The author is not liable for any damages arising from the use of the software.

Contributing

Contributions from the community are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.


Code of Conduct

Please note that this project is governed by a Code of Conduct. By participating, you are expected to uphold this code.


Legal Disclaimer

This project is not affiliated with, endorsed by, or associated with Figma, Inc. or any of its products and services. All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

This tool uses the official, documented Figma REST API with the user's own personal access token, and only accesses files that the token holder already has permission to view.

About

Export Figma comments to JSON via the REST API — nested threads, replies, resolved state, node IDs. Fills the gap left by the Figma MCP server (no comment support).

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages