Figma Context MCP is a server that connects your Figma designs with AI coding assistants like Cursor, Windsurf, and Cline. By providing direct access to Figma design data, AI tools can generate more accurate code on the first try, eliminating the limitations of screenshots.
Via Smithery (Recommended)
npx -y @smithery/cli install @1yhy/Figma-Context-MCP --client claude
Via npm
npm install -g @yhy2001/figma-mcp-server
From Source
git clone https://github.com/1yhy/Figma-Context-MCP.git
cd Figma-Context-MCP
pnpm install
pnpm build
Cursor / Windsurf / Cline
Add to your MCP configuration file:
{
"mcpServers": {
"Figma": {
"command": "npx",
"args": ["-y", "@yhy2001/figma-mcp-server", "--stdio"],
"env": {
"FIGMA_API_KEY": "your-figma-api-key"
}
}
}
}
HTTP/SSE Mode (Local Development)
# From source (development)
cp .env.example .env # Add FIGMA_API_KEY to .env
pnpm install && pnpm build
pnpm start # Starts on port 3333
# Or with environment variable
FIGMA_API_KEY=<your-key> pnpm start
# Or via global install
figma-mcp --figma-api-key=<your-key> --port=3333
# Connect via SSE
# URL: http://localhost:3333/sse
Once configured, you can ask your AI assistant to implement designs by providing the Figma link:
Please implement this Figma design: https://www.figma.com/design/abc123/MyDesign?node-id=1:234
Use React and Tailwind CSS.
| Tool | Description | Parameters |
|---|---|---|
get_figma_data |
Fetch simplified design data | fileKey, nodeId?, depth? |
download_figma_images |
Download images and icons | fileKey, nodes[], localPath |
The server includes built-in professional prompt templates:
| Prompt | Description | Parameters |
|---|---|---|
design_to_code |
Complete design-to-code workflow | framework?, includeResponsive? |
analyze_components |
Analyze component structure | - |
extract_styles |
Extract design tokens | - |
Lightweight data access options:
# Get file metadata (~200 tokens)
figma://file/abc123
# Get design tokens (~500 tokens)
figma://file/abc123/styles
# Get component list (~300 tokens)
figma://file/abc123/components
# Get asset inventory (~400 tokens)
figma://file/abc123/assets
| Option | Description | Default |
|---|---|---|
--figma-api-key |
Figma API token | Required |
--port |
Server port for HTTP mode | 3333 |
--stdio |
Run in stdio mode | false |
--help |
Show help | - |
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "Figma-MCP" '{"command":"npx","args":["figma-mcp","--figma-api-key=<your-figma-api-key>","--stdio"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"Figma MCP": {
"command": "npx",
"args": [
"figma-mcp",
"--figma-api-key=<your-figma-api-key>",
"--stdio"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"Figma MCP": {
"command": "npx",
"args": [
"figma-mcp",
"--figma-api-key=<your-figma-api-key>",
"--stdio"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect