Utilities

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):

InterfaceEndpoint (default)For
WebSocketws://127.0.0.1:37830Plugin Remote Connect iframe
MCP (Streamable HTTP)http://127.0.0.1:37830/mcpCursor / Claude Desktop / any MCP client
HTTP RESThttp://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:

  1. Install and run @sxl-studio/bridge.
  2. Open the Figma file and launch SXL Studio.
  3. Enable Remote Connect inside the plugin.
  4. 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)

BASH
npm install -g @sxl-studio/bridge
sxl-bridge

Update to the latest compatible version (1.8.9 for SXL Studio Plugin 2.8.1):

BASH
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-path1.8.0+ returns JSON with a root field.

Monorepo source

BASH
cd Utils/bridge
npm install
npm run build
npm start

By default, Bridge runs on port 37830.

BASH
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.

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:

BASH
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# or
openssl rand -hex 32

Start Bridge with the generated value:

BASH
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:

BASH
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:

JSON
{
  "scope": "selection",
  "sampleLimit": 20
}

Supported scopes are selection, currentPage, allPages, and node (nodeId is required for node).

The response includes:

  • availableFontsCount
  • requiredFonts
  • missingFamilies
  • loadFailures
  • textNodesBlocked
  • sampleNodeIds
  • affectedPages
  • requiredAction

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:

JSON
{
  "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:

JSON
{ "mcpServers": { "sxl-studio": { "url": "http://127.0.0.1:37830/mcp" } } }

Claude Desktopclaude_desktop_config.json (bridge the HTTP endpoint with mcp-remote):

JSON
{ "mcpServers": { "sxl-studio": { "command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:37830/mcp"] } } }

Codex CLI~/.codex/config.toml:

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:

BASH
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:

BASH
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:

  1. Check live state with get_bridge_runtime_summary or GET /api/runtime-summary.
  2. 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.
  3. For natural-language requests, call route_intent, then plan_workflow, then preview_workflow before write tools.
  4. For design creation, inspect the design system first with inspect_design_system; then run validate_screen_spec; then run build_screen or update_screen with dryRun: true; only then apply.
  5. For token export, run preview_export_variables before export_variables. Destructive export options require explicit confirmDestructive: 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.
  6. For documentation in Figma, use apply_doc_spec, build_component_doc, build_doc_flow, bind_variable_palette, or build_scenario_from_md. Do not hand-write composition JSON or ad hoc canvas scripts when a Bridge thick command exists.
  7. For large scans, request summaries first and use paginated detail tools only for the required subset.
  8. 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_TOKEN is configured, but REST reads do not replace Remote Connect for active canvas writes.
  • Git Sync Local Storage and /api/workspace-blob are part of the public Bridge contract. They must keep working without an active Remote Connect websocket session; if BRIDGE_AUTH_TOKEN is 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 intentAgent should start withThen use
"Draw/build a screen in Figma"route_intent, inspect_design_systemvalidate_screen_spec, build_screen dry-run, build_screen apply
"Update this existing screen"get_metadata or get_design_contextupdate_screen dry-run, then apply
"Create documentation in Figma"route_intent, sxl://agent/recipes/sxl-doc-builderapply_doc_spec, build_component_doc, build_doc_flow, build_scenario_from_md
"Export variables/styles"preview_export_variablesexport_variables with explicit options
"Find unbound raw values"audit_variable_coverage / audit_style_coveragefind_*_coverage_misses, then dry-run apply suggestions
"Analyze component usage or props"analyze_component_usage / analyze_component_prop_usagefind_component_usages / find_component_prop_usages
"Generate/apply compositions"compose_from_url or list_composition_filesbulk_generate_compositions, audit_composition_drift
"Map Figma components to code"get_context_for_code_connectget_code_connect_suggestions, generate_code_connect_template, codeconnect_save_binding
"Use datasets/assets/mappings"list_datasets, list_assets, list_mappingssave/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:

BASH
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:

BASH
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:

BASH
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:

BASH
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:

BASH
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:

BASH
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:

BASH
curl http://127.0.0.1:37830/api/ultimate-readiness

Local operators can run the same audit without a running Bridge server:

BASH
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:

BASH
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:

BASH
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:

BASH
# 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:

BASH
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:

BASH
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:

