-
Notifications
You must be signed in to change notification settings - Fork 18
Add Figma MCP skill #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
neubig
wants to merge
8
commits into
main
Choose a base branch
from
add-figma-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d8b4144
Add Figma MCP skill
neubig c9ccd68
fix: correct Figma MCP server URL
openhands-agent ebb5feb
Add figma skill to marketplace
openhands-agent 32e903d
Fix Figma MCP skill: consistent URL, progressive disclosure
openhands-agent 6eece67
Fix data inconsistency: clarify OAuth is automatic
openhands-agent cbca1b2
docs: address review comments on Figma MCP skill
openhands-agent 20a601a
Clarify Figma MCP README workflows
openhands-agent 1b8ab33
Clarify Figma MCP prompts and OAuth wording
openhands-agent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # Figma MCP | ||
|
|
||
| Read Figma design data using the Figma MCP server. Inspect files, components, design tokens, and layer properties. | ||
|
|
||
| ## Overview | ||
|
|
||
| The Figma MCP server provides tools to interact with Figma designs directly from OpenHands. It uses OAuth authentication to securely access your Figma account. | ||
|
|
||
| With the server enabled, you can: | ||
|
|
||
| - **Generate code from frames**: Ask OpenHands to read a Figma frame through MCP and generate React, HTML, or other code from the retrieved design data | ||
| - **Extract design context**: Retrieve variables, components, and layout information from a file or frame | ||
| - **Retrieve design tokens**: Pull colors, typography, spacing, and other reusable style values | ||
| - **Inspect node properties**: Review supported node types such as frames, components, instances, text, and shapes | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| openhands mcp add figma --transport http https://mcp.figma.com/mcp | ||
neubig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| This adds the Figma MCP server to your OpenHands configuration. The first time OpenHands calls a Figma MCP tool, the server will open your browser and prompt you to authorize access with Figma OAuth. | ||
|
|
||
| **Note:** Restart your OpenHands session after installation to load the new MCP server. This is required because MCP servers are initialized at session startup. | ||
|
|
||
| ## Verification | ||
|
|
||
| To verify the installation: | ||
|
|
||
| ```bash | ||
| openhands mcp list | ||
| ``` | ||
|
|
||
| You should see the Figma server listed with status "enabled". | ||
|
|
||
| ## Managing the Server | ||
|
|
||
| ```bash | ||
| # Disable the Figma MCP server | ||
| openhands mcp disable figma | ||
|
|
||
| # Re-enable the Figma MCP server | ||
| openhands mcp enable figma | ||
|
|
||
| # Remove the Figma MCP server | ||
| openhands mcp remove figma | ||
|
|
||
| # Get details about the Figma server | ||
| openhands mcp get figma | ||
neubig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| The MCP server is link-based. Start by copying the link to a Figma file, frame, or layer, then use a prompt like one of these in OpenHands: | ||
|
|
||
| - **Generate code from a frame** | ||
| ```text | ||
| Generate a React component from this Figma frame: https://www.figma.com/file/ABC123/MyDesign?node-id=1-2 | ||
| ``` | ||
| - **Extract design tokens from a file** | ||
| ```text | ||
| List the colors, typography, and spacing tokens used in this Figma file: https://www.figma.com/file/ABC123/MyDesign | ||
| ``` | ||
| - **Inspect component structure** | ||
| ```text | ||
| Show me the component tree and layer hierarchy for this Figma frame: https://www.figma.com/file/ABC123/MyDesign?node-id=1-2 | ||
| ``` | ||
|
|
||
| For each prompt, OpenHands uses the Figma MCP server to read the referenced design data before generating a response. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **OAuth errors**: | ||
| 1. Visit `https://www.figma.com/`, log out, and log back in to refresh your Figma session | ||
| 2. If that does not work, clear your browser cookies/cache for `figma.com` | ||
| 3. Restart your OpenHands session and retry the same Figma prompt | ||
|
|
||
| Re-running `openhands mcp add` refreshes the server configuration, but it does not reset OAuth state cached in your browser. | ||
| - **Server not found**: Ensure you've restarted your OpenHands session after installation | ||
| - **Access denied**: Verify you have view access to the Figma file you're trying to access | ||
|
|
||
| ## Documentation | ||
|
|
||
| - [Figma MCP Server](https://developers.figma.com/docs/figma-mcp-server) | ||
| - [Remote Server Installation](https://developers.figma.com/docs/figma-mcp-server/remote-server-installation/) | ||
| - [Figma API](https://www.figma.com/developers/api) | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
neubig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: figma | ||
| description: Read Figma design data using the Figma MCP server. Inspect files, components, design tokens, and layer properties. | ||
| triggers: | ||
| - figma | ||
| - figma design | ||
| - figma mcp | ||
| --- | ||
|
|
||
| # Figma MCP | ||
|
|
||
| Read Figma design data via the official Figma MCP server. Uses OAuth authentication. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| openhands mcp add figma --transport http https://mcp.figma.com/mcp | ||
neubig marked this conversation as resolved.
Show resolved
Hide resolved
neubig marked this conversation as resolved.
Show resolved
Hide resolved
neubig marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| You'll be prompted to authorize via Figma OAuth the first time OpenHands calls a Figma tool. Restart your OpenHands session after installation. | ||
|
|
||
| See [README.md](./README.md) for verification, example prompts, management commands, and detailed documentation. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.