Figma MCP服务器

一个提供与Figma API只读集成的模型上下文协议(MCP)服务器,支持核心Figma文件和项目访问,设计用于Claude Desktop和其他MCP兼容客户端。

  • by ishivam06
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 ishivam06/figmcpserver

使用说明

Figma MCP服务器

当Claude/Cursor可以直接访问Figma设计数据时,它可以在一个步骤中生成准确的设计,比依赖屏幕截图的方法更有效。

模型上下文协议(MCP)服务器,提供与Figma API的只读集成。支持核心Figma文件和项目访问,专为与Claude Desktop和其他MCP兼容客户端一起使用而设计。

特性

  • 使用Figma API进行安全身份验证
  • Figma文件操作(读取、列表)

先决条件

  • Node.js 18.x或更高版本
  • Figma访问令牌(读取权限)

配置

  1. 复制 .env.example 向 .env 并设置您的Figma访问令牌:
FIGMA_ACCESS_TOKEN=your_figma_token
MCP_SERVER_PORT=3000
DEBUG=figma-mcp:*
  1. 对于Claude Desktop集成,请将服务器添加到Claude配置中(请参阅 examples/claude_desktop_config.json).
### Available Tools

- **get-file**: Retrieve Figma file details
- **list-files**: List files in a Figma project
- **create-variables**: Create variables in a Figma file
- **update-variables**: Update existing variables in a Figma file
- **delete-variables**: Delete variables from a Figma file
- **create-reference**: Create a reference between variables
- **validate-references**: Check for circular references and validate dependencies
- **create-theme**: Create a theme with variable mode configurations

See `src/handlers/figma.ts` and `src/commands/figma.ts` for implementation details.


See `src/handlers/figma.ts` and `src/commands/figma.ts` for implementation details.

## Project Structure

- `src/server.ts` — Main server logic
- `src/handlers/figma.ts` — Figma API handlers
- `src/commands/figma.ts` — Command definitions
- `src/schemas/` — Input validation schemas
- `src/types/` — TypeScript types
- `bin/figma-mcp-server` — CLI entry point
- `examples/` — Example Claude Desktop configs