An MCP server that provides access to Figma design data through the Model Context Protocol. This server simplifies and translates Figma API responses to provide the most relevant layout and styling information.
- Clone the repository
- Install dependencies with
pnpm install - Update the
src/config.tsfile with your Figma API access token. Only read access is required:
export const NODE_ENV = "cli"; // Keep as "cli" for Cline usage
export const FIGMA_API_KEY = "your_figma_api_key_here";
export const PORT = 3333;To use this MCP server with Cline, add the following configuration to your Cline MCP settings file:
{
"mcpServers": {
"Figma": {
"command": "node",
"args": ["/path/to/Figma-Context-MCP/dist/cli.js"],
"disabled": false,
"autoApprove": ["get-file", "get-node"]
}
}
}Make sure to:
- Replace
path/to/Figma-Context-MCPwith the actual path to your cloned repository - Ensure
NODE_ENVis set to"cli"insrc/config.tsfor CLI mode operation - Build the project with
pnpm buildbefore connecting
Once configured, you can use Figma design data in your Cline conversations by referencing Figma file links.
The server provides the following MCP tools:
Fetches information about a Figma file.
Parameters:
fileKey(string): The key of the Figma file to fetchdepth(number, optional): How many levels deep to traverse the node tree
Fetches information about a specific node within a Figma file.
Parameters:
fileKey(string): The key of the Figma file containing the nodenodeId(string): The ID of the node to fetch
The server can also be used with Cursor. For Cursor usage, you'll need to:
- Set
NODE_ENVtonullinsrc/config.ts - Start the development server:
pnpm dev
# Initializing Figma MCP Server in HTTP mode on port 3333...
# HTTP server listening on port 3333
# SSE endpoint available at http://localhost:3333/sse
# Message endpoint available at http://localhost:3333/messages- Connect Cursor to the MCP server in Cursor's settings, under the features tab.
- Confirm the connection in Cursor - you should see a green dot and the tools listed.
- Use the composer in agent mode with Figma design links.
For Cursor-specific setup details and screenshots, refer to Cursor's documentation.
To inspect responses from the MCP server, you can use the @modelcontextprotocol/inspector:
pnpm inspect
# > figma-mcp@0.1.0 inspect
# > pnpx @modelcontextprotocol/inspector
#
# Starting MCP inspector...
# Proxy server listening on port 3000
#
# 🔍 MCP Inspector is up and running at http://localhost:5173 🚀