figma-mcp-server

figma-mcp-server

Enables Claude to interact with Figma designs, convert designs to code, extract variables, get screenshots, and more.

Category
Visit Server

README

Figma MCP Server

FastAPI-based MCP server that exposes Figma design tools for Claude Desktop. Convert designs to code, extract variables, get screenshots, and more.

Deploy to Render

Features

  • šŸŽØ 7 Figma tools (screenshots, design context, variables, metadata, etc.)
  • šŸ”„ Automatic rate limit handling with retry logic
  • šŸš€ Ready for Render, Railway, or Fly.io deployment
  • šŸ“” Server-Sent Events (SSE) for Claude Desktop
  • šŸ”§ CORS support for browser clients

Connect with Claude Desktop

Edit claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "figma": {
      "url": "https://your-app.onrender.com/figma/sse",
      "type": "sse"
    }
  }
}

Restart Claude Desktop and test:

List available Figma MCP tools

Local Development

# Setup
python3 -m venv mcp-venv
source mcp-venv/bin/activate
pip install -r requirements.txt

# Configure
echo 'FIGMA_ACCESS_TOKEN=your-token-here' > .env

# Run
uvicorn main:app --reload --port 8002

Server: http://localhost:8002

API Routes

GET  /                    # Server info
GET  /health              # Health check
POST /figma/messages      # MCP protocol
GET  /figma/sse          # Server-Sent Events
POST /save-code           # Save generated code

Available Tools

  1. get_screenshot - Export designs as images
  2. get_design_context - Extract UI context for code generation
  3. get_metadata - Get node metadata
  4. get_variable_defs - Access design variables
  5. get_figjam - Process FigJam boards
  6. get_code_connect_map - Map components to code
  7. whoami - Verify authentication

Usage with Claude

Ask Claude to use your Figma designs:

Generate React code from this Figma file:
https://www.figma.com/file/ABC123/My-Design

Claude will use the MCP server to fetch design data and generate code.

Rate Limits

Figma API limits: ~25-50 requests/min (free tier)

The server handles this automatically:

  • Detects 429 errors
  • Retries with exponential backoff (2s → 4s → 8s)
  • Respects Retry-After headers

Deployment Options

Render (Recommended)

  • Free tier: 750 hours/month
  • Auto-deploy from Git
  • Built-in HTTPS
  • Config: render.yaml āœ…

Railway

  • Usage-based pricing (~$5/month)
  • Fast deployments
  • Config: railway.json āœ…

Fly.io

  • Global edge deployment
  • Free tier available
  • Config: Dockerfile āœ…

Tech Stack

  • FastAPI - Web framework
  • httpx - Async HTTP
  • Pydantic - Data validation
  • Uvicorn - ASGI server

Troubleshooting

429 Rate Limit Errors:

  • Wait 60 seconds between requests
  • Server auto-retries with backoff

Claude Connection Failed:

  • Verify URL ends with /figma/sse
  • Check server is running
  • Restart Claude Desktop

Invalid API Key:

  • Get new token: https://www.figma.com/developers/api#access-tokens
  • Update environment variable
  • Redeploy

Project Structure

figma-mcp-server/
ā”œā”€ā”€ main.py              # FastAPI MCP server (all-in-one)
ā”œā”€ā”€ requirements.txt     # Python dependencies
ā”œā”€ā”€ .env                 # Environment variables (not in git)
ā”œā”€ā”€ .gitignore          # Git ignore rules
ā”œā”€ā”€ Dockerfile          # Docker deployment config
└── render.yaml         # Render deployment config

Why single-file?

  • Simpler deployment (one file to read)
  • Easier for LLMs to understand context
  • Common pattern for MCP servers
  • FastAPI works great in monolithic style for small services

Links


Built for design-to-code workflows with Nattu šŸš€

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured