This MCP server provides integration with Figma's API through Claude and other MCP-compatible clients, allowing read-only access to Figma files and projects. The server architecture supports more advanced design token and theme management features that could be enabled with expanded API access or plugin development.
npm install figma-mcp-server
Create a .env
file based on .env.example
:
# Figma API Access Token
FIGMA_ACCESS_TOKEN=your_figma_token
# Server Configuration
MCP_SERVER_PORT=3000
# Debug Configuration
DEBUG=figma-mcp:*
Configure the server in your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/figma-mcp-server/dist/index.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your_token_here"
}
}
}
}
Important Notes:
import { startServer } from 'figma-mcp-server';
const server = await startServer(process.env.FIGMA_ACCESS_TOKEN);
{
"name": "get-file",
"arguments": {
"fileKey": "your_file_key"
}
}
{
"name": "list-files",
"arguments": {
"projectId": "your_project_id"
}
}
{
"name": "create-variables",
"arguments": {
"fileKey": "your_file_key",
"variables": [
{
"name": "primary-color",
"type": "COLOR",
"value": "#0066FF"
}
]
}
}
{
"name": "create-theme",
"arguments": {
"fileKey": "your_file_key",
"name": "Dark Theme",
"modes": [
{
"name": "dark",
"variables": [
{
"variableId": "123",
"value": "#000000"
}
]
}
]
}
}
npm run build
)dist/index.js
)~/Library/Logs/Claude/mcp*.log
%APPDATA%\Claude\logs\mcp*.log
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.