npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@standardbeagle/figma-query

v0.1.0

Published

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

Downloads

93

Readme

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