Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FIGMA_BRIDGENoSet to off to disable the plugin bridge.on
FIGMA_API_KEYNoAlternative to FIGMA_ACCESS_TOKEN; also works as a personal access token.
FIGMA_TEAM_IDNoTeam ID that turns on team library search and the available-to-add list.
FIGMA_API_BASENoREST base URL.https://api.figma.com
FIGMA_ASSET_DIRNoDirectory where screenshots and assets rendered by the plugin are saved.system temp /figma-mcp-assets
FIGMA_BRIDGE_HOSTNoInterface the bridge binds to.127.0.0.1
FIGMA_OAUTH_TOKENNoFigma OAuth token, sent as Bearer. Used instead of the PAT when both are set.
FIGMA_TOOL_PREFIXNoPrefix prepended to every tool name. Set to an empty string for official names.figma_local_
FIGMA_ACCESS_TOKENNoFigma personal access token, sent as X-Figma-Token.
FIGMA_BRIDGE_PORTSNoPorts to try for the plugin bridge.3850-3854
FIGMA_BRIDGE_TIMEOUT_MSNoDefault timeout for use_figma.60000
FIGMA_BRIDGE_SECRET_FILENoShared 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 1:2 and the fileKey is :fileKey. If the URL does not include node-id, ask the user for a node-specific URL; do not pass an empty or guessed nodeId. For branch URLs (https://figma.com/design/:fileKey/branch/:branchKey/:fileName) use the branchKey as the fileKey.

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 node-id, pass it as nodeId; otherwise omit nodeId. For branch URLs use the branchKey as the fileKey.

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 0:1. Extract nodeId and fileKey from the URL, e.g. https://figma.com/board/:fileKey/:fileName?node-id=1-2. Only for FigJam files (URL path /board/).

figma_local_download_assetsA

Download assets for a single node: export (an exported image of the whole node), rawImages (original uploaded images used as fills in the subtree, capped at 20, each with its real format) and svgAssets (SVGs for vector layers such as icons and logos, capped at 20). When defaultFormat/defaultScale are given they override the export settings configured on the node; otherwise the node's export settings are used if present, else png at scale 1. Pass them only when the user asks for a specific format or size. Each asset has a temporary url (download promptly) or, when the companion plugin rendered it, a local file path.

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 queries as an array of objects, each with entity ("component", "variable" or "style") and a string query, e.g. {"fileKey":"","queries":[{"entity":"component","query":"button"},{"entity":"variable","query":"surface"}]}. Combine the searches the task needs in one call. Results come back in a results array in the same order as queries.

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 in scope. Use return to send JSON-serializable data back (nodes are returned as {id, name, type}; bytes from exportAsync come back as images). A single expression is returned automatically. console.log output is captured. GOTCHAS: the plugin uses dynamic page loading, so use async APIs: await figma.getNodeByIdAsync(id), await figma.setCurrentPageAsync(page), await page.loadAsync() before reading another page. Call await figma.loadFontAsync({family, style}) before setting text; the Inter style is "Semi Bold", not "SemiBold". Append new nodes to a parent and position them, and return the IDs of what you created. Each call is committed as one undo step.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.1/5.0

Scored across 11 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness5/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues