figma-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FIGMA_BRIDGE | No | Set to off to disable the plugin bridge. | on |
| FIGMA_API_KEY | No | Alternative to FIGMA_ACCESS_TOKEN; also works as a personal access token. | |
| FIGMA_TEAM_ID | No | Team ID that turns on team library search and the available-to-add list. | |
| FIGMA_API_BASE | No | REST base URL. | https://api.figma.com |
| FIGMA_ASSET_DIR | No | Directory where screenshots and assets rendered by the plugin are saved. | system temp /figma-mcp-assets |
| FIGMA_BRIDGE_HOST | No | Interface the bridge binds to. | 127.0.0.1 |
| FIGMA_OAUTH_TOKEN | No | Figma OAuth token, sent as Bearer. Used instead of the PAT when both are set. | |
| FIGMA_TOOL_PREFIX | No | Prefix prepended to every tool name. Set to an empty string for official names. | figma_local_ |
| FIGMA_ACCESS_TOKEN | No | Figma personal access token, sent as X-Figma-Token. | |
| FIGMA_BRIDGE_PORTS | No | Ports to try for the plugin bridge. | 3850-3854 |
| FIGMA_BRIDGE_TIMEOUT_MS | No | Default timeout for use_figma. | 60000 |
| FIGMA_BRIDGE_SECRET_FILE | No | Shared secret file that relaying instances present. | ~/.figma-mcp/bridge-secret |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
A self-hosted Figma MCP server with the same tool interface as the official Figma MCP server. Use it whenever the user mentions Figma, shares a figma.com URL, or wants to implement, inspect, create or edit a design.
Every tool here is named "figma_local_" (e.g. figma_local_get_design_context) so it never collides with the official Figma MCP or other Figma servers connected at the same time. Skills and prompts written for the official tools apply: call the figma_local_-prefixed equivalent.
READ (Figma REST API, needs FIGMA_ACCESS_TOKEN):
figma_local_get_design_context: primary design-to-code tool. React + Tailwind reference code, assets, tokens, components, screenshot.
figma_local_get_metadata: XML structure of a node, or the page list when nodeId is omitted.
figma_local_get_screenshot, figma_local_get_variable_defs, figma_local_get_figjam, figma_local_download_assets, figma_local_get_code_connect_map.
figma_local_search_design_system, figma_local_get_libraries: find components, styles and variables to reuse.
WRITE (companion plugin, needs the "Figma MCP Bridge" plugin running in the file in Figma desktop):
figma_local_use_figma: run Plugin API JavaScript in the open file to create or edit anything.
URLS: for https://figma.com/design/:fileKey/:fileName?node-id=1-2 use fileKey=:fileKey and nodeId=1:2. For branch URLs (/design/:fileKey/branch/:branchKey/...) use the branchKey as fileKey. FigJam boards use /board/.
Generated code is a reference, not final code: adapt it to the project's framework, components and design tokens. If a tool fails with permission, rate-limit or plugin errors, call figma_local_whoami to diagnose.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| figma_local_get_design_contextA | Get design context for a Figma node — the primary tool for design-to-code workflows. Returns React + Tailwind reference code, asset download URLs, the design tokens and components used, and a screenshot of the node. The code is a reference: adapt it to the target project's components, design tokens and conventions. Use the nodeId parameter to specify a node id and the fileKey parameter to specify the file key. If given the URL https://figma.com/design/:fileKey/:fileName?node-id=1-2, the nodeId is |
| figma_local_get_metadataA | IMPORTANT: Always prefer figma_local_get_design_context. Get metadata for a node or page in XML format: node IDs, layer types, names, positions and sizes only. Useful for an overview of the structure; call figma_local_get_design_context on the node IDs it contains. The nodeId can also be a page id (e.g. 0:1). When nodeId is omitted, returns the top-level pages of the document instead. If the URL includes |
| figma_local_get_screenshotA | Generate a screenshot for a node. Works on design files, FigJam boards and Slides. maxDimension (default 1024) caps the longer edge of the PNG; the metadata includes the rendered width/height and the node's original_width/original_height. By default returns a short-lived URL plus curl instructions, or a local file path when the companion plugin rendered it; both cost far fewer tokens than an inline image. Set enableBase64Response: true only when you cannot fetch URLs or read files. nodeId and fileKey are required; extract them from the URL (node-id=1-2 -> 1:2). For branch URLs use the branchKey as the fileKey. |
| figma_local_get_variable_defsA | Get the variables and styles used by a node and its children, e.g. {'icon/default/secondary': '#949494'}. Variables are reusable values for colors, sizes, spacing and fonts. Extract nodeId from the URL (node-id=1-2 -> 1:2); do not pass an empty or guessed nodeId. Variable names resolve through the companion plugin when it is running in the file, or through the REST variables API on Enterprise plans. For branch URLs use the branchKey as the fileKey. |
| figma_local_get_figjamA | Get the content of a FigJam board node as XML: stickies, shapes, connectors (with from/to node IDs), sections, text and tables, including their text and colors. If no node id is provided, use |
| figma_local_download_assetsA | Download assets for a single node: |
| figma_local_get_code_connect_mapA | Get a mapping of {[nodeId]: {codeConnectSrc, codeConnectName}} for the component instances in a node, e.g. {'1:2': {codeConnectSrc: 'https://github.com/foo/components/Button.tsx', codeConnectName: 'Button'}}. This server reads the code links attached to components as Dev Mode dev resources (Figma's public API does not expose CLI-published Code Connect files). Extract nodeId and fileKey from the URL; do not pass an empty or guessed nodeId. |
| figma_local_search_design_systemA | Search for design system assets (components, variables and styles) in the file and in the team's libraries. Pass |
| figma_local_get_librariesA | Get the design libraries associated with a Figma file. Returns (1) libraries in use by the file (the libraries its component instances and styles come from) and (2) libraries available to add (the team's published libraries, when FIGMA_TEAM_ID is set). Each library has a name and library key (the library file key). The available list is paginated: pass libraries_available_to_add_next_offset back as offset. Use library keys to scope figma_local_search_design_system via includeLibraryKeys. |
| figma_local_use_figmaA | Create, edit, inspect or sync anything in a Figma file by running JavaScript against the Figma Plugin API: frames, components, variants, variables, styles, text, auto layout, images and whole screens. Works in design files and FigJam boards. Requires the companion "Figma MCP Bridge" plugin to be running in the target file in the Figma desktop app. The code runs as the body of an async function with |
| figma_local_whoamiA | Returns the authenticated Figma user (handle, email, id), how this server authenticates, the tool name prefix, and the status of the companion plugin bridge (which files have the plugin open, their current page and selection). Use this tool when you hit file access or permission errors, rate limits, or when figma_local_use_figma cannot find the plugin. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Most tools have clearly distinct purposes: design context, metadata, screenshot, variables, libraries, FigJam, assets, code connect, and design-system search. There is some conceptual overlap between get_design_context, get_screenshot, get_metadata, and download_assets, but the descriptions provide enough guidance to choose correctly. whoami and use_figma are also clearly differentiated.
All tools use snake_case and a shared figma_local_ prefix, with mostly predictable verb_noun patterns such as get_design_context, download_assets, and search_design_system. The main minor deviation is figma_local_whoami, which is idiomatic but does not follow the verb_noun pattern. use_figma is also slightly generic but still consistent with the prefix style.
The server exposes 11 tools, which is well within the typical 3-15 range for a focused MCP server. Each tool appears to earn its place by covering a distinct capability area such as metadata, assets, variables, search, or editing. There is no obvious bloat or missing operational category.
The tool surface comprehensively covers Figma design and FigJam workflows: authentication/diagnostics, design context extraction, metadata and screenshots, variables and styles, libraries, asset downloads, Code Connect mapping, design-system search, and plugin-based read/write via JavaScript. This spans both read-only inspection and editing, with no obvious dead ends for the stated purpose.