mcp figma

Local 2025-08-31 23:58:45 0
Developer Tools @smithery-ai/mcp-figma

A Model Context Protocol server that provides access to Figma API functionality, allowing AI assistants like Claude to interact with Figma files, comments, components, and team resources.


A Model Context Protocol (MCP) server for Figma API integration, designed to be used with Claude and other MCP-compatible AI assistants.

npm version

Features

This MCP server provides access to Figma API functionality:

  • File operations (get file, get nodes, get images)
  • Comments management
  • Team/project management
  • Components and styles access
  • Persistent API key storage

Installation

NPM Installation

# Install globally
npm install -g mcp-figma

# Or install locally in a project
npm install mcp-figma

# Update to latest version
npm update -g mcp-figma

Usage with Claude

  1. Add mcp-figma to your Claude configuration:
"mcp-figma": {
  "command": "npx",
  "args": [
    "-y",
    "mcp-figma"
  ]
}
  1. When using Claude, the first time you'll need to set your Figma API key:
Please use mcp-figma to set my Figma API key: figd_xxxxxxxxxxxxxxxxxxxxxxx

Your API key will be stored in ~/.mcp-figma/config.json and will be automatically loaded in future sessions.

  1. You can verify your API key is configured:
Please use mcp-figma to check my API key status
  1. Then use any of the available Figma API functions:
Please use mcp-figma to get the file with key abc123

Available Tools

The server provides the following tools:

  • set_api_key: Set your Figma API personal access token (saved to config)
  • check_api_key: Check if an API key is already configured
  • get_file: Get a Figma file by key
  • get_file_nodes: Get specific nodes from a Figma file
  • get_image: Get images for nodes in a Figma file
  • get_image_fills: Get URLs for images used in a Figma file
  • get_comments: Get comments on a Figma file
  • post_comment: Post a comment on a Figma file
  • delete_comment: Delete a comment from a Figma file
  • get_team_projects: Get projects for a team
  • get_project_files: Get files for a project
  • get_team_components: Get components for a team
  • get_file_components: Get components from a file
  • get_component: Get a component by key
  • get_team_component_sets: Get component sets for a team
  • get_team_styles: Get styles for a team
  • get_file_styles: Get styles from a file
  • get_style: Get a style by key

For detailed usage examples, see USAGE.md.

License

MIT

