Skip to main content
Glama
tazumi

Figma Comments MCP

by tazumi
README.md
# Figma Comments MCP

A small local MCP server that adds Figma comment tools to an MCP client. It uses the official [Figma REST API](https://developers.figma.com/docs/rest-api/comments-endpoints/) and works alongside Figma's design MCP server.

## Tools

| Tool | Figma permission | Action |
| --- | --- | --- |
| `get_comments` | `file_comments:read` | Read all comments and replies in a file, including authors, timestamps, resolution state and pin metadata. Accepts a file key or file URL. |
| `post_comment` | `file_comments:write` | Create a file comment, reply to a root comment, or attach a comment to a frame with `client_meta`. |

The server does not alter designs or delete comments. Figma file permissions still apply.

## Setup

1. Install Node.js 20 or later and run `npm ci` in this repository.
2. In Figma, open **Settings > Security > Personal access tokens** and create a token with `file_comments:read`. Add `file_comments:write` if you want to post comments. Give it an expiration date. [Figma token instructions](https://developers.figma.com/docs/rest-api/personal-access-tokens/)
3. Supply the token to the server through `FIGMA_ACCESS_TOKEN` or `FIGMA_TOKEN_FILE`. The latter points to a local UTF-8 file containing only the token. Keep that file outside this repository and restrict access to your account.
4. Register the server in your MCP client. For Codex CLI, from this repository run:

   ```powershell
   codex mcp add figma-comments -- node (Resolve-Path ./src/index.js).Path
   ```

   If your shell does not pass the path as expected, use the absolute path to `src/index.js`. Start Codex with the token variable available to its process. The existing official Figma MCP registration can stay enabled.

Do not put the token in an MCP config, command argument, `.env` committed to Git, or a public issue. Authentication for Figma's official MCP server is separate from REST API authentication and cannot be reused here.

## Examples

Ask your MCP client:

> Get the comments from `https://www.figma.com/design/FILE_KEY/Example?node-id=0-1` and group replies with their parent comments.

> Reply to root comment `COMMENT_ID` in `FILE_KEY` with this text: ...

The API returns comments for the whole file. The `node-id` in a pasted URL does not filter the results; use the returned `client_meta` to identify comments pinned to a frame. `post_comment` accepts `client_meta` in this form when you want a frame pin:

```json
{
  "node_id": "1:2",
  "node_offset": { "x": 20, "y": 20 }
}
```

## Development

Run `npm test`. Tests use mock Figma responses and a real MCP stdio handshake. No Figma token is needed.

This project is an independent community tool and is not affiliated with Figma.