Bridge
SXL Studio Bridge: connect SXL Studio in Figma to AI tools and automation via MCP and HTTP. Setup, workflows, and command categories.
Overview
SXL Studio Bridge (@sxl-studio/bridge) is a Node.js process that connects your running SXL Studio plugin in Figma to external tools (Cursor, AI clients, scripts, CI). It exposes three interfaces on one port (BRIDGE_PORT, default 37830):
| Interface | Endpoint (default) | For |
|---|---|---|
| WebSocket | ws://127.0.0.1:37830 | Plugin Remote Connect iframe |
| MCP (Streamable HTTP) | http://127.0.0.1:37830/mcp | Cursor / Claude Desktop / any MCP client |
| HTTP REST | http://127.0.0.1:37830/api/* | Scripts, CI, curl, idempotent retries |
In practice, Bridge gives you one controlled integration point for:
- SXL token and composition workflows;
- real Figma screen/documentation generation through SXL agent skills;
- Dev Mode code generation parity;
- Git Sync file workflows;
- automation scenarios for teams and agents.
When to use Bridge
Use Bridge when you need to run SXL Studio features remotely (from AI or scripts), not only click them in the plugin UI.
Typical use cases:
- export/apply token and style workflows;
- generate/apply composition JSON in bulk;
- build/update Figma screens from existing design-system components;
- render documentation, palettes, component docs, and scenario flows in Figma;
- run codegen outputs (
designer-json,vue3,react,swiftui,uikit,kotlin,divkit); - automate Git pull/push and token file updates;
- run usage, coverage, drift, component, and prop analytics at scale.
Requirements
Before using Bridge:
- Install and run
@sxl-studio/bridge. - Open the Figma file and launch SXL Studio.
- Enable Remote Connect inside the plugin.
- Keep Bridge running while tools execute commands.
Git Sync Local Storage is the exception: it uses Bridge HTTP endpoints (/api/status, /api/workspace-blob) and does not require an active Remote Connect websocket session.
Install and run
npm (recommended)
npm install -g @sxl-studio/bridge
sxl-bridge
Update to the latest compatible version (1.8.9 for SXL Studio Plugin 2.8.1):
npm install -g @sxl-studio/bridge@latest
After updating, restart Bridge: stop the old process and run sxl-bridge again — a running process keeps the previous version in memory. To check the version: Bridge prints it on startup, or run curl http://127.0.0.1:37830/api/workspace-path — 1.8.0+ returns JSON with a root field.
Monorepo source
cd Utils/bridge
npm install
npm run build
npm start
By default, Bridge runs on port 37830.
BRIDGE_PORT=38000 sxl-bridge
When you use a custom port, set the same value in the SXL Studio plugin Remote Connect overlay and in your MCP client URL.
Secure access (recommended)
Set a shared secret to protect MCP, HTTP, and plugin Remote Connect WebSocket endpoints.
BRIDGE_AUTH_TOKEN is not issued by Figma, GitHub, GitLab, or SXL Studio. It is a local shared secret that you generate yourself and reuse in Bridge clients:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# or
openssl rand -hex 32
Start Bridge with the generated value:
BRIDGE_AUTH_TOKEN=<generated_secret> sxl-bridge
Then HTTP/MCP clients must send:
Authorization: Bearer <generated_secret>
For live Remote Connect, enter the same value in the plugin Remote Connect overlay token field. If Git Sync Local Storage is enabled, also enter it in the plugin Sync form under Bridge Auth Token. Leave these fields empty when Bridge runs without BRIDGE_AUTH_TOKEN.
Optional Figma REST companion
For read-only hosted context without an active plugin session, start Bridge with a Figma REST token:
FIGMA_TOKEN=figd_xxx npm start
# or OAuth/plan token with bearer auth
FIGMA_ACCESS_TOKEN=xxx FIGMA_AUTH_MODE=bearer npm start
Call figma_rest_diagnose first, or use GET /api/figma-rest-diagnostics?checks=whoami,fileMetadata&fileKey=..., to verify token/auth/scopes/permissions without exposing the token. Then use figma_rest_whoami, figma_rest_get_file_metadata, figma_rest_get_file_nodes, figma_rest_get_images, figma_rest_get_file_components, figma_rest_get_file_component_sets, figma_rest_get_file_styles, figma_rest_get_team_components, figma_rest_get_team_component_sets, figma_rest_get_team_styles, figma_rest_get_variables_local, figma_rest_get_variables_published, and figma_rest_search_design_system for known file/team REST reads. For Figma MCP-style library discovery, prefer Bridge get_libraries and search_design_system; they combine active-file enabled libraries with known REST file/team sources when configured. Bridge still does not create new files or handle FigJam/Slides asset upload. For Figma Design asset insertion, use Bridge upload_assets with an active Remote Connect session.
For libraries already enabled in the open Figma file, get_libraries and search_design_system are the primary agent-facing tools. Use search_enabled_library_assets for lower-level enabled-library search, inspect_enabled_libraries for raw enabled descriptors, and list_enabled_library_variables for variables in a specific enabled collection. Figma Plugin API cannot enable libraries from code; Bridge reports that limitation in the compatibility tool responses.
For screenshots or rendered node images, use get_screenshot. mode: "plugin-svg" returns inline SVG from active-file nodes or current selection through Remote Connect. mode: "rest-image" returns Figma-hosted PNG/JPG/SVG/PDF URLs for known fileKey/url + nodeIds using the REST Images endpoint.
For metadata, use get_metadata. mode: "plugin" returns active-file selection/page structure or node tree metadata through Remote Connect. mode: "rest" returns hosted file metadata or node metadata for known fileKey/url and optional nodeIds.
For active-file design context, use get_design_context. It bundles SXL codegen/composition JSON, sparse metadata, native variable/style definitions, optional SVG screenshot, and optional local Code Connect suggestions for the current selection or provided node ids. This mirrors the official MCP get_design_context intent as a structured starting point for the agent; it does not claim to be final production code.
For Code Connect template/binding context, use get_context_for_code_connect. It bundles SXL registry/settings, selection status, existing bindings, SXL codegen/composition context, component discovery with props, and local source-file suggestions. It covers the active-file/local-codebase side of the official MCP get_context_for_code_connect workflow; hosted remote-only context remains official Figma MCP companion scope.
For .figma.ts Code Connect template generation, use generate_code_connect_template. It accepts a full SXL CodeConnectBinding or local targets/component names, returns dry-run content/path by default, and writes only when writeFile: true is explicitly passed. Keep includePropertyAttrs off unless you have verified that Figma property names match the code component props.
For variable/style definitions, use get_variable_defs. mode: "selection" is the official-MCP-style route for variables/styles used in the current Figma Design selection; it reads native boundVariables, text segment bindings, style ids, and resolved variable/style definitions through Remote Connect, then adds SXL applied-token metadata as compatibility context. mode: "local" reads active-file local variables/styles; mode: "enabled-libraries" reads variables from libraries already enabled in the open file; mode: "rest" reads known-file REST variable endpoints.
Font preflight for migration workflows
Before running migration, rebind, detach, or repair workflows that can mutate text layers, use migration_font_preflight.
Figma Plugin API requires the plugin to load the exact font used by a text node before changing that text node. A font can be visible in the Figma UI and still be unavailable to figma.loadFontAsync() for the current plugin runtime. Bridge therefore exposes a read-only preflight that scans text nodes, groups exact { family, style } pairs, attempts to load them, and reports which text nodes would be blocked.
Example payload:
{
"scope": "selection",
"sampleLimit": 20
}
Supported scopes are selection, currentPage, allPages, and node (nodeId is required for node).
The response includes:
availableFontsCountrequiredFontsmissingFamiliesloadFailurestextNodesBlockedsampleNodeIdsaffectedPagesrequiredAction
If an exact font is not loadable, SXL Studio does not substitute a similar family automatically. For example, SF Pro Display Regular is not replaced with SF Pro Regular unless a future workflow provides an explicit user-approved mapping. The safe action is to enable or upload the exact shared font for the file/user, reload the Figma file, restart SXL Studio, and rerun the preflight.
After the font preflight passes, agents can use migration commands through the SXL Studio plugin runtime:
migration_text_variable_bindings— typography variables on text ranges (fontFamily,fontSize,fontWeight,lineHeight,letterSpacing, paragraph fields).migration_text_fill_bindings— text fill color variables on text ranges.
Start with dryRun: true, review affectedTextNodes, affectedRanges or affectedSegments, rebindCount, detachCount, skippedCount, leftoverCount, errors, leftovers, and samples, then repeat with dryRun: false only for the approved mappings. Apply results are post-verified: a command is not successful while old aliases remain. Text typography migration also returns rangeResults with before/after binding snapshots. Text fill migration returns partial, changed, failed, and skipped so agents can detect interrupted instance-sublayer/table-cell runs and resume safely. For large files, use maxTextNodes or maxNodesPerChunk and continue while continueCursor is present.
Example dry-run:
{
"scope": "page",
"dryRun": true,
"mappings": [
{
"kind": "variable",
"fromId": "VariableID:old",
"fromName": "Projects/ff/label",
"toId": "VariableID:new",
"toName": "Projects/ff/label"
}
],
"sampleLimit": 20
}
The command changes variable bindings only. It does not change text characters, font names, raw typography values, or create missing variables. To detach a legacy binding to raw text formatting, use toId: "__SXL_GHOST_DETACH_RAW__" deliberately and only after a dry-run.
For files migrated between variable collections, use migration_explicit_modes_audit to find page-level explicit mode references pointing to missing collections and to list remaining live collection refs. If cleanup is needed, run migration_clear_orphan_explicit_modes with dryRun: true first. The cleanup uses live collection objects where Figma exposes them. If Figma rejects clearing a missing collection id, Bridge returns unsupportedByFigmaApi, manualFallbackRequired, manualSteps, and unsupportedMissingCollectionRefs instead of reporting a false success. Rerun the audit after manual cleanup and continue only when missingCollectionRefs is 0.
Connect an AI client (MCP)
Any MCP-capable AI client installed on the same computer as Bridge can call Bridge tools to read and control the open Figma file — while Bridge is running and Remote Connect is enabled in the plugin. The only thing each client needs is the Bridge MCP endpoint: http://127.0.0.1:37830/mcp.
Cursor — .cursor/mcp.json:
{ "mcpServers": { "sxl-studio": { "url": "http://127.0.0.1:37830/mcp" } } }
Claude Desktop — claude_desktop_config.json (bridge the HTTP endpoint with mcp-remote):
{ "mcpServers": { "sxl-studio": { "command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:37830/mcp"] } } }
Codex CLI — ~/.codex/config.toml:
[mcp_servers.sxl-studio]
command = "npx"
args = ["-y", "mcp-remote", "http://127.0.0.1:37830/mcp"]
If BRIDGE_AUTH_TOKEN is set, add the Authorization: Bearer <token> header (URL clients) or pass --header to mcp-remote, and enter the same token in the plugin Remote Connect overlay.
After saving the config: restart the client's MCP session, confirm Bridge is running, and confirm Remote Connect is enabled in the plugin.
Verify connection
Quick status check:
curl http://127.0.0.1:37830/api/status
The response includes connection/session fields plus runtime.health (ready, busy,
degraded, or disconnected), actionable runtime.issues, the sanitized queue snapshot,
and telemetry counters/last-failure metadata without payload values.
Tool catalog check:
curl http://127.0.0.1:37830/api/tools
For MCP clients, use list_tools to get the live command catalog.
AI agent operating contract
If you give this page to an AI agent, the agent should treat Bridge as a controlled SXL Studio operating layer, not as a generic script runner. The safe default flow is:
- Check live state with
get_bridge_runtime_summaryorGET /api/runtime-summary. - If the task needs the open Figma file and the summary says Remote Connect is missing, stop and ask the operator to open SXL Studio in Figma and enable Remote Connect. Do not fake a live result.
- For natural-language requests, call
route_intent, thenplan_workflow, thenpreview_workflowbefore write tools. - For design creation, inspect the design system first with
inspect_design_system; then runvalidate_screen_spec; then runbuild_screenorupdate_screenwithdryRun: true; only then apply. - For token export, run
preview_export_variablesbeforeexport_variables. Destructive export options require explicitconfirmDestructive: true; delete/reset-class Remote Connect commands may also require the user to enable Allow destructive commands in the plugin overlay for the current session. - For documentation in Figma, use
apply_doc_spec,build_component_doc,build_doc_flow,bind_variable_palette, orbuild_scenario_from_md. Do not hand-write composition JSON or ad hoc canvas scripts when a Bridge thick command exists. - For large scans, request summaries first and use paginated detail tools only for the required subset.
- After writes, re-run the relevant read/audit command and report what changed, what was skipped, and whether visual review is still needed.
Agent-critical boundaries:
- Bridge targets Figma Design + SXL Studio active-file workflows.
- Official Figma MCP remains the companion for creating new files, FigJam/Slides-specific editing, generated diagrams, and hosted-only Code Connect context.
- Bridge can read known hosted Figma files through REST when
FIGMA_TOKEN/FIGMA_ACCESS_TOKENis configured, but REST reads do not replace Remote Connect for active canvas writes. - Git Sync Local Storage and
/api/workspace-blobare part of the public Bridge contract. They must keep working without an active Remote Connect websocket session; ifBRIDGE_AUTH_TOKENis enabled, they require the same bearer token as the rest of/api/*.
Useful official context: Figma documents the MCP server as an agent interface for design context and write-to-canvas workflows, and lists several remote-only tools such as create_new_file, generate_diagram, use_figma, get_libraries, search_design_system, and upload_assets. Figma also publishes skills such as figma-use, figma-code-connect, figma-generate-library, and figma-generate-design. Bridge mirrors the parts it can honestly support through the local plugin and SXL workflows, and exposes the rest as companion scope rather than pretending plugin APIs can do it.
Official references:
Intent routing quick map
| User intent | Agent should start with | Then use |
|---|---|---|
| "Draw/build a screen in Figma" | route_intent, inspect_design_system | validate_screen_spec, build_screen dry-run, build_screen apply |
| "Update this existing screen" | get_metadata or get_design_context | update_screen dry-run, then apply |
| "Create documentation in Figma" | route_intent, sxl://agent/recipes/sxl-doc-builder | apply_doc_spec, build_component_doc, build_doc_flow, build_scenario_from_md |
| "Export variables/styles" | preview_export_variables | export_variables with explicit options |
| "Find unbound raw values" | audit_variable_coverage / audit_style_coverage | find_*_coverage_misses, then dry-run apply suggestions |
| "Analyze component usage or props" | analyze_component_usage / analyze_component_prop_usage | find_component_usages / find_component_prop_usages |
| "Generate/apply compositions" | compose_from_url or list_composition_files | bulk_generate_compositions, audit_composition_drift |
| "Map Figma components to code" | get_context_for_code_connect | get_code_connect_suggestions, generate_code_connect_template, codeconnect_save_binding |
| "Use datasets/assets/mappings" | list_datasets, list_assets, list_mappings | save/delete with dryRun, import/export payloads, mapping dry-runs |
| "Use local repository storage" | Git Sync settings + Local Storage | /api/workspace-blob, git_pull, git_push |
Raw HTTP command pattern
MCP clients should prefer MCP tools. HTTP clients can use /api/command directly:
curl -s -X POST http://127.0.0.1:37830/api/command \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: export-preview-001' \
-d '{
"commandType": "preview_export_variables",
"payload": {
"settings": {
"dryRun": true
}
}
}'
When BRIDGE_AUTH_TOKEN is enabled, add Authorization: Bearer <token>. Write commands return a normalized envelope with command id, status, result, and typed errors where possible. Use Idempotency-Key for retries from scripts and agents.
For a compact start-here guide, call get_operator_runbook, attach sxl://agent/operator-runbook, or use the sxl-operator prompt. HTTP clients can use GET /api/operator-runbook. It maps common RU/EN requests to the right SXL workflow, required resources, preferred tools, dry-run gates, done criteria, and official Figma MCP companion handoff.
For broad natural-language requests, call route_intent first. It returns ranked SXL recipes, preferred tools, dryRunFirst, and schema resources such as sxl://agent/schemas/design-dsl-v1, sxl://agent/schemas/doc-spec-v2, sxl://agent/schemas/code-connect-context-v1, or sxl://agent/schemas/code-connect-template-v1.
For multi-step work, call plan_workflow, then validate the proposed tool sequence with preview_workflow before executing write tools. The preview reports unknown tools, missing or misordered status checks, design-system discovery, dry-run gates, preflight tools declared by preferredAfter, and guard steps that appear after the write they were meant to protect.
For token export, run preview_export_variables before export_variables. For Figma Design library discovery/search, use Bridge get_libraries / search_design_system. For official Figma MCP companion scope such as new-file creation, FigJam/Slides, diagrams, or hosted Code Connect repository context, the planner adds an explicit handoff step; avoid Bridge write tools unless the user narrows the task back to SXL/active-file Figma Design work.
For larger workflows, call get_capability_matrix first. HTTP clients can use the equivalent endpoint:
curl http://127.0.0.1:37830/api/capabilities
It returns the same catalogue with execution metadata (plugin, bridge-orchestration, bridge-local), exact pluginCommandTypes, aliases, natural-language intents, dryRunSupported, returnsLargeData, preferred order hints, and Bridge timeouts.
To compare Bridge with official Figma MCP tools, use:
curl http://127.0.0.1:37830/api/figma-mcp-parity
MCP clients can call get_figma_mcp_parity or attach sxl://agent/figma-mcp-parity. The matrix marks each official Figma MCP tool as covered by Bridge/SXL, companion-required, future scope, or unsupported by the plugin API. Bridge plugin tools cover enabled-library search and active-file metadata in the open file. Bridge REST tools cover authenticated whoami and known file/team library reads when a Figma REST token is configured. get_libraries / search_design_system provide Figma MCP-compatible Figma Design library discovery/search over active-file and known REST sources. get_design_context covers active-file SXL-native design context. get_metadata covers hosted file/node metadata. get_variable_defs covers selection/local/enabled-library/known-file variable definitions. get_screenshot covers active-file SVG and known-node REST image rendering. Bridge upload_assets covers Figma Design image insertion from URL/base64 with dry-run and a 10MB-per-asset limit. get_context_for_code_connect covers active-file Code Connect context, generate_code_connect_template generates dry-run-first local .figma.ts templates, and get_code_connect_suggestions covers local candidate discovery before codeconnect_save_binding. Remote-only hosted capabilities such as creating a new file, hosted Code Connect repository context, and FigJam/Slides asset upload still require official Figma MCP as a companion.
For skill-level routing, use:
curl http://127.0.0.1:37830/api/figma-mcp-skills-parity
MCP clients can call get_figma_mcp_skills_parity or attach sxl://agent/figma-mcp-skills-parity. It maps the current official Figma MCP skills figma-use, figma-use-figjam, figma-use-slides, figma-swiftui, figma-code-connect, figma-create-new-file, figma-generate-diagram, figma-generate-library, and figma-generate-design to SXL recipes/resources/tools, companion scope, or agent-side codebase work.
route_intent and plan_workflow understand current official skills and legacy/client aliases. FigJam, Slides, new-file, and diagram skills route to the official Figma MCP companion. figma-swiftui uses Bridge for active-file design context and Code Connect hints, then agent-side Swift edits. Older aliases remain supported: figma-implement-design routes to sxl-implement-design, figma-create-design-system-rules routes to sxl-generate-library, and figma-code-connect-components routes to sxl-code-connect.
For performance-sensitive workflows, use the Bridge performance profile:
curl http://127.0.0.1:37830/api/performance-profile
MCP clients can call get_performance_profile or attach sxl://agent/performance-profile. It marks local, summary, paginated-detail, write-preview, and long-running commands, exposes target budgets, and highlights large-data, dry-run-first, and destructive-write risks. Use it before broad scans, screen generation, bulk export/apply, or slow workflow debugging.
For operational preflight, call get_operator_runbook as the start-here workflow chooser, then get_bridge_runtime_summary before live work. HTTP clients can use:
curl http://127.0.0.1:37830/api/operator-runbook
curl http://127.0.0.1:37830/api/runtime-summary
The runbook chooses the workflow, tools, dry-run gates, and companion handoff. The runtime summary reports plugin connection, current/queued commands, recent event/audit failures, auth state, MCP URL, and recommendations so an agent can decide whether to proceed, wait, inspect logs, or ask the operator to open Remote Connect.
For release/readiness evaluation, call get_ultimate_readiness or:
curl http://127.0.0.1:37830/api/ultimate-readiness
Local operators can run the same audit without a running Bridge server:
cd Utils/bridge
npm run readiness
sxl-bridge-readiness --json
It maps the Ultimate Bridge plan to requirement rows across contract surface, SXL skills, Design DSL, analytics, database, variables/styles, compositions, docs, Code Connect, production safety, official Figma MCP tool parity, and official Figma MCP skill parity. The contract row includes Remote Connect whitelist and handler-path evidence when the plugin source is available. Companion/future Figma MCP scope remains explicit. Add --runtime to report running Bridge HTTP/MCP proof next to local readiness; add --require-live when release sign-off must fail unless an active Remote Connect plugin session passes live validation.
Tools marked returnsLargeData support bridgeResponseMode. Use summary first to get counts, preview, and pagination hints; use auto for the default budget-aware behavior; use full only when exact payloads are required. Bridge strips these control fields before forwarding the command to the plugin, while raw HTTP /api/command remains an exact-result fallback.
Bridge also has a destructive confirmation gate. Commands such as delete_*, remove_*, reset_*, git_hard_pull, detach_instance, flatten_nodes, boolean_operation, and export_variables with deleteOrphans or allowDestructiveReorder require top-level confirmDestructive: true. Run dry-run/preview first when available; use preview_export_variables before token export to inspect the exact settings payload, effective plugin defaults, risk flags, and required confirmation without touching Figma. Bridge removes confirmDestructive and destructiveReason before forwarding the payload to the plugin.
Plugin 2.6+ adds a second user-level gate for delete/reset-class Remote Connect commands. Commands like delete_*, batch_delete_variables, remove_variable_mode, reset_diff*, and git_hard_pull stay blocked until the user enables Allow destructive commands in the plugin Remote Connect overlay. confirmDestructive does not bypass that plugin gate. If a command fails with blocked by session policy, enable the overlay toggle and retry.
Bridge persists a sanitized command audit log to disk. Use get_bridge_audit_log or:
curl http://127.0.0.1:37830/api/log?source=disk
The default root is the OS cache directory from env-paths under sxl-studio-bridge/audit; override it with SXL_BRIDGE_AUDIT_ROOT. Audit entries include ids, command type, status, timings, payload key names, and idempotency keys, but never payload values.
For release checks or new agent/client setup, run the Bridge contract audit:
curl http://127.0.0.1:37830/api/contract-audit
MCP clients can call get_contract_audit. It verifies required meta tools, recipe references, schema entrypoints, workflow gates, plugin command declarations, Remote Connect whitelist coverage and handler-path coverage when the plugin source is available, and timeouts. Treat status: "fail" as blocking.
For CLI checks, use the Bridge health gate:
# local contract gate; no running server required
npm run bridge:check
# local agent routing/planning/preview validation; no Figma session required
cd Utils/bridge
npm run workflow:agent
# local Ultimate Bridge requirement audit; no running server required
npm run readiness
# local readiness + running Bridge HTTP/MCP proof
npm run bridge:readiness:runtime
sxl-bridge-readiness --runtime
# strict Figma E2E proof; requires active Remote Connect
npm run bridge:readiness:live
sxl-bridge-readiness --runtime --require-live --suite all
# runtime HTTP + MCP smoke against a running Bridge
npm run health:runtime
# require a live Remote Connect plugin session
node dist/bridge-health-cli.js --runtime --require-plugin
# live workflow smoke through Remote Connect: status -> get_plugin_status -> find_components -> build_mockup dryRun
npm run workflow:smoke
# broader non-destructive live validation: baseline reads + Design DSL dryRun
npm run workflow:validate
# explicit write-path proof: create a tiny frame, verify rootNodeId, delete it
sxl-bridge-live --suite all --write-canary --cleanup
workflow:agent validates representative RU/EN requests through route_intent, plan_workflow, and preview_workflow. It catches stale routing, missing preflight dependencies, unsafe generated plans, and read-only intents that accidentally plan write tools. readiness prints the same Ultimate Bridge requirement audit locally without a running server. health:local includes the same agent workflow gate plus the Ultimate Bridge readiness audit. A healthy build reports PASS; WARN should be reviewed before release, while explicit companion/future scope is listed separately by readiness.
health:runtime checks /mcp initialize/session/tools-list/tools-call (get_libraries + search_design_system zero-config envelopes, get_operator_runbook, list_tools, validate_screen_spec, preview_export_variables, get_figma_mcp_skills_parity, and plan_workflow for Figma Design library discovery routing), resources-list/resources-read for runtime-summary + operator-runbook + figma-mcp-skills-parity, prompts-list/prompts-get for sxl-operator + sxl-generate-design, plus the REST runtime endpoints including /api/operator-runbook. It is status-aware for readiness and performance endpoints, so runtime fail blocks the gate and runtime warn is reported as a warning. It does not require an active plugin session unless --require-plugin is passed.
workflow:smoke requires Bridge to be running and the SXL Studio plugin Remote Connect session to be active. It is non-destructive by default; sxl-bridge-smoke --apply creates a small smoke frame only when you explicitly opt in and Figma reports writesAllowed=true. sxl-bridge-smoke --apply --cleanup deletes the rootNodeId returned by that same apply step, proving create/delete access without leaving the canary frame in the file.
workflow:validate also requires an active Remote Connect session. The default baseline suite verifies Bridge status, /mcp initialize/session/tools-list/tools-call (get_libraries + search_design_system zero-config envelopes, get_operator_runbook, list_tools, validate_screen_spec, preview_export_variables, get_figma_mcp_skills_parity, and plan_workflow for Figma Design library discovery routing), resources-list/resources-read for runtime-summary + operator-runbook + figma-mcp-skills-parity, prompts-list/prompts-get for sxl-operator + sxl-generate-design, ultimate readiness, performance profile, operator runbook, tool catalogue, token/config reads, variable/style reads, component discovery, and a Design DSL dry-run. Readiness/performance status is enforced: fail fails the suite and warn is surfaced as a warning. Run sxl-bridge validate --suite all to also validate Code Connect registry/settings/selection status, selection variable definitions, dry-run .figma.ts template generation, database list commands, database payload export plus import dry-run, variable/style spec dry-runs, dedupe dry-runs, variable/style coverage summary and paginated detail, variable/style coverage dry-run apply previews, unused variable/style scans, composition list plus bulk dry-run and drift audit, component usage summary/detail pagination, component prop usage summary/detail pagination, and Doc Builder build_doc_flow dry-run. Add --write-canary --cleanup only with explicit operator approval; it creates a tiny validation frame, verifies the returned rootNodeId, then deletes that same node.
Live queue diagnostics:
curl http://127.0.0.1:37830/api/queue
It returns current, queued, and immediate commands with ids, status, timings, and payloadKeys. Payload values are never exposed.
Command event timeline:
curl http://127.0.0.1:37830/api/events?limit=100
curl http://127.0.0.1:37830/api/events?commandId=<command-id>
It returns sanitized lifecycle/progress events (queued, started, completed/failed, timeout/cancel, and plugin progress events). Values are not exposed; only ids, status, timings, payloadKeys, and detailKeys.
Persisted audit after restart:
curl http://127.0.0.1:37830/api/log?source=disk&limit=50
Core workflows
1) Tokens and styles workflows
Use Bridge to:
- export variables/styles;
- reapply token bindings;
- manage token files and token config in workspace;
- run cross-file sync actions.
preview_export_variables is the read-only preflight for export modes. It returns the exact export_variables payload Bridge will send, effective plugin defaults, risk flags, and whether destructive confirmation is required. export_variables follows plugin-safe defaults: it does not apply code syntax/scopes, force-update all entries, delete orphans, or run destructive reorder unless those options are explicitly passed.
The export result is the real Plugin result — counts, warnings, errors, and the partial-mode report are not replaced by a generic success. Missing mode cells complete in the same non-destructive run: existing Figma values stay unchanged, new destinations keep Figma-created values, and orphan cleanup/destructive reorder are disabled. Use get_export_report to read the latest manual, automatic, or Remote Connect result; before the first export it returns available: false.
Start with:
list_token_filesget_token_file_contentsave_token_filesave_tokens_configpreview_export_variablesexport_variablesget_export_report
2) Composition workflows
Use Bridge to:
- export composition JSON from selection;
- generate/apply/preview compositions;
- audit composition drift;
- run bulk composition operations.
Start with:
export_composition_jsongenerate_compositionapply_compositionbulk_generate_compositionsaudit_composition_drift
Bridge uses the same optimized Composition Generate / Apply pipeline as the plugin UI. For large libraries, pass an explicit list to bulk_generate_compositions, keep Remote Connect open until the run finishes, and verify the result with audit_composition_drift.
For heavy Figma files or runs with dozens of compositions, prefer chunked bulk generation:
{
"operation": "generate",
"fileIds": ["button-primary-sm", "button-primary-md"],
"chunkSize": 12,
"pauseBetweenChunksMs": 300
}
chunkSize lets Bridge process the same bulk request in smaller resumable batches instead of pushing the whole canvas run through one long plugin command. A chunk size around 10-15 is a good starting point for large component libraries. Bridge returns chunk progress, the next cursor and a target hash, so an agent can continue safely if the operator needs to reopen Figma or Remote Connect.
3) Codegen workflows (Dev Mode parity)
Use get_codegen for the same family of outputs used in SXL Studio Dev Mode:
designer-jsonvue3swiftuikotlindivkit(generic DivKit JSON card)
4) Design and documentation workflows
Bridge exposes SXL agent skill resources:
sxl://agent/operator-runbooksxl://agent/recipes/sxl-usesxl://agent/recipes/sxl-implement-designsxl://agent/recipes/sxl-generate-designsxl://agent/recipes/sxl-generate-librarysxl://agent/recipes/sxl-code-connectsxl://agent/recipes/sxl-auditsxl://agent/recipes/sxl-doc-buildersxl://agent/recipes/sxl-data-apply-mappingsxl://agent/recipes/sxl-data-apply-allsxl://agent/recipes/sxl-data-generate-instancessxl://agent/recipes/sxl-database-transfersxl://agent/recipes/figma-mcp-companionsxl://agent/schemas/code-connect-context-v1sxl://agent/schemas/code-connect-template-v1sxl://agent/figma-mcp-paritysxl://agent/figma-mcp-skills-paritysxl://agent/performance-profilesxl://agent/runtime-summarysxl://agent/ultimate-readiness
MCP clients that support prompts can also use prompts/list / prompts/get for sxl-operator, sxl-router, sxl-use, sxl-implement-design, sxl-generate-design, sxl-generate-library, sxl-code-connect, sxl-audit, sxl-doc-builder, and figma-mcp-companion. Prompts return the same SXL skill intent as actionable instructions with preferred tools, resources, dry-run gates, and done criteria. Use figma-mcp-companion when route_intent identifies remote-only official Figma MCP scopes such as new-file creation, FigJam/Slides, or diagrams; use Bridge get_libraries / search_design_system for Figma Design library discovery.
Use inspect_design_system, validate_screen_spec, build_screen, and update_screen to build or update editable Figma screens from existing components. Use apply_doc_spec, build_component_doc, build_doc_flow, bind_variable_palette, and build_scenario_from_md for documentation in Figma. build_doc_flow accepts pages with nodeId or compositionFileId; composition pages are generated/applied through the existing composition pipeline and rendered into the flow as an instance or clone.
5) Variables and local styles CRUD
Bridge supports end-to-end operations for:
- variable collections, modes, values, scopes, code syntax;
- local paint/text/effect styles;
- style assignments and import-by-key;
- bulk import/dedupe/rebind/audit flows.
6) Audit, analytics, and coverage workflows
Bridge supports read-first audit scenarios:
- variable usage and coverage;
- style coverage and drift;
- unused variables/styles;
- component usage and component prop usage analytics;
- suggestion-based apply workflows (dry-run first).
Coverage audit recipes are read-only. When the user asks to fix findings, switch to apply_coverage_suggestions / apply_style_coverage_suggestions and run preview mode before committing.
7) Code Connect and database workflows
Bridge exposes Code Connect settings, registry, node UI status, active-file Code Connect context (get_context_for_code_connect), dry-run-first .figma.ts template generation (generate_code_connect_template), local source-file suggestions, and full binding save/read flows, including docs URLs, files, Storybook metadata, and component API status.
Database tools can list/get/save/delete datasets, assets, and mappings. Save/delete tools support dryRun preview before plugin state changes. export_database_payload creates a portable backup/transfer payload through existing CRUD reads; asset content is excluded unless includeAssetContent=true. import_database_payload defaults to dryRun, reports existing-ID conflicts, and requires confirmDestructive=true plus a reason before overwriting datasets, assets, or mappings. Mapping write tools (apply_mapping, apply_all_mappings, generate_instances) also support dryRun previews so agents can inspect mappings, target counts, and row estimates before writing. Apply/count/generate workflows accept explicit targetNodeIds as deterministic selection roots; without them Bridge falls back to the current selection or scope.
8) Git Sync workflows
Bridge can run Git-connected actions used by SXL Studio:
git_pullgit_hard_pullgit_push
Local Storage for large Git Sync projects
For medium/large datasets, enable Local Storage in Git Sync connection settings.
This keeps large synced data on disk via Bridge and improves stability for large workspaces. The plugin probes GET /api/status before Pull and then reads/writes workspace-scoped payloads through /api/workspace-blob.
If BRIDGE_AUTH_TOKEN is set, also fill Bridge Auth Token in the same Sync connection. Use the same generated secret that starts Bridge, not a Git provider token or a Figma REST token. Local Storage does not need a Remote Connect websocket session, but Bridge must be reachable on localhost.
Use SXL_BRIDGE_WORKSPACE_BLOB_ROOT when you need to move the blob directory to a custom path. If Pull stops with a Local Storage warning, verify Bridge is running on the same machine as Figma, check the port, and confirm the auth token matches.
User-facing details: Git integration
Dev Mode behavior
In Figma Dev Mode:
- read and file workflows are available;
- direct canvas writes can be restricted by Figma context;
- token/config/git file workflows remain available when connection state is valid.
If a write action is blocked by mode, switch to Design Mode for that operation.
Command categories (practical map)
Bridge command catalog is large and evolving. Use this map as a navigation layer and use list_tools for the exact current list.
| Category | Typical jobs |
|---|---|
diagnostics | status, mode checks, selection summary, drift summary |
tokens | token file CRUD, config updates, variable/style export, binding reapply |
composition | composition export/generate/apply/preview/link checks |
codegen | designer-json/vue3/swiftui/kotlin/divkit outputs |
variables | collection/mode/value/scopes/codeSyntax CRUD + batch ops |
styles | local style CRUD, assignment, import, drift checks |
audit | variable/style usage coverage, component usage, prop analytics, unused assets, suggestion pipelines |
mockup | design-system inspection, screen validation/build/update, dataset-based generation |
data | datasets, assets, mappings, variable/style definition orchestration, enabled-library search/read tools, Code Connect registry/bindings/suggestions |
canvas | node reads/writes, design context, screenshot/SVG export, selection, page structure |
git | pull/push operations through configured sync |
Recommended operating model
- Start with read/audit calls.
- Run dry-run where available.
- Apply write actions after review.
- Keep token and composition JSON in git.
- Re-run audits after write operations.
Troubleshooting
Bridge is running, but no commands execute
- Check Remote Connect in plugin is enabled.
- Check
.cursor/mcp.jsonURL and port. - If auth is enabled, check the MCP/HTTP
Authorizationheader, the plugin Remote Connect overlay token, and the Sync connection Bridge Auth Token used by Local Storage.
Unauthorized / forbidden
- Token mismatch in
Authorizationheader, Remote Connect overlay, or Sync connection Bridge Auth Token. - Restart Bridge after changing env variables.
Commands visible, but canvas writes fail
- Current Figma context may be Dev Mode-restricted.
- Retry the same action in Design Mode.
Git operations fail
- Verify the Sync connection in plugin is valid.
- Verify provider token scopes and repository path settings.
Version compatibility (quick rule)
Keep Bridge and plugin versions aligned by release notes. For the release documented on this page, use this exact pair:
| SXL Studio Plugin | Bridge | Contract |
|---|---|---|
2.8.1 | 1.8.9 | Truthful export_variables results and get_export_report; no continuation or misleading composition reapply command. |
An older Bridge can omit new tools; an older Plugin can reject a command that the newer Bridge exposes. reapply_compositions is not an advertised tool in this pair because it never performed an Apply. Use apply_composition for one composition or bulk_generate_compositions with operation apply for an explicit reviewed set.
Practical rule:
- update Bridge and SXL Studio plugin together in the same maintenance window;
- after update, run
list_tools,get_performance_profile,workflow:smoke, andworkflow:validateagainst a live Remote Connect session.
Prompts for users
You do not call tools by hand — you describe the task in natural language and the AI client picks the right Bridge tools. Bridge also has a natural-language router (route_intent) that maps RU/EN requests to the correct recipe and tools. Ready-to-use prompts:
| Goal | Example prompt |
|---|---|
| Export tokens | Export my tokens to Figma variables and styles — preview first, then apply. |
| Build from URL | Generate the composition from this Figma URL <url> and apply it. |
| Audit raw values | Audit this file for raw colors that should be variables and show the top offenders. |
| Clean up | Find unused variables and styles in this file. |
| Build a screen | Build a login screen from my design system components. |
| Document a component | Document the selected component: title, variants matrix, and props table. |
| Variable usage | Which nodes use the variable color.brand.primary? Show the usages. |
| Git round-trip | Pull the latest tokens from Git, run export, then push my changes. |
Tip For multi-step or destructive work, ask the agent to preview / dry-run first. Bridge exposes read-only previews (preview_export_variables, preview_composition, audit_*) and dryRun on write tools, so you can review before anything changes in Figma.
Command reference (MCP tools)
Bridge exposes 250+ MCP tools grouped by category. Each is callable by any connected AI client (and most map to a single plugin Remote Connect command). Read-only and dryRun-first tools are safe to explore; write tools change the Figma file.
Diagnostics (5)
| Command | What it does |
|---|---|
get_plugin_status | Plugin runtime status (editor, mode, selection, session). |
is_dev_mode | Shortcut flag: true when figma.editorType === 'dev'. |
get_selection_summary | Summary of current Figma selection. |
get_drift_status | Drift status across exported collections. |
get_export_report | Most recent export report. |
Tokens (19)
| Command | What it does |
|---|---|
list_token_files | Index of token files (id, name, folder, gitPath). |
get_token_file_content | Raw JSON body of a token file. |
save_token_file | Upsert JSON content of a token file. |
create_token_file | Create a new token file. |
delete_token_file | Delete a token file (queues gitPath removal if tracked). |
move_token_file | Rename/move a token file. |
rename_token_file | Rename a token file (alias of move_token_file). |
get_tokens_config | Read the plugin config.json content. |
save_tokens_config | Overwrite config.json. |
get_applied_tokens | Applied tokens + composition binding on a node. |
apply_token_doc_spec | Doc Spec v1: bind token paths to TEXT layers by name (same as build_token_documentation). |
preview_export_variables | READ-ONLY preflight for export_variables: normalize exact settings payload, effective plugin-safe defaults, risks, and destructive confirmation requirement. |
export_variables | Run variables/styles export with plugin-safe defaults unless flags are explicitly provided. |
reset_diff | Reset all Diff-IDs. |
reset_diff_collection | Reset Diff-IDs for a collection. |
reset_diff_file | Reset Diff-IDs for a file. |
reapply_token_bindings | Re-apply token bindings (scope: selection|page|document). |
cross_file_sync_fetch | Fetch remote variables for cross-file sync. |
cross_file_sync_apply | Apply cross-file sync entries. |
Variables (25)
| Command | What it does |
|---|---|
get_variables | List local variable collections and variables. |
get_variable_defs | Bridge orchestration for official-MCP-style variable/style definitions: selection-compatible applied token context plus local, enabled-library, or REST variable definition modes. |
create_variable_collection | Create a new variable collection. |
create_variable | Create a new variable inside a collection. |
bind_variable | Bind a variable to a node property. |
rename_variable | Rename a variable. |
delete_variable | Delete a variable. |
rename_variable_collection | Rename a variable collection. |
delete_variable_collection | Delete a variable collection. |
add_variable_mode | Add a mode to a collection. |
remove_variable_mode | Remove a mode from a collection. |
rename_variable_mode | Rename a mode. |
set_variable_mode_value | Set variable value for a mode. |
set_variable_scopes | Set variable scopes. |
set_variable_code_syntax | Set variable codeSyntax per platform. |
batch_create_variables | Create many variables in one collection with per-item errors. |
batch_set_variable_values | Set many variable mode values in one round-trip. |
batch_delete_variables | Delete many variables with per-item errors. |
batch_bind_variables | Bind many nodes/properties to variables in one round-trip. |
get_mode_context | Read SXL token mode preview context and mode inventory. |
set_mode_preview_context | Set file-level SXL mode preview context. |
apply_modes_to_selection | Apply current SXL/native mode context to selected nodes. |
apply_modes_to_parent_frame | Apply current SXL/native mode context to the nearest parent frame. |
apply_modes_to_page | Apply current SXL/native mode context to the current page. |
clear_modes_from_selection | Clear explicit modes from selected nodes. |
Variables — bulk / orchestration (5)
| Command | What it does |
|---|---|
import_variable_spec | Idempotent bulk-create / update of Variables from a declarative spec (collections + modes + variables + aliases). |
analyze_variable_order | READ-ONLY: recommend a new order for variables in a collection (alphabetical / byPath / explicit). |
dedupe_variables | Find / merge duplicate Variables (byName | byDefaultModeValue). Dry-run by default; canvas write only when apply: true. |
rebind_variable_aliases | Bulk rewrite alias targets across modes ({ fromVariableId, toVariableId }[]). |
apply_coverage_suggestions | Apply audit_variable_coverage suggestions as setBoundVariableFor* writes. Dry-run by default. |
Styles (9)
| Command | What it does |
|---|---|
get_local_styles | List local paint/text/effect styles. |
create_paint_style | Create a local PaintStyle. |
create_text_style | Create a local TextStyle. |
create_effect_style | Create a local EffectStyle. |
set_text_style | Assign a TextStyle to a node. |
set_effect_style | Assign an EffectStyle to a node. |
set_stroke_style | Assign a PaintStyle to a node stroke. |
set_fill_style | Assign a PaintStyle to a node fill. |
import_style_by_key | Import a published style by key. |
Styles — bulk / orchestration (5)
| Command | What it does |
|---|---|
import_style_spec | Idempotent bulk-create / update of local Paint / Text / Effect styles from a declarative spec. Dry-run preview supported. |
dedupe_styles | Find / merge duplicate styles (byName | bySignature). Dry-run by default; canvas write only when apply: true. |
rebind_style_consumers | Bulk rewrite styleId on every consumer node ({ fromStyleId, toStyleId }[]). Dry-run aware. |
audit_style_drift | READ-ONLY: detect drift between local Paint styles and same-named Variables / explicit expectations. |
apply_style_coverage_suggestions | Apply audit_style_coverage suggestions as setStyleId writes. Dry-run by default. |
Compositions (12)
| Command | What it does |
|---|---|
export_composition_json | Single source of truth: composition JSON for a node. |
get_codegen | Mirror Dev Mode Inspect→Code for any node. |
get_codegen_settings | Read Dev Mode Codegen project settings from the current Figma file. |
preview_codegen_settings | Validate Codegen settings without writing them. |
save_codegen_settings | Save Dev Mode Codegen project settings after validation. |
list_compositions | Enumerate composition files in workspace. |
generate_composition | Generate Figma component/set from composition JSON. |
apply_composition | Apply composition to an existing anchor. |
preview_composition | Preview composition structure. |
check_composition_linked | Check if a composition is linked. |
remap_composition_id | Remap a composition id to a new anchor. |
inspect_selection | Inspect current selection. |
Compositions — bulk (2)
| Command | What it does |
|---|---|
bulk_generate_compositions | Bulk generate / apply many composition files. Filters by fileIds | names | prefix; per-item error isolation; dry-run preview supported. Use chunkSize for heavy Figma files so Bridge runs resumable short plugin commands. |
audit_composition_drift | READ-ONLY drift detector between composition files and the Figma components they tracked (linked | unlinked | drift | missing). |
Canvas & nodes (68)
| Command | What it does |
|---|---|
get_selection | Current selection with node ids. |
set_selection | Select nodes. |
select_nodes | Select nodes (alias). |
get_pages | List document pages. |
set_current_page | Change current page. |
get_node_info | Basic info about one node. |
get_node_tree | Full scene subtree. |
get_node_reactions | Read normalized prototyping reactions from a node. |
set_node_reactions | Set prototyping reactions on a node with diff preview. |
clear_node_reactions | Clear prototyping reactions from a node with diff preview. |
audit_node_reactions | Compare expected reactions with live node reactions. |
get_component_property_definitions | Read component property definitions for a component/set/instance. |
set_instance_component_properties | Set validated component property values on an instance/component. |
audit_component_property_usage | Audit instance component property values against definitions. |
repair_component_property_values | Validate and repair component property values with dry-run default. |
get_page_structure | Summary of current page structure. |
get_design_context | Bridge design-context orchestration: active-file SXL codegen/composition context, metadata, native variable/style definitions, optional screenshot, and optional Code Connect suggestions. |
get_metadata | Bridge metadata orchestration: active-file selection/page/node tree metadata through plugin or file/node metadata through Figma REST. |
read_node_properties | Read canonical node properties. |
find_nodes | Find nodes by predicate. |
list_components | List local components. |
list_available_fonts | Available fonts (+ project text styles hint). |
migration_font_preflight | Read-only exact-font preflight before text migration/rebind workflows. |
migration_text_variable_bindings | Dry-run/apply TEXT range variable rebind/detach by explicit variable mappings. |
migration_text_fill_bindings | Dry-run/apply TEXT fill color variable rebind/detach by explicit variable mappings. |
migration_explicit_modes_audit | Read-only audit for page-level explicit variable modes that point to missing collections. |
migration_clear_orphan_explicit_modes | Dry-run/apply best-effort clear for orphan page explicit variable modes; reports Figma API limits. |
migration_replace_ghost_explicit_mode_pages | Dry-run/apply clean PageNode replacement for missing explicit variable mode refs while preserving page children. |
probe_motion_export | Read-only probe for Figma Motion runtime export support and Motion node metadata. |
export_as_svg | Export node(s) as SVG. |
get_screenshot | Bridge screenshot/render orchestration: plugin inline SVG for active-file nodes or Figma REST image URLs for fileKey/nodeIds. |
notify | Figma toast notification. |
create_frame | Create a frame. |
create_rectangle | Create a rectangle. |
create_text | Create a text node. |
create_ellipse | Create an ellipse. |
create_line | Create a line. |
create_svg_node | Create a node from SVG string. |
create_vector | Create a vector node. |
set_auto_layout | Configure auto layout. |
modify_node | Modify generic node properties. |
set_node_text | Set text on a text node. |
set_node_property | Set arbitrary node property. |
rename_node | Rename a node. |
set_node_visibility | Show/hide node. |
set_node_size | Resize a node. |
set_node_fill | Set solid fill. |
set_node_fill_variable | Bind a variable as fill. |
set_stroke | Set stroke. |
set_effects | Set effects array. |
set_fill | Set fills array. |
set_image_fill | Set image fill from bytes. |
set_constraints | Set layout constraints. |
style_text_range | Style a text range. |
insert_data | Insert raw payload onto the page. |
delete_node | Delete one node. |
delete_nodes | Delete many nodes. |
clone_node | Clone a node. |
duplicate_subtree | Duplicate a subtree. |
move_to_parent | Reparent a node. |
create_component | Create a component. |
create_component_set | Create a component set. |
create_component_instance | Create an instance of a component. |
detach_instance | Detach an instance. |
import_component_by_key | Import a published component by key. |
boolean_operation | Boolean op on nodes. |
flatten_nodes | Flatten nodes. |
apply_documentation_payload | Apply SXL documentation payload. |
Datasets, assets, mappings & Code Connect (36)
| Command | What it does |
|---|---|
list_datasets | List SXL datasets. |
get_dataset | Get one SXL dataset. |
save_dataset | Create/update one SXL dataset. |
delete_dataset | Delete one SXL dataset. |
list_assets | List SXL local assets. |
get_asset | Get one SXL asset; optional content. |
save_asset | Create/update one SXL asset. |
delete_asset | Delete one SXL asset. |
list_mappings | List SXL mappings. |
get_mapping | Get one SXL mapping. |
save_mapping | Create/update one SXL mapping. |
delete_mapping | Delete one SXL mapping. |
export_database_payload | Bridge orchestration: export portable SXL datasets/assets/mappings payload via existing CRUD commands. |
import_database_payload | Bridge orchestration: dry-run-first import/upsert of portable SXL database payloads. |
apply_mapping | Apply a mapping to explicit targetNodeIds or the current Figma selection. Dry-run preview supported. |
apply_all_mappings | Apply all mappings within a scope or explicit targetNodeIds. Dry-run preview supported. |
count_apply_targets | Count mapping targets. |
generate_instances | Generate instances from mapping into explicit targetNodeIds or the current selection. Dry-run preview supported. |
apply_image | Apply an image asset. |
upload_assets | Bridge asset uploader: validate/fetch PNG, JPG/JPEG, GIF, or WebP assets up to 10MB and apply them as image fills via set_image_fill. Dry-run preview supported. |
rebind_instance | Rebind an instance to a new main. |
codeconnect_get_binding | Get Code Connect binding for node. |
codeconnect_save_binding | Save Code Connect binding. |
codeconnect_get_selection_status | Code Connect status for selection. |
codeconnect_get_registry | Code Connect registry snapshot. |
codeconnect_get_global_settings | Global Code Connect settings. |
codeconnect_save_global_settings | Save global Code Connect settings. |
codeconnect_get_node_ui_status | Code Connect node UI status. |
get_context_for_code_connect | Bridge Code Connect context orchestration: selection status, existing SXL bindings, registry/settings, codegen/composition context, component discovery, and local source suggestions for template/binding generation. |
get_code_connect_suggestions | Bridge-local Code Connect suggestion engine: scan local code and rank full CodeConnectBinding candidates for selected Figma nodes before saving. |
generate_code_connect_template | Bridge-local .figma.ts Code Connect template generator from a full SXL CodeConnectBinding or local suggestions. Dry-run preview by default; writes only with writeFile=true. |
inspect_enabled_libraries | READ-ONLY: inspect team libraries already enabled for the current Figma file (variable collections and runtime-optional component/style descriptors). |
list_enabled_library_variables | READ-ONLY: list variables from enabled team-library variable collections; requires an explicit collection/library filter or includeAllCollections=true. |
search_enabled_library_assets | Bridge orchestration: search components, styles, variable collections, and variables in libraries already enabled for the current Figma file. |
get_libraries | Figma MCP-compatible library discovery: active-file enabled libraries through Remote Connect plus known file/team libraries through Figma REST. |
search_design_system | Figma MCP-compatible design-system search across active-file components, enabled libraries, and known file/team REST libraries. |
Audit & analytics (13)
| Command | What it does |
|---|---|
analyze_variable_usage | Summarise where a variable is used (counts, byProperty, aliasChain). Read-only. |
find_variable_usages | Paginated detail list of nodes using a variable. |
render_variable_usage_page | Clone every usage of a variable into a fresh page. |
audit_variable_coverage | Find raw values that should be variables (summary + topOffenders). |
find_variable_coverage_misses | Paginated detail for audit_variable_coverage. |
audit_style_coverage | Find raw values that should be styles (summary). |
find_style_coverage_misses | Paginated detail for audit_style_coverage. |
find_unused_variables | List local variables that nothing references. |
find_unused_styles | List local Paint / Text / Effect styles that nothing references. |
analyze_component_usage | Summarise local/remote component instance usage by component selector. |
find_component_usages | Paginated list of component instances matching a component selector. |
analyze_component_prop_usage | Summarise instance component property usage by property/value filters. |
find_component_prop_usages | Paginated component property usage records. |
Mockups & Design DSL (7)
| Command | What it does |
|---|---|
inspect_design_system | READ-ONLY: aggregate components, variables, styles, token config, and composition index for design agents. |
validate_screen_spec | READ-ONLY: validate Design DSL v1 screen spec before writing to Figma. |
build_screen | Build a screen using Design DSL v1; Bridge wrapper over build_mockup with agent-friendly naming. |
update_screen | Update an existing screen/frame using Design DSL v1 without recreating the whole file. |
find_components | READ-ONLY: paginated catalogue of local + (opt) library components used in this file (id, key, name, parent set, defaultVariantId, propertyDefinitions). |
build_mockup | Assemble an auto-layout mockup from a declarative item tree (instance + section + spacer + text). Supports property / text / fill-binding overrides. Dry-run preview supported. |
apply_mockup_dataset | Clone a template scene node once per dataset row and apply row-specific overrides (properties, text, fill bindings). Dry-run preview supported. |
Orchestration, docs & meta (24)
| Command | What it does |
|---|---|
index_icons_for_export | Read-only icon index: COMPONENT + COMPONENT_SET variants with page/section metadata for export pipelines. |
generate_code_from_url | Parse Figma URL → run get_codegen on target node. |
compose_from_url | Parse Figma URL → export_composition_json → save as composition file → optional generate. |
document_component | Generate SXL documentation payload for a component and apply it. |
build_token_documentation | Doc Spec v1: resolve token paths and fill doc template TEXT by layer name. |
apply_doc_spec | Doc Spec v2 (canonical): apply a list of documentation sections to a Figma frame. |
bind_variable_palette | Doc Builder: render Figma variable collection as cards by cloning a swatch template. |
build_component_doc | Doc Builder: title + variants matrix + props table for a component / component set. |
build_doc_flow | Doc Builder: render multi-page flow / scenario in an auto-layout container. |
build_scenario_from_md | Parse markdown scenario into build_doc_flow pages. Dry-run preview supported. |
get_capability_matrix | Machine-readable Bridge capability matrix: catalogue metadata + command type + timeout. |
get_contract_audit | Bridge-local release contract audit: catalogue mapping, meta tools, recipes, schema entrypoints, workflow gates, and findings. |
get_bridge_plugin_parity_audit | Bridge-local Remote Connect parity audit: catalogue/MCP tools vs plugin whitelist, handlers, timeouts, destructive policy, and companion-only Figma MCP scope. |
get_figma_mcp_parity | Bridge-local parity map: official Figma MCP tools → Bridge/SXL equivalents, companion requirements, future/unsupported scope. |
get_figma_mcp_skills_parity | Bridge-local parity map: official Figma MCP skills → SXL Bridge recipes/resources, companion requirements, and agent-side implementation boundaries. |
get_performance_profile | Bridge-local performance profile: command budgets, large-data/dry-run policies, destructive-write warnings, and recent audit timings. |
get_bridge_audit_log | Bridge-local sanitized command audit log from memory or persisted disk JSONL. |
get_bridge_runtime_summary | Bridge-local runtime summary: plugin connection, queue pressure, recent events/audit failures, MCP URL, auth flag, and recommendations. |
get_operator_runbook | Bridge-local start-here operator runbook: common workflows, safety rules, preferred tools, dry-run gates, and Figma MCP companion handoff. |
get_ultimate_readiness | Bridge-local requirement-by-requirement readiness audit for the Ultimate Bridge Toolkit plan. |
list_tools | List all Bridge MCP tools with metadata. |
route_intent | Bridge-local natural-language router: user request → ranked SXL recipes, preferred tools, schema resources, and dry-run policy. |
plan_workflow | Bridge-local workflow planner: request/recipe → resources, expected tools, dry-run gates, approval gates, done criteria. |
preview_workflow | Bridge-local workflow validator: proposed tool sequence → findings for missing status/discovery/dry-run gates. |
Figma REST companion (16)
| Command | What it does |
|---|---|
figma_rest_diagnose | Figma REST companion preflight: token, auth mode, endpoint, scope, plan, and permission diagnostics without exposing secrets. |
figma_rest_whoami | Figma REST companion: authenticated user for configured token. |
figma_rest_get_file_metadata | Figma REST companion: file metadata from /v1/files/:key/meta. |
figma_rest_get_file | Figma REST companion: file JSON from /v1/files/:key; prefer depth/ids. |
figma_rest_get_file_nodes | Figma REST companion: specific nodes from /v1/files/:key/nodes. |
figma_rest_get_images | Figma REST companion: render node image URLs from /v1/images/:key. |
figma_rest_get_image_fills | Figma REST companion: image fill download URLs from /v1/files/:key/images. |
figma_rest_get_file_components | Figma REST companion: published components in a file library. |
figma_rest_get_file_component_sets | Figma REST companion: published component sets in a file library. |
figma_rest_get_file_styles | Figma REST companion: published styles in a file library. |
figma_rest_get_team_components | Figma REST companion: published components in a team library. |
figma_rest_get_team_component_sets | Figma REST companion: published component sets in a team library. |
figma_rest_get_team_styles | Figma REST companion: published styles in a team library. |
figma_rest_get_variables_local | Figma REST companion: local and remote variables used in a file. |
figma_rest_get_variables_published | Figma REST companion: variables published from a file. |
figma_rest_search_design_system | Figma REST companion: search known file/team library components, styles, and variables. |
Git Sync (3)
| Command | What it does |
|---|---|
git_pull | Pull from active Git connection. |
git_hard_pull | Hard pull (overwrite local). |
git_push | Push to active Git connection. |