Repository navigation
feat(figma-mcp): add Figma MCP integration - #382
Open
devcustrom wants to merge 4 commits into
Open
devcustrom wants to merge 4 commits into
devcustrom wants to merge 4 commits into
Conversation
Add external_plugins/figma-mcp: an HTTP MCP declaration for the Figma desktop Dev Mode server at http://127.0.0.1:3845/mcp, plus the Figma-hosted remote endpoint shipped disabled because it needs an OAuth sign-in that the ZCode MCP configuration cannot complete. The plugin ships a skill for the design-to-code workflow (design context, metadata, variables, screenshots, motion, Code Connect, FigJam), the prompt-injection rules for design content, and a /figma-setup diagnostic command. Tools are documented from Figma Dev Mode MCP Server 1.0.0. Requirements (documented in both READMEs): the Figma desktop app, Dev Mode, and a Dev or Full seat on a paid plan. No bundled third-party code; the only network request is loopback to the Figma app.
ZCode implements MCP OAuth for plugin servers: Settings -> MCP shows "Authorization required" with an "Open authorization" action, and the client performs discovery, dynamic client registration, PKCE S256 and token refresh. The previous revision claimed the client could not complete OAuth and shipped the remote server disabled, so users never saw an authorization prompt. - Enable figma-remote (https://mcp.figma.com/mcp) by default and finish the one-time authorization in Settings -> MCP. - Disable figma-desktop by default: it is loopback and needs no authorization, but requires the desktop app and a paid Dev/Full seat, and running both duplicates every Figma tool. - Rewrite the skill and both READMEs around the authorization flow, token storage in ZCode, revocation handling, and the desktop fallback. - Bump to 0.1.1.
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
Figma's remote MCP endpoint advertises standard OAuth metadata, and ZCode implements the MCP OAuth flow, but Figma's dynamic client registration endpoint returns 403 Forbidden for clients it does not recognise, so no authorization URL is ever produced and the app cannot offer a prompt. Reproduced with curl, bare and with browser-like headers. - Enable figma-desktop by default again: loopback, no authorization. - Keep figma-remote disabled and document the exact 403 failure and the condition under which it can be enabled (Figma opening registration). - READMEs explain the remote flow and why it cannot complete today. - Bump to 0.1.2.
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
Figma admits MCP clients from its catalog, not individual users. Add the catalog and new-client waitlist links to the skill and both READMEs so the 403 on registration is actionable instead of looking like a broken plugin.
Collaborator
|
✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin type (required) / 插件类型(必填)
Affected plugin name(s) / 涉及的插件名称:
figma-mcpWhat / 改动内容
Adds
external_plugins/figma-mcp, a community plugin that connects ZCode to the Figma MCP server described in Figma's Claude and Figma MCP setup guide.figma-desktop(enabled) — HTTP MCP endpoint served by the Figma desktop app onhttp://127.0.0.1:3845/mcp, no authorization. Verified against Figma Dev Mode MCP Server 1.0.0:initializehandshake,tools/list(10 tools),get_metadataagainst an open document.figma-remote(disabled) — Figma's hosted endpointhttps://mcp.figma.com/mcp(Government:https://mcp.figma-gov.com/mcp). Figma recommends it and its OAuth metadata is standard, but Figma admits only MCP clients listed in its catalog, and ZCode is not listed:POST https://api.figma.com/v1/oauth/mcp/registerreturns403 Forbidden. Without a client registration there is no authorization URL, so a client can never show an authorization prompt. There is no per-user allowlist; a client vendor can join Figma's new-client waitlist or apply through their Figma account team. The plugin ships the entry disabled and documents the exact failure instead of leaving a server that fails on every startup. If Figma adds the client, enabling the entry is enough — no code change.figma-mcp— enabling the desktop server, tool selection, the design-to-code workflow, Code Connect approval flow, motion data, troubleshooting, and rules for treating design text and layer names as untrusted content rather than instructions./figma-setup— probes the endpoint, reports which Figma tools are registered, and gives the exact Figma steps when the server is off.The plugin bundles no third-party code, writes no files and registers no hooks.
Self-check / 自查清单
external_plugins/figma-mcp/categoryisdeveloper-toolsversion0.1.2matches in bothplugin.jsonandmarketplace.jsonREADME.md(EN) andREADME_CN.md(中文) both added and equivalentdescription_i18nhas bothenandzh-CN, identical in manifest and marketplace entrypython3 scripts/build_dist.py— see the note belowTesting / 测试
python3 scripts/validate.py→OK: 59 plugin(s) validatedgit diff --check→ cleaninitializereturnedserverInfo: "Figma Dev Mode MCP Server" 1.0.0, protocol2025-06-18;tools/listreturned the 10 tools documented in the README;get_metadatareturned the pages of the open document.POST /mcpreturns401withWWW-Authenticate: Bearer resource_metadata="https://mcp.figma.com/.well-known/oauth-protected-resource",scope="mcp:connect"; the protected-resource document nameshttps://api.figma.com; that server publishesauthorization_endpoint,token_endpoint,registration_endpoint, PKCES256. Registration itself returns403 Forbidden, reproduced with curl both bare and with browser-likeUser-Agent/Originheaders.build_dist.pycannot complete in a fresh source checkout: it aborts onexcalidrawwithincomplete build; run pnpm build first, because UI plugindist/output is not committed. That failure is unrelated to this PR. To verify this plugin's artifact, I invokedbuild_dist.build_zipdirectly forexternal_plugins/figma-mcp: 6 files, 13724 bytes, sha256af01bfb65c2658dc2984d4bb3523fa40a2fd8f9110aa6cd1fbac6d3681188d40. With the UI build in place, the full build should pass.Dependencies, network, side effects / 依赖、网络与副作用
http://127.0.0.1:3845/mcpon the user's machine, no credentials. The disabled remote entry points at Figma's HTTPS endpoint and is documented as blocked by Figma's registration policy.add_code_connect_mapandsend_code_connect_mappingswrite Code Connect data into the Figma file; the skill requires showing suggestions and getting user approval first. Everything else is read-only.