Figma MCP Server
Servidor MCP de Figma
Un servidor de Protocolo de Contexto de Modelo (MCP) que conecta los diseños de Figma con las implementaciones de React. Este servidor permite la conversión con precisión de píxeles de diseños de Figma en aplicaciones de React procesando los datos de los archivos de Figma y proporcionándolos en un formato compatible con React.
🚀 Características
Integración de la API de Figma : conexión directa a la API de Figma para acceder a los archivos de diseño
Salida lista para React : procesa datos de Figma en un formato compatible con React
Procesamiento de estilos : convierte los estilos de Figma en CSS/componentes con estilo
Gestión de activos : gestiona activos de imagen y componentes SVG
Procesamiento de diseño : convierte el diseño automático de Figma a Flexbox
Seguridad de tipos : creado con TypeScript para una verificación de tipos confiable
Related MCP server: MCP Figma to React Converter
🛠️ Herramientas proporcionadas
get_file_content:Obtiene y procesa el contenido del archivo Figma
Convierte diseño, estilos y componentes.
Devuelve la estructura del componente preparada para React GXP1
get_node_images:Recupera recursos de imagen de Figma
Admite múltiples formatos (PNG, JPG, SVG)
Opciones de escalado configurables GXP2
📦 Instalación
Clonar el repositorio:
git clone https://github.com/yourusername/figma-mcp.git cd figma-mcpInstalar dependencias:
npm installConfigura tu token de acceso de Figma:
cp .env.example .env # Add your Figma access token to .env
Configuración del IDE del cursor
Crea el archivo
.cursor/mcp.jsonen la raíz de tu proyecto:mkdir -p .cursor touch .cursor/mcp.jsonPara la configuración del servidor basada en Stdio:
{ "mcpServers": { "figma": { "command": "node", "args": ["d:/<folder>>/figma-mcp/build/index.js"], "env": { "FIGMA_ACCESS_TOKEN": "your figma token" }, "disabled": false, "alwaysAllow": [], "protocol": "stdio" } }
}
## 💻 Usage
1. Build the server:
```bash
npm run build
```
2. Configure MCP settings based on your IDE:
- For VS Code (global settings):
```json
// In settings.json
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["path/to/figma-mcp/build/index.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-token-here"
}
}
}
}
```
- For Cursor IDE:
Use the `.cursor/mcp.json` configuration as described in the "Cursor IDE Setup" section above.
This configuration will take precedence over VS Code settings when using Cursor IDE.
3. Use the MCP tools in your application:
```typescript
// Example: Fetch processed Figma content
const result = await useMcpTool("figma", "get_file_content", {
fileKey: "your-figma-file-key"
});🧩 Proyecto de ejemplo
Consulta el directorio raccoon-game para ver un ejemplo completo del uso de este servidor MCP para crear una implementación React con píxeles perfectos de un diseño de Figma.
🔄 Tubería de procesamiento
Entrada : datos del archivo Figma a través de la API oficial
Procesando :
Conversión de estilo (colores, tipografía, efectos)
Transformación de diseño (absoluta a Flexbox)
Mapeo de jerarquía de componentes
Optimización de activos
Salida : Datos del componente listo para React
📝 Licencia
Licencia MIT
🤝 Contribuyendo
¡Se agradecen las contribuciones! Por favor, lea nuestras normas de contribución.
🙏 Agradecimientos
Equipo de API de Figma para la API integral
Protocolo de contexto de modelo para la especificación MCP
Hecho con ❤️ por [Tu nombre]
Available Tools
5 toolsadd_figma_fileC
Add a Figma file to your context
Inputs: url (required).
post_commentC
Post a comment on a node in a Figma file
Inputs: file_key (required), message (required), x (required), y (required), +1 more.
read_commentsC
Get all comments on a Figma file
Inputs: file_key (required).
reply_to_commentC
Reply to an existing comment in a Figma file
Inputs: file_key (required), comment_id (required), message (required).
view_nodeC
Get a thumbnail for a specific node in a Figma file
Inputs: file_key (required), node_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose targeting specific actions in Figma: adding files, posting comments, reading comments, replying to comments, and viewing nodes. There is no overlap in functionality, making it easy for an agent to select the correct tool without confusion.
The naming follows a consistent verb_noun pattern (e.g., add_figma_file, post_comment) with clear and descriptive names. The only minor deviation is 'view_node' which uses 'view' instead of a more action-oriented verb like 'get', but it still fits the pattern well and remains readable.
With 5 tools, the server is well-scoped for its purpose of interacting with Figma files, comments, and nodes. Each tool serves a distinct and necessary function, avoiding bloat while covering essential operations like file management and comment handling.
The toolset covers core workflows for Figma interactions, including file addition, comment management (post, read, reply), and node viewing. A minor gap is the lack of tools for updating or deleting files or comments, but agents can still perform basic operations effectively without major dead ends.
Related MCP Connectors
The Figma MCP server brings Figma design context directly into your AI workflow.
Deterministic Figma to Elementor, Gutenberg, Oxygen, Etch and HTML layouts for AI assistants.
Designs React sites with animated components fitted to your brand, then checks each page.
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Related MCP Servers
- AlicenseCqualityDmaintenanceConverts Figma designs to React Native components, allowing users to extract components from Figma designs and generate corresponding React Native components with proper typing and styling.38MIT
- AlicenseNot gradedqualityDmaintenanceConverts Figma designs into React components with TypeScript and Tailwind CSS by extracting components from Figma files and transforming them into ready-to-use code.77MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI applications to Figma API for extracting design data, generating production-ready HTML/CSS from designs, and capturing screenshots in multiple formats.ISC
- AlicenseAqualityDmaintenanceConverts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend module generation.351 npm1MIT