Zapcode (Figma-VS Code Bridge) MCP server

Bridges Figma designs with coding assistants in VS Code, enabling direct access to visual design context for accurate code generation based on selected elements.
Back to servers
Setup instructions
Provider
Zapcode
Release date
Apr 12, 2025
Language
Go
Stats
5 stars

The ZapCode Figma MCP Server acts as a bridge between your Figma designs and AI coding assistants that support the Model Context Protocol (MCP). It retrieves real-time context from your selected Figma frames, including HTML/CSS structure, generated images, and SVG assets, allowing your AI assistant to generate code that accurately reflects your designs.

Prerequisites

Before getting started, you'll need:

  1. Node.js (v16 or higher) installed on your system. You can download it from nodejs.org.

  2. ZapCode Figma Plugin installed from the Figma Community at Zapcode - Figma Plugin.

Configuring Your AI Assistant

The MCP server runs via npx without requiring permanent installation. You'll need to configure your AI assistant to launch it automatically.

GitHub Copilot Configuration

Add the following to your Copilot configuration:

{
  "servers": {
    "Zapcode stdio mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["zapcode-figma-mcp"]
    }
  },
  "inputs": []
}

Claude for Desktop Configuration

Add the following to your claude_desktop_config.json file in the mcpServers section:

{
  "mcpServers": {
    "zapcode-figma-mcp": {
      "command": "npx",
      "args": ["zapcode-figma-mcp"]
    }
  }
}

The config file location depends on your operating system:

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

Note: Restart Claude for Desktop after making these changes.

Other MCP Clients Configuration

For other clients like Cline or Open WebUI, add a server configuration pointing to the npx command:

{
  "mcpServers": {
    "zapcode-figma-mcp": {
      "command": "npx",
      "args": ["zapcode-figma-mcp"]
    }
  }
}

Using the Server

Follow these steps to use the ZapCode Figma MCP Server:

  1. Launch the ZapCode Plugin in your Figma desktop app and open your design file.

  2. Select a frame or component in Figma that you want to convert to code.

  3. Interact with your AI Assistant by asking it to perform tasks related to your Figma selection, such as:

    • "Generate a React component based on the current Figma selection."
    • "Create HTML and CSS for the selected Figma frame."
  4. Your AI assistant will automatically launch the zapcode-figma-mcp server, connect to the Figma plugin, and fetch the necessary context to complete your request.

How It Works

The server operates by:

  1. Running as a local process initiated by your MCP-compatible AI assistant.
  2. Establishing a connection with the ZapCode Figma Plugin.
  3. Receiving context (structure, styles, assets) from the currently selected Figma frame.
  4. Serving this context to the AI assistant via the Model Context Protocol.
  5. Extracting any SVG assets and saving them to your local workspace.

Troubleshooting

Common Issues

  • "Error: Figma plugin is not connected"

    • Make sure the Figma desktop app is open and the ZapCode plugin is running on your design file.
  • Port Conflict / EADDRINUSE Error

    • Another application is using port 3001 or 32896. Stop the other application to resolve this issue.

Enterprise & Custom Integration

For professional services to integrate the MCP server with your enterprise environment, connect proprietary design systems, or develop custom features, contact: [email protected]

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "zapcode" '{"url":"http://localhost:3001/zapcode-mcp-sse"}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

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": {
        "zapcode": {
            "url": "http://localhost:3001/zapcode-mcp-sse"
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

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

2. Add this to your configuration file:

{
    "mcpServers": {
        "zapcode": {
            "url": "http://localhost:3001/zapcode-mcp-sse"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later