Skip to main content

A Grok Bot skill and loopback MCP gateway for Figma Desktop users, no Figma REST token

GitHubGitHubCageEcho2026-11-25

Getting startedLimitsSource read in fullRead first
GitHubGitHubCageEcho2026-11-25

Open original

Overview

A Figma Desktop user who wants Grok Bot to read and edit local design files registers a remote HTTP MCP connector over a private Tailscale tailnet into an authenticated loopback gateway on the computer running Figma.

Workflow

  1. What it is: a bilingual skill package plus a local gateway that connects Grok Bot to Figma Desktop on the reader's own computer, with no Figma REST token. It ships a Grok Bot-facing SKILL.md (skill name grok-figma-bridge), a new loopback HTTP-to-stdio gateway built on the public MCP TypeScript SDK, fetch/setup/serve scripts, tests, and bilingual docs, and works through the upstream MIT project sso-ss/figma-unified-mcp and its Figma Desktop companion plugin, which are fetched, not vendored. The README states the package is not affiliated with Figma and does not replace login, file permissions, or plan limits.
  2. Grok Bot parts used: a remote HTTP MCP connector, the built-in Tailscale plugin, and one skill file. The connector is registered in Grok Bot as a remote HTTP MCP server (transport: http) with a name, a URL, and optional headers, following the shape in templates/grok-bot-remote-mcp.template.json. The Tailscale plugin is authenticated inside Grok Bot under Connect apps → Your plugins → Tailscale → Authenticate on the same tailnet. SKILL.md is the agent-facing usage guide; no Bots, Routines, Pages, or Vault are used. Not part of Grok Bot: the Tailscale tailnet and Serve HTTPS, the loopback gateway and its bearer token, the upstream figma-unified-mcp stdio backend and its Figma plugin, Node.js, and the local network path; no Grok Build CLI or xAI API is involved.
  3. You need: Node.js 20 or newer, Figma Desktop, and a Tailscale tailnet with MagicDNS and HTTPS certificates enabled. Node 20+ is required by the gateway SDK while upstream itself declares Node 18+; the browser version of Figma does not work. On a personal tailnet the member must own or administer it; on a company tailnet an admin enables the integration first, then the member authenticates. This route never configures FIGMA_ACCESS_TOKEN; the gateway writes its bearer token to a mode 0600 local file (default $XDG_CONFIG_HOME/grok-figma-bridge/gateway.env), and the reader enters Authorization: Bearer … in the connector's own credential field, never in chat. The package does not waive Grok Bot usage limits or Figma plan limits; other plan or key requirements are not stated in the source.
  4. Install: five local commands, one Grok Bot registration, one Figma plugin import. In the repo's own order:
    • npm ci; node scripts/fetch-upstream.mjs (accepts only upstream commit 1f089393e73da8a5955bd48b973b3af2ac7def28 and fails closed on any hash mismatch); node scripts/setup.mjs --upstream upstream/figma-unified-mcp/dist/server.js --allowed-host YOUR_DEVICE.YOUR_TAILNET.ts.net; node src/gateway.mjs; node scripts/enable-tailscale-serve.mjs, which runs only tailscale serve --bg --https=443 http://127.0.0.1:3847 and refuses Funnel arguments.
    • In Grok Bot: authenticate the Tailscale plugin on the same tailnet and wait for the user to approve the allow/deny card, without installing a Tailscale client on the bot computer; then add a remote HTTP MCP server, not a local command, with the URL https://YOUR_DEVICE.YOUR_TAILNET.ts.net/mcp.
    • In Figma Desktop: open an explicitly authorized blank test file, choose Plugins → Development → Import plugin from manifest…, select figma-plugin/manifest.json from the checkout, and run figma-unified-mcp (no Figma Community download URL exists; the manifest allows only ws://localhost:18211; if the menu shows the manifest name, choose figma-unified-mcp).
    • Keep the plugin panel green Connected on channel figma in the target file during canvas actions; if it disconnects, reconnect before retrying. If the panel cannot connect while the listener is already on 127.0.0.1, do not bind every interface — localhost may be IPv6 ::1, a case not tested on a Mac.
  5. After install: the agent checks status, reads without a file key, and writes only with the user's explicit agreement.
    • The skill has the agent confirm the target is an authorized blank test file with the panel green, then call figma_status; the 2026-11-25 session reported the REST API not configured, port 18211 with one client, and channel figma.
    • Reads use plugin-bridge tools that need no fileKey, such as figma_get_viewport, figma_get_selection, or figma_get_styles; if the status shows zero clients, the user clicks Connect before the agent calls figma_connect_plugin on channel figma.
    • Writes go one temporary node at a time: create, read back, delete, confirm gone; stop if the file is read-only or permission is denied.
    • The full path is Grok Bot's remote HTTP connector → Tailscale Serve private HTTPS with Funnel off → the authenticated loopback gateway on 127.0.0.1 → one hardened upstream stdio child on port 18211 → the open plugin panel; a local tools/list counted 106 tools.
  6. Did the author run it: yes, but the runs are carefully separated from what this package itself was tested for. Per the README and SKILL.md, on 2026-11-25 an existing Grok Bot setup, separate from this helper, read a canvas, created a temporary rectangle, read it back, and deleted it, with 106 tools available and the REST API not configured (author's claim, not reproduced). In this package's packaging workspace the pinned upstream was patched and built, a local gateway listed 106 tools including figma_status, and the WebSocket listened only on 127.0.0.1:18211; no Figma tool was called and no Figma account was used (author's claim, not reproduced). PR #1 by the author reports npm run check, npm test with 15 tests, and npm run privacy-scan passing, covering auth and MCP calls against a mock stdio subprocess, single-instance behavior, and cleanup. The records do not show a clean second computer, other AI clients, a company tailnet, or end-to-end macOS or Windows, and this package did not re-call figma_status.

Key points and results

  • Maturity: at fetch time on 2026-11-26 the repo was 1 day old, with 0 stars, 0 forks, no open issues or PRs, an MIT license, and no commit count returned by the API. It was created 2026-11-25 and last pushed the same day. The README frames it as a community guide and reusable skill rather than a finished product.
  • Permissions and boundaries: every hop stays private, and Figma writes wait for explicit agreement. Tailscale Serve is private HTTPS and the serve script refuses Funnel; the gateway binds 127.0.0.1 and rejects non-loopback TCP peers; the bearer token is compared in constant time, never echoed, rejected in the query string, and kept in a mode 0600 file; SDK Host and Origin checks refuse *, non-loopback IPs, and values with a path. The skill forbids asking for passwords, cookies, or Figma tokens in chat, forbids a broad pkill, and stops if a tool demands FIGMA_ACCESS_TOKEN. The plugin does not replace Figma login, file permissions, or plan limits.
  • Known limits: a clean second computer, other clients, and a company tailnet were not tested. Requires Node 20+, Figma Desktop, and a tailnet with MagicDNS and HTTPS; the IPv6 ::1 localhost case was not tested on a Mac; upstream is pinned to one commit and fails closed on mismatch, and still contains code that can stop an older node process on EADDRINUSE, though this gateway exits first when port 18211 is taken; the 2026-11-25 canvas round-trip ran on a separate existing setup, not this helper.
  • Worth borrowing: design ideas that work without installing this repo.
    • The fail-closed upstream pin in scripts/fetch-upstream.mjs: a commit hash, a file hash, and a pinned source line are all verified before patching, so a changed upstream stops instead of silently exposing the WebSocket.
    • The connection route in SKILL.md: register Grok Bot's remote HTTP MCP connector over Tailscale Serve private HTTPS rather than a bot-local command, because the bot's computer cannot reach the reader's desktop.
    • The read-before-write acceptance pattern in SKILL.md: status check, reads that need no fileKey, then one temporary node created, read back, and deleted before touching real files.

Source

Platform
GitHub
Author
CageEcho
Published
Categories
Getting started, Limits

What this evidence label means

Source read in full

We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.