Skip to main content
Glama

FigLens

FigLens is a high-speed Linux desktop visual .fig inspector and local MCP (Model Context Protocol) server powered by a Hybrid Rust Core + CanvasKit WASM engine for massive Figma exports (200+ MB, 500,000+ nodes, 500+ embedded images).

Designed to solve the context-bloat and freeze/OOM issues of working with huge local .fig exports alongside AI coding agents: open the full design canvas smoothly, click or box-select the exact components you care about, inspect JSX/CSS/design tokens, and expose only that targeted selection to your coding agent via Figma-compatible MCP tools.

Features

  • Native Rust Engine & Memory-Mapped Cache (figlens-core): Static x86_64-linux-musl Rust daemon indexes 220 MB / 543k-node .fig files in ~4s, reloads warm files via mmap in ~230 ms (~100 MB RSS), searches 500k+ nodes in ~5 ms, and extracts isolated <1 MB screen slices in ~60 ms without re-reading the full archive.

  • Full Design View Like Figma + Focus Mode: Pan and zoom across entire Figma pages (SECTION regions + 900+ screens laid out at true (x, y) coordinates) with viewport-virtualized progressive CanvasKit rendering, or toggle Focus Screen to isolate a single frame.

  • Figma-Style Multi-Mode Canvas Cursor Dock:

    • V Select / Inspect: Click any card, frame, or text layer (Shift+Click toggles multi-selection; repeat-click cycles through stacked overlapping layers).

    • H Hand Pan (Space hold / Middle or Right drag): Pan smoothly across the full page board.

    • I Measure / Redlines (Alt hold): Hover any element to render live pixel distance rulers (top, right, bottom, left, sibling gaps) relative to the selected element or container.

    • M Box Multi-Select: Drag a marquee rectangle to select multiple elements at once; Inspector & MCP combine all selected nodes cleanly.

    • Zoom Controls: Shift+1 Fit Page, F Fit Selection, 1 Zoom 100%, wheel zoom.

  • Pristine Layout Inspection + Isolated Render Pass: Preserves exact Figma node geometry while running @open-pencil/core CanvasKit + Yoga rendering on an isolated graph copy.

  • Built-In MCP Server (127.0.0.1:7600/mcp + --mcp-stdio): Exposes 13 Figma/OpenPencil-compatible MCP tools: get_selection, get_design_context, get_screenshot, get_node, get_jsx, get_metadata, get_variable_defs, find_nodes, list_pages, list_screens, get_page_tree, select_nodes, open_file.

  • Cross-Distro Portable .AppImage: Bundles Electron (GLIBC_2.25 baseline) + statically linked musl Rust binary so a single .AppImage runs identically on Ubuntu (20.04/22.04/24.04+), Debian, Fedora, and Manjaro/Arch.

Related MCP server: figctx-mcp

Download & Install (AppImage)

Download the latest FigLens-x86_64.AppImage from GitHub Releases:

chmod +x FigLens-x86_64.AppImage
./FigLens-x86_64.AppImage /path/to/design.fig

Or install it into ~/Applications/FigLens.AppImage, ~/.local/bin/fig-lens, and your desktop menu:

chmod +x packaging/install.sh
./packaging/install.sh /path/to/FigLens-x86_64.AppImage

Pass --no-mcp to skip automatic CLI MCP registration.

Connecting Coding Agents (MCP)

While FigLens GUI is open, a local Streamable HTTP MCP server listens at http://127.0.0.1:7600/mcp (recommended so your agent shares live UI selection & screenshots):

Claude Code

claude mcp add --transport http fig-lens http://127.0.0.1:7600/mcp

Cursor / Windsurf / VS Code / Generic MCP JSON

{
  "mcpServers": {
    "fig-lens": {
      "url": "http://127.0.0.1:7600/mcp"
    }
  }
}

Headless --mcp-stdio Mode (No X11 Required)

For agents spawning FigLens via stdio (such as Antigravity CLI, registered automatically by packaging/install.sh):

{
  "mcpServers": {
    "fig-lens": {
      "command": "fig-lens",
      "args": ["--mcp-stdio"]
    }
  }
}

Build From Source

Requirements

  • Node.js 20+ & npm

  • Rust toolchain (cargo + rustc, plus musl C compiler for static AppImage builds)

On Ubuntu / Debian:

sudo apt install -y nodejs npm clang llvm musl-tools curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

On Arch / Manjaro:

sudo pacman -S --needed nodejs npm rust clang lld llvm curl

Build & Test Commands

# 1. Install Node dependencies & CanvasKit runtime safety patch
npm install

# 2. Build static native Rust engine -> resources/bin/figlens-core
npm run build:rust

# 3. Run Rust, CanvasKit render, isolation & MCP end-to-end tests
npm test

# 4. Run FigLens locally
npm start -- /path/to/design.fig

# 5. Build portable Linux AppImage -> dist/FigLens-x86_64.AppImage
npm run build:appimage

To run the test suite against your own large .fig file:

FIG_LENS_TEST_FILE=/path/to/large-design.fig npm test

Architecture

Further engineering notes for human & AI maintainers are documented in PLAN.md and CHANGELOG.md.

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables coding agents to interact with the currently open Figma file via local MCP tools, including reading the design, extracting nodes as PNG, React, HTML or CSS, editing the canvas when permitted, and sharing saved component sets.
      39
      57 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables agents to extract, inspect, search, and bundle design context from local Figma .fig files entirely offline, exposing frame summaries, node context, style tokens, assets, vector SVGs, and visual-match review via MCP.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to read and inspect local Figma .fig files entirely offline, exposing document structure, geometry, styles, text, components, variables, and embedded images via MCP tools.
      12
      86 npm
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides read-only Figma design data to AI agents via MCP, supporting local .fig files and browser-based figma.com access without plugins or API tokens.
      18
      86 npm
      1
      MIT