Loading...
Loading...
Figma MCP server with full read/write access via plugin bridge — no API tokens, no rate limits, text to designs and designs to code
npx skill4agent add aradotso/mcp-skills figma-mcp-goSkill by ara.so — MCP Skills collection
claude mcp add -s project figma-mcp-go -- npx -y @vkhanhqui/figma-mcp-go@latestcodex mcp add figma-mcp-go -- npx -y @vkhanhqui/figma-mcp-go@latest.vscode/mcp.json{
"servers": {
"figma-mcp-go": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@vkhanhqui/figma-mcp-go"]
}
}
}.mcp.json{
"mcpServers": {
"figma-mcp-go": {
"command": "npx",
"args": ["-y", "@vkhanhqui/figma-mcp-go"]
}
}
}manifest.json// Use get_design_context for depth-limited tree with detail control
const context = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "get_design_context",
arguments: {
rootNodeId: "0:1", // page ID or specific frame
maxDepth: 3,
detail: "compact" // minimal | compact | full
}
});const metadata = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "get_metadata",
arguments: {}
});
const pages = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "get_pages",
arguments: {}
});const results = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "search_nodes",
arguments: {
rootNodeId: "0:1",
nameSubstring: "Button",
types: ["COMPONENT", "INSTANCE"]
}
});const frame = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_frame",
arguments: {
name: "Hero Section",
x: 0,
y: 0,
width: 1440,
height: 600,
fills: "#0066FF",
layoutMode: "VERTICAL",
primaryAxisAlignItems: "CENTER",
counterAxisAlignItems: "CENTER",
itemSpacing: 24,
paddingTop: 48,
paddingRight: 48,
paddingBottom: 48,
paddingLeft: 48
}
});const text = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_text",
arguments: {
characters: "Welcome to Our Platform",
fontFamily: "Inter",
fontStyle: "Bold",
fontSize: 48,
x: 100,
y: 100,
parentId: frame.id // optional, parent frame
}
});const image = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "import_image",
arguments: {
base64Data: "iVBORw0KGgoAAAANSUhEUg...", // without data:image prefix
x: 0,
y: 0,
width: 800,
height: 600,
name: "Hero Image",
parentId: frame.id
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_text",
arguments: {
nodeId: "123:456",
characters: "Updated heading text"
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_fills",
arguments: {
nodeIds: ["123:456", "123:457"],
color: "#FF5733"
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_strokes",
arguments: {
nodeId: "123:456",
color: "#000000",
weight: 2
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "find_replace_text",
arguments: {
rootNodeId: "0:1", // search entire page
findText: "Company Name",
replaceText: "Acme Corp",
useRegex: false,
caseSensitive: false
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "resize_nodes",
arguments: {
nodeIds: ["123:456"],
width: 1200,
height: 800
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "move_nodes",
arguments: {
nodeIds: ["123:456"],
x: 200,
y: 300
}
});const component = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_component",
arguments: {
nodeId: "123:456", // must be a FRAME
name: "Button/Primary"
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "swap_component",
arguments: {
instanceId: "123:789",
newComponentId: "456:123"
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "detach_instance",
arguments: {
nodeIds: ["123:789"]
}
});const style = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_paint_style",
arguments: {
name: "Colors/Primary/500",
color: "#0066FF"
}
});const textStyle = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_text_style",
arguments: {
name: "Heading/H1",
fontFamily: "Inter",
fontStyle: "Bold",
fontSize: 48,
lineHeight: 56,
letterSpacing: -0.5
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "apply_style_to_node",
arguments: {
nodeId: "123:456",
styleId: style.id,
styleType: "FILL" // FILL | STROKE | TEXT | EFFECT | GRID
}
});const collection = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_variable_collection",
arguments: {
name: "Spacing",
initialModeName: "Default"
}
});const variable = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_variable",
arguments: {
collectionId: collection.id,
name: "spacing-md",
resolvedType: "FLOAT"
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_variable_value",
arguments: {
variableId: variable.id,
modeId: collection.defaultModeId,
value: 16
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "bind_variable_to_node",
arguments: {
nodeId: "123:456",
variableId: variable.id,
field: "itemSpacing" // fillColor | strokeColor | width | height | opacity | rotation | visible | cornerRadius | itemSpacing | paddingLeft | etc.
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_reactions",
arguments: {
nodeId: "123:456",
reactions: [
{
trigger: { type: "ON_CLICK" },
actions: [
{
type: "NODE",
destinationId: "123:789",
navigation: "NAVIGATE",
transition: {
type: "DISSOLVE",
duration: 0.3,
easing: { type: "EASE_OUT" }
}
}
]
}
],
mode: "replace" // replace | append
}
});const reactions = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "get_reactions",
arguments: {
nodeId: "123:456"
}
});const screenshot = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "get_screenshot",
arguments: {
nodeId: "123:456",
format: "PNG",
scale: 2
}
});
// Returns base64-encoded imageawait use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "save_screenshots",
arguments: {
nodeIds: ["123:456", "123:789"],
outputDir: "/path/to/exports",
format: "PNG",
scale: 2,
filenameTemplate: "{nodeName}_{nodeId}"
}
});await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "export_frames_to_pdf",
arguments: {
frameIds: ["123:1", "123:2", "123:3"],
outputPath: "/path/to/output.pdf",
scale: 2
}
});const tokens = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "export_tokens",
arguments: {
format: "json" // json | css
}
});
// Returns design tokens (variables + paint styles)// 1. Create color variables
const colorCollection = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_variable_collection",
arguments: { name: "Colors", initialModeName: "Light" }
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "add_variable_mode",
arguments: { collectionId: colorCollection.id, modeName: "Dark" }
});
const primaryVar = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_variable",
arguments: {
collectionId: colorCollection.id,
name: "primary",
resolvedType: "COLOR"
}
});
// Set values for both modes
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_variable_value",
arguments: {
variableId: primaryVar.id,
modeId: colorCollection.modes[0].id, // Light
value: "#0066FF"
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_variable_value",
arguments: {
variableId: primaryVar.id,
modeId: colorCollection.modes[1].id, // Dark
value: "#66B3FF"
}
});
// 2. Create component with bound variable
const buttonFrame = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_frame",
arguments: {
name: "Button",
width: 200,
height: 48,
layoutMode: "HORIZONTAL",
primaryAxisAlignItems: "CENTER",
counterAxisAlignItems: "CENTER"
}
});
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "bind_variable_to_node",
arguments: {
nodeId: buttonFrame.id,
variableId: primaryVar.id,
field: "fillColor"
}
});
const component = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_component",
arguments: { nodeId: buttonFrame.id, name: "Button/Primary" }
});// Find all text nodes in a page
const textNodes = await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "scan_text_nodes",
arguments: { rootNodeId: "0:1" }
});
// Update placeholder text
for (const node of textNodes) {
if (node.characters.includes("Lorem ipsum")) {
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "set_text",
arguments: {
nodeId: node.id,
characters: node.characters.replace("Lorem ipsum", "Real content")
}
});
}
}
// Or use find_replace_text for efficiency
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "find_replace_text",
arguments: {
rootNodeId: "0:1",
findText: "Lorem ipsum",
replaceText: "Real content",
useRegex: false
}
});// Group related frames
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "group_nodes",
arguments: {
nodeIds: ["123:1", "123:2", "123:3"],
groupName: "Button Variants"
}
});
// Create sections for organization
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "create_section",
arguments: {
name: "Components",
x: 0,
y: 0,
width: 2000,
height: 1000
}
});
// Batch rename nodes
await use_mcp_tool({
server_name: "figma-mcp-go",
tool_name: "batch_rename_nodes",
arguments: {
rootNodeId: "0:1",
findPattern: "Frame",
replaceText: "Card",
useRegex: false
}
});read_design_strategydesign_strategytext_replacement_strategyannotation_conversion_strategyswap_overrides_instancesreaction_to_connector_strategyget_documentsearch_nodescreate_componentget_fontssave_screenshotsexport_frames_to_pdfmaxDepthget_design_contextdetail: "minimal"get_nodesearch_nodes