Skip to content

feat: MCP server + Browser Yolo/CDP mode for NixOS/Linux - #29

Open
alauxui wants to merge 5 commits into
silships:mainfrom
alauxui:main
Open

feat: MCP server + Browser Yolo/CDP mode for NixOS/Linux#29
alauxui wants to merge 5 commits into
silships:mainfrom
alauxui:main

Conversation

@alauxui

@alauxui alauxui commented Jul 7, 2026

Copy link
Copy Markdown

Hi @silships

What's included

MCP Server (src/mcp-server.js)

  • 21 native figma_* tools for Claude Code and any MCP client — render, tokens, variables, blocks, shadcn, verify, export, import, canvas, find, spec, and more
  • Register once in ~/.claude/settings.json, works across every project
  • No shell commands needed — Claude calls the tools directly

Browser / CDP Mode (src/commands/setup.js, src/daemon.js)

  • figma-cli connect --browser drives Figma in Chrome/Chromium via CDP
  • Targets NixOS, Linux, Docker, CI — any platform where Figma Desktop is unavailable or the Yolo patch is blocked
  • No plugin, no token, no Desktop required
  • All commands (render, render-batch, eval, verify) work identically
  • Auto-attaches to a running browser debug port or launches one

Docs

  • README fully restructured: table of contents, dedicated Browser Mode section, MCP setup section with tool table, cleaner comparison table
  • Live Browser Yolo screenshots added

Supporting artifacts

  • button-handoff.md, button-tokens.css, button-tokens.json — example output from a live Browser Yolo session

Test plan

  • figma-cli connect --browser attaches to browser and returns "Connected"
  • figma-cli render '<Frame>...</Frame>' works in CDP mode
  • node src/mcp-server.js starts and Claude Code lists 21 tools
  • Existing Yolo + Safe Mode flows unaffected

alauxui and others added 5 commits July 2, 2026 12:35
- Auto-detect NixOS and switch to browser mode on connect
- Add --browser flag to figma-cli connect
- detectBrowser(), isCdpBrowserRunning(), startFigmaBrowser() in cli-core.js
- Render command falls back to daemon when figma-use binary unavailable
- Fix daemon WebSocket Private Network Access header for Chrome 130+

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…enshots

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds src/mcp-server.js — a Model Context Protocol server that wraps
figma-cli commands so Claude can drive Figma from any project without
shell access. Register once in ~/.claude/settings.json and all projects
get figma_render, figma_render_batch, figma_verify, figma_tokens_preset,
figma_extract, figma_import, figma_export, figma_blocks, figma_shadcn_add,
figma_a11y, figma_gradient, figma_variants_from, and more.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant