NPM Star
Collections
  1. Home
  2. Compare
  3. figma-developer-mcp vs figma-transformer
NPM Compare

Compare NPM packages statistics, trends, and features

CollectionsVS Code extensionChrome extensionTermsPrivacyLinkTreeIndiehackersBig Frontendqiuyumi

Unable to load comparison data. Please try again later.

<a href="https://www.framelink.ai/?utm_source=github&utm_medium=referral&utm_campaign=readme" target="_blank" rel="noopener"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://www.framelink.ai/github/HeaderDark.png" /> <img alt="Framelink" src="https://www.framelink.ai/github/HeaderLight.png" /> </picture> </a> <div align="center"> <h1>Framelink MCP for Figma</h1> <h3>Give your coding agent access to your Figma data.<br/>Implement designs in any framework in one-shot.</h3> <a href="https://npmcharts.com/compare/figma-developer-mcp?interval=30"> <img alt="weekly downloads" src="https://img.shields.io/npm/dm/figma-developer-mcp.svg"> </a> <a href="https://github.com/GLips/Figma-Context-MCP/blob/main/LICENSE"> <img alt="MIT License" src="https://img.shields.io/github/license/GLips/Figma-Context-MCP" /> </a> <a href="https://framelink.ai/discord"> <img alt="Discord" src="https://img.shields.io/discord/1352337336913887343?color=7389D8&label&logo=discord&logoColor=ffffff" /> </a> <br /> <a href="https://twitter.com/glipsman"> <img alt="Twitter" src="https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Fglipsman&label=%40glipsman" /> </a> </div> <br/>

Give Cursor and other AI-powered coding tools access to your Figma files with this Model Context Protocol server.

When Cursor has access to Figma design data, it's way better at one-shotting designs accurately than alternative approaches like pasting screenshots.

<h3><a href="https://www.framelink.ai/docs/quickstart?utm_source=github&utm_medium=referral&utm_campaign=readme">See quickstart instructions →</a></h3>

Demo

Watch a demo of building a UI in Cursor with Figma design data

Watch the video

How it works

  1. Open your IDE's chat (e.g. agent mode in Cursor).
  2. Paste a link to a Figma file, frame, or group.
  3. Ask Cursor to do something with the Figma file—e.g. implement the design.
  4. Cursor will fetch the relevant metadata from Figma and use it to write your code.

This MCP server is specifically designed for use with Cursor. Before responding with context from the Figma API, it simplifies and translates the response so only the most relevant layout and styling information is provided to the model.

Reducing the amount of context provided to the model helps make the AI more accurate and the responses more relevant.

Getting Started

Many code editors and other AI clients use a configuration file to manage MCP servers.

The figma-developer-mcp server can be configured by adding the following to your configuration file.

NOTE: You will need to create a Figma access token to use this server. Instructions on how to create a Figma API access token can be found here.

MacOS / Linux

{ "mcpServers": { "Framelink MCP for Figma": { "command": "npx", "args": ["-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"] } } }

Windows

{ "mcpServers": { "Framelink MCP for Figma": { "command": "cmd", "args": ["/c", "npx", "-y", "figma-developer-mcp", "--figma-api-key=YOUR-KEY", "--stdio"] } } }

Or you can set FIGMA_API_KEY and PORT in the env field.

If you need more information on how to configure the Framelink MCP for Figma, see the Framelink docs.

Star History

<a href="https://star-history.com/#GLips/Figma-Context-MCP"><img src="https://api.star-history.com/svg?repos=GLips/Figma-Context-MCP&type=Date" alt="Star History Chart" width="600" /></a>

Learn More

The Framelink MCP for Figma is simple but powerful. Get the most out of it by learning more at the Framelink site.

<p align="center"> <br/> <img width="100" src="./figma-transformer.svg" /> </p> <h1 align="center"> figma-transformer </h1> <div align="center">

A tiny utility library that makes the Figma API more human friendly.

npm version npm downloads gzip size modules MIT License PRs Welcome

</div>

How to use figma-transformer?

import { processFile } from "figma-transformer"; // Fetch the file you want using your favourite method const originalFile = fetchFigmaFile(); const file = processFile(originalFile); // ✨ You can now use `file` for whatever you need! ✨ // Let's get the styles for a component named "Test" const testStyles = file.shortcuts.components.find( component => component.name === "Test" ).shortcuts.styles;