BASH
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_files
  • get_token_file_content
  • save_token_file
  • save_tokens_config
  • preview_export_variables
  • export_variables
  • get_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_json
  • generate_composition
  • apply_composition
  • bulk_generate_compositions
  • audit_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:

JSON
{
  "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-json
  • vue3
  • swiftui
  • kotlin
  • divkit (generic DivKit JSON card)

4) Design and documentation workflows

Bridge exposes SXL agent skill resources:

  • sxl://agent/operator-runbook
  • sxl://agent/recipes/sxl-use
  • sxl://agent/recipes/sxl-implement-design
  • sxl://agent/recipes/sxl-generate-design
  • sxl://agent/recipes/sxl-generate-library
  • sxl://agent/recipes/sxl-code-connect
  • sxl://agent/recipes/sxl-audit
  • sxl://agent/recipes/sxl-doc-builder
  • sxl://agent/recipes/sxl-data-apply-mapping
  • sxl://agent/recipes/sxl-data-apply-all
  • sxl://agent/recipes/sxl-data-generate-instances
  • sxl://agent/recipes/sxl-database-transfer
  • sxl://agent/recipes/figma-mcp-companion
  • sxl://agent/schemas/code-connect-context-v1
  • sxl://agent/schemas/code-connect-template-v1
  • sxl://agent/figma-mcp-parity
  • sxl://agent/figma-mcp-skills-parity
  • sxl://agent/performance-profile
  • sxl://agent/runtime-summary
  • sxl://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_pull
  • git_hard_pull
  • git_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.

CategoryTypical jobs
diagnosticsstatus, mode checks, selection summary, drift summary
tokenstoken file CRUD, config updates, variable/style export, binding reapply
compositioncomposition export/generate/apply/preview/link checks
codegendesigner-json/vue3/swiftui/kotlin/divkit outputs
variablescollection/mode/value/scopes/codeSyntax CRUD + batch ops
styleslocal style CRUD, assignment, import, drift checks
auditvariable/style usage coverage, component usage, prop analytics, unused assets, suggestion pipelines
mockupdesign-system inspection, screen validation/build/update, dataset-based generation
datadatasets, assets, mappings, variable/style definition orchestration, enabled-library search/read tools, Code Connect registry/bindings/suggestions
canvasnode reads/writes, design context, screenshot/SVG export, selection, page structure
gitpull/push operations through configured sync
  1. Start with read/audit calls.
  2. Run dry-run where available.
  3. Apply write actions after review.
  4. Keep token and composition JSON in git.
  5. Re-run audits after write operations.

Troubleshooting

Bridge is running, but no commands execute

  • Check Remote Connect in plugin is enabled.
  • Check .cursor/mcp.json URL and port.
  • If auth is enabled, check the MCP/HTTP Authorization header, the plugin Remote Connect overlay token, and the Sync connection Bridge Auth Token used by Local Storage.

Unauthorized / forbidden

  • Token mismatch in Authorization header, 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 PluginBridgeContract
2.8.11.8.9Truthful 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, and workflow:validate against 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:

GoalExample prompt
Export tokensExport my tokens to Figma variables and styles — preview first, then apply.
Build from URLGenerate the composition from this Figma URL <url> and apply it.
Audit raw valuesAudit this file for raw colors that should be variables and show the top offenders.
Clean upFind unused variables and styles in this file.
Build a screenBuild a login screen from my design system components.
Document a componentDocument the selected component: title, variants matrix, and props table.
Variable usageWhich nodes use the variable color.brand.primary? Show the usages.
Git round-tripPull 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)

CommandWhat it does
get_plugin_statusPlugin runtime status (editor, mode, selection, session).
is_dev_modeShortcut flag: true when figma.editorType === 'dev'.
get_selection_summarySummary of current Figma selection.
get_drift_statusDrift status across exported collections.
get_export_reportMost recent export report.

Tokens (19)

