Skip to main content

Token-efficient Figma MCP server with image export, query DSL, and design token support

Project description

figma-query

Token-efficient Figma MCP server with image export, query DSL, and design token support.

Installation

npm

npm install -g @standardbeagle/figma-query

Or use with npx:

npx @standardbeagle/figma-query

Python (uvx/pipx)

# Using uvx (recommended)
uvx figma-query

# Using pipx
pipx install figma-query

# Using pip
pip install figma-query

Configuration

Environment Variables

  • FIGMA_ACCESS_TOKEN - Your Figma personal access token (required)
  • FIGMA_EXPORT_DIR - Directory for file exports (default: ./figma-export)

Claude Desktop / MCP Client

Add to your MCP configuration:

{
  "mcpServers": {
    "figma-query": {
      "command": "npx",
      "args": ["@standardbeagle/figma-query"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "figma-query": {
      "command": "figma-query",
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Using uvx (Python):

{
  "mcpServers": {
    "figma-query": {
      "command": "uvx",
      "args": ["figma-query"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Tools

Export Tools

Tool Description
sync_file Export entire file to nested folders (includes assets by default)
export_assets Export images/icons for specific nodes
export_tokens Export design tokens to CSS/JSON/Tailwind
download_image Download images by ref ID or render nodes as images

Query Tools

Tool Description
query Query nodes with JSON DSL and data shaping
search Full-text search across names, text, properties
get_tree Get file structure as ASCII tree with node IDs
list_components List all components with usage stats
list_styles List all styles (color, text, effect, grid)

Detail Tools

Tool Description
get_node Get full details for a specific node
get_css Extract CSS properties for node(s)
get_tokens Get design token references and resolved values

Other Tools

Tool Description
wireframe Generate annotated wireframe with node IDs
diff Compare exports or file versions
info Help and status

Projections

Use projections in the select array to get specific property groups:

Projection Properties
@structure id, name, type, visible
@bounds x, y, width, height
@css fills, strokes, effects, cornerRadius, opacity
@layout layoutMode, padding, itemSpacing, constraints
@typography fontFamily, fontSize, fontWeight, lineHeight
@tokens boundVariables
@images imageRefs (from fills/strokes/backgrounds), exportSettings
@all All properties

Examples

Query all buttons

{
  "file_key": "abc123",
  "q": {
    "from": ["COMPONENT"],
    "where": { "name": { "$match": "Button*" } },
    "select": ["@structure", "@css"]
  }
}

Get images from a node

{
  "file_key": "abc123",
  "q": {
    "from": ["FRAME"],
    "select": ["@structure", "@images"]
  }
}

Download image fills

{
  "file_key": "abc123",
  "image_refs": ["ref123", "ref456"],
  "output_dir": "./images"
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

figma_query-0.1.0.tar.gz (12.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figma_query-0.1.0-py3-none-any.whl (12.2 MB view details)

Uploaded Python 3

File details

Details for the file figma_query-0.1.0.tar.gz.

File metadata

  • Download URL: figma_query-0.1.0.tar.gz
  • Upload date:
  • Size: 12.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for figma_query-0.1.0.tar.gz
Algorithm Hash digest
SHA256 32e4f806e139bd195da166f89a329ac7ef3287d01fa95a1487917f7f1c7a36d9
MD5 ce5541fe943fb046cfb7f117cd7b1c2a
BLAKE2b-256 19f8e1bc37e5f12f001294c07743add6f25d6bcfdfa28ca7f78fab8a31c63aee

See more details on using hashes here.

Provenance

The following attestation bundles were made for figma_query-0.1.0.tar.gz:

Publisher: release.yml on standardbeagle/figma-query

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file figma_query-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: figma_query-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for figma_query-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16c3389086550ee5f3d6457e44f0e5e99f25b77ee5041ef022a81c3a098531dc
MD5 039567e9af900c268acf35d5d678d6df
BLAKE2b-256 a81da50b62f874166675524e6bd9b8219febddf21e31a1e38c858fb2f4d5672d

See more details on using hashes here.

Provenance

The following attestation bundles were made for figma_query-0.1.0-py3-none-any.whl:

Publisher: release.yml on standardbeagle/figma-query

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page