Skip to content

Feature Request: Add fontFamily parameter to create_text and set_text_content #138

@kuba-guzik

Description

@kuba-guzik

Problem

Currently, the create_text tool only supports fontSize, fontWeight, and fontColor parameters. There is no way to set the font family when creating or modifying text nodes programmatically.

This means all text created via MCP defaults to Figma's default font (Inter), even when the design system requires specific fonts like custom/locally installed typefaces.

Use Case

When building a design system programmatically (e.g., extracting styles from a live website and recreating them in Figma), typography is a fundamental token. Being unable to set font family makes it impossible to fully automate design system creation.

Example: A brand uses Arbeit Pro for headings and Basier Square Mono for body text. Both fonts are installed locally and available in Figma Desktop. However, the MCP tool creates all text in Inter, requiring manual font changes afterwards.

Proposed Solution

Add an optional fontFamily parameter to:

  • create_text - set font family when creating a new text node
  • set_text_content - optionally change font family when updating text

Suggested API

{
  "text": "Heading",
  "fontSize": 32,
  "fontWeight": 400,
  "fontFamily": "Arbeit Pro Trial",
  "fontColor": { "r": 0, "g": 0, "b": 0 }
}

Implementation Note

In the Figma Plugin API, font family can be set via loadFontAsync({ family, style }) followed by assigning node.fontName. The font must be available in Figma (either installed locally for Desktop, or a Google Font).

A graceful fallback would be ideal - if the requested font is not available, keep the default and optionally return a warning.

Impact

This would unlock full design system automation through MCP, which is one of the primary use cases for this tool.

Thank you for the great project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions