The Figma MCP Server allows you to analyze Figma file structures and extract node hierarchies with the following capabilities:
Analyze Figma files: Extract nodes and their hierarchies from a specific Figma file URL
Configurable depth: Limit the node tree depth using the optional
depthparameterREST API support: Access endpoints for health checks (
/health), specifications (/openapi.json), and file analysis (/analyze)MCP Protocol integration: Use the server directly via the Model Context Protocol for integration with large language models (LLMs)
Server information: Retrieve the server's MCP manifest via
/mcp.jsonDocker support: Deploy in a containerized environment for scalability
Allows analyzing Figma file structures by extracting node hierarchies through the Figma API
Figma MCP Server
An MCP (Model Context Protocol) server for analyzing Figma file structures.
Features
Analyze Figma files to extract node hierarchies
Supports both REST API and MCP protocol
Configurable node tree depth
Related MCP server: FigmaMind MCP Server
Prerequisites
Node.js 16+
npm or yarn
A Figma API key
Installation
From npm
From source
Configuration
Copy the example environment file and add your Figma API key:
Then edit the .env file and add your Figma API key:
You can get a Figma API key from your Figma account settings: https://www.figma.com/developers/api#access-tokens
Usage
As a REST API Server
Start the server:
This will start an Express server on port 3000 (or the port specified in your .env file).
API Endpoints
GET /health- Health check endpointGET /openapi.json- OpenAPI specificationGET /mcp.json- MCP manifestPOST /analyze- Analyze a Figma file
Example request to the analyze endpoint:
As an MCP Server
The server can be used directly by an LLM through the MCP protocol:
Or if running from source:
Client Example
A simple client example is included. To use it:
The last parameter is the optional depth parameter.
Development
Running in Development Mode
Testing
Docker
A Dockerfile is provided for containerized deployment:
License
MIT