
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@hapins/figma-mcp
Advanced tools
A Model Context Protocol server for Figma API integration, enabling seamless interaction with Figma files and components
A Model Context Protocol server for Figma API integration. This package provides a set of tools to interact with the Figma API through the Model Context Protocol.
Note: This package was implemented by Cline, an open-source CLI tool for Claude AI. All code in this repository was written by Claude through Cline.
npm install -g @hapins/figma-mcp
Get your Figma access token:
Run the server:
# Using environment variable
FIGMA_ACCESS_TOKEN=your-token npx @hapins/figma-mcp
# Or using config file
npx @hapins/figma-mcp --config=config.json
Example config.json:
{
"mcpServers": {
"figma": {
"command": "npx",
"args": ["-y", "@hapins/figma-mcp"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-figma-access-token"
}
}
}
}
npm install -g @hapins/figma-mcp
~/.config/cline/settings.json
or platform equivalent):{
"mcpServers": {
"figma": {
"command": "npx",
"args": ["@hapins/figma-mcp"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-figma-access-token"
}
}
}
}
Add the following to your Claude Desktop settings file:
{
"mcpServers": {
"figma": {
"command": "npx",
"args": ["@hapins/figma-mcp"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-figma-access-token"
}
}
}
}
The server provides the following tools through the Model Context Protocol:
list_files
: List files in a project or team
project_id
: (optional) Project ID to list files fromteam_id
: (optional) Team ID to list files fromget_file_versions
: Get version history of a file
file_key
: (required) Figma file keyget_file_comments
: Get comments on a file
file_key
: (required) Figma file keyget_file_info
: Get detailed file information
file_key
: (required) Figma file keydepth
: (optional) Maximum depth to traverse the node tree (1-4 recommended)node_id
: (optional) ID of a specific node to fetchget_components
: Get components from a file
file_key
: (required) Figma file keyget_styles
: Get styles from a file
file_key
: (required) Figma file keyget_file_nodes
: Get specific nodes from a file
file_key
: (required) Figma file keyids
: (required) Array of node IDs to retrieveFIGMA_ACCESS_TOKEN
: Your Figma access token (required)# Install dependencies
npm install
# Build the package
npm run build
# Watch mode
npm run watch
# Run tests
npm test
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
[0.1.2] - 2024-03-14
FAQs
A Model Context Protocol server for Figma API integration, enabling seamless interaction with Figma files and components
The npm package @hapins/figma-mcp receives a total of 59 weekly downloads. As such, @hapins/figma-mcp popularity was classified as not popular.
We found that @hapins/figma-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.