Model Context Protocol server implementation for Figma API
A Model Context Protocol (MCP) server that provides integration with Figma's API through Claude and other MCP-compatible clients. Currently supports read-only access to Figma files and projects, with server-side architecture capable of supporting more advanced design token and theme management features (pending Figma API enhancements or plugin development).
get-file
and list-files
tools for Figma file accessThe server has been designed with code to support these features (currently limited by API restrictions):
With Figma plugin development or expanded API access, these features could be fully enabled.
npm install figma-mcp-server
.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:*
The server can be configured in your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%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);
get-file
{
"name": "get-file",
"arguments": {
"fileKey": "your_file_key"
}
}
list-files
{
"name": "list-files",
"arguments": {
"projectId": "your_project_id"
}
}
create-variables
{
"name": "create-variables",
"arguments": {
"fileKey": "your_file_key",
"variables": [
{
"name": "primary-color",
"type": "COLOR",
"value": "#0066FF"
}
]
}
}
create-theme
{
"name": "create-theme",
"arguments": {
"fileKey": "your_file_key",
"name": "Dark Theme",
"modes": [
{
"name": "dark",
"variables": [
{
"variableId": "123",
"value": "#000000"
}
]
}
]
}
}
startServer(figmaToken: string, debug?: boolean, port?: number)
All tool inputs are validated using Zod schemas:
const CreateVariablesSchema = z.object({
fileKey: z.string(),
variables: z.array(z.object({
name: z.string(),
type: z.enum(['COLOR', 'FLOAT', 'STRING']),
value: z.string(),
scope: z.enum(['LOCAL', 'ALL_FRAMES'])
}))
});
The server provides detailed error messages and proper error codes:
Read-Only Operations
Rate Limiting
Cache Management
Authentication
Technical Implementation
Please follow our coding standards:
MIT License - See LICENSE file for details
See TROUBLESHOOTING.md for a comprehensive troubleshooting guide.
JSON Connection Errors
npm run build
)Authentication Issues
Server Not Starting
dist/index.js
)~/Library/Logs/Claude/mcp*.log
%APPDATA%\Claude\logs\mcp*.log
For more detailed debugging steps and solutions, refer to the troubleshooting guide.
No configuration available
This service may require manual configuration, please check the details on the left
Related projects feature coming soon
Will recommend related projects based on sub-categories