MS

magic-spells/figma-mcp-bridge

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

85 stars 13 forks 质量 82 趋势 8MIT

magic-spells/figma-mcp-bridge 是从 https://github.com/magic-spells/figma-mcp-bridge. 导入的 MCP 服务器候选

概览

magic-spells/figma-mcp-bridge 是从 https://github.com/magic-spells/figma-mcp-bridge. 导入的 MCP 服务器候选

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,使Claude能够通过WebSocket桥实时读取和操作Figma设计文件和FigJam文件,连接到Figma插件。

特色

  • 98 个操作- 73 个 Figma 设计工具 + 21 个 FigJam 工具(便签、流程图形状、连接器、表格、代码块、链接预览)+ 4 个原型工具(反应、流程起点)
  • 支持两个编辑器,以及只读开发模式 - 自动检测你是在Figma设计文件还是FigJam中,并相应地控制编辑器专用命令(仅FigJam的粘贴/连接器/表格工具;仅Figma设计的原型工具)。在开发模式下,该插件运行为只读——参见开发者模式支持
  • 实时双向通信 - 变更在Figma/FigJam中即时出现
  • 令牌优化查询 - 高效的变量搜索和节点遍历,用于AI交互
  • 完整的Figma API访问 - 样式、变量、自动布局、组件和团队库,以及FigJam图表和文档
  • 内置技能 - 自带操作指南作为MCP资源('skill://figma-bridge/SKILL。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Figma MCP Bridge

A Model Context Protocol (MCP) server that enables Claude to read and manipulate Figma design files and FigJam files in real-time through a WebSocket bridge to a Figma plugin.

Features

  • 98 operations - 73 Figma design tools + 21 FigJam tools (sticky notes, flowchart shapes, connectors, tables, code blocks, link previews) + 4 Prototype tools (reactions, flow starting points)
  • Works in both editors, plus read-only Dev Mode - Auto-detects whether you’re in a Figma design file or FigJam, and gates editor-specific commands accordingly (FigJam-only sticky/connector/table tools; Figma-Design-only prototype tools). In Dev Mode the plugin runs read-only — see Dev Mode support
  • Real-time bidirectional communication - Changes appear instantly in Figma/FigJam
  • Token-optimized queries - Efficient variable search and node traversal for AI interactions
  • Full Figma API access - Styles, variables, auto-layout, components and team libraries, plus FigJam diagrams and documentation
  • Built-in skills - Ships its own operating guide as MCP resources (skill://figma-bridge/SKILL.md); connected agents are directed to read it before write-heavy work, so no separate skill install is needed

Architecture

Claude Code ←──stdio──→ MCP Server ←──WebSocket──→ Figma Plugin ←──→ Figma API
                        (Node.js)    localhost:3055    (runs in Figma)

Dev Mode Support

The plugin also runs in Figma Dev Mode (e.g. on a Developer seat, or a view-only file opened in Dev Mode). It appears in the inspect panel’s plugin area with a read-only badge next to the port field.

Dev Mode plugins get a read-only document — this is a Figma platform restriction, not a bridge limitation — so only the read tools work there:

  • figma_get_context, figma_list_pages, figma_get_nodes, figma_get_children
  • figma_search_nodes, figma_search_components, figma_search_styles, figma_search_variables
  • figma_get_local_styles, figma_get_local_variables
  • figma_export_node
  • figma_set_selection, figma_set_current_page (selection/navigation, not document edits)

Every mutation tool returns a READ_ONLY_EDITOR error naming the tool. To edit the file, open it in the Figma Design editor with an editor seat.

If you only need read access to designs and tokens, also consider Figma’s official MCP server, which specializes in design-to-code extraction. This bridge’s Dev Mode support exists so bridge users keep one consistent tool surface — its real differentiator (writing to the document) requires the Design editor.

Quick Start

Prerequisites

  • Node.js 18+
  • Figma desktop app
  • Claude Code CLI or Claude Desktop

Installation

For Claude Code CLI:

claude mcp add figma-mcp-bridge -- npx @magic-spells/figma-mcp-bridge

For Claude Desktop:

在 GitHub 查看完整 README

安装

npx -y @magic-spells/figma-mcp-bridge
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "figma-mcp-bridge": { "command": "npx", "args": ["-y", "@magic-spells/figma-mcp-bridge"] } } }