CommandWhat it does
list_token_filesIndex of token files (id, name, folder, gitPath).
get_token_file_contentRaw JSON body of a token file.
save_token_fileUpsert JSON content of a token file.
create_token_fileCreate a new token file.
delete_token_fileDelete a token file (queues gitPath removal if tracked).
move_token_fileRename/move a token file.
rename_token_fileRename a token file (alias of move_token_file).
get_tokens_configRead the plugin config.json content.
save_tokens_configOverwrite config.json.
get_applied_tokensApplied tokens + composition binding on a node.
apply_token_doc_specDoc Spec v1: bind token paths to TEXT layers by name (same as build_token_documentation).
preview_export_variablesREAD-ONLY preflight for export_variables: normalize exact settings payload, effective plugin-safe defaults, risks, and destructive confirmation requirement.
export_variablesRun variables/styles export with plugin-safe defaults unless flags are explicitly provided.
reset_diffReset all Diff-IDs.
reset_diff_collectionReset Diff-IDs for a collection.
reset_diff_fileReset Diff-IDs for a file.
reapply_token_bindingsRe-apply token bindings (scope: selection|page|document).
cross_file_sync_fetchFetch remote variables for cross-file sync.
cross_file_sync_applyApply cross-file sync entries.

Variables (25)

CommandWhat it does
get_variablesList local variable collections and variables.
get_variable_defsBridge orchestration for official-MCP-style variable/style definitions: selection-compatible applied token context plus local, enabled-library, or REST variable definition modes.
create_variable_collectionCreate a new variable collection.
create_variableCreate a new variable inside a collection.
bind_variableBind a variable to a node property.
rename_variableRename a variable.
delete_variableDelete a variable.
rename_variable_collectionRename a variable collection.
delete_variable_collectionDelete a variable collection.
add_variable_modeAdd a mode to a collection.
remove_variable_modeRemove a mode from a collection.
rename_variable_modeRename a mode.
set_variable_mode_valueSet variable value for a mode.
set_variable_scopesSet variable scopes.
set_variable_code_syntaxSet variable codeSyntax per platform.
batch_create_variablesCreate many variables in one collection with per-item errors.
batch_set_variable_valuesSet many variable mode values in one round-trip.
batch_delete_variablesDelete many variables with per-item errors.
batch_bind_variablesBind many nodes/properties to variables in one round-trip.
get_mode_contextRead SXL token mode preview context and mode inventory.
set_mode_preview_contextSet file-level SXL mode preview context.
apply_modes_to_selectionApply current SXL/native mode context to selected nodes.
apply_modes_to_parent_frameApply current SXL/native mode context to the nearest parent frame.
apply_modes_to_pageApply current SXL/native mode context to the current page.
clear_modes_from_selectionClear explicit modes from selected nodes.

Variables — bulk / orchestration (5)

CommandWhat it does
import_variable_specIdempotent bulk-create / update of Variables from a declarative spec (collections + modes + variables + aliases).
analyze_variable_orderREAD-ONLY: recommend a new order for variables in a collection (alphabetical / byPath / explicit).
dedupe_variablesFind / merge duplicate Variables (byName | byDefaultModeValue). Dry-run by default; canvas write only when apply: true.
rebind_variable_aliasesBulk rewrite alias targets across modes ({ fromVariableId, toVariableId }[]).
apply_coverage_suggestionsApply audit_variable_coverage suggestions as setBoundVariableFor* writes. Dry-run by default.

Styles (9)

CommandWhat it does
get_local_stylesList local paint/text/effect styles.
create_paint_styleCreate a local PaintStyle.
create_text_styleCreate a local TextStyle.
create_effect_styleCreate a local EffectStyle.
set_text_styleAssign a TextStyle to a node.
set_effect_styleAssign an EffectStyle to a node.
set_stroke_styleAssign a PaintStyle to a node stroke.
set_fill_styleAssign a PaintStyle to a node fill.
import_style_by_keyImport a published style by key.

Styles — bulk / orchestration (5)

CommandWhat it does
import_style_specIdempotent bulk-create / update of local Paint / Text / Effect styles from a declarative spec. Dry-run preview supported.
dedupe_stylesFind / merge duplicate styles (byName | bySignature). Dry-run by default; canvas write only when apply: true.
rebind_style_consumersBulk rewrite styleId on every consumer node ({ fromStyleId, toStyleId }[]). Dry-run aware.
audit_style_driftREAD-ONLY: detect drift between local Paint styles and same-named Variables / explicit expectations.
apply_style_coverage_suggestionsApply audit_style_coverage suggestions as setStyleId writes. Dry-run by default.

Compositions (12)

CommandWhat it does
export_composition_jsonSingle source of truth: composition JSON for a node.
get_codegenMirror Dev Mode Inspect→Code for any node.
get_codegen_settingsRead Dev Mode Codegen project settings from the current Figma file.
preview_codegen_settingsValidate Codegen settings without writing them.
save_codegen_settingsSave Dev Mode Codegen project settings after validation.
list_compositionsEnumerate composition files in workspace.
generate_compositionGenerate Figma component/set from composition JSON.
apply_compositionApply composition to an existing anchor.
preview_compositionPreview composition structure.
check_composition_linkedCheck if a composition is linked.
remap_composition_idRemap a composition id to a new anchor.
inspect_selectionInspect current selection.

Compositions — bulk (2)

CommandWhat it does
bulk_generate_compositionsBulk 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_driftREAD-ONLY drift detector between composition files and the Figma components they tracked (linked | unlinked | drift | missing).

Canvas & nodes (68)

CommandWhat it does
get_selectionCurrent selection with node ids.
set_selectionSelect nodes.
select_nodesSelect nodes (alias).
get_pagesList document pages.
set_current_pageChange current page.
get_node_infoBasic info about one node.
get_node_treeFull scene subtree.
get_node_reactionsRead normalized prototyping reactions from a node.
set_node_reactionsSet prototyping reactions on a node with diff preview.
clear_node_reactionsClear prototyping reactions from a node with diff preview.
audit_node_reactionsCompare expected reactions with live node reactions.
get_component_property_definitionsRead component property definitions for a component/set/instance.
set_instance_component_propertiesSet validated component property values on an instance/component.
audit_component_property_usageAudit instance component property values against definitions.
repair_component_property_valuesValidate and repair component property values with dry-run default.
get_page_structureSummary of current page structure.
get_design_contextBridge design-context orchestration: active-file SXL codegen/composition context, metadata, native variable/style definitions, optional screenshot, and optional Code Connect suggestions.
get_metadataBridge metadata orchestration: active-file selection/page/node tree metadata through plugin or file/node metadata through Figma REST.
read_node_propertiesRead canonical node properties.
find_nodesFind nodes by predicate.
list_componentsList local components.
list_available_fontsAvailable fonts (+ project text styles hint).
migration_font_preflightRead-only exact-font preflight before text migration/rebind workflows.
migration_text_variable_bindingsDry-run/apply TEXT range variable rebind/detach by explicit variable mappings.
migration_text_fill_bindingsDry-run/apply TEXT fill color variable rebind/detach by explicit variable mappings.
migration_explicit_modes_auditRead-only audit for page-level explicit variable modes that point to missing collections.
migration_clear_orphan_explicit_modesDry-run/apply best-effort clear for orphan page explicit variable modes; reports Figma API limits.
migration_replace_ghost_explicit_mode_pagesDry-run/apply clean PageNode replacement for missing explicit variable mode refs while preserving page children.
probe_motion_exportRead-only probe for Figma Motion runtime export support and Motion node metadata.
export_as_svgExport node(s) as SVG.
get_screenshotBridge screenshot/render orchestration: plugin inline SVG for active-file nodes or Figma REST image URLs for fileKey/nodeIds.
notifyFigma toast notification.
create_frameCreate a frame.
create_rectangleCreate a rectangle.
create_textCreate a text node.
create_ellipseCreate an ellipse.
create_lineCreate a line.
create_svg_nodeCreate a node from SVG string.
create_vectorCreate a vector node.
set_auto_layoutConfigure auto layout.
modify_nodeModify generic node properties.
set_node_textSet text on a text node.
set_node_propertySet arbitrary node property.
rename_nodeRename a node.
set_node_visibilityShow/hide node.
set_node_sizeResize a node.
set_node_fillSet solid fill.
set_node_fill_variableBind a variable as fill.
set_strokeSet stroke.
set_effectsSet effects array.
set_fillSet fills array.
set_image_fillSet image fill from bytes.
set_constraintsSet layout constraints.
style_text_rangeStyle a text range.
insert_dataInsert raw payload onto the page.
delete_nodeDelete one node.
delete_nodesDelete many nodes.
clone_nodeClone a node.
duplicate_subtreeDuplicate a subtree.
move_to_parentReparent a node.
create_componentCreate a component.
create_component_setCreate a component set.
create_component_instanceCreate an instance of a component.
detach_instanceDetach an instance.
import_component_by_keyImport a published component by key.
boolean_operationBoolean op on nodes.
flatten_nodesFlatten nodes.
apply_documentation_payloadApply SXL documentation payload.

