wooji-dev/figmaMCP_server
3.3
If you are the rightful owner of figmaMCP_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Figma REST API MCP Server is a tool that converts Figma designs into HTML/CSS/JavaScript code using the Model Context Protocol.
Tools
7
Resources
0
Prompts
0
Figma REST API MCP Server
Figma μμμ λΆμνμ¬ HTML/CSS/JavaScript μ½λλ‘ λ³ννλ MCP(Model Context Protocol) μλ²μ λλ€
This project is a customized version based on: https://github.com/sonnylazuardi/cursor-talk-to-figma-mcp
π λΉ λ₯Έ μ€μΉ κ°μ΄λ
1. νλ‘μ νΈ ν΄λ‘ λ° μμ‘΄μ± μ€μΉ
git clone <your-repo-url>
cd figmaMCP_server
npm install
2. νκ²½λ³μ μ€μ (μ€μ!)
# .env.exampleμ 볡μ¬νμ¬ .env νμΌ μμ±
cp .env.example .env
# .env νμΌμ μ΄μ΄μ μ€μ Figma ν ν°μΌλ‘ μμ
# FIGMA_ACCESS_TOKEN=your-actual-figma-token-here
Figma Personal Access Token λ°κΈ λ°©λ²:
- Figma μΉμ¬μ΄νΈ λ‘κ·ΈμΈ
- Settings β Personal Access Tokens
- "Generate new token" ν΄λ¦
- μμ±λ ν ν°μ
.env
νμΌμ μ λ ₯
3. λΉλ
npm run build
4. MCP ν΄λΌμ΄μΈνΈ μ°κ²°
Claude Desktopμμ μ¬μ©:
claude_desktop_config.json
νμΌμ μΆκ°:
{
"mcpServers": {
"figma-rest-api": {
"command": "node",
"args": ["/μ λ/κ²½λ‘/figmaMCP_server/dist/server.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-figma-token"
}
}
}
}
Cursorμμ μ¬μ©:
Settings β User Settings (JSON)μ μΆκ°:
{
"mcp": {
"servers": {
"figma-rest-api": {
"command": "node",
"args": ["/μ λ/κ²½λ‘/figmaMCP_server/dist/server.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-figma-token"
}
}
}
}
}
π οΈ μ¬μ© κ°λ₯ν λꡬλ€
get_figma_file
- μ 체 νμΌ κ΅¬μ‘° λΆμget_figma_components
- μ»΄ν¬λνΈ λͺ©λ‘ μ‘°νget_figma_styles
- λμμΈ μμ€ν (μμ, ν°νΈ) μ‘°νget_figma_nodes
- νΉμ λ Έλλ€ μμΈ λΆμextract_text_content
- κ°λ° μ€λͺ & FTP μ 보 μΆμΆget_node_styles
- CSS μ€νμΌ & HTML μ μexport_figma_images
- πΌοΈ μ΄λ―Έμ§ νμΌ λ€μ΄λ‘λ (μμ΄μ½, λ‘κ³ λ±)
π‘ μ¬μ© μμ
AIμκ² λ€μκ³Ό κ°μ΄ μμ²νμΈμ:
"μ΄ Figma μμμ μΉνμ΄μ§λ‘ λ§λ€μ΄μ€:
https://www.figma.com/file/ABC123DEF456/My-Design
1. μμμ μ ν κ°λ° μ€λͺ
μ μ½μ΄μ€
2. FTP μ 보λ νμΈν΄μ€
3. κ° λ²νΌμ CSS μ€νμΌμ λΆμν΄μ€
4. μμ΄μ½κ³Ό μ΄λ―Έμ§λ€μ PNGλ‘ λ€μ΄λ‘λν΄μ€
5. React μ»΄ν¬λνΈλ‘ λ§λ€μ΄μ€"
πΌοΈ μ΄λ―Έμ§ λ€μ΄λ‘λ μμ
"λ‘κ³ μ μμ΄μ½λ€μ λͺ¨λ PNGλ‘ λ€μ΄λ°μμ€.
λ
Έλ IDλ: ['1:123', '1:124', '1:125']
κ³ ν΄μλλ‘ 2λ°° ν¬κΈ°λ‘ λ°κ³ μΆμ΄"
κ²°κ³Ό:
- π
downloads/ABC123DEF456_images/
λ‘κ³ _1:123.png
ν_μμ΄μ½_1:124.png
κ²μ_λ²νΌ_1:125.png
π§ κ°λ° μ€ν¬λ¦½νΈ
npm run build # TypeScript λΉλ
npm run dev # κ°λ° λͺ¨λ μ€ν
npm start # νλ‘λμ
λͺ¨λ μ€ν
π νλ‘μ νΈ κ΅¬μ‘°
Comp/
βββ server.ts # MCP μλ² λ©μΈ μ½λ
βββ dist/ # λΉλ κ²°κ³Ό (Git μ μΈ)
βββ .env # νκ²½λ³μ (Git μ μΈ)
βββ .env.example # νκ²½λ³μ μμ
βββ package.json # νλ‘μ νΈ μ€μ
βββ tsconfig.json # TypeScript μ€μ
β οΈ μ£Όμμ¬ν
- μ λλ‘
.env
νμΌμ Gitμ 컀λ°νμ§ λ§μΈμ (Figma ν ν° μ μΆ μν) - Figma Personal Access Tokenμ κ°μΈλ³λ‘ λ°κΈλ°μμΌ ν©λλ€
- MCP ν΄λΌμ΄μΈνΈ μ¬μμ ν λκ΅¬κ° νμ±νλ©λλ€
π λ¬Έμ ν΄κ²°
"Cannot find module" μ€λ₯ λ°μ μ:
rm -rf node_modules package-lock.json
npm install
npm run build
νκ²½λ³μ μΈμ μλ¨:
# .env νμΌμ΄ νλ‘μ νΈ λ£¨νΈμ μλμ§ νμΈ
ls -la .env
# .env νμΌ λ΄μ© νμΈ (ν ν° μ μΈνκ³ )
cat .env
MCP λκ΅¬κ° λνλμ§ μμ:
- ν΄λΌμ΄μΈνΈ(Claude Desktop/Cursor) μ¬μμ
- μ€μ νμΌμ κ²½λ‘κ° μ λκ²½λ‘μΈμ§ νμΈ
dist/server.js
νμΌμ΄ μ‘΄μ¬νλμ§ νμΈ
π μ§μ
λ¬Έμ κ° λ°μνλ©΄ μ견μ λ¨κ²¨μ£ΌμΈμ!