MCP.so
ログイン
F

Figma To Code Mcp Server

@toddle-edu

Figma To Code Mcp Server について

Use this Figma MCP Server to convert Figma Design to pseudo-code like structure - simple yet efficient for LLMs to understand design context. Connect to Figma API and get pseudo-code for the given Design. For visual context, can also fetch images.

基本情報

カテゴリ

メディアとデザイン

トランスポート

stdio

公開者

toddle-edu

投稿者

vaibhav patel

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "figma MCP Server": {
      "command": "npx",
      "args": [
        "figma-codegen-mcp",
        "--figma_api_key=${input:FIGMA_API_KEY}"
      ]
    }
  },
  "inputs": [
    {
      "id": "FIGMA_API_KEY",
      "type": "promptString",
      "description": "Paste your Figma Personal access Token here"
    }
  ]
}

ツール

2

Fetches a PNG image of a Figma node or frame using the file key and node ID. Returns the image as base64.

It will generates JSX and CSS pseudo-code for a Figma frame or node, given its file key and node ID. Useful for converting Figma designs to code. Can also be used to generate code for specific components or frames in Figma.

概要

What is Figma To Code Mcp Server?

Figma To Code Mcp Server connects to the Figma API and converts Figma designs into a pseudo-code-like structure (JSX and CSS) that is simple and efficient for LLMs to understand design context. It is aimed at developers and AI workflows that need to translate visual designs into code representations automatically.

How to use Figma To Code Mcp Server?

Share a Figma Design URL with an MCP client; the server automatically extracts the file key and node ID, then calls the appropriate tools. Two tools are provided: fetch_figma_node_image (returns a base64 PNG of a node) and generate_pseudo_code_from_figma_frame (returns formatted JSX, CSS, and semantic HTML). No additional configuration is required beyond the MCP client setup.

Key features of Figma To Code Mcp Server

  • Auto-extracts file key and node ID from Figma URLs.
  • Generates pseudo-JSX + CSS code from Figma frames.
  • Fetches PNG images of nodes as base64 data.
  • Produces semantic HTML structure and readable formatting.
  • Integrates design system components (accuracy depends on Figma library).

Use cases of Figma To Code Mcp Server

  • Converting Figma designs to React-inspired pseudo-components.
  • Providing code-like design representations to LLMs.
  • Rapid prototyping from Figma designs.
  • Automating design-to-code workflows.
  • Creating documentation with actual design screenshots.

FAQ from Figma To Code Mcp Server

What does the generate_pseudo_code_from_figma_frame tool return?

It returns formatted text containing CSS styles, JSX component structure, and semantic HTML elements. The output is clean and readable.

How does the server extract the file key and node ID?

It parses the Figma URL automatically: the file key is the part after /design/ or /file/, and the node ID comes from the node-id URL parameter.

Does the server require a Figma API token?

The README does not mention authentication details, but Figma API access typically requires a personal access token. The server likely expects one to be configured in the MCP client environment.

What formats are supported for image output?

The fetch_figma_node_image tool returns a PNG image as base64-encoded data along with its MIME type.

Are there any known limitations?

Accuracy and quality of the generated pseudo-code depend on the Figma component library used in the design. The server does not produce production-ready code; it is meant as a helpful representation for LLMs.

コメント

「メディアとデザイン」の他のコンテンツ