Datasets, assets, mappings & Code Connect (36)

CommandWhat it does
list_datasetsList SXL datasets.
get_datasetGet one SXL dataset.
save_datasetCreate/update one SXL dataset.
delete_datasetDelete one SXL dataset.
list_assetsList SXL local assets.
get_assetGet one SXL asset; optional content.
save_assetCreate/update one SXL asset.
delete_assetDelete one SXL asset.
list_mappingsList SXL mappings.
get_mappingGet one SXL mapping.
save_mappingCreate/update one SXL mapping.
delete_mappingDelete one SXL mapping.
export_database_payloadBridge orchestration: export portable SXL datasets/assets/mappings payload via existing CRUD commands.
import_database_payloadBridge orchestration: dry-run-first import/upsert of portable SXL database payloads.
apply_mappingApply a mapping to explicit targetNodeIds or the current Figma selection. Dry-run preview supported.
apply_all_mappingsApply all mappings within a scope or explicit targetNodeIds. Dry-run preview supported.
count_apply_targetsCount mapping targets.
generate_instancesGenerate instances from mapping into explicit targetNodeIds or the current selection. Dry-run preview supported.
apply_imageApply an image asset.
upload_assetsBridge 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_instanceRebind an instance to a new main.
codeconnect_get_bindingGet Code Connect binding for node.
codeconnect_save_bindingSave Code Connect binding.
codeconnect_get_selection_statusCode Connect status for selection.
codeconnect_get_registryCode Connect registry snapshot.
codeconnect_get_global_settingsGlobal Code Connect settings.
codeconnect_save_global_settingsSave global Code Connect settings.
codeconnect_get_node_ui_statusCode Connect node UI status.
get_context_for_code_connectBridge 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_suggestionsBridge-local Code Connect suggestion engine: scan local code and rank full CodeConnectBinding candidates for selected Figma nodes before saving.
generate_code_connect_templateBridge-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_librariesREAD-ONLY: inspect team libraries already enabled for the current Figma file (variable collections and runtime-optional component/style descriptors).
list_enabled_library_variablesREAD-ONLY: list variables from enabled team-library variable collections; requires an explicit collection/library filter or includeAllCollections=true.
search_enabled_library_assetsBridge orchestration: search components, styles, variable collections, and variables in libraries already enabled for the current Figma file.
get_librariesFigma MCP-compatible library discovery: active-file enabled libraries through Remote Connect plus known file/team libraries through Figma REST.
search_design_systemFigma MCP-compatible design-system search across active-file components, enabled libraries, and known file/team REST libraries.

Audit & analytics (13)

CommandWhat it does
analyze_variable_usageSummarise where a variable is used (counts, byProperty, aliasChain). Read-only.
find_variable_usagesPaginated detail list of nodes using a variable.
render_variable_usage_pageClone every usage of a variable into a fresh page.
audit_variable_coverageFind raw values that should be variables (summary + topOffenders).
find_variable_coverage_missesPaginated detail for audit_variable_coverage.
audit_style_coverageFind raw values that should be styles (summary).
find_style_coverage_missesPaginated detail for audit_style_coverage.
find_unused_variablesList local variables that nothing references.
find_unused_stylesList local Paint / Text / Effect styles that nothing references.
analyze_component_usageSummarise local/remote component instance usage by component selector.
find_component_usagesPaginated list of component instances matching a component selector.
analyze_component_prop_usageSummarise instance component property usage by property/value filters.
find_component_prop_usagesPaginated component property usage records.

Mockups & Design DSL (7)

CommandWhat it does
inspect_design_systemREAD-ONLY: aggregate components, variables, styles, token config, and composition index for design agents.
validate_screen_specREAD-ONLY: validate Design DSL v1 screen spec before writing to Figma.
build_screenBuild a screen using Design DSL v1; Bridge wrapper over build_mockup with agent-friendly naming.
update_screenUpdate an existing screen/frame using Design DSL v1 without recreating the whole file.
find_componentsREAD-ONLY: paginated catalogue of local + (opt) library components used in this file (id, key, name, parent set, defaultVariantId, propertyDefinitions).
build_mockupAssemble 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_datasetClone 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)

