Skip to main content
Glama

figcontext — Figma ↔ AI bridge (no usage limits)

A simple file that lets your CLI know what's going on in your Figma file using the Figma plugin API. The plugin and bridge themselves are named oc mcp.

Let opencode, Claude Code, Cursor, or any AI read your open Figma file and change it. No Figma Dev Mode MCP, no 6/month limit.

The plugin auto-connects — no codes, no channels, nothing to paste.


Setup — 3 steps (2 minutes, first time only)

1. Install Node.js — get LTS from https://nodejs.org (skip if you already have it).

2. Start the bridge — either double-click start-bridge.bat (keeps a window open, says [bridge] listening ws://localhost:3055), or run bridge\ensure-bridge.vbs once for a hidden background start. After editing server.js, restart the bridge — Node loads the file once at startup.

3. Add the plugin to Figma — in Figma Desktop open any file:

  • Plugins → Development → Import plugin from manifest… → pick manifest.json in THIS folder (re-import only if manifest.json itself changes)

  • Then Plugins → Development → oc mcp → it connects by itself and stays connected while its window is open

Done. Restart opencode/Claude/Cursor once so it loads the bridge (node setup-opencode.js already merged the MCP config).

Port 3055 is automatic — only change it if that port is busy. If two bridges end up on one port, the second becomes a proxy instead of crashing — keep just one open to avoid confusion.


Related MCP server: OneWright

Everyday use — 3 steps (30 seconds)

1. Make sure the bridge is up (http://localhost:3055/health says ok).

2. In Figma run oc mcp — it auto-connects (keep its window open; it reconnects by itself if the connection drops).

3. Paste the link (http://localhost:3055/file) to ANY AI and tell it what to do:

  • this is my Figma file: <link> — code the hero section in React

  • <link> — add a red button under the headline

  • <link> — what components and styles are in this file?

The AI reads the live file from the link and posts changes back. Re-fetch the link for fresh state — never work from memory.

Power (no link, MCP tools): in opencode just say connect (or get_status, then get_document_info) — then get my selection and code it, create a frame, etc. 157 tools, same names over HTTP (POST /api/<command>) and MCP.


Local links only work on your PC. To share:

  1. Make sure the bridge + Figma plugin are running.

  2. Get cloudflared.exe once from https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/downloads/ → drop it in this folder.

  3. Double-click share-link.bat → keep open → it prints https://something.trycloudflare.com — your share link is THAT-URL/file. Paste to Claude/ChatGPT in browser. Close share-link.bat to kill the link instantly.

Browser AIs are READ-only via the public link. Writing still needs the local bridge + CLI.


If it doesn't work

You see

Fix

ws closed code=1006 looping

Bridge not running — start it (bat or ensure-bridge.vbs), then re-run plugin

Link says not connected / ok:false

Plugin window closed — re-run plugin (it auto-connects)

Timed out waiting for Figma

Plugin window was closed mid-task — re-open plugin, retry once

unknown command: <name> over HTTP

Bridge is running old server.js — restart it to load the new code

Port 3055 busy

Close extra bridge windows — only ONE at a time

Copy button does nothing

Drag-select the text, Ctrl+C (Figma blocks auto-copy sometimes)

Still stuck? Send: (1) last 10 lines of bridge output, (2) plugin log last 10 lines, (3) AI error text.


Manual / advanced (you don't need this)

npm --prefix bridge install
npm install
node node_modules/typescript/bin/tsc -p tsconfig.json
node setup-opencode.js              # global config
node setup-opencode.js --project .\my-project

The bat does all of this automatically. Only use manual steps for CI or custom paths. (npx is blocked by PowerShell execution policy — call node/npm.cmd directly.)

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Local MCP server exposing Figma REST API tools to AI agents, enabling file reads, comments, variables, and other resource operations. Works with personal access tokens and integrates with Claude, Cursor, Codex, and more.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to read and write Figma designs through a local WebSocket relay, turning Figma selections into framework-aware code and building/editing designs directly on the canvas. Provides 112 MCP tools for bidirectional design-code workflows with support for any MCP client.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible AI clients to read and modify the user's currently open Figma file by executing JavaScript in Figma's sandbox, all through a local bridge with status monitoring, node jumping, and automatic rollback on errors.
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    The Figma desktop app as an MCP server. Gives AI agents the full Figma Plugin API on your open file: read, write, tokens, components, exports, undo. Runs locally with no cloud API, no token and no quota.
    10
    40 npm
    1
    MIT