# figlens

figlens — an MCP server for Claude Code and Codex that reads layouts, vector assets, and variables directly from saved .fig files. Feeds exact design context to coding agents without cloud Figma calls.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 26 repo stars
- Author: runkids
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/runkids/figlens
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — warning: a command downloads a script from raw.githubusercontent.com and runs it right away; a PowerShell command downloads a script from raw.githubusercontent.com and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/figlens

## What it does

The server parses local `.fig` files using an internal native binary without requiring a running Figma application or network requests. Its `bundle` tool extracts layer trees, exports vector icons as SVG, and produces reference renders, while `verify` checks font availability and handoff constraints.

Visual verification uses `compare-image` to inspect screenshot differences against the design render and highlight modified layers. Design revisions between saved local files are tracked with `diff` and `changes`.

Execution requires Node.js 18+ and a local `.fig` copy in the workspace. Converting copied layers via `figlens clipboard` leaves out raster images and vector outlines.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add figlens -- npx -y @runkids/figlens
```

### Codex

**Platform CLI**
```bash
codex mcp add figlens -- npx -y @runkids/figlens
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "figlens": {
            "command": "npx",
            "args": [
                "-y",
                "@runkids/figlens"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "figlens": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@runkids/figlens"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add figlens npx -y @runkids/figlens
```

## When to use it
- extract layout dimensions and variables from local `.fig` files
- export vector assets directly to SVG format
- compare UI implementation screenshots against reference renders
- inspect changes between design revisions with diff tools

## Example prompts
- Bundle the header frame from design.fig and export its vector icons
- Compare screenshot.png with the design using compare-image
- Verify missing fonts and layout properties in design.fig

## Similar
- [Figma-Context-MCP](https://affpapa.org/en/nevibecode/mcp/figma-context-mcp.md) — MCP server · ★ 16304 repo stars
- [build-design](https://affpapa.org/en/nevibecode/skills/build-design.md) — skill · 11100 installs
- [implement-from-figma](https://affpapa.org/en/nevibecode/commands/implement-from-figma.md) — command · ★ 8350 repo stars
- [pix](https://affpapa.org/en/nevibecode/plugins/pix.md) — plugin · ★ 96 repo stars
- [icon-system](https://affpapa.org/en/nevibecode/skills/icon-system.md) — skill · 2800 installs
- [design-handoff](https://affpapa.org/en/nevibecode/skills/design-handoff.md) — skill · 4000 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
