|
…
|
||
|---|---|---|
| .. | ||
| script | ||
| skills | ||
| index.ts | ||
| package.json | ||
| README.md | ||
| skills-source.json | ||
| tsconfig.json | ||
Figma
An opt-in OpenCode plugin that registers Figma's remote MCP server and official Figma skills. It uses OpenCode's existing OAuth/DCR flow and credential storage, without a shared client secret.
Install
Install directly from Git:
opencode plugin add 'git+https://github.com/anomalyco/opencode.git#path:packages/plugins/figma'
The URL selects the Figma directory and uses the repository's default branch, so no explicit branch name is needed. Installation is Git-only.
The plugin exports index.ts directly. There is no build step or installation hook.
For local development, add the directory to plugins in the project's opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["./packages/plugins/figma"],
}
The plugin is not activated merely by being present in the repository. Installing it adds it to the user's configuration.
Sign in and test
- Open
/mcps, selectfigma, and sign in. - Confirm that the server is connected.
- Ask the agent to call Figma's
whoamitool.
The connection uses the approved app-specific endpoint https://mcp.figma.com/mcp/8CKW0Mgge6TtIHM5ko0YxQ. The app ID belongs in that URL, not in oauth.client_id; setting a configured client ID would skip DCR.
Existing mcp.servers.figma configuration takes precedence, including disabled servers and custom endpoints.
Official skills
skills/ contains selected skills copied unchanged from Figma's official plugin. skills-source.json records the exact upstream revision and the selected skill IDs.
The bundle contains figma-design-to-code, figma-use, figma-generate-design, figma-generate-library, figma-code-connect, and figma-create-new-file, along with their supporting references and scripts. No replacement instructions are authored by OpenCode. Existing skills with the same IDs are preserved. Specialized skills remain available through Figma's MCP skill resources when needed.
The vendored Figma materials remain Figma's materials, not OpenCode-authored MIT code. See skills/NOTICE.md for attribution and the Figma Developer Terms.
Manually sync skills
From packages/plugins/figma, explicitly run:
bun run sync:skills
This fetches upstream main, replaces only the selected skill directories, and updates the recorded commit. To use a particular branch, tag, or commit, pass it as an argument. To reproduce the current bundle, pass the revision in skills-source.json.
Review and commit skills/ and skills-source.json together. Sync replaces local edits within selected directories, so keep the upstream files unchanged and review updates before releasing them.
Sync never runs automatically during installation, plugin startup, typechecking, or CI. The plugin loads only the checked-in files. Supporting Figma scripts are guidance assets; the plugin does not execute them.
Remove
opencode plugin remove 'git+https://github.com/anomalyco/opencode.git#path:packages/plugins/figma'
If you installed with a different Git specification, pass that same specification to remove it. An independently configured mcp.servers.figma entry remains unaffected.