Skip to content

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

License

Notifications You must be signed in to change notification settings

stone-w4tch3r/Figma-Context-MCP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

188 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framelink

Framelink MCP for Figma

THIS IS DEV FORK WITH CACHING FEATURE ADDED! USE IT UNTIL THE FEATURE WILL BE MERGED INTO UPSTREAM

🌐 Available in: 한국어 (Korean) | 日本語 (Japanese) | 简体中文 (Simplified Chinese) | 繁體中文 (Traditional Chinese)

Give your coding agent access to your Figma data.
Implement designs in any framework in one-shot.

weekly downloads MIT License

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.

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.

This caching fork, published as figma-developer-mcp-caching-dev-fork, 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-caching-dev-fork", "--figma-api-key=YOUR-KEY", "--stdio"]
    }
  }
}

Windows

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

If you prefer to manage credentials via environment variables (as recommended in the MCP client spec), place them in the env object alongside your server definition. Example Cursor configuration:

{
  "mcpServers": {
    "Framelink MCP for Figma": {
      "command": "npx",
      "args": ["-y", "figma-developer-mcp-caching-dev-fork", "--stdio"],
      "env": {
        "FIGMA_API_KEY": "YOUR-KEY",
        "FIGMA_CACHING": "{\"ttl\":{\"value\":30,\"unit\":\"d\"}}",
        "PORT": "3333"
      }
    }
  }
}

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

Support for free Figma accounts: Persistent caching (optional)

To avoid hitting Figma's heavy rate limits, you can tell the MCP server to cache full file responses on disk by setting a FIGMA_CACHING environment variable that contains a JSON object.

FIGMA_CACHING='{ "ttl": { "value": 30, "unit": "d" } }'

Put this var into your mcp config json, see example above.

  • cacheDir (optional) controls where cached files are written. Relative paths are resolved against the current working directory and ~ expands to your home directory. If you omit it, the server defaults to ~/.cache/figma-mcp on Linux, ~/Library/Caches/FigmaMcp on macOS, and %LOCALAPPDATA%/FigmaMcpCache on Windows.
  • ttl controls how long a cached file remains valid. It must contain a value (number) and a unit (ms, s, m, h, or d).

When caching is enabled the server always fetches the full Figma file once, stores it on disk, and serves subsequent get_figma_data / get_raw_node requests from the cached copy until it expires. Delete the files inside cacheDir if you need to force a refresh. Leaving FIGMA_CACHING unset keeps the default non-cached behavior.

Learn More

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

About

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

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.6%
  • JavaScript 1.4%