[
  {
    "description": "Set your Figma API personal access token (will be saved to ~/.mcp-figma/config.json)",
    "inputSchema": {
      "properties": {
        "api_key": {
          "description": "Your Figma API personal access token",
          "type": "string"
        }
      },
      "required": [
        "api_key"
      ],
      "type": "object"
    },
    "name": "set_api_key"
  },
  {
    "description": "Check if a Figma API key is already configured",
    "inputSchema": {
      "properties": {},
      "required": [],
      "type": "object"
    },
    "name": "check_api_key"
  },
  {
    "description": "Get a Figma file by key",
    "inputSchema": {
      "properties": {
        "branch_data": {
          "description": "Optional. Include branch data if true",
          "type": "boolean"
        },
        "depth": {
          "description": "Optional. Depth of nodes to return (1-4)",
          "type": "number"
        },
        "fileKey": {
          "description": "The key of the file to get",
          "type": "string"
        },
        "version": {
          "description": "Optional. A specific version ID to get",
          "type": "string"
        }
      },
      "required": [
        "fileKey"
      ],
      "type": "object"
    },
    "name": "get_file"
  },
  {
    "description": "Get specific nodes from a Figma file",
    "inputSchema": {
      "properties": {
        "depth": {
          "description": "Optional. Depth of nodes to return (1-4)",
          "type": "number"
        },
        "fileKey": {
          "description": "The key of the file to get nodes from",
          "type": "string"
        },
        "node_ids": {
          "description": "Array of node IDs to get",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "version": {
          "description": "Optional. A specific version ID to get",
          "type": "string"
        }
      },
      "required": [
        "fileKey",
        "node_ids"
      ],
      "type": "object"
    },
    "name": "get_file_nodes"
  },
  {
    "description": "Get images for nodes in a Figma file",
    "inputSchema": {
      "properties": {
        "fileKey": {
          "description": "The key of the file to get images from",
          "type": "string"
        },
        "format": {
          "description": "Optional. Image format",
          "enum": [
            "jpg",
            "png",
            "svg",
            "pdf"
          ],
          "type": "string"
        },
        "ids": {
          "description": "Array of node IDs to render",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "scale": {
          "description": "Optional. Scale factor to render at (0.01-4)",
          "type": "number"
        },
        "svg_include_id": {
          "description": "Optional. Include IDs in SVG output",
          "type": "boolean"
        },
        "svg_simplify_stroke": {
          "description": "Optional. Simplify strokes in SVG output",
          "type": "boolean"
        },
        "use_absolute_bounds": {
          "description": "Optional. Use absolute bounds",
          "type": "boolean"
        }
      },
      "required": [
        "fileKey",
        "ids"
      ],
      "type": "object"
    },
    "name": "get_image"
  },
  {
    "description": "Get URLs for images used in a Figma file",
    "inputSchema": {
      "properties": {
        "fileKey": {
          "description": "The key of the file to get image fills from",
          "type": "string"
        }
      },
      "required": [
        "fileKey"
      ],
      "type": "object"
    },
    "name": "get_image_fills"
  },
  {
    "description": "Get comments on a Figma file",
    "inputSchema": {
      "properties": {
        "fileKey": {
          "description": "The key of the file to get comments from",
          "type": "string"
        }
      },
      "required": [
        "fileKey"
      ],
      "type": "object"
    },
    "name": "get_comments"
  },
  {
    "description": "Post a comment on a Figma file",
    "inputSchema": {
      "properties": {
        "client_meta": {
          "description": "Optional. Position of the comment",
          "properties": {
            "node_id": {
              "type": "string"
            },
            "node_offset": {
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                }
              },
              "type": "object"
            },
            "x": {
              "type": "number"
            },
            "y": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "comment_id": {
          "description": "Optional. ID of comment to reply to",
          "type": "string"
        },
        "fileKey": {
          "description": "The key of the file to comment on",
          "type": "string"
        },
        "message": {
          "description": "Comment message text",
          "type": "string"
        }
      },
      "required": [
        "fileKey",
        "message"
      ],
      "type": "object"
    },
    "name": "post_comment"
  },
  {
    "description": "Delete a comment from a Figma file",
    "inputSchema": {
      "properties": {
        "comment_id": {
          "description": "ID of the comment to delete",
          "type": "string"
        },
        "fileKey": {
          "description": "The key of the file to delete a comment from",
          "type": "string"
        }
      },
      "required": [
        "fileKey",
        "comment_id"
      ],
      "type": "object"
    },
    "name": "delete_comment"
  },
  {
    "description": "Get projects for a team",
    "inputSchema": {
      "properties": {
        "cursor": {
          "description": "Optional. Cursor for pagination",
          "type": "string"
        },
        "page_size": {
          "description": "Optional. Number of items per page",
          "type": "number"
        },
        "team_id": {
          "description": "The team ID",
          "type": "string"
        }
      },
      "required": [
        "team_id"
      ],
      "type": "object"
    },
    "name": "get_team_projects"
  },
  {
    "description": "Get files for a project",
    "inputSchema": {
      "properties": {
        "branch_data": {
          "description": "Optional. Include branch data if true",
          "type": "boolean"
        },
        "cursor": {
          "description": "Optional. Cursor for pagination",
          "type": "string"
        },
        "page_size": {
          "description": "Optional. Number of items per page",
          "type": "number"
        },
        "project_id": {
          "description": "The project ID",
          "type": "string"
        }
      },
      "required": [
        "project_id"
      ],
      "type": "object"
    },
    "name": "get_project_files"
  },
  {
    "description": "Get components for a team",
    "inputSchema": {
      "properties": {
        "cursor": {
          "description": "Optional. Cursor for pagination",
          "type": "string"
        },
        "page_size": {
          "description": "Optional. Number of items per page",
          "type": "number"
        },
        "team_id": {
          "description": "The team ID",
          "type": "string"
        }
      },
      "required": [
        "team_id"
      ],
      "type": "object"
    },
    "name": "get_team_components"
  },
  {
    "description": "Get components from a file",
    "inputSchema": {
      "properties": {
        "fileKey": {
          "description": "The key of the file to get components from",
          "type": "string"
        }
      },
      "required": [
        "fileKey"
      ],
      "type": "object"
    },
    "name": "get_file_components"
  },
  {
    "description": "Get a component by key",
    "inputSchema": {
      "properties": {
        "key": {
          "description": "The component key",
          "type": "string"
        }
      },
      "required": [
        "key"
      ],
      "type": "object"
    },
    "name": "get_component"
  },
  {
    "description": "Get component sets for a team",
    "inputSchema": {
      "properties": {
        "cursor": {
          "description": "Optional. Cursor for pagination",
          "type": "string"
        },
        "page_size": {
          "description": "Optional. Number of items per page",
          "type": "number"
        },
        "team_id": {
          "description": "The team ID",
          "type": "string"
        }
      },
      "required": [
        "team_id"
      ],
      "type": "object"
    },
    "name": "get_team_component_sets"
  },
  {
    "description": "Get styles for a team",
    "inputSchema": {
      "properties": {
        "cursor": {
          "description": "Optional. Cursor for pagination",
          "type": "string"
        },
        "page_size": {
          "description": "Optional. Number of items per page",
          "type": "number"
        },
        "team_id": {
          "description": "The team ID",
          "type": "string"
        }
      },
      "required": [
        "team_id"
      ],
      "type": "object"
    },
    "name": "get_team_styles"
  },
  {
    "description": "Get styles from a file",
    "inputSchema": {
      "properties": {
        "fileKey": {
          "description": "The key of the file to get styles from",
          "type": "string"
        }
      },
      "required": [
        "fileKey"
      ],
      "type": "object"
    },
    "name": "get_file_styles"
  },
  {
    "description": "Get a style by key",
    "inputSchema": {
      "properties": {
        "key": {
          "description": "The style key",
          "type": "string"
        }
      },
      "required": [
        "key"
      ],
      "type": "object"
    },
    "name": "get_style"
  }
]