figma-mcp
# figma-mcp
MCP server for the Figma REST API (stdio). TypeScript; only dependencies are the MCP SDK + zod.
## Tools
| Tool | What it does | Writes |
|---|---|---|
| `figma_get_me` | Token user, sanity check | no |
| `figma_get_file` | File as document tree (limit `depth`!) | no |
| `figma_get_file_nodes` | Full node data (fills, layout, text) for node IDs | no |
| `figma_get_images` | Render nodes as PNG/JPG/SVG/PDF, temporary URLs | no |
| `figma_get_image_fills` | URLs of all image fills in a file | no |
| `figma_get_comments` | Read comments | no |
| `figma_post_comment` | Post a comment, optionally pinned to a node | yes |
## Setup
1. Create a personal access token: https://www.figma.com/settings → Security → Personal access tokens (scope `file_content:read` at minimum; comments scope for `figma_post_comment`).
2. MCP client configuration:
```json
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["<absolute-path>/figma-mcp/dist/index.js"],
"env": { "FIGMA_API_KEY": "figd_YOUR_TOKEN" }
}
}
}
```
3. Restart your MCP client.
## Usage notes
- **File key** = the part of a Figma URL between `/design/` and the next `/`.
- **Node ID** = `12:34` format. Right-click → "Copy link to selection" gives `node-id=12-34` → use `12:34`.
- Large files: start with `figma_get_file` at `depth=1..2`, then go deeper with `figma_get_file_nodes`.
## Dev
```
npm install
npm run build
```
## License
MIT
TDQS
Scored across 7 tools
Most tools target clearly distinct resources (user, comments, file tree, nodes, rendered images). The one pair that could be confused is figma_get_image_fills (embedded photo assets) vs figma_get_images (rendered node exports), but the descriptions make the distinction explicit, and figma_get_file vs figma_get_file_nodes is clearly framed as a drill-down workflow.
Every tool follows the same figma_<verb>_<noun> pattern with consistent snake_case, and get_/post_ verbs map cleanly to read vs write. The shared prefix also makes the tools trivially groupable in a multi-server context.
Seven tools is well-scoped for a Figma read/inspect server: each one covers a distinct facet (auth check, file tree, nodes, image fills, renders, comment read, comment write). Nothing feels redundant or padded.
The read path is fully covered end to end—verify token, walk the document tree, drill into nodes, resolve assets, render images, and read/post comments. Gaps remain around write operations (no creating/updating nodes or styles), no project/team file listing, and no comment resolution or deletion, but these are workable omissions for an inspection-focused server.