Figma MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
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
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
You must be authenticated.
Facilitates the analysis of Figma file structures by extracting node hierarchies, accessible via REST API or MCP protocol.