Bridge
SXL Studio Bridge: how to install and run the local program that links the plugin in Figma with AI tools and scripts, connect the plugin through Remote Connect, configure an MCP client, what an agent can do and how to fix typical problems.
SXL Studio Bridge is a small program that runs on your computer and links the running SXL Studio plugin with external tools: Cursor, Claude Desktop and other MCP clients, as well as scripts. Through it an AI agent can read and change tokens, variables, styles, compositions and data in the open Figma file. The same program serves Local Workspace and Local Storage.
| What Bridge gives you | Example |
|---|---|
| Working with tokens from an AI tool | "Add the token color/brand/600 and export the Core collection to Figma" |
| Building and checking designs | "Generate the Card composition and check for drift against the JSON" |
| Documentation in Figma | "Build a page with the palette of the Projects collection" |
| Audits | "Find layers with raw colours instead of variables on this page" |
| Data and Git | "Update the data set and push the changes to the branch" |
Requirements
| Component | Version |
|---|---|
| SXL Studio plugin | 2.9.2 |
Bridge (@sxl-studio/bridge) | 1.10.0 |
| Node.js | 20 or newer |
Bridge listens only on the local address 127.0.0.1: it cannot be reached from another computer.
Install and run
npm install -g @sxl-studio/bridge
sxl-bridge
Bridge takes one port, 37830 by default. The plugin connection, the MCP address http://127.0.0.1:37830/mcp and HTTP requests to http://127.0.0.1:37830/api/... all use it. If the port is busy, set another one with an environment variable:
BRIDGE_PORT=39999 sxl-bridge
The same port then has to be set in the plugin and in the MCP client settings.
To check that the program is running:
sxl-bridge health
Connecting the plugin: Remote Connect
- Start Bridge and open the plugin in a Figma file in Design mode.
- In the plugin footer press the Remote Connect button. The plugin collapses into a compact bar with the connection state.
- Expand the bar with the arrows button to open the connection window: it has the Port field, the Token field for the protected mode and the Allow destructive commands toggle.
- The state Connected — Waiting for commands means the agent can send commands.

The compact Remote Connect bar in the plugin footer: the connection state, Disconnect and the expand button.

The Remote Connect window: port, token, session and client identifiers, the Allow destructive commands toggle.
While the connection is active the plugin tabs are hidden. Press Disconnect to get the usual interface back. The plugin remembers the port between sessions.
Destructive commands
Deleting layers, variables and collections, resetting synchronization identifiers and hard pull are blocked by default. To allow them, turn on Allow destructive commands in the Remote Connect window. The permission lasts until you disconnect. Even with the toggle on, the agent has to confirm every destructive command explicitly.
Token export can be previewed with preview_export_variables before export_variables. Sort arranges styles and style folders without changing their IDs; existing collections, modes and variables cannot be reordered through Figma’s public API. The old allowDestructiveReorder option is ignored by these MCP tools. Deleting orphaned objects remains a separate destructive action. See Export variables and styles.
Protected mode
If Bridge is started with the BRIDGE_AUTH_TOKEN variable, every connection must present the same token: enter it in the Token field of the Remote Connect window, in the Local Storage connection form and in the MCP client settings.
BRIDGE_AUTH_TOKEN=my-secret sxl-bridge
Connecting an AI tool
Bridge speaks the MCP protocol. For Cursor add this to .cursor/mcp.json:
{
"mcpServers": {
"sxl-studio": {
"url": "http://127.0.0.1:37830/mcp"
}
}
}
Other MCP clients connect to the same address. Start Bridge before opening the chat with the agent, otherwise the tools do not appear in the list. The first things worth asking the agent: call get_operator_runbook, which describes where to start, and get_plugin_status, which shows whether Bridge sees the plugin.
What the agent can do
| Area | Example tools |
|---|---|
| Tokens and files | list_token_files, get_token_file_content, save_token_file, export_variables |
| Variables and styles | get_variables, create_variable, bind_variable, import_variable_spec, get_local_styles, import_style_spec |
| Compositions and screens | list_compositions, generate_composition, apply_composition, build_screen, build_mockup |
| Documentation in Figma | build_token_documentation, bind_variable_palette, build_component_doc, build_doc_flow |
| Audits | analyze_variable_usage, audit_variable_coverage, audit_style_coverage, audit_composition_drift |
| Database data | list_datasets, save_dataset, save_mapping, apply_mapping, generate_instances |
| Git | git_pull, git_push, git_hard_pull |
| Code | get_codegen, export_composition_json |
Bridge itself returns the full list: the list_tools tool or the address http://127.0.0.1:37830/api/tools.
Preview and audit tools change nothing. Write tools accept dryRun: true for a check without changes. Bridge shortens large responses to a summary; the full version can be requested separately.
Bridge and Figma modes
| Where the plugin is open | Reading | Canvas changes | Tokens, settings, Git |
|---|---|---|---|
| Design | Yes | Yes | Yes |
| Dev Mode, plugin window | Yes | No, the plugin returns an error | Yes |
| Dev Mode, Code panel | Code generation only | No | No |
Local Workspace
Bridge reads and writes token and data files in a folder on disk for the Local Workspace mode and stores large Local Storage files for Git connections. Remote Connect is not needed for that: a running Bridge and an active profile in the synchronization settings are enough. The port and token are set on the Local Workspace tab of the Synchronization settings window. More: Local Workspace and Local Storage.
If something does not work
| What happened | What to do |
|---|---|
The agent gets "Failed to send to plugin" or PLUGIN_NOT_CONNECTED | The plugin is not connected. Open the plugin in Design mode and press Remote Connect |
Bridge prints EADDRINUSE on start | The port is busy. Start with BRIDGE_PORT=<another port> and set it in the plugin and the MCP client |
| Tools do not appear in the chat | Bridge was started after the chat was opened. Restart the chat or the client |
| Authorization error | The token in the plugin or the client does not match BRIDGE_AUTH_TOKEN |
| A delete command is rejected | Turn on Allow destructive commands in the Remote Connect window and repeat with confirmation |
| The plugin replies that the editor is read-only | The file is open in Dev Mode. Switch to Design for canvas changes |
| Local Workspace does not see the folder | Check that Bridge runs on the port from the profile settings and press Test on the Local Workspace tab |