Figma MCP 服务器是一个与 Figma API 集成的 Model Context Protocol (MCP) 服务器,它能让您与 Figma 文件、评论、组件等进行交互,为您在 Figma 平台上的操作提供便利。
本服务器可帮助您轻松实现与 Figma API 的交互,按以下步骤操作即可开启使用。
npm install
npm run build
在您的 MCP 设置文件中配置服务器,使用 Figma 访问令牌:
{
"mcpServers": {
"figma": {
"command": "node",
"args": ["path/to/figma-server/build/index.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-access-token-here"
},
"disabled": false,
"alwaysAllow": []
}
}
}
{
"file_key": "string"
}
{
"file_key": "string"
}
{
"file_key": "string"
}
{
"file_key": "string"
}
{
"file_key": "string",
"message": "string"
}
{
"file_key": "string",
"comment_id": "string"
}
{
"team_id": "string"
}
{
"project_id": "string"
}
{
"team_id": "string"
}
{
"team_id": "string",
"event_type": "string",
"callback_url": "string"
}
{
"team_id": "string"
}
{
"webhook_id": "string"
}
// 示例:使用 MCP 工具获取文件信息
<server_name>figmaserver_name>
<tool_name>get_filetool_name>
<arguments>
{
"file_key": "your-file-key"
}
arguments>
本项目采用 MIT 许可证。
如果您想为项目做出贡献,请按以下步骤操作: