Figma MCP and Primitree
Choose a Figma or repository data source for each token task.
Figma's MCP servers read live Figma files. The Primitree plugin exports local variables from an open file, and @primitree/mcp reads token data from a repository.
Figma remote MCP server
Figma recommends the remote server. The remote server uses Figma links to identify files, frames, and layers.
Tools such as get_design_context and get_variable_defs return design context and variables that the requested node references. The remote server provides:
use_figmafor reading or changing objects through the Plugin APIget_librariesfor libraries subscribed to a file and libraries available to addsearch_design_systemfor components, variables, and styles in design libraries
See Figma's tools and prompts page for the current tool list.
Figma desktop MCP server
The desktop server runs through the Figma desktop app. It accepts a copied node link or the current selection in the open file. Selection-based prompting works on the desktop server; the remote server requires a link.
Figma provides the desktop server for specific organization and enterprise use cases. Its desktop setup guide lists the supported clients and Dev Mode steps.
Access and rate limits
Figma requires a supported MCP client and access to the requested file. Its current read-tool limits depend on plan and seat:
| Access | Tool-call limit |
|---|---|
| Starter plan | Up to 6 per month |
| View or Collab seat | Up to 6 per month |
| Professional Full or Dev seat | Up to 200 per day, 10/min |
| Organization Full or Dev seat | Up to 200 per day, 15/min |
| Enterprise Full or Dev seat | Up to 600 per day, 20/min |
Figma reserves the right to change these limits. Check its rate limits and access page before planning usage.
Primitree plugin and CLI
The Primitree export plugin calls the local variables Plugin API in the open file and writes variables.json.
| Step | Tool |
|---|---|
| Export | Primitree export plugin |
| Build | primitree build variables.json |
| Commit | design-tokens/ in your repo |
The export contains local collections, their modes, variable values, aliases, scopes, and code syntax. The plugin does not fetch remote library collections.
Primitree MCP (@primitree/mcp)
Point the server at a raw local variables export or the output from primitree build:
{
"mcpServers": {
"design-tokens": {
"command": "npx",
"args": ["-y", "@primitree/mcp@next", "--tokens", "./design-tokens"]
}
}
}The MCP client can list token groups, read a token by dot path, select Resolver contexts, or search paths and descriptions. diff_tokens takes paths to two variables JSON files and returns a Markdown comparison.
Data flow
Figma file
→ Primitree export plugin (variables.json)
→ primitree build (design-tokens/)
→ @primitree/mcp (repo token queries)
Live Figma context
→ Figma remote MCP (file or node link)
→ Figma desktop MCP (file link or current selection)Choose a source
| Tool | Data source | Input |
|---|---|---|
| Figma remote MCP | Figma-hosted file | File, frame, or layer link |
| Figma desktop MCP | File open in the desktop app | Current selection or copied node link |
| Primitree export | Local variables in the open file | Plugin command |
@primitree/mcp | Repository token files | variables.json or design-tokens/ |