Figma MCP Python
](https://badge.fury.io/py/figma-mcp)
允许您的AI编码代理直接访问Figma文件和原型。 如有任何问题/改进,您可以向我发送DM:https://x.com/jasonzhou1993
使用pipx快速安装
pipx install figma-mcp对于光标:
- 在设置中,使用以下命令添加MCP服务器:
figma-mcp --figma-api-key=your_figma_key- 或添加
.cursor/mcp.json项目中的文件:
{
"mcpServers": {
"figma-python": {
"command": "figma-mcp",
"args": [
"--figma-api-key=your_figma_key"
]
}
}
}对于Windsurf等其他IDE,请使用MCP配置文件(例如。, mcp_config.json):
{
"mcpServers": {
"figma-python": {
"command": "figma-mcp",
"args": [
"--figma-api-key=your_figma_key"
]
}
}
}安装uv并设置环境
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv sync本地测试
python -m figma_mcp.main