Figma MCP Proxy Server

Figma MCP Proxy Server

Provides secure access to Figma designs through Cursor IDE using a personal access token, enabling developers to list files, export assets, extract design tokens, and search designs without requiring individual Figma accounts.

Category
访问服务器

README

Figma MCP Proxy Server

A Model Context Protocol (MCP) server that provides secure access to your Figma designs through Cursor IDE. This server authenticates with Figma using your personal access token and exposes your designs to your development team without requiring individual Figma accounts.

Architecture

Developer Cursor IDEs → Your MCP Server (Cloud) → Figma API (Your Account)
  • Your developers connect their Cursor IDE to your hosted MCP server
  • Your MCP server authenticates with Figma using your credentials
  • All Figma requests go through your server (developers never touch Figma directly)

Features

Resources

  • figma://files - List all your Figma files
  • figma://file/{file_id} - Get specific file content (frames, layers, components)
  • figma://team/{team_id} - List files and projects for a team
  • figma://project/{project_id} - Project information

Tools

  • export_asset - Export images from designs (PNG, JPG, SVG, PDF)
  • get_design_tokens - Extract design tokens (colors, typography, spacing)
  • search_files - Search across your Figma files by name
  • get_components - List components from a specific file
  • get_styles - Get published styles (colors, text styles)

Setup Instructions

1. Get Your Figma Personal Access Token

  1. Log in to your Figma account
  2. Click your profile picture → Settings
  3. Go to Account tab → Personal Access Tokens
  4. Click Generate new token
  5. Give it a name (e.g., "MCP Proxy Server")
  6. Copy the token (you won't see it again!)

2. Deploy the Server

Option A: Deploy to Render with Docker (Recommended)

  1. Fork or push this repository to GitHub
  2. Sign up at render.com
  3. Create a new Web Service
  4. Connect your GitHub repository
  5. Configure:
    • Runtime: Docker
    • Dockerfile Path: Dockerfile (auto-detected)
    • Environment Variables:
      • FIGMA_ACCESS_TOKEN = (your token from step 1)
      • NODE_ENV = production
      • PORT = 10000 (Render sets this automatically)
  6. Deploy!

📖 Detailed steps: See DEPLOYMENT.md for complete walkthrough.

Your server URL will be: https://your-service-name.onrender.com

Option B: Deploy to Railway

  1. Push to GitHub
  2. Sign up at railway.app
  3. Create new project from GitHub repo
  4. Add environment variable: FIGMA_ACCESS_TOKEN
  5. Deploy!

Option C: Deploy to Other Platforms

Any Node.js hosting platform works:

  • Fly.io: Use fly.toml configuration
  • AWS ECS/Lambda: Containerize and deploy
  • DigitalOcean App Platform: Similar to Render
  • Heroku: Standard Node.js buildpack

3. Configure Cursor IDE (For Each Developer)

Each developer needs to add the MCP server to their Cursor configuration:

Mac

Edit: ~/Library/Application Support/Cursor/mcp.json

Windows

Edit: %APPDATA%\Cursor\mcp.json

Linux

Edit: ~/.config/Cursor/mcp.json

Configuration:

{
  "mcpServers": {
    "figma-proxy": {
      "transport": "sse",
      "url": "https://your-service-name.onrender.com/sse"
    }
  }
}

Replace your-service-name.onrender.com with your actual server URL.

Note: If your server requires authentication, you may need to add headers or use a different transport method.

4. Restart Cursor

After adding the configuration, restart Cursor IDE completely. The MCP server should now be available.

Usage Examples

Once configured, developers can use natural language in Cursor to interact with Figma:

List Files

"Show me all my Figma files"
"List the files in my Figma account"

View File Content

"Show me the design for file [file-id]"
"Get the components from file [file-id]"

Export Assets

"Export the logo from file [file-id] as PNG"
"Get a 2x scale export of node [node-id]"

Get Design Tokens

"Extract design tokens from file [file-id]"
"Show me the colors and typography from [file-id]"

Search Files

"Search for files named 'dashboard'"
"Find all files with 'mobile' in the name"

Local Development

To run the server locally for testing:

# Install dependencies
npm install

# Create .env file
echo "FIGMA_ACCESS_TOKEN=your_token_here" > .env
echo "PORT=3000" >> .env

# Build
npm run build

# Run
npm start

The server will be available at http://localhost:3000/sse

API Endpoints

  • GET /health - Health check endpoint
  • GET /sse - SSE endpoint for MCP protocol (used by Cursor)
  • POST /message - Message endpoint for client-to-server communication

Security Considerations

  1. Token Security: Your Figma token is stored in environment variables only - never commit it to git
  2. HTTPS: Always use HTTPS in production (Render provides this automatically)
  3. Access Control: Currently, anyone with the server URL can access it. For production, consider:
    • Adding API key authentication
    • IP whitelisting
    • User authentication

Rate Limits

Figma API has rate limits:

  • 120 requests per minute
  • 24,000 requests per day

The server implements caching for file lists (5-minute cache) to reduce API calls.

Troubleshooting

Server won't start

  • Check that FIGMA_ACCESS_TOKEN is set correctly
  • Verify Node.js version (requires Node 20+)
  • Check server logs for errors

Cursor can't connect

  • Verify the server URL is correct
  • Check that the server is running (/health endpoint)
  • Ensure Cursor config file syntax is valid JSON
  • Restart Cursor completely after config changes

No files showing

  • Verify your Figma token has access to files
  • Check server logs for API errors
  • Test the Figma API directly with your token

Project Structure

proxy_mcp_fogma/
├── src/
│   ├── index.ts              # Main server with HTTP/SSE transport
│   ├── figma-client.ts       # Figma API wrapper
│   ├── types.ts              # TypeScript types
│   ├── handlers/
│   │   ├── resources.ts      # Resource handlers
│   │   └── tools.ts          # Tool handlers
│   └── transport/
│       └── sse-transport.ts  # SSE transport implementation
├── package.json
├── tsconfig.json
├── render.yaml              # Render deployment config
└── README.md

License

MIT

Support

For issues or questions:

  1. Check the troubleshooting section
  2. Review server logs
  3. Test Figma API access directly
  4. Verify Cursor MCP configuration

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选