@obra-studio/figma-console-mcp 1.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +879 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.js +278 -0
- package/dist/apps/design-system-dashboard/scoring/accessibility.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts +29 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.js +358 -0
- package/dist/apps/design-system-dashboard/scoring/component-metadata.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.js +342 -0
- package/dist/apps/design-system-dashboard/scoring/consistency.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.js +231 -0
- package/dist/apps/design-system-dashboard/scoring/coverage.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/engine.d.ts +27 -0
- package/dist/apps/design-system-dashboard/scoring/engine.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/engine.js +93 -0
- package/dist/apps/design-system-dashboard/scoring/engine.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.js +309 -0
- package/dist/apps/design-system-dashboard/scoring/naming-semantics.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts +14 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js +350 -0
- package/dist/apps/design-system-dashboard/scoring/token-architecture.js.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/types.d.ts +89 -0
- package/dist/apps/design-system-dashboard/scoring/types.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/scoring/types.js +41 -0
- package/dist/apps/design-system-dashboard/scoring/types.js.map +1 -0
- package/dist/apps/design-system-dashboard/server.d.ts +24 -0
- package/dist/apps/design-system-dashboard/server.d.ts.map +1 -0
- package/dist/apps/design-system-dashboard/server.js +160 -0
- package/dist/apps/design-system-dashboard/server.js.map +1 -0
- package/dist/apps/token-browser/server.d.ts +26 -0
- package/dist/apps/token-browser/server.d.ts.map +1 -0
- package/dist/apps/token-browser/server.js +137 -0
- package/dist/apps/token-browser/server.js.map +1 -0
- package/dist/browser/base.d.ts +58 -0
- package/dist/browser/base.d.ts.map +1 -0
- package/dist/browser/base.js +6 -0
- package/dist/browser/base.js.map +1 -0
- package/dist/browser/local.d.ts +87 -0
- package/dist/browser/local.d.ts.map +1 -0
- package/dist/browser/local.js +318 -0
- package/dist/browser/local.js.map +1 -0
- package/dist/core/accessibility-tools.d.ts +21 -0
- package/dist/core/accessibility-tools.d.ts.map +1 -0
- package/dist/core/accessibility-tools.js +307 -0
- package/dist/core/accessibility-tools.js.map +1 -0
- package/dist/core/annotation-tools.d.ts +14 -0
- package/dist/core/annotation-tools.d.ts.map +1 -0
- package/dist/core/annotation-tools.js +231 -0
- package/dist/core/annotation-tools.js.map +1 -0
- package/dist/core/autodocs-tools.d.ts +7 -0
- package/dist/core/autodocs-tools.d.ts.map +1 -0
- package/dist/core/autodocs-tools.js +195 -0
- package/dist/core/autodocs-tools.js.map +1 -0
- package/dist/core/comment-tools.d.ts +11 -0
- package/dist/core/comment-tools.d.ts.map +1 -0
- package/dist/core/comment-tools.js +293 -0
- package/dist/core/comment-tools.js.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +154 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/console-monitor.d.ts +82 -0
- package/dist/core/console-monitor.d.ts.map +1 -0
- package/dist/core/console-monitor.js +428 -0
- package/dist/core/console-monitor.js.map +1 -0
- package/dist/core/deep-component-tools.d.ts +14 -0
- package/dist/core/deep-component-tools.d.ts.map +1 -0
- package/dist/core/deep-component-tools.js +129 -0
- package/dist/core/deep-component-tools.js.map +1 -0
- package/dist/core/design-code-tools.d.ts +116 -0
- package/dist/core/design-code-tools.d.ts.map +1 -0
- package/dist/core/design-code-tools.js +2751 -0
- package/dist/core/design-code-tools.js.map +1 -0
- package/dist/core/design-system-manifest.d.ts +272 -0
- package/dist/core/design-system-manifest.d.ts.map +1 -0
- package/dist/core/design-system-manifest.js +261 -0
- package/dist/core/design-system-manifest.js.map +1 -0
- package/dist/core/design-system-tools.d.ts +67 -0
- package/dist/core/design-system-tools.d.ts.map +1 -0
- package/dist/core/design-system-tools.js +874 -0
- package/dist/core/design-system-tools.js.map +1 -0
- package/dist/core/diagnose-tool.d.ts +33 -0
- package/dist/core/diagnose-tool.d.ts.map +1 -0
- package/dist/core/diagnose-tool.js +97 -0
- package/dist/core/diagnose-tool.js.map +1 -0
- package/dist/core/diff/changelog-formatter.d.ts +35 -0
- package/dist/core/diff/changelog-formatter.d.ts.map +1 -0
- package/dist/core/diff/changelog-formatter.js +276 -0
- package/dist/core/diff/changelog-formatter.js.map +1 -0
- package/dist/core/diff/diff-engine.d.ts +127 -0
- package/dist/core/diff/diff-engine.d.ts.map +1 -0
- package/dist/core/diff/diff-engine.js +335 -0
- package/dist/core/diff/diff-engine.js.map +1 -0
- package/dist/core/diff/property-compare.d.ts +19 -0
- package/dist/core/diff/property-compare.d.ts.map +1 -0
- package/dist/core/diff/property-compare.js +37 -0
- package/dist/core/diff/property-compare.js.map +1 -0
- package/dist/core/diff/version-cache.d.ts +40 -0
- package/dist/core/diff/version-cache.d.ts.map +1 -0
- package/dist/core/diff/version-cache.js +75 -0
- package/dist/core/diff/version-cache.js.map +1 -0
- package/dist/core/enrichment/enrichment-service.d.ts +52 -0
- package/dist/core/enrichment/enrichment-service.d.ts.map +1 -0
- package/dist/core/enrichment/enrichment-service.js +369 -0
- package/dist/core/enrichment/enrichment-service.js.map +1 -0
- package/dist/core/enrichment/index.d.ts +8 -0
- package/dist/core/enrichment/index.d.ts.map +1 -0
- package/dist/core/enrichment/index.js +8 -0
- package/dist/core/enrichment/index.js.map +1 -0
- package/dist/core/enrichment/relationship-mapper.d.ts +106 -0
- package/dist/core/enrichment/relationship-mapper.d.ts.map +1 -0
- package/dist/core/enrichment/relationship-mapper.js +352 -0
- package/dist/core/enrichment/relationship-mapper.js.map +1 -0
- package/dist/core/enrichment/style-resolver.d.ts +80 -0
- package/dist/core/enrichment/style-resolver.d.ts.map +1 -0
- package/dist/core/enrichment/style-resolver.js +327 -0
- package/dist/core/enrichment/style-resolver.js.map +1 -0
- package/dist/core/figjam-tools.d.ts +8 -0
- package/dist/core/figjam-tools.d.ts.map +1 -0
- package/dist/core/figjam-tools.js +548 -0
- package/dist/core/figjam-tools.js.map +1 -0
- package/dist/core/figma-api.d.ts +245 -0
- package/dist/core/figma-api.d.ts.map +1 -0
- package/dist/core/figma-api.js +446 -0
- package/dist/core/figma-api.js.map +1 -0
- package/dist/core/figma-connector.d.ts +180 -0
- package/dist/core/figma-connector.d.ts.map +1 -0
- package/dist/core/figma-connector.js +8 -0
- package/dist/core/figma-connector.js.map +1 -0
- package/dist/core/figma-desktop-connector.d.ts +312 -0
- package/dist/core/figma-desktop-connector.d.ts.map +1 -0
- package/dist/core/figma-desktop-connector.js +1298 -0
- package/dist/core/figma-desktop-connector.js.map +1 -0
- package/dist/core/figma-reconstruction-spec.d.ts +166 -0
- package/dist/core/figma-reconstruction-spec.d.ts.map +1 -0
- package/dist/core/figma-reconstruction-spec.js +403 -0
- package/dist/core/figma-reconstruction-spec.js.map +1 -0
- package/dist/core/figma-style-extractor.d.ts +76 -0
- package/dist/core/figma-style-extractor.d.ts.map +1 -0
- package/dist/core/figma-style-extractor.js +312 -0
- package/dist/core/figma-style-extractor.js.map +1 -0
- package/dist/core/figma-tools.d.ts +22 -0
- package/dist/core/figma-tools.d.ts.map +1 -0
- package/dist/core/figma-tools.js +3187 -0
- package/dist/core/figma-tools.js.map +1 -0
- package/dist/core/identity.d.ts +41 -0
- package/dist/core/identity.d.ts.map +1 -0
- package/dist/core/identity.js +97 -0
- package/dist/core/identity.js.map +1 -0
- package/dist/core/library-tools.d.ts +17 -0
- package/dist/core/library-tools.d.ts.map +1 -0
- package/dist/core/library-tools.js +581 -0
- package/dist/core/library-tools.js.map +1 -0
- package/dist/core/logger.d.ts +22 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +54 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/port-discovery.d.ts +171 -0
- package/dist/core/port-discovery.d.ts.map +1 -0
- package/dist/core/port-discovery.js +563 -0
- package/dist/core/port-discovery.js.map +1 -0
- package/dist/core/resolve-package-root.d.ts +2 -0
- package/dist/core/resolve-package-root.d.ts.map +1 -0
- package/dist/core/resolve-package-root.js +12 -0
- package/dist/core/resolve-package-root.js.map +1 -0
- package/dist/core/slides-tools.d.ts +8 -0
- package/dist/core/slides-tools.d.ts.map +1 -0
- package/dist/core/slides-tools.js +715 -0
- package/dist/core/slides-tools.js.map +1 -0
- package/dist/core/snippet-injector.d.ts +24 -0
- package/dist/core/snippet-injector.d.ts.map +1 -0
- package/dist/core/snippet-injector.js +97 -0
- package/dist/core/snippet-injector.js.map +1 -0
- package/dist/core/tokens/alias-resolver.d.ts +55 -0
- package/dist/core/tokens/alias-resolver.d.ts.map +1 -0
- package/dist/core/tokens/alias-resolver.js +136 -0
- package/dist/core/tokens/alias-resolver.js.map +1 -0
- package/dist/core/tokens/config.d.ts +87 -0
- package/dist/core/tokens/config.d.ts.map +1 -0
- package/dist/core/tokens/config.js +285 -0
- package/dist/core/tokens/config.js.map +1 -0
- package/dist/core/tokens/figma-converter.d.ts +81 -0
- package/dist/core/tokens/figma-converter.d.ts.map +1 -0
- package/dist/core/tokens/figma-converter.js +196 -0
- package/dist/core/tokens/figma-converter.js.map +1 -0
- package/dist/core/tokens/formatters/css-vars.d.ts +24 -0
- package/dist/core/tokens/formatters/css-vars.d.ts.map +1 -0
- package/dist/core/tokens/formatters/css-vars.js +330 -0
- package/dist/core/tokens/formatters/css-vars.js.map +1 -0
- package/dist/core/tokens/formatters/dtcg.d.ts +28 -0
- package/dist/core/tokens/formatters/dtcg.d.ts.map +1 -0
- package/dist/core/tokens/formatters/dtcg.js +301 -0
- package/dist/core/tokens/formatters/dtcg.js.map +1 -0
- package/dist/core/tokens/formatters/index.d.ts +30 -0
- package/dist/core/tokens/formatters/index.d.ts.map +1 -0
- package/dist/core/tokens/formatters/index.js +46 -0
- package/dist/core/tokens/formatters/index.js.map +1 -0
- package/dist/core/tokens/formatters/json.d.ts +37 -0
- package/dist/core/tokens/formatters/json.d.ts.map +1 -0
- package/dist/core/tokens/formatters/json.js +188 -0
- package/dist/core/tokens/formatters/json.js.map +1 -0
- package/dist/core/tokens/formatters/less.d.ts +4 -0
- package/dist/core/tokens/formatters/less.d.ts.map +1 -0
- package/dist/core/tokens/formatters/less.js +5 -0
- package/dist/core/tokens/formatters/less.js.map +1 -0
- package/dist/core/tokens/formatters/scss.d.ts +26 -0
- package/dist/core/tokens/formatters/scss.d.ts.map +1 -0
- package/dist/core/tokens/formatters/scss.js +253 -0
- package/dist/core/tokens/formatters/scss.js.map +1 -0
- package/dist/core/tokens/formatters/stubs.d.ts +9 -0
- package/dist/core/tokens/formatters/stubs.d.ts.map +1 -0
- package/dist/core/tokens/formatters/stubs.js +14 -0
- package/dist/core/tokens/formatters/stubs.js.map +1 -0
- package/dist/core/tokens/formatters/style-dictionary-v3.d.ts +45 -0
- package/dist/core/tokens/formatters/style-dictionary-v3.d.ts.map +1 -0
- package/dist/core/tokens/formatters/style-dictionary-v3.js +208 -0
- package/dist/core/tokens/formatters/style-dictionary-v3.js.map +1 -0
- package/dist/core/tokens/formatters/tailwind-v3.d.ts +37 -0
- package/dist/core/tokens/formatters/tailwind-v3.d.ts.map +1 -0
- package/dist/core/tokens/formatters/tailwind-v3.js +238 -0
- package/dist/core/tokens/formatters/tailwind-v3.js.map +1 -0
- package/dist/core/tokens/formatters/tailwind-v4.d.ts +41 -0
- package/dist/core/tokens/formatters/tailwind-v4.d.ts.map +1 -0
- package/dist/core/tokens/formatters/tailwind-v4.js +331 -0
- package/dist/core/tokens/formatters/tailwind-v4.js.map +1 -0
- package/dist/core/tokens/formatters/tokens-studio.d.ts +44 -0
- package/dist/core/tokens/formatters/tokens-studio.d.ts.map +1 -0
- package/dist/core/tokens/formatters/tokens-studio.js +251 -0
- package/dist/core/tokens/formatters/tokens-studio.js.map +1 -0
- package/dist/core/tokens/formatters/ts-module.d.ts +35 -0
- package/dist/core/tokens/formatters/ts-module.d.ts.map +1 -0
- package/dist/core/tokens/formatters/ts-module.js +199 -0
- package/dist/core/tokens/formatters/ts-module.js.map +1 -0
- package/dist/core/tokens/index.d.ts +17 -0
- package/dist/core/tokens/index.d.ts.map +1 -0
- package/dist/core/tokens/index.js +16 -0
- package/dist/core/tokens/index.js.map +1 -0
- package/dist/core/tokens/parsers/css-vars.d.ts +3 -0
- package/dist/core/tokens/parsers/css-vars.d.ts.map +1 -0
- package/dist/core/tokens/parsers/css-vars.js +5 -0
- package/dist/core/tokens/parsers/css-vars.js.map +1 -0
- package/dist/core/tokens/parsers/dtcg.d.ts +21 -0
- package/dist/core/tokens/parsers/dtcg.d.ts.map +1 -0
- package/dist/core/tokens/parsers/dtcg.js +254 -0
- package/dist/core/tokens/parsers/dtcg.js.map +1 -0
- package/dist/core/tokens/parsers/index.d.ts +37 -0
- package/dist/core/tokens/parsers/index.d.ts.map +1 -0
- package/dist/core/tokens/parsers/index.js +139 -0
- package/dist/core/tokens/parsers/index.js.map +1 -0
- package/dist/core/tokens/parsers/json.d.ts +4 -0
- package/dist/core/tokens/parsers/json.d.ts.map +1 -0
- package/dist/core/tokens/parsers/json.js +8 -0
- package/dist/core/tokens/parsers/json.js.map +1 -0
- package/dist/core/tokens/parsers/scss.d.ts +3 -0
- package/dist/core/tokens/parsers/scss.d.ts.map +1 -0
- package/dist/core/tokens/parsers/scss.js +5 -0
- package/dist/core/tokens/parsers/scss.js.map +1 -0
- package/dist/core/tokens/parsers/stubs.d.ts +15 -0
- package/dist/core/tokens/parsers/stubs.d.ts.map +1 -0
- package/dist/core/tokens/parsers/stubs.js +21 -0
- package/dist/core/tokens/parsers/stubs.js.map +1 -0
- package/dist/core/tokens/parsers/style-dictionary-v3.d.ts +3 -0
- package/dist/core/tokens/parsers/style-dictionary-v3.d.ts.map +1 -0
- package/dist/core/tokens/parsers/style-dictionary-v3.js +5 -0
- package/dist/core/tokens/parsers/style-dictionary-v3.js.map +1 -0
- package/dist/core/tokens/parsers/tailwind-v3.d.ts +3 -0
- package/dist/core/tokens/parsers/tailwind-v3.d.ts.map +1 -0
- package/dist/core/tokens/parsers/tailwind-v3.js +5 -0
- package/dist/core/tokens/parsers/tailwind-v3.js.map +1 -0
- package/dist/core/tokens/parsers/tailwind-v4.d.ts +3 -0
- package/dist/core/tokens/parsers/tailwind-v4.d.ts.map +1 -0
- package/dist/core/tokens/parsers/tailwind-v4.js +5 -0
- package/dist/core/tokens/parsers/tailwind-v4.js.map +1 -0
- package/dist/core/tokens/parsers/tokens-studio.d.ts +3 -0
- package/dist/core/tokens/parsers/tokens-studio.d.ts.map +1 -0
- package/dist/core/tokens/parsers/tokens-studio.js +5 -0
- package/dist/core/tokens/parsers/tokens-studio.js.map +1 -0
- package/dist/core/tokens/schemas.d.ts +31 -0
- package/dist/core/tokens/schemas.d.ts.map +1 -0
- package/dist/core/tokens/schemas.js +149 -0
- package/dist/core/tokens/schemas.js.map +1 -0
- package/dist/core/tokens/transforms/color.d.ts +9 -0
- package/dist/core/tokens/transforms/color.d.ts.map +1 -0
- package/dist/core/tokens/transforms/color.js +13 -0
- package/dist/core/tokens/transforms/color.js.map +1 -0
- package/dist/core/tokens/transforms/index.d.ts +36 -0
- package/dist/core/tokens/transforms/index.d.ts.map +1 -0
- package/dist/core/tokens/transforms/index.js +30 -0
- package/dist/core/tokens/transforms/index.js.map +1 -0
- package/dist/core/tokens/transforms/size.d.ts +7 -0
- package/dist/core/tokens/transforms/size.d.ts.map +1 -0
- package/dist/core/tokens/transforms/size.js +8 -0
- package/dist/core/tokens/transforms/size.js.map +1 -0
- package/dist/core/tokens/types.d.ts +228 -0
- package/dist/core/tokens/types.d.ts.map +1 -0
- package/dist/core/tokens/types.js +19 -0
- package/dist/core/tokens/types.js.map +1 -0
- package/dist/core/tokens-tools.d.ts +42 -0
- package/dist/core/tokens-tools.d.ts.map +1 -0
- package/dist/core/tokens-tools.js +860 -0
- package/dist/core/tokens-tools.js.map +1 -0
- package/dist/core/types/design-code.d.ts +271 -0
- package/dist/core/types/design-code.d.ts.map +1 -0
- package/dist/core/types/design-code.js +5 -0
- package/dist/core/types/design-code.js.map +1 -0
- package/dist/core/types/enriched.d.ts +213 -0
- package/dist/core/types/enriched.d.ts.map +1 -0
- package/dist/core/types/enriched.js +6 -0
- package/dist/core/types/enriched.js.map +1 -0
- package/dist/core/types/index.d.ts +104 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +5 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/core/variable-resolver.d.ts +45 -0
- package/dist/core/variable-resolver.d.ts.map +1 -0
- package/dist/core/variable-resolver.js +86 -0
- package/dist/core/variable-resolver.js.map +1 -0
- package/dist/core/version-tools.d.ts +59 -0
- package/dist/core/version-tools.d.ts.map +1 -0
- package/dist/core/version-tools.js +1159 -0
- package/dist/core/version-tools.js.map +1 -0
- package/dist/core/websocket-connector.d.ts +187 -0
- package/dist/core/websocket-connector.d.ts.map +1 -0
- package/dist/core/websocket-connector.js +378 -0
- package/dist/core/websocket-connector.js.map +1 -0
- package/dist/core/websocket-server.js +866 -0
- package/dist/core/websocket-server.js.map +1 -0
- package/dist/core/write-tools.d.ts +7 -0
- package/dist/core/write-tools.d.ts.map +1 -0
- package/dist/core/write-tools.js +2172 -0
- package/dist/core/write-tools.js.map +1 -0
- package/dist/local.d.ts +95 -0
- package/dist/local.d.ts.map +1 -0
- package/dist/local.js +3036 -0
- package/dist/local.js.map +1 -0
- package/dist/vendor/obra-autodocs/autodocs-body.generated.d.ts +2 -0
- package/dist/vendor/obra-autodocs/autodocs-body.generated.d.ts.map +1 -0
- package/dist/vendor/obra-autodocs/autodocs-body.generated.js +6 -0
- package/dist/vendor/obra-autodocs/autodocs-body.generated.js.map +1 -0
- package/figma-desktop-bridge/README.md +365 -0
- package/figma-desktop-bridge/code.js +6504 -0
- package/figma-desktop-bridge/icon.png +0 -0
- package/figma-desktop-bridge/manifest.json +67 -0
- package/figma-desktop-bridge/ui.html +2441 -0
- package/package.json +98 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autodocs-body.generated.js","sourceRoot":"","sources":["../../../src/vendor/obra-autodocs/autodocs-body.generated.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,+EAA+E;AAC/E,wDAAwD;AACxD,oBAAoB;AACpB,MAAM,CAAC,MAAM,aAAa,GAAW,+toTAA+toT,CAAC"}
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
# Figma Desktop Bridge
|
|
2
|
+
|
|
3
|
+
A Figma plugin that bridges the Variables API and Component descriptions to MCP (Model Context Protocol) clients without requiring an Enterprise plan. Supports both local MCP servers and cloud relay connections from web-based AI clients.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This plugin enables AI assistants to access your Figma variables AND component descriptions through the MCP protocol. It serves two purposes:
|
|
8
|
+
|
|
9
|
+
- **Local MCP bridge** — Connects to a local MCP server via WebSocket on localhost (Claude Code, Claude Desktop, Cursor)
|
|
10
|
+
- **Cloud relay bridge** — Connects to a cloud relay via WebSocket over TLS, enabling web-based AI clients (Claude.ai, v0, Replit, Lovable) to send write commands to Figma
|
|
11
|
+
|
|
12
|
+
Both modes bypass Figma's plugin sandbox restrictions and the REST API's component description bug.
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
The plugin communicates with MCP servers via WebSocket through two paths:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
LOCAL: MCP Server ←WebSocket (ports 9223–9232)→ Plugin UI ←postMessage→ Plugin Worker → Figma API
|
|
20
|
+
CLOUD: Cloud MCP Server → Relay DO ←WebSocket (wss://)→ Plugin UI ←postMessage→ Plugin Worker → Figma API
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For local mode, the server supports multi-instance operation — if port 9223 is already in use, it automatically falls back through ports 9224–9232. The plugin scans all ports and connects to every active server.
|
|
24
|
+
|
|
25
|
+
For cloud mode, the plugin connects to a Cloudflare Durable Object relay via a one-time pairing code. Web-based AI clients send write commands through the relay to the plugin.
|
|
26
|
+
|
|
27
|
+
**Key Features:**
|
|
28
|
+
- ✅ No Enterprise plan required for variables
|
|
29
|
+
- ✅ Access all local variables and collections
|
|
30
|
+
- ✅ Reliable component descriptions (bypasses REST API bug)
|
|
31
|
+
- ✅ Supports multiple variable modes
|
|
32
|
+
- ✅ On-demand component data retrieval
|
|
33
|
+
- ✅ Persistent connection (stays open until closed)
|
|
34
|
+
- ✅ Clean, minimal UI
|
|
35
|
+
- ✅ Real-time data updates
|
|
36
|
+
- ✅ WebSocket transport — no debug flags needed
|
|
37
|
+
- ✅ Auto-reconnect on connection loss
|
|
38
|
+
- ✅ Multi-instance: connects to all active MCP servers simultaneously (v1.10.0)
|
|
39
|
+
- ✅ Cloud Mode: pair with web-based AI clients (Claude.ai, v0, Replit, Lovable)
|
|
40
|
+
- ✅ Full write access from any MCP-capable web platform
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
### Quick Install (Recommended)
|
|
45
|
+
|
|
46
|
+
1. **Open Figma Desktop**
|
|
47
|
+
2. **Go to Plugins → Development → Import plugin from manifest...**
|
|
48
|
+
3. **Navigate to:** `/path/to/figma-console-mcp/figma-desktop-bridge/manifest.json`
|
|
49
|
+
4. **Click "Open"**
|
|
50
|
+
|
|
51
|
+
The plugin will appear in your Development plugins list as "Figma Desktop Bridge".
|
|
52
|
+
|
|
53
|
+
### Manual Installation
|
|
54
|
+
|
|
55
|
+
Alternatively, you can install from the plugin directory:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# From the figma-console-mcp directory
|
|
59
|
+
cd figma-desktop-bridge
|
|
60
|
+
|
|
61
|
+
# Figma will use these files:
|
|
62
|
+
# - manifest.json (plugin configuration)
|
|
63
|
+
# - code.js (plugin worker logic)
|
|
64
|
+
# - ui.html (plugin UI interface)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
### Running the Plugin
|
|
70
|
+
|
|
71
|
+
1. **Open your Figma file** with variables and/or components
|
|
72
|
+
2. **Run the plugin:** Right-click → Plugins → Development → Figma Desktop Bridge
|
|
73
|
+
3. **Wait for confirmation:** the status strip turns green and shows `READY`
|
|
74
|
+
|
|
75
|
+
The plugin will:
|
|
76
|
+
- Fetch all local variables and collections on startup
|
|
77
|
+
- Display counts in the UI (e.g., "Variables: 404 in 2 collections")
|
|
78
|
+
- Store variables in `window.__figmaVariablesData`
|
|
79
|
+
- Provide on-demand component data via `window.requestComponentData(nodeId)`
|
|
80
|
+
- Keep running until manually closed
|
|
81
|
+
|
|
82
|
+
### Accessing Data via MCP
|
|
83
|
+
|
|
84
|
+
Once the plugin is running, MCP clients can access both variables and components:
|
|
85
|
+
|
|
86
|
+
**Variables (pre-loaded):**
|
|
87
|
+
```typescript
|
|
88
|
+
// From Claude Code or Claude Desktop
|
|
89
|
+
figma_get_variables({
|
|
90
|
+
format: "summary" // or "filtered" or "full"
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Components (on-demand):**
|
|
95
|
+
```typescript
|
|
96
|
+
// Request component with description
|
|
97
|
+
figma_get_component({
|
|
98
|
+
fileUrl: "https://figma.com/design/YOUR_FILE_KEY",
|
|
99
|
+
nodeId: "279:2861"
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Important:** Keep the plugin running while querying. Variables are pre-loaded, but component data is fetched on-demand when requested.
|
|
104
|
+
|
|
105
|
+
## Plugin Interface
|
|
106
|
+
|
|
107
|
+
The plugin is a compact, collapsible status panel designed to stay out of the way of the canvas. It opens as a small strip and expands only when you ask it to.
|
|
108
|
+
|
|
109
|
+
### Status strip (always visible)
|
|
110
|
+
|
|
111
|
+
- **Status** — a coloured dot + label (`READY`, `CONNECTING`, disconnected) showing whether the bridge is live.
|
|
112
|
+
- **Pause / Reconnect** — the action button:
|
|
113
|
+
- `Pause` (when connected) — disconnects and stops auto-reconnect until you resume.
|
|
114
|
+
- `Reconnect` (when not connected) — runs a fresh port scan and connects on the spot, with no need to close and reopen the plugin.
|
|
115
|
+
- **Cloud icon** — opens cloud pairing (see [Cloud Mode](#cloud-mode)).
|
|
116
|
+
- **`+` / `−`** — expand/collapse the options and panels.
|
|
117
|
+
|
|
118
|
+
### Options (under `+`)
|
|
119
|
+
|
|
120
|
+
- **Info** — shows the connected **File** and **Page**, confirming which file the bridge is bound to (useful when several MCP servers or files are in play).
|
|
121
|
+
- **Log** — opens the activity log (below).
|
|
122
|
+
- **`N server(s)` badge** — how many MCP servers the plugin is currently connected to. A surprisingly high count is a useful signal that stale/zombie server instances are lingering (see [Multi-Instance Support](#multi-instance-support-v1100)).
|
|
123
|
+
|
|
124
|
+
### Activity log
|
|
125
|
+
|
|
126
|
+
The log tells the story of what the AI did, rather than listing raw API traffic:
|
|
127
|
+
|
|
128
|
+
- Each entry is a human-readable label taken from a leading `// comment` in executed code (e.g. `// Apply drop shadow` → "Apply drop shadow"), a recognised Figma API call, or a `<Code>` prefix for unrecognised raw JS.
|
|
129
|
+
- Errors are shown in red and prefixed `[!]`.
|
|
130
|
+
- Consecutive duplicate actions collapse to one line with a `×N` repeat count.
|
|
131
|
+
- The ⚠ control filters to errors only; the copy button exports the full session log as plain text (handy for bug reports and demos).
|
|
132
|
+
|
|
133
|
+
The log records actions as they happen while the panel is in memory — it reflects activity since the plugin connected.
|
|
134
|
+
|
|
135
|
+
### Theme
|
|
136
|
+
|
|
137
|
+
The plugin follows Figma's light/dark theme automatically — there is no separate theme control to manage.
|
|
138
|
+
|
|
139
|
+
### Connection & auto-reconnect
|
|
140
|
+
|
|
141
|
+
- On launch the plugin scans ports 9223–9232 and connects to every MCP server it finds.
|
|
142
|
+
- If no server is running yet (for example, you opened the plugin before starting your AI client), a background watchdog keeps probing while disconnected and connects automatically as soon as a server appears — **no plugin restart needed**. The `Reconnect` button forces an immediate retry.
|
|
143
|
+
- On the server side, stale/zombie MCP instances that would otherwise squat the port range are reaped automatically (SIGTERM, escalating to SIGKILL), so a freshly launched server can claim its preferred port instead of being pushed onto a fallback the plugin then has to chase.
|
|
144
|
+
|
|
145
|
+
## Cloud Mode
|
|
146
|
+
|
|
147
|
+
Cloud Mode lets web-based AI clients (Claude.ai, v0, Replit, Lovable) send write commands to your Figma file through a cloud relay. This enables the full suite of design creation and variable management tools from any MCP-capable web platform — no local Node.js required.
|
|
148
|
+
|
|
149
|
+
### How to Connect
|
|
150
|
+
|
|
151
|
+
1. **Start pairing from the AI client.** The AI client calls `figma_pair_plugin`, which generates a 6-character pairing code (valid for 5 minutes).
|
|
152
|
+
2. **Open the Desktop Bridge plugin** in Figma Desktop.
|
|
153
|
+
3. **Expand Cloud Mode.** Click the "Cloud Mode" toggle (chevron) below the status bar.
|
|
154
|
+
4. **Enter the pairing code** in the text input and click **Connect**.
|
|
155
|
+
5. The plugin establishes a WebSocket connection to the cloud relay. The status indicator changes to "Connected to cloud relay."
|
|
156
|
+
|
|
157
|
+
### Disconnecting
|
|
158
|
+
|
|
159
|
+
Click the **Disconnect** button in the Cloud Mode section, or close the plugin. The cloud relay session is terminated immediately.
|
|
160
|
+
|
|
161
|
+
### Notes
|
|
162
|
+
|
|
163
|
+
- **Both local and cloud connections can be active simultaneously.** Local MCP servers continue to work while Cloud Mode is connected.
|
|
164
|
+
- **Pairing codes are single-use.** Each code can only be used once. If connection fails, generate a new code from the AI client.
|
|
165
|
+
- **Codes expire in 5 minutes.** If the code has expired, ask the AI client to generate a fresh one.
|
|
166
|
+
- **One plugin per relay session.** Each pairing code creates a dedicated relay instance scoped to that session.
|
|
167
|
+
|
|
168
|
+
## How It Works
|
|
169
|
+
|
|
170
|
+
### Plugin Worker (code.js)
|
|
171
|
+
|
|
172
|
+
**On Startup (Variables):**
|
|
173
|
+
1. Uses Figma's Variables API to fetch all local variables
|
|
174
|
+
2. Formats data with full mode values
|
|
175
|
+
3. Sends to UI via `postMessage`
|
|
176
|
+
|
|
177
|
+
**On Request (Components):**
|
|
178
|
+
1. Listens for component requests via `figma.ui.onmessage`
|
|
179
|
+
2. Uses `figma.getNodeByIdAsync(nodeId)` to fetch component
|
|
180
|
+
3. Extracts description, descriptionMarkdown, and metadata
|
|
181
|
+
4. Sends response back to UI via `postMessage` with requestId
|
|
182
|
+
|
|
183
|
+
### Plugin UI (ui.html)
|
|
184
|
+
|
|
185
|
+
**Variables Flow:**
|
|
186
|
+
1. Listens for `VARIABLES_DATA` message from worker
|
|
187
|
+
2. Stores data on `window.__figmaVariablesData`
|
|
188
|
+
3. Sets `window.__figmaVariablesReady = true`
|
|
189
|
+
4. Displays status to user
|
|
190
|
+
|
|
191
|
+
**Components Flow:**
|
|
192
|
+
1. Exposes `window.requestComponentData(nodeId)` function
|
|
193
|
+
2. Returns a Promise that resolves when worker responds
|
|
194
|
+
3. Sends request to worker via `parent.postMessage()`
|
|
195
|
+
4. Resolves promise when `COMPONENT_DATA` message received
|
|
196
|
+
5. Includes 10-second timeout and error handling
|
|
197
|
+
|
|
198
|
+
### MCP Desktop Connector
|
|
199
|
+
|
|
200
|
+
**WebSocket Path (Preferred):**
|
|
201
|
+
1. MCP server starts WebSocket server on port 9223 (or next available port in range 9223–9232)
|
|
202
|
+
2. Plugin UI connects as WebSocket client
|
|
203
|
+
3. MCP server sends commands as JSON `{ id, method, params }`
|
|
204
|
+
4. Plugin UI routes to the same `window.*` handlers
|
|
205
|
+
5. Results sent back as `{ id, result }` or `{ id, error }`
|
|
206
|
+
|
|
207
|
+
## Troubleshooting
|
|
208
|
+
|
|
209
|
+
### Plugin doesn't appear in menu
|
|
210
|
+
- Make sure Figma Desktop is running (not browser)
|
|
211
|
+
- Check that manifest.json path is correct
|
|
212
|
+
- Try **Plugins → Development → Refresh plugin list**
|
|
213
|
+
|
|
214
|
+
### "No plugin UI found with variables data" or "No plugin UI found with requestComponentData"
|
|
215
|
+
- Ensure plugin is running (check for open plugin window showing "✓ Desktop Bridge active")
|
|
216
|
+
- Try closing and reopening the plugin
|
|
217
|
+
- Check browser console for errors (Plugins → Development → Open Console)
|
|
218
|
+
|
|
219
|
+
### Variables not updating
|
|
220
|
+
- Close and reopen the plugin to refresh data
|
|
221
|
+
- Use `refreshCache: true` parameter in MCP call
|
|
222
|
+
- Check that you're viewing the correct Figma file
|
|
223
|
+
|
|
224
|
+
### Component descriptions are empty or missing
|
|
225
|
+
- **First, verify in Figma:** Check if the component actually has a description set
|
|
226
|
+
- If using REST API fallback (not Desktop Bridge), descriptions may be missing due to known Figma API bug
|
|
227
|
+
- Ensure the plugin is running - component data requires active plugin connection
|
|
228
|
+
- Check that the nodeId is correct (format: "123:456")
|
|
229
|
+
|
|
230
|
+
### Component request times out
|
|
231
|
+
- Ensure plugin is running and shows "Desktop Bridge active"
|
|
232
|
+
- Check that the component exists in the current file
|
|
233
|
+
- Verify nodeId format is correct
|
|
234
|
+
- Timeout is set to 10 seconds - complex files may take longer
|
|
235
|
+
|
|
236
|
+
### WebSocket connection not working
|
|
237
|
+
- Verify the MCP server is running (it starts the WebSocket server on port 9223)
|
|
238
|
+
- Check that the plugin is open in Figma — the WebSocket client is in the plugin UI
|
|
239
|
+
- Check the browser console (Plugins > Development > Open Console) for `[MCP Bridge] WebSocket connected to port 9223`
|
|
240
|
+
- **You usually don't need to restart the plugin.** If you opened it before starting the MCP server, the background watchdog reconnects automatically within ~12s once a server appears; the `Reconnect` button forces it immediately. The status strip and the `N server(s)` badge reflect the live connection state.
|
|
241
|
+
- As of v1.10.0, multiple MCP servers can run simultaneously on different ports (9223–9232). If tools aren't working on a fallback port, re-import the plugin manifest to enable multi-port scanning.
|
|
242
|
+
- **Custom ports:** the plugin scans ports 9223–9232 automatically. The `FIGMA_WS_PORT` env var sets the preferred starting port. Multi-instance support works out of the box within this range.
|
|
243
|
+
|
|
244
|
+
### Empty or outdated data
|
|
245
|
+
- Plugin fetches variables on load - rerun plugin after making variable changes
|
|
246
|
+
- Component data is fetched on-demand - always returns current state
|
|
247
|
+
- Cache TTL is 5 minutes for variables - use `refreshCache: true` for immediate updates
|
|
248
|
+
- Ensure you're in the correct file (plugin reads current file's data)
|
|
249
|
+
|
|
250
|
+
### Cloud Mode shows "Connection failed"
|
|
251
|
+
- The pairing code may have expired (codes are valid for 5 minutes). Generate a new one from the AI client.
|
|
252
|
+
- Verify the code was entered correctly (6 characters, case-sensitive).
|
|
253
|
+
|
|
254
|
+
### Cloud Mode disconnect button doesn't work
|
|
255
|
+
- Close and reopen the Cloud Mode section, then try again.
|
|
256
|
+
|
|
257
|
+
### Cloud connection drops between AI turns
|
|
258
|
+
- Re-pair by generating a new pairing code from the AI client. The relay uses hibernation-safe patterns, but extended idle periods may cause reconnection. If it persists, generate a fresh code.
|
|
259
|
+
|
|
260
|
+
## Multi-Instance Support (v1.10.0)
|
|
261
|
+
|
|
262
|
+
The Desktop Bridge plugin supports connecting to **multiple MCP server instances** simultaneously. This is useful when:
|
|
263
|
+
|
|
264
|
+
- **Claude Desktop** runs both Chat and Code tabs (each spawns a separate MCP server)
|
|
265
|
+
- **Multiple CLI terminals** are running different projects with the MCP
|
|
266
|
+
- **Claude Desktop + Claude Code CLI** are used together
|
|
267
|
+
|
|
268
|
+
### How It Works
|
|
269
|
+
|
|
270
|
+
1. The MCP server tries port 9223 first. If it's taken, it falls back to 9224, 9225, etc. (up to 9232)
|
|
271
|
+
2. The plugin scans **all 10 ports** on startup and connects to every active server
|
|
272
|
+
3. All events (selection changes, document changes, variables, console logs) are **broadcast to every connected server**
|
|
273
|
+
4. Each server instance independently receives real-time data from Figma
|
|
274
|
+
|
|
275
|
+
### Automatic cleanup of stale servers
|
|
276
|
+
|
|
277
|
+
When an AI client closes, its MCP server should exit. If a server's shutdown hangs (e.g. a network close blocks), it can be left behind as a **zombie** still holding a port — and enough zombies exhaust the 9223–9232 range, forcing new servers onto fallback ports the plugin then connects to instead of the one your client is using. This is the classic *"server running but no plugin connected — restart the plugin"* symptom.
|
|
278
|
+
|
|
279
|
+
The server guards against this on two fronts:
|
|
280
|
+
|
|
281
|
+
- **On shutdown**, a hard backstop forces the process to exit even if graceful close hangs, so zombies aren't created in the first place.
|
|
282
|
+
- **On startup and periodically**, each server reaps orphaned instances that hold a port without a live advertisement file — escalating from `SIGTERM` to `SIGKILL` so a process that ignores `SIGTERM` is still cleared.
|
|
283
|
+
|
|
284
|
+
The `N server(s)` badge in the plugin is a quick health check: if it's higher than the number of AI clients you actually have open, stale instances are present (and will be reaped on the next server launch).
|
|
285
|
+
|
|
286
|
+
### Important: One-Time Plugin Update
|
|
287
|
+
|
|
288
|
+
If you imported the Desktop Bridge plugin **before v1.10.0**, you need to re-import the manifest once to enable multi-port scanning:
|
|
289
|
+
|
|
290
|
+
1. In Figma: **Plugins → Development → Import plugin from manifest...**
|
|
291
|
+
2. Select the `manifest.json` file from the `figma-desktop-bridge` directory
|
|
292
|
+
3. Run the plugin — it will now scan all ports and connect to all servers
|
|
293
|
+
|
|
294
|
+
> **Why?** Figma caches plugin files at the application level. Simply restarting the plugin does NOT reload the code from disk. You must re-import the manifest to force Figma to pick up the new multi-port scanning logic.
|
|
295
|
+
|
|
296
|
+
Without re-importing, the old plugin code only connects to port 9223. If your server fell back to a different port, the plugin won't find it.
|
|
297
|
+
|
|
298
|
+
## Development
|
|
299
|
+
|
|
300
|
+
### File Structure
|
|
301
|
+
```
|
|
302
|
+
figma-desktop-bridge/
|
|
303
|
+
├── manifest.json # Plugin configuration
|
|
304
|
+
├── code.js # Plugin worker (accesses Figma API)
|
|
305
|
+
├── ui.html # Plugin UI (stores/requests data for MCP access)
|
|
306
|
+
└── README.md # This file
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Console Logging
|
|
310
|
+
|
|
311
|
+
The plugin logs to Figma's console:
|
|
312
|
+
|
|
313
|
+
**Variables (startup):**
|
|
314
|
+
```
|
|
315
|
+
🌉 [Desktop Bridge] Plugin loaded and ready
|
|
316
|
+
🌉 [Desktop Bridge] Fetching variables...
|
|
317
|
+
🌉 [Desktop Bridge] Found 404 variables in 2 collections
|
|
318
|
+
🌉 [Desktop Bridge] Variables data sent to UI successfully
|
|
319
|
+
🌉 [Desktop Bridge] UI iframe now has variables data accessible via window.__figmaVariablesData
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Components (on-demand):**
|
|
323
|
+
```
|
|
324
|
+
🌉 [Desktop Bridge] Fetching component: 279:2861
|
|
325
|
+
🌉 [Desktop Bridge] Component data ready. Has description: true
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Ready state:**
|
|
329
|
+
```
|
|
330
|
+
🌉 [Desktop Bridge] Ready to handle component requests
|
|
331
|
+
🌉 [Desktop Bridge] Plugin will stay open until manually closed
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
View logs: **Plugins → Development → Open Console** (Cmd+Option+I on Mac)
|
|
335
|
+
|
|
336
|
+
## Security
|
|
337
|
+
|
|
338
|
+
**Local Mode:**
|
|
339
|
+
- Plugin network access limited to `localhost` only (for WebSocket bridge)
|
|
340
|
+
- Data never leaves the local machine
|
|
341
|
+
- WebSocket bridge is local-only and unauthenticated — it relies on `localhost` binding for security. Multiple clients may be connected concurrently (one per Figma file). Do not expose the WebSocket port outside `localhost` (e.g., via port forwarding) on untrusted machines
|
|
342
|
+
|
|
343
|
+
**Cloud Mode:**
|
|
344
|
+
- Cloud relay connection uses TLS (`wss://`) for all traffic
|
|
345
|
+
- Pairing codes are single-use and expire in 5 minutes — no unauthenticated access is possible
|
|
346
|
+
- Each relay Durable Object is scoped per session (one plugin per relay instance)
|
|
347
|
+
- The relay passes commands through without storing design data persistently
|
|
348
|
+
|
|
349
|
+
**Both Modes:**
|
|
350
|
+
- Uses standard Figma Plugin API (no unofficial APIs)
|
|
351
|
+
- Component requests are scoped to current file only
|
|
352
|
+
|
|
353
|
+
## Why Desktop Bridge for Components?
|
|
354
|
+
|
|
355
|
+
Figma's REST API has a known bug where component `description` and `descriptionMarkdown` fields are often missing or outdated. This is particularly problematic for:
|
|
356
|
+
|
|
357
|
+
- **Local project components** (not published to team libraries)
|
|
358
|
+
- **Unpublished components** in active development
|
|
359
|
+
- **Team collaboration** where descriptions contain important usage guidelines
|
|
360
|
+
|
|
361
|
+
The Desktop Bridge plugin bypasses this limitation by using the Figma Plugin API (`figma.getNodeByIdAsync()`), which has reliable, real-time access to all component fields including descriptions. This makes it ideal for teams working with local components in shared project files.
|
|
362
|
+
|
|
363
|
+
## License
|
|
364
|
+
|
|
365
|
+
Part of the figma-console-mcp project.
|