This Python-based Figma MCP server allows AI assistants to interact with Figma through WebSocket connections, enabling them to read, analyze, and export design elements without making any modifications to the original design files.
cd python-version
python -m venv venv
source venv/bin/activate # Linux/Mac
# or venv\Scripts\activate # Windows
pip install -r requirements.txt
python websocket_proxy.py --port 3055 --debug
src/cursor_mcp_plugin/manifest.json
abc123xyz
)Add the following configuration to your Cursor MCP settings (.cursor/mcp.json
):
{
"mcpServers": {
"figma-mcp": {
"command": "python",
"args": ["-m", "src.figma_mcp.server", "--server", "localhost:3055"],
"cwd": "/path/to/your/figma_mcp"
}
}
}
Alternative configuration using virtual environment:
{
"mcpServers": {
"figma-mcp": {
"command": "/path/to/your/figma_mcp/venv/bin/python",
"args": ["/path/to/your/figma_mcp/src/figma_mcp/server.py", "--server", "localhost:3055"]
}
}
}
Replace
/path/to/your/figma_mcp
with the actual path to your project.
python -m src.figma_mcp.server --server localhost:3055
Use the join_channel
tool with your Channel ID:
{
"tool": "join_channel",
"arguments": {
"channel": "abc123xyz"
}
}
{
"tool": "get_document_info",
"arguments": {}
}
{
"tool": "get_node_info",
"arguments": {
"node_id": "4472:98013"
}
}
{
"tool": "get_node_children",
"arguments": {
"node_id": "4472:98012"
}
}
{
"tool": "scan_text_nodes",
"arguments": {
"node_id": "4472:98012",
"use_chunking": true,
"chunk_size": 50
}
}
{
"tool": "export_node_as_image",
"arguments": {
"node_id": "4472:98013",
"format": "PNG",
"scale": 2.0
}
}
join_channel
- Join a channel to communicate with Figmaget_document_info
- Get information about the current Figma documentget_selection
- Get information about the current selectionread_my_design
- Get detailed information about the selection including all node detailsget_node_info
- Get information about a specific node by IDget_nodes_info
- Get information about multiple nodesget_node_children
- Get IDs of all child nodes with full recursive nestingget_styles
- Get all styles from the documentget_local_components
- Get all local componentsget_instance_overrides
- Get overrides for a component instancescan_text_nodes
- Scan text nodes within a given nodescan_nodes_by_types
- Scan nodes of specific types (TEXT, RECTANGLE, FRAME)export_node_as_image
- Export a node as an image (PNG, JPG, SVG, PDF)get_annotations
- Get annotations for a node or the entire documentget_reactions
- Get reactions (interactive connections) for nodes--debug
Create a .cursor/mcp.json
file in your project root or home directory:
{
"$schema": "https://schema.cursor.com/mcp.json",
"mcpServers": {
"figma-mcp": {
"command": "python",
"args": ["-m", "src.figma_mcp.server", "--server", "localhost:3055"],
"cwd": "/absolute/path/to/figma_mcp",
"env": {
"PYTHONPATH": "/absolute/path/to/figma_mcp"
}
}
}
}
If you encounter issues:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "figma-mcp" '{"command":"python","args":["-m","src.figma_mcp.server","--server","localhost:3055"],"cwd":"/path/to/your/figma_mcp","env":{"PYTHONPATH":"/path/to/your/figma_mcp"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"figma-mcp": {
"command": "python",
"args": [
"-m",
"src.figma_mcp.server",
"--server",
"localhost:3055"
],
"cwd": "/path/to/your/figma_mcp",
"env": {
"PYTHONPATH": "/path/to/your/figma_mcp"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"figma-mcp": {
"command": "python",
"args": [
"-m",
"src.figma_mcp.server",
"--server",
"localhost:3055"
],
"cwd": "/path/to/your/figma_mcp",
"env": {
"PYTHONPATH": "/path/to/your/figma_mcp"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect