使用说明
Figma MCP服务器
模型上下文协议(MCP)服务器,提供与Figma的API的集成,允许您与Figama文件、注释、组件等进行交互。
特性
-
文件操作
- 获取文件信息
- 获取文件版本历史记录
- 获取文件组件
-
评论管理
- 在文件中列出注释
- 添加新评论
- 删除评论
-
项目和团队特征
- 列出团队项目
- 获取项目文件
- 获取已发布的样式
-
网钩 管理
- 创建 Webhooks
- 列出现有的 webhooks
- 删除网站挂钩
安装
通过Smithery安装
通过以下方式自动安装Claude Desktop的Figma MCP服务器 史密瑟里:
npx -y @smithery/cli install @deepsuthar496/figma-mcp-server --client claude
手动安装
- 克隆存储库
- 安装依赖项:
npm install
- 构建服务器:
npm run build
配置
使用Figma访问令牌在MCP设置文件中配置服务器:
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["path/to/figma-server/build/index.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-access-token-here"
},
"disabled": false,
"alwaysAllow": []
}
}
}
可用工具
文件操作
获取文件
获取有关Figma文件的信息
{
"file_key": "string"
}
获取_版本
获取文件的版本历史记录
{
"file_key": "string"
}
get_file_组件
在文件中获取组件
{
"file_key": "string"
}
评论管理
获取_文件_注释
从文件中获取评论
{
"file_key": "string"
}
投稿
在文件中发表评论
{
"file_key": "string",
"message": "string"
}
删除注释
从文件中删除注释
{
"file_key": "string",
"comment_id": "string"
}
项目和团队运营
get_team_项目
为团队获取项目
{
"team_id": "string"
}
get_project_files
获取项目中的文件
{
"project_id": "string"
}
get_component_styles
获取已发布的样式
{
"team_id": "string"
}
网钩 管理
创建_网钩
创建一个 webhook
{
"team_id": "string",
"event_type": "string",
"callback_url": "string"
}
获取_webhooks
网页挂钩列表
{
"team_id": "string"
}
删除_网钩
删除网页挂钩
{
"webhook_id": "string"
}
用法示例
// Example using the MCP tool to get file information
<use_mcp_tool>
<server_name>figma</server_name>
<tool_name>get_file</tool_name>
<arguments>
{
"file_key": "your-file-key"
}
</arguments>
</use_mcp_tool>
许可证
麻省理工学院
贡献
- 分叉存储库
- 创建功能分支
- 提交您的更改
- 推到分支
- 创建新的Pull请求
