Skip to content

Repository files navigation

figma-graph

MCP server that converts Figma files into graph structures (nodes + edges).

Tools

ToolDescription
get_figma_graphFetch a Figma file/node and return it as a graph (nodes + edges)
get_graph_summaryGet stats: node counts, types, depth, component usage
find_componentsFind all components and their instance relationships

Setup

npm install
npm run build

Usage with Claude Code

Add to your MCP config (e.g. ~/.claude/claude_desktop_config.json):

{
"mcpServers": {
"figma-graph": {
"command": "node",
"args": ["/path/to/figma-graph/dist/index.js"],
"env": {
"FIGMA_TOKEN": "your-figma-token"
}
}
}
}

Graph Output

The graph contains:

  • Nodes: Each Figma layer as a node with id, name, type, parentId, depth, and metadata
  • Edges: Three relationship types:
    • parent-child — layer hierarchy
    • instance-component — component instance → master component
  • Stats: totalNodes, totalEdges, maxDepth, typeBreakdown

License

MIT

About

MCP server that converts Figma files into graph structures (nodes + edges)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages