# @design-twin/dtwin [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/its-magdy/design-twin  
**GitHub Stars:** 6  
**npm Downloads (last month):** 1599  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/design-twin-dtwin

## Description
Figma → code with Claude Code: the dtwin CLI + MCP server (and the Figma plugin) that read a design on the free Figma plan into your project. No REST API key, no cloud service in between.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/its-magdy/design-twin), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
brew install its-magdy/tap/dtwin      # or: bun add -g @design-twin/dtwin
```

2. Add to Claude Code:

```sh
claude plugin marketplace add its-magdy/design-twin
```

3. Install:

```sh
claude plugin install designtwin@designtwin-marketplace
```

4. Add to your MCP client:

```sh
dtwin init --mcp
```

## Documentation

## What @design-twin/dtwin does

@design-twin/dtwin creates a local path from an open Figma file to Claude Code. A development plugin runs inside the Figma desktop app, while the `dtwin` CLI configures the project and MCP connection. Claude Code can then work with a selected Figma frame, generate implementation code, and compare the result with the source design.

The workflow is designed for Figma accounts on any plan, including the free plan. It uses the Figma Plugin API rather than the Figma REST API, so setup does not require a Figma API key or a hosted service between Figma and the coding agent.

## How it works

Run `dtwin init --mcp` from the root of the application project. The command creates a `design/` directory, records the detected stack in `design/target.json`, creates a local bridge token, copies the plugin, and adds an MCP entry for Claude Code.

After importing the development plugin into Figma, connect it with the token printed by `dtwin token show`. The Figma file must remain open in the desktop application with the plugin running whenever a design is pulled.

Claude Code uses the `/designtwin:extract` skill to retrieve a frame from a Figma link and `/designtwin:build-screen` to implement it. `/designtwin:verify` checks a running web or native build against the design. Component mappings in `design/codeconnect.local.json` and token mappings in `design/tokens.json` can guide implementation and drift checks.

## Setup and configuration

Install the CLI with Homebrew or Bun:

```bash
brew install its-magdy/tap/dtwin
# or
bun add -g @design-twin/dtwin
```

Install the Claude Code plugin, initialize the project, and import the Figma plugin:

```bash
claude plugin marketplace add its-magdy/design-twin
claude plugin install designtwin@designtwin-marketplace
dtwin init --mcp
dtwin plugin import
```

In Figma, open the imported development plugin and connect it to Claude Code using the token from `dtwin token show`. Restart Claude Code in the project directory and approve the MCP server when prompted. `dtwin doctor` checks the local setup and reports the next step for detected problems.

Bun 1.4.2 or later is required for the CLI, MCP server, and Claude Code plugin scripts.

## Tools and capabilities

- Read a Figma frame through the local plugin.
- Expose Figma status through `figma_status`.
- Perform limited Figma edits through `figma_write` after edits are enabled in the plugin.
- Build screens using the project's components and token mappings.
- Check component mappings against the live Figma catalog with drift-lint.
- Measure web output node by node and compare native output as images.

Supported target stacks include web, React Native, SwiftUI, Jetpack Compose, Flutter, and custom project stacks.

## Limitations and notes

Figma desktop is required; the workflow is not headless. The plugin is imported as a development plugin rather than installed from Figma Community. The local bridge accepts connections only from the configured localhost WebSocket range.

Design data is kept between the Figma plugin and the local coding agent, but files read by Claude Code are still sent to its model as project data. Write operations are intentionally narrow: `figma_write` can create a frame or text and set a fill or text, and requires the user to enable edits.

Web verification uses Chromium. Native verification uses the relevant stack's rendering tools. Generated Swift, Kotlin, and Dart token files are not compiled in CI. Windows quick suites run in CI, but live Figma testing has been performed on macOS; the Claude Code plugin's Windows startup check requires `sh`, such as through Git Bash.

_Full upstream README: https://allmcps.com/mcp/design-twin-dtwin/readme_