Why use figma-transformer?

The Figma API is great but sometimes it feels like it's built for machines, not humans. The more you use it, the more you'll end up wasting a lot of time to get to the information that you want.

These are the most common problems:

  • Code needs to change if file structure changes
  • Incomplete information about styles and components
  • No type safety

With figma-transformer you get the file structure that you wished the Figma API had.

How does figma-transformer solve these problems?

Break free from the file structure

The Figma API response is very strict in terms of the file structure. To get to a specific node you have to navigate through the entire tree of nodes and it's really easy for your code to break if there's a change in the design file that changes the initial hierarchy.

We break from that rigid structure by creating shortcuts that are grouped by node type, making it a lot easier to access the nodes that we want irrespective of their placement in the file.

{ "children": [{...}, {...}], "shortcuts": { "CANVAS": [...], "INSTANCE": [...], "RECTANGLE": [...], "STYLE": [...], "TEXT": [...], "FRAME": [...], "COMPONENT": [...], "GROUP": [...] } }

We can see that even though this node just has two direct children, it actually contains a lot more elements down the tree, which are surfaced in the shortcuts.

Each node of the document tree contains the shortcuts to all their respective child nodes, which reduces the amount of work needed to get to the information we need.

Missing information from nodes

From the API we can get the information about the styles and components that are present in the file, which is great, but it doesn't contain all the information so we need to parse the entire file to get the additional information that we usuallly need.

Let's look at how the Figma API describes the styles in a document:

styles: { "1:12": { key: "ea017aed6616af00f3c4d59e3d945c8c3e47adca", name: "Green", styleType: "FILL", description: "", }, "1:11": { key: "e234400b962ffafce654af9b3220ce88857523ec", name: "Red", styleType: "FILL", description: "", }, "97:6": { key: "cc806814e1b9b7d20ce0b6bed8adf52099899c01", name: "Body", styleType: "TEXT", description: "", }, },

and this is how it's represented after being processed (note the populated styles from the associated nodes)

[ { id: "1:12", key: "ea017aed6616af00f3c4d59e3d945c8c3e47adca", name: "Green", styleType: "FILL", description: "", styles: [ { blendMode: "NORMAL", type: "SOLID", color: { r: 0.047774821519851685, g: 0.9563318490982056, b: 0.02923285961151123, a: 1, }, }, ], type: "STYLE", }, { id: "1:11", key: "e234400b962ffafce654af9b3220ce88857523ec", name: "Red", styleType: "FILL", description: "", styles: [ { blendMode: "NORMAL", type: "SOLID", color: { r: 0.8515284061431885, g: 0.11155396699905396, b: 0.11155396699905396, a: 1, }, }, ], textStyles: { fontFamily: "Roboto", fontPostScriptName: null, fontWeight: 400, fontSize: 12, textAlignHorizontal: "LEFT", textAlignVertical: "TOP", letterSpacing: 0, lineHeightPx: 14.0625, lineHeightPercent: 100, lineHeightUnit: "INTRINSIC_%", }, type: "STYLE", }, { id: "97:6", key: "cc806814e1b9b7d20ce0b6bed8adf52099899c01", name: "Body", styleType: "TEXT", description: "", textStyles: { fontFamily: "Roboto", fontPostScriptName: null, fontWeight: 400, fontSize: 12, textAlignHorizontal: "LEFT", textAlignVertical: "TOP", letterSpacing: 0, lineHeightPx: 14.0625, lineHeightPercent: 100, lineHeightUnit: "INTRINSIC_%", }, type: "STYLE", }, ];

The same happens with the components, this is what we get from the API:

components: { "1:5": { key: "", name: "Rectangle", description: "" }, },

and this is the processed data:

{ "id": "1:5", "parentId": "7:0", "fileId": "cLp23bR627jcuNSoBGkhL04E", "name": "Rectangle", "type": "COMPONENT", "blendMode": "PASS_THROUGH", "absoluteBoundingBox": { "x": -232, "y": -208, "width": 201, "height": 109 }, "constraints": { "vertical": "TOP", "horizontal": "LEFT" }, "clipsContent": false, "background": [ { "blendMode": "NORMAL", "visible": false, "type": "SOLID", "color": { "r": 1, "g": 1, "b": 1, "a": 1 } } ], "backgroundColor": { "r": 0, "g": 0, "b": 0, "a": 0 }, "effects": [], "children": [...], "shortcuts": {...} }

