trueui-bridge
v0.1.0
Published
TrueUI Bridge — connect the TrueUI Figma plugin to your Claude account (via the Claude Agent SDK). No API key needed: inference runs on your existing Claude sign-in, the same auth Claude Code uses. The plugin's full pipeline (Refiner/Planner/Executor, des
Downloads
12
Maintainers
Readme
TrueUI Bridge
Connect the TrueUI Figma plugin to your Claude account — no API key needed.
The bridge is a tiny local server. The TrueUI plugin sends its model calls to it instead of to the Anthropic API, and the bridge answers them through the Claude Agent SDK using your existing Claude sign-in (the same auth Claude Code uses). Usage draws on your Claude subscription.
Nothing else changes: TrueUI's full pipeline — Refiner, Planner, Executor, your mapped design system, all guards and run reports — runs exactly as it does with an API key. The bridge is purely the connection to the model.
Requirements
- Node.js 18+
- Claude Code installed and signed in (run
claudeonce in your terminal and log in), or aCLAUDE_CODE_OAUTH_TOKEN/ANTHROPIC_API_KEYenvironment variable.
Run
npx trueui-bridgeor from this folder:
npm install
npm startYou'll see:
TrueUI Bridge v0.1.0
listening on http://localhost:7878
open the TrueUI plugin in Figma — it will connect automatically.Then open the TrueUI plugin in Figma. If the bridge is running, the plugin detects it automatically — check Settings → API Provider → "Claude Account" to see the connection status. Keep the terminal window open while you work; Ctrl+C stops the bridge.
How it works
| Plugin | Bridge |
|---|---|
| POST /v1/messages (Anthropic-shaped: system, messages, tools) | Starts a Claude Agent SDK run. Plugin tools are registered as in-process MCP tools whose handlers relay rather than execute. |
| receives tool_use blocks, executes them inside Figma (all design-system guards apply) | suspends the run while the plugin works |
| POST /v1/messages again with tool_result blocks | resumes the run; returns the next tool_use batch or the final text |
Claude Code's built-in tools (Bash, file access, web) are disabled for bridge runs — the only tools that exist are the plugin's own Figma tools, and they execute inside Figma under the plugin's enforcement layer.
Endpoints
GET /trueui/status— connection/auth status (used by the plugin's auto-detect)GET /v1/models— current Claude model list (key-free)POST /v1/messages— inference
Configuration
TRUEUI_BRIDGE_PORT— port (default7878; must match the plugin's manifest allowlist)
Test (no Claude account needed)
npm testRuns the protocol test against a mock engine — verifies the exact request/response contract the plugin depends on.
Privacy
The bridge runs entirely on your machine. Prompts and design-system context go from the plugin to the bridge (localhost) and then to Anthropic under your Claude account, governed by Anthropic's terms for your plan. The bridge stores nothing and phones home to no one.
