Tu bridge oficial entre Cursor/Claude y Figma
Fork de figma-console-mcp con mejoras especΓficas para flujos de trabajo AI-asistido.
cursor2figma es un servidor MCP (Model Context Protocol) que conecta Cursor IDE con Figma Desktop, permitiendo:
- π― ImportaciΓ³n HTML β Figma (ΓΊnico en el mercado)
- π¨ GestiΓ³n completa de design systems (tokens, componentes, estilos)
- πΈ Screenshots y debugging visual
- π FigJam, Slides, y herramientas de colaboraciΓ³n
- β‘ 94+ herramientas disponibles
βββββββββββββββββββ WebSocket βββββββββββββββββββ
β Cursor IDE β βββββββββββββββββββΊ β Figma Desktop β
β (Claude AI) β (Port 9223+) β (Desktop Bridge)β
ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ MCP Protocol
βββββββββββββββββββ
β cursor2figma β
β (este repo) β
β β
β β’ HTML Import β
β β’ Variables β
β β’ Componentes β
β β’ Screenshots β
βββββββββββββββββββ
claude2figma/
βββ cursor2figma/ # π― Servidor MCP principal
β βββ src/
β β βββ core/
β β β βββ html-import/ # β Nuestra contribuciΓ³n
β β β β βββ html-to-figma.ts
β β β β βββ index.ts
β β β βββ ... # 94+ herramientas de southleft
β βββ figma-desktop-bridge/ # Plugin Figma
β βββ dist/ # Build output
β
βββ deprecated/ # ποΈ CΓ³digo histΓ³rico
β βββ cursor2figma-old/ # VersiΓ³n CDP anterior
β
βββ .cursor/
β βββ mcp.json # Config MCP
β βββ rules/
β βββ figma-connection.mdc
β
βββ landing.html # π¨ Ejemplo para importar
βββ README.md # Esta documentaciΓ³n
- Ve a Figma Settings β Personal Access Tokens
- Crea un token con scopes:
- β File content (Read)
- β Variables (Read)
- β Comments (Read and write)
- Copia el token (
figd_...) - Edita
%USERPROFILE%\.cursor\mcp.json:
{
"mcpServers": {
"cursor2figma": {
"command": "node",
"args": ["C:\\Users\\misat\\Desktop\\claude2figma\\cursor2figma\\dist\\local.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "figd_TU_TOKEN_AQUI",
"ENABLE_MCP_APPS": "true",
"FIGMA_WS_PORT": "9223"
}
}
}
}- Abre Figma Desktop
- Plugins β Development β Import plugin from manifest...
- Selecciona:
%USERPROFILE%\.figma-console-mcp\plugin\manifest.json - El plugin se abre automΓ‘ticamente β dΓ©jalo abierto
cd C:\Users\misat\Desktop\claude2figma\cursor2figma
npm install
npm run build:local- Cierra Cursor completamente
- Vuelve a abrirlo
- Espera 5-10 segundos a que el MCP se cargue
En el chat de Cursor, escribe:
Check Figma status
Debe responder:
{
"connected": true,
"transport": "websocket",
"fileName": "Tu Archivo Figma"
}// Desde HTML inline
figma_import_html({
html: "<!DOCTYPE html><html>...</html>",
name: "Mi Landing",
width: 1440
})
// O desde URL
figma_import_html({
url: "http://localhost:8778/landing.html",
name: "Izipay Landing",
width: 1440
})| Herramienta | DescripciΓ³n |
|---|---|
figma_get_variables |
Extraer design tokens |
figma_batch_create_variables |
Crear 100+ tokens en batch |
figma_get_component |
Metadata de componentes |
figma_instantiate_component |
Crear instancias |
figma_execute |
Ejecutar JavaScript arbitrario |
figma_capture_screenshot |
Capturar screenshots |
figjam_create_sticky |
Crear sticky notes |
figma_list_slides |
Gestionar slides |
Hemos desarrollado una funcionalidad ΓΊnica que no existe en ningΓΊn otro MCP de Figma:
Archivos:
cursor2figma/src/core/html-import/html-to-figma.tsβ LΓ³gica de extracciΓ³ncursor2figma/src/core/html-import/index.tsβ Registro MCP
CaracterΓsticas:
- Renderizado con Playwright (headless Chromium)
- ExtracciΓ³n de estilos computados (CSS aplicado)
- Soporte para: gradientes, sombras, pseudo-elementos, textos, imΓ‘genes
- Posicionamiento absoluto para fidelidad pixel-perfect
- Verifica que el build existe:
cursor2figma/dist/local.js - Reinicia Cursor
- Espera 10 segundos despuΓ©s de reiniciar
- Abre Figma Desktop
- Activa el plugin Desktop Bridge
- Verifica que no haya mΓΊltiples instancias del MCP corriendo
Si ves puertos 9223-9228 todos ocupados, mata los procesos:
Get-Process -Name "node" | Where-Object { $_.CommandLine -like "*cursor2figma*" } | Stop-Process| Aspecto | cursor2figma | figma-console-mcp |
|---|---|---|
| HTML Import | β Incluido | β No disponible |
| Nombre | cursor2figma | figma-console-mcp |
| Mantenimiento | Nosotros + upstream | southleft |
| Objetivo | Cursor + Figma | General |
- Mejorar soporte para fuentes web en HTML Import
- AΓ±adir importaciΓ³n de componentes React β Figma
- Integrar con Code Connect
- Visual regression testing
- Base: figma-console-mcp por southleft (MIT)
- Contribuciones: MIT