Not only we have the complete node definition but we also have its child nodes and shortcuts so we can easily navigate through the component tree if needed.

Improved type safety

The Figma API doesn't have official type definitions, but fortunately we can provide a better developer experience by extending the TypeScript type definitions provided by the awesome figma-js library.

This means that you can continue to use your preferred way of fetching the data from the Figma API and figma-transformer will provide the types for you.

Examples

Let's see more specific examples where the benefits of the library really stand out.

Getting all text used in a document

const text = file.shortcuts.texts.map(node => node.characters);

Finding the styles applied to a specific component

const styles = file.shortcuts.components .filter(component => component.name === "Test") .map(component => component.shortcuts.styles);

Getting the fill colours for all the rectangles in the first page

const fills = file.shortcuts.pages .filter(page => page.name === "Page 1") .map(page => page.shortcuts.rectangles.fills);

Projects using figma-transformer

  • figma-graphql
  • theme.figma

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

This project was bootstrapped with TSDX.

StarsIssuesVersionUpdatedⓘLast publish dateCreatedⓘPackage creation dateSizeⓘMinified + Gzipped size
F
figma-developer-mcp
15,998270.13.24 months ago20 months agoinstall size 9.8 KB
F
figma-transformer
59192.1.04 years ago7 years agoinstall size 1.0 KB

Dependencies Comparison

figma-developer-mcp

Dependencies

zod^3.25.76
cleye^2.2.1
dotenv^16.4.7
remeda^2.20.1
undici^7.25.0
express^5.2.1
js-yaml^4.1.1
cross-env^7.0.3
@jimp/core^1.6.0
@jimp/js-gif^1.6.0
@jimp/js-png^1.6.0
posthog-node^5.29.2
@jimp/js-jpeg^1.6.0
@jimp/plugin-crop^1.6.0
@figma/rest-api-spec^0.37.0
@modelcontextprotocol/sdk1.29.0

Dev Dependencies

tsx^4.21.0
tsup^8.5.1
eslint^9.39.3
vitest^4.0.18
globals^17.3.0
lefthook^2.0.15
prettier^3.5.0
@eslint/js^9.33.0
typescript^5.7.3
@types/node^25.3.3
@types/express^5.0.0
@types/js-yaml^4.0.9
eslint-config-prettier^10.0.1
@typescript-eslint/parser^8.56.1
@typescript-eslint/eslint-plugin^8.56.1

Peer Dependencies

figma-transformer

Dependencies

Dev Dependencies

tsdx^0.14.0
husky^4.3.0
figma-js^1.13.0
bundlesize^0.18.0
typescript3.9.7
@types/jest^26.0.14

Peer Dependencies

Who's Using These Packages

figma-developer-mcp

Figma-Context-MCP
Figma-Context-MCP

MCP server to provide Figma layout information to AI coding agents like Cursor

mcp-cn
mcp-cn

MCP Hub 中国是一个专注于 Model Context Protocol (MCP) 生态的开源平台。它致力于汇聚全球优质的 MCP 服务,提供一站式的解决方案,包括服务发现、接入指南和使用示例,并建立完善的中文生态,欢迎开发者参与贡献和完善平台功能。

sunnysideFigma-Context-MCP
sunnysideFigma-Context-MCP

A comprehensive Model Context Protocol (MCP) server that bridges Figma designs with AI development workflows. It provides 30 specialized tools for extracting pixel-perfect code, assets, and component structures directly from Figma designs.

QuanuX
QuanuX

This is the raw dev repo for "QuanuX" (Quant-Linux). Official releases are available via @QuanuX org. Quantitative Framework for Research, Development and Deployment of Proprietary Trading Strategies. Website under development.

nCompose
nCompose

Convert Figma designs into production-ready React, Vue, Svelte, Angular, and Solid components

figma-transformer

react-ui
react-ui

Customisable components and primitives based on design tokens

figma-graphql
figma-graphql

The reimagined Figma API (super)powered by GraphQL