-
securityA
license-
qualityEnables Cursor to access Figma files through the Model Context Protocol, enhancing its ability to accurately interpret and utilize design data for code generation.
Last updated -
5
41,115
7,637
TypeScript
MIT License
该项目实现了 Cursor AI 和 Figma 之间的模型上下文协议 (MCP) 集成,允许 Cursor 与 Figma 通信以读取设计并以编程方式修改它们。
https://github.com/user-attachments/assets/129a14d2-ed73-470f-9a4c-2240b2a4885c
src/talk_to_figma_mcp/
- 用于 Figma 集成的 TypeScript MCP 服务器src/cursor_mcp_plugin/
- 用于与 Cursor 通信的 Figma 插件src/socket.ts
- WebSocket 服务器,用于促进 MCP 服务器和 Figma 插件之间的通信将服务器添加到~/.cursor/mcp.json
中的 Cursor MCP 配置中:
启动 WebSocket 服务器:
src/cursor_mcp_plugin/manifest.json
文件join_channel
加入频道,将插件连接到 WebSocket 服务器MCP 服务器提供了以下与 Figma 交互的工具:
get_document_info
- 获取有关当前 Figma 文档的信息get_selection
- 获取有关当前选择的信息get_node_info
- 获取特定节点的详细信息create_rectangle
- 创建具有位置、大小和可选名称的新矩形create_frame
- 创建具有位置、大小和可选名称的新框架create_text
- 创建具有可自定义字体属性的新文本节点set_fill_color
- 设置节点的填充颜色(RGBA)set_stroke_color
- 设置节点的描边颜色和粗细set_corner_radius
- 使用可选的每个角控制设置节点的角半径move_node
将节点移动到新位置resize_node
- 使用新尺寸调整节点大小delete_node
删除节点get_styles
- 获取有关本地样式的信息get_local_components
- 获取有关本地组件的信息get_team_components
- 获取有关团队组件的信息create_component_instance
- 创建组件的实例export_node_as_image
- 将节点导出为图像(PNG、JPG、SVG 或 PDF)execute_figma_code
- 在 Figma 中执行任意 JavaScript 代码(谨慎使用)join_channel
- 加入特定频道与 Figma 进行通信使用 Figma MCP 时:
get_document_info
获取文档概述get_selection
检查当前选择create_frame
create_rectangle
用于基本形状create_text
get_node_info
验证更改麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
使 Cursor AI 能够与 Figma 设计进行交互,允许用户读取设计信息并通过自然语言命令以编程方式修改元素。
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yhc984/cursor-talk-to-figma-mcp-main'
If you have feedback or need assistance with the MCP directory API, please join our Discord server