figmaMCP_server

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 λ°œκΈ‰ 방법:
  1. Figma μ›Ήμ‚¬μ΄νŠΈ 둜그인
  2. Settings β†’ Personal Access Tokens
  3. "Generate new token" 클릭
  4. μƒμ„±λœ 토큰을 .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"
        }
      }
    }
  }
}

πŸ› οΈ μ‚¬μš© κ°€λŠ₯ν•œ 도ꡬ듀

  1. get_figma_file - 전체 파일 ꡬ쑰 뢄석
  2. get_figma_components - μ»΄ν¬λ„ŒνŠΈ λͺ©λ‘ 쑰회
  3. get_figma_styles - λ””μžμΈ μ‹œμŠ€ν…œ (색상, 폰트) 쑰회
  4. get_figma_nodes - νŠΉμ • λ…Έλ“œλ“€ 상세 뢄석
  5. extract_text_content - 개발 μ„€λͺ… & FTP 정보 μΆ”μΆœ
  6. get_node_styles - CSS μŠ€νƒ€μΌ & HTML μ œμ•ˆ
  7. 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 도ꡬ가 λ‚˜νƒ€λ‚˜μ§€ μ•ŠμŒ:

  1. ν΄λΌμ΄μ–ΈνŠΈ(Claude Desktop/Cursor) μž¬μ‹œμž‘
  2. μ„€μ • 파일의 κ²½λ‘œκ°€ μ ˆλŒ€κ²½λ‘œμΈμ§€ 확인
  3. dist/server.js 파일이 μ‘΄μž¬ν•˜λŠ”μ§€ 확인

πŸ“ž 지원

λ¬Έμ œκ°€ λ°œμƒν•˜λ©΄ μ˜κ²¬μ„ λ‚¨κ²¨μ£Όμ„Έμš”!