A comprehensive MCP server providing AI assistants with full access to the Figma REST API
46 tools: 38 atomic API tools + 8 orchestration tools with domain-based actions.
Quick Start β’ Features β’ Tools β’ Orchestration β’ Configuration
# Clone and setup
git clone https://github.com/devstroop/figma-mcp.git
cd figma-mcp
npm install
# Configure
cp .env.example .env
# Edit .env and add your FIGMA_TOKEN
# Build and run
npm run build
npm startRemote mode (SSE transport for hosted deployments):
npm run start:remote # Starts on http://localhost:3001
curl http://localhost:3001/health| Category | Description | Tools |
|---|---|---|
| π Files | Get file JSON, specific nodes, images, versions, and metadata | 6 |
| π¬ Comments | Full comment lifecycle with reaction support | 6 |
| π§© Components | Team/file components and component sets | 6 |
| π¨ Styles | Published styles from files and teams | 3 |
| π Projects | Browse team projects and files | 2 |
| π’ Variables | Design tokens management (Enterprise) | 3 |
| π Webhooks | Create, manage, and monitor webhooks | 5 |
| π§ Dev Resources | Link code references to design nodes | 4 |
| π Analytics | Library usage analytics for components, styles, variables | 6 |
| π€ Users | Authenticated user information | 1 |
| π Orchestration | Domain-based tools with multiple actions per tool | 8 |
Total: 46 tools β 38 atomic API tools + 8 orchestration tools
- Node.js 18+
- npm or yarn
- Figma Personal Access Token (Get one here)
# 1. Clone the repository
git clone https://github.com/devstroop/figma-mcp.git
cd figma-mcp
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .envEdit .env with your credentials:
FIGMA_TOKEN=figd_xxxxxxxxxxxxxxxxxxxxx
FIGMA_TEAM_ID=123456789 # Optional: default team
FIGMA_FILE_KEY=abc123XYZ # Optional: default file# 4. Build and run
npm run build
npm start- Log in to Figma
- Go to Settings β Account β Personal access tokens
- Click Generate new token
- Give it a descriptive name and copy the token
| Variable | Required | Default | Description |
|---|---|---|---|
FIGMA_TOKEN |
β | β | Figma personal access token |
FIGMA_TEAM_ID |
β | β | Default team ID for team operations |
FIGMA_FILE_KEY |
β | β | Default file key for file operations |
PORT |
β | 3001 |
Server port (remote mode) |
MCP_BASE_PATH |
β | /mcp |
Base path for SSE endpoints |
LOG_LEVEL |
β | info |
debug | info | warn | error |
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["/path/to/figma-mcp/dist/index.js"],
"env": {
"FIGMA_TOKEN": "figd_your_token_here"
}
}
}
}Add to your VS Code settings.json or workspace settings:
{
"mcp.servers": {
"figma": {
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"],
"env": {
"FIGMA_TOKEN": "figd_your_token_here"
}
}
}
}For hosted deployments, web integrations, or shared access:
npm run start:remote # Starts SSE serverConnect via SSE:
{
"mcpServers": {
"figma": {
"type": "sse",
"url": "http://localhost:3001/mcp/sse"
}
}
}| Tool | Description |
|---|---|
figma_get_file |
Get complete file JSON with nodes, components, and styles |
figma_get_file_nodes |
Get specific nodes by ID with optional geometry |
figma_get_images |
Export nodes as PNG, JPG, SVG, or PDF |
figma_get_image_fills |
Get download URLs for images used in fills |
figma_get_file_versions |
Get version history of a file |
figma_get_file_meta |
Get file metadata (name, last modified, thumbnail) |
| Tool | Description |
|---|---|
figma_get_comments |
Get all comments on a file |
figma_post_comment |
Add a new comment or reply |
figma_delete_comment |
Delete a comment |
figma_get_comment_reactions |
Get reactions on a comment |
figma_post_comment_reaction |
Add an emoji reaction to a comment |
figma_delete_comment_reaction |
Remove a reaction from a comment |
| Tool | Description |
|---|---|
figma_get_team_components |
Get all published components in a team library |
figma_get_file_components |
Get components published from a file |
figma_get_component |
Get a single component by key |
figma_get_team_component_sets |
Get all component sets in a team library |
figma_get_file_component_sets |
Get component sets from a file |
figma_get_component_set |
Get a single component set by key |
| Tool | Description |
|---|---|
figma_get_team_styles |
Get all published styles in a team library |
figma_get_file_styles |
Get styles published from a file |
figma_get_style |
Get a single style by key |
| Tool | Description |
|---|---|
figma_get_team_projects |
List all projects in a team |
figma_get_project_files |
List all files in a project |
| Tool | Description |
|---|---|
figma_get_local_variables |
Get all local variables in a file |
figma_get_published_variables |
Get published variables from a library |
figma_post_variables |
Create, update, or delete variables |
| Tool | Description |
|---|---|
figma_get_webhooks |
List all webhooks for a team |
figma_get_webhook |
Get details of a specific webhook |
figma_create_webhook |
Create a new webhook subscription |
figma_update_webhook |
Update webhook configuration |
figma_delete_webhook |
Delete a webhook |
figma_get_webhook_requests |
Get recent webhook delivery requests |
| Tool | Description |
|---|---|
figma_get_dev_resources |
Get code links attached to nodes |
figma_create_dev_resource |
Attach a code link to a node |
figma_update_dev_resource |
Update an existing dev resource |
figma_delete_dev_resource |
Remove a dev resource |
| Tool | Description |
|---|---|
figma_get_component_actions |
Get usage actions for components |
figma_get_component_usages |
Get files using specific components |
figma_get_style_actions |
Get usage actions for styles |
figma_get_style_usages |
Get files using specific styles |
figma_get_variable_actions |
Get usage actions for variables |
figma_get_variable_usages |
Get files using specific variables |
| Tool | Description |
|---|---|
figma_get_me |
Get the authenticated user's profile |
Domain-based tools that combine multiple API calls with flexible actions. Each tool covers a specific domain and supports multiple operations via the action parameter.
Inspect and analyze Figma files, nodes, and document structure.
| Action | Description | Key Parameters |
|---|---|---|
snapshot |
Get file overview with optional components/styles/variables | fileKey, depth, includeComponents, includeStyles, includeVariables |
nodes |
Get specific nodes by ID | fileKey, nodeIds, geometry |
properties |
Extract dev-ready node properties | fileKey, nodeIds |
tree |
Get document hierarchy | fileKey, depth, maxChildren |
compare |
Compare file with branch or version | fileKey, branchKey or versionId |
Manage comments and reactions for design review workflows.
| Action | Description | Key Parameters |
|---|---|---|
threads |
Get all comment threads with filters | fileKey, asMarkdown, after |
create |
Post a new comment | fileKey, message, clientMeta |
reply |
Reply to existing comment | fileKey, commentId, message |
resolve |
Mark comment as resolved | fileKey, commentId |
react |
Add emoji reaction | fileKey, commentId, emoji |
delete |
Delete comment or reaction | fileKey, commentId, emoji |
Export and manage design assets in multiple formats.
| Action | Description | Key Parameters |
|---|---|---|
export |
Export single node | fileKey, nodeId, format, scale |
batch |
Export multiple nodes in multiple formats/scales | fileKey, nodeIds, formats, scales |
list |
Find exportable nodes in file | fileKey, types |
fill_images |
Get image fill URLs | fileKey |
Design token management and export.
| Action | Description | Key Parameters |
|---|---|---|
list |
List all variables in file | fileKey, collectionId |
collections |
Get variable collections | fileKey |
modes |
Get collection modes | fileKey, collectionId |
export |
Export tokens as CSS/SCSS/JSON/Tailwind | fileKey, format, collectionIds, modeIds |
diff |
Compare tokens between files | fileKey, compareFileKey |
Navigate team structure, projects, and files.
| Action | Description | Key Parameters |
|---|---|---|
projects |
List team projects | teamId |
files |
List files in project | teamId, projectId, branchData |
branches |
Get file branches | fileKey |
versions |
Get file version history | fileKey |
search |
Search for files/projects | teamId, query |
Library analytics and health audits.
| Action | Description | Key Parameters |
|---|---|---|
library |
Get library overview | fileKey or teamId, type |
usage |
Get component/style usage data | fileKey, componentKey or styleKey |
audit |
Health check with recommendations | fileKey or teamId, type |
actions |
Get library action history | fileKey, cursor |
Manage dev resources (code links) attached to nodes.
| Action | Description | Key Parameters |
|---|---|---|
list |
Get dev resources | fileKey, nodeIds |
create |
Create code link | fileKey, nodeId, url, name |
update |
Update existing link | fileKey, devResourceId, url, name |
delete |
Remove code link | fileKey, devResourceId |
Webhook subscription management.
| Action | Description | Key Parameters |
|---|---|---|
list |
List team webhooks | teamId |
create |
Create webhook subscription | teamId, endpoint, events, passcode |
delete |
Remove webhook | webhookId |
requests |
Get recent webhook deliveries | webhookId |
| Scenario | Recommended | Why |
|---|---|---|
| Quick file lookup | figma_get_file (atomic) |
Simple, single operation |
| Design review workflow | figma_feedback (orchestration) |
Threads + create + react in one tool |
| Export one image | figma_get_images (atomic) |
Direct and simple |
| Export multiple formats/scales | figma_assets (orchestration) |
Batch all combinations |
| Check one component | figma_get_component (atomic) |
Targeted retrieval |
| Audit entire library | figma_analytics (orchestration) |
Full audit with usage stats |
| Get file structure | figma_inspect (orchestration) |
Rich snapshot with optional includes |
Get file structure:
"Show me the structure of Figma file abc123xyz"
β Uses figma_get_file
Export designs:
"Export frames 1:23 and 1:45 from file xyz as 2x PNG"
β Uses figma_get_images with scale: 2, format: "png"
Batch export for handoff:
"Export button-primary as PNG at 1x, 2x, 3x and SVG"
β Uses figma_assets with action: "batch", formats: ["png", "svg"], scales: [1, 2, 3]
Browse component library:
"List all button components in team 123456"
β Uses figma_get_team_components
Full library audit:
"Audit the design library in team 123456 and show usage stats"
β Uses figma_analytics with action: "audit"
Manage comments:
"Add a comment 'Needs more contrast' to node 4:56 in file abc123"
β Uses figma_feedback with action: "create"
Complete design review:
"Review file abc123, show me comments, and add feedback 'Great work!'"
β Uses figma_feedback with action: "threads" then action: "create"
Check library usage:
"Which files are using the primary button component?"
β Uses figma_analytics with action: "usage"
Export design tokens:
"Export all design tokens from file xyz as CSS variables"
β Uses figma_tokens with action: "export", format: "css"
figma-mcp/
βββ src/
β βββ index.ts # Entry point (stdio transport)
β βββ remote.ts # SSE transport server
β βββ server-core.ts # MCP server with 46 tool handlers
β βββ config.ts # Environment configuration
β βββ logger.ts # Structured logging
β β
β βββ api/
β β βββ base/
β β β βββ base-client.ts # Axios HTTP client with auth
β β β βββ response-formatter.ts # MCP response formatting
β β β βββ error-handler.ts # Error normalization
β β β
β β βββ domains/
β β β βββ files-api.ts # File operations
β β β βββ comments-api.ts # Comments & reactions
β β β βββ components-api.ts # Components & styles
β β β βββ projects-api.ts # Projects & team files
β β β βββ variables-api.ts # Variables (Enterprise)
β β β βββ webhooks-api.ts # Webhook management
β β β βββ users-api.ts # User info
β β β βββ dev-resources-api.ts # Dev resources
β β β βββ analytics-api.ts # Library analytics
β β β
β β βββ client-factory.ts # Creates all API clients
β β
β βββ tools/
β βββ tool-definitions.ts # MCP tool schemas (46 tools)
β βββ orchestration/ # Domain-based orchestration tools
β βββ types.ts # Shared interfaces
β βββ inspect.ts # File inspection (5 actions)
β βββ feedback.ts # Comments & reactions (6 actions)
β βββ assets.ts # Asset export (4 actions)
β βββ tokens.ts # Design tokens (5 actions)
β βββ navigate.ts # Project navigation (5 actions)
β βββ analytics.ts # Library analytics (4 actions)
β βββ code-connect.ts # Dev resources (4 actions)
β βββ webhooks.ts # Webhook management (4 actions)
β
βββ dist/ # Compiled output
βββ package.json
βββ tsconfig.json
βββ .env.example
npm install # Install dependencies
npm run dev # Watch mode with auto-rebuild
npm run build # Production build
npm run lint # ESLint
npm run type-check # TypeScript validation- Add API method in
src/api/domains/<domain>-api.ts - Define tool schema in
src/tools/tool-definitions.ts - Add handler in
src/server-core.ts(handleToolCallmethod) - Export from
src/api/domains/index.tsif new domain
| Figma API Section | Coverage | Notes |
|---|---|---|
| Files | β 100% | All endpoints |
| Comments | β 100% | Including reactions |
| Components | β 100% | Including component sets |
| Styles | β 100% | All endpoints |
| Projects | β 100% | Team projects and files |
| Variables | β 100% | Enterprise feature |
| Webhooks | β 100% | Full CRUD + requests |
| Dev Resources | β 100% | Full CRUD |
| Library Analytics | β 100% | Components, styles, variables |
| Users | β 100% | Get current user |
| Activity Logs | β | Requires Organization OAuth2 |
| Payments | β | Plugin monetization only |
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
MIT License β see LICENSE for details.
Built with β€οΈ by Devstroop Technologies
Figma API Docs β’ MCP Protocol β’ Report Issue