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
4 stars

The ZapCode MCP Server acts as a bridge between your Figma designs and AI coding assistants in VS Code. It allows AI tools that support the Model Context Protocol (MCP) to access real-time context from your selected Figma frames, eliminating the need to manually copy design information.

Installation Requirements

Before you begin, ensure you have:

  • VS Code version 1.99.0 or higher
  • An MCP-compatible AI assistant like Cline, Cursor, or Github Copilot with agent mode
  • The ZapCode Figma Plugin (companion plugin)

Setup Instructions

Install the Figma Plugin

  1. Install the companion plugin from the Figma Community
  2. Visit: Zapcode - Figma Plugin

Install the VS Code Extension

  1. Open VS Code
  2. Access the Extensions view with Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
  3. Search for "ZapCode"
  4. Click "Install"

Configure Your AI Assistant

You need to tell your AI assistant where to find the ZapCode MCP server:

  1. Open your AI assistant's MCP server settings
  2. Add a new remote server with these details:
    • Name: ZapCode (or similar)
    • URL: http://localhost:3001/zapcode-mcp-sse

For Cline users, edit your ~/.continue/config.json:

{
  "mcpSources": [
    {
      "title": "ZapCode",
      "url": "http://localhost:3001/zapcode-mcp-sse"
    }
  ]
}

Configure the Figma Plugin (If Needed)

  • Open the ZapCode Figma Plugin in Figma
  • Complete any necessary setup within the plugin

Using ZapCode

Starting the Connection

  1. Open VS Code and click "Start ZapCode" in the status bar
  2. Go to your Figma design file and run the ZapCode Figma Plugin
  3. Inside the plugin UI, find the "MCP Mode" toggle and turn it ON
  4. Confirm the connection status changes from "Connecting..." to "✓ Connected"

Working With Your AI Assistant

  1. Select a frame or component in Figma
  2. Switch to VS Code and instruct your AI assistant to perform tasks based on the design:
    • "Generate a React component based on the current Figma selection"
    • "Create HTML and CSS for the selected Figma frame"

The AI assistant will automatically:

  • Detect the need for Figma context
  • Call the get_figma_context tool provided by the extension
  • Receive context (HTML structure, CSS styles, image data, assets)
  • Generate more accurate code based on your design

Closing the Connection

  1. Click the "ZapCode" status bar item in VS Code
  2. Select "Stop ZapCode" to close the local servers
  3. Toggle MCP Mode OFF in the Figma plugin

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