CommandWhat it does
index_icons_for_exportRead-only icon index: COMPONENT + COMPONENT_SET variants with page/section metadata for export pipelines.
generate_code_from_urlParse Figma URL → run get_codegen on target node.
compose_from_urlParse Figma URL → export_composition_json → save as composition file → optional generate.
document_componentGenerate SXL documentation payload for a component and apply it.
build_token_documentationDoc Spec v1: resolve token paths and fill doc template TEXT by layer name.
apply_doc_specDoc Spec v2 (canonical): apply a list of documentation sections to a Figma frame.
bind_variable_paletteDoc Builder: render Figma variable collection as cards by cloning a swatch template.
build_component_docDoc Builder: title + variants matrix + props table for a component / component set.
build_doc_flowDoc Builder: render multi-page flow / scenario in an auto-layout container.
build_scenario_from_mdParse markdown scenario into build_doc_flow pages. Dry-run preview supported.
get_capability_matrixMachine-readable Bridge capability matrix: catalogue metadata + command type + timeout.
get_contract_auditBridge-local release contract audit: catalogue mapping, meta tools, recipes, schema entrypoints, workflow gates, and findings.
get_bridge_plugin_parity_auditBridge-local Remote Connect parity audit: catalogue/MCP tools vs plugin whitelist, handlers, timeouts, destructive policy, and companion-only Figma MCP scope.
get_figma_mcp_parityBridge-local parity map: official Figma MCP tools → Bridge/SXL equivalents, companion requirements, future/unsupported scope.
get_figma_mcp_skills_parityBridge-local parity map: official Figma MCP skills → SXL Bridge recipes/resources, companion requirements, and agent-side implementation boundaries.
get_performance_profileBridge-local performance profile: command budgets, large-data/dry-run policies, destructive-write warnings, and recent audit timings.
get_bridge_audit_logBridge-local sanitized command audit log from memory or persisted disk JSONL.
get_bridge_runtime_summaryBridge-local runtime summary: plugin connection, queue pressure, recent events/audit failures, MCP URL, auth flag, and recommendations.
get_operator_runbookBridge-local start-here operator runbook: common workflows, safety rules, preferred tools, dry-run gates, and Figma MCP companion handoff.
get_ultimate_readinessBridge-local requirement-by-requirement readiness audit for the Ultimate Bridge Toolkit plan.
list_toolsList all Bridge MCP tools with metadata.
route_intentBridge-local natural-language router: user request → ranked SXL recipes, preferred tools, schema resources, and dry-run policy.
plan_workflowBridge-local workflow planner: request/recipe → resources, expected tools, dry-run gates, approval gates, done criteria.
preview_workflowBridge-local workflow validator: proposed tool sequence → findings for missing status/discovery/dry-run gates.

Figma REST companion (16)

CommandWhat it does
figma_rest_diagnoseFigma REST companion preflight: token, auth mode, endpoint, scope, plan, and permission diagnostics without exposing secrets.
figma_rest_whoamiFigma REST companion: authenticated user for configured token.
figma_rest_get_file_metadataFigma REST companion: file metadata from /v1/files/:key/meta.
figma_rest_get_fileFigma REST companion: file JSON from /v1/files/:key; prefer depth/ids.
figma_rest_get_file_nodesFigma REST companion: specific nodes from /v1/files/:key/nodes.
figma_rest_get_imagesFigma REST companion: render node image URLs from /v1/images/:key.
figma_rest_get_image_fillsFigma REST companion: image fill download URLs from /v1/files/:key/images.
figma_rest_get_file_componentsFigma REST companion: published components in a file library.
figma_rest_get_file_component_setsFigma REST companion: published component sets in a file library.
figma_rest_get_file_stylesFigma REST companion: published styles in a file library.
figma_rest_get_team_componentsFigma REST companion: published components in a team library.
figma_rest_get_team_component_setsFigma REST companion: published component sets in a team library.
figma_rest_get_team_stylesFigma REST companion: published styles in a team library.
figma_rest_get_variables_localFigma REST companion: local and remote variables used in a file.
figma_rest_get_variables_publishedFigma REST companion: variables published from a file.
figma_rest_search_design_systemFigma REST companion: search known file/team library components, styles, and variables.

Git Sync (3)

CommandWhat it does
git_pullPull from active Git connection.
git_hard_pullHard pull (overwrite local).
git_pushPush to active Git connection.