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

figma-code-agent-mcp

v1.0.23

Published

AI agents design in Figma through code execution. 4 MCP tools, 30+ sandbox methods, multi-agent hub. Works with Claude Code, Cursor, Codex, Gemini.

Downloads

139

Readme

figma-code-agent-mcp

AI agents design in Figma through code execution. 4 MCP tools, 30+ sandbox methods, multi-agent hub. Works with Claude Code, Cursor, Codex, Gemini, and any MCP-compatible client.

What makes this different?

Most Figma MCPs are read-only or expose dozens of individual tools that bloat the AI's context window. This one gives the AI a JavaScript sandbox — it writes code, Figma executes it. One execute tool replaces 30+ individual tools, supports batch operations, loops, conditionals, and data filtering. A built-in hub lets multiple AI agents collaborate on the same file simultaneously.

| Tool | Description | |------|-------------| | execute | Run JavaScript with 30+ figma.* API methods | | search_tools | Discover available methods and parameters | | capture_screenshot | Export nodes as PNG, JPG, SVG, or PDF | | get_design_context | Generate React + Tailwind code from a design |

Setup

1. Add MCP Server to your AI client

Claude Code

claude mcp add figma -- npx figma-code-agent-mcp

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["figma-code-agent-mcp"]
    }
  }
}

Codex

codex mcp add npx figma-code-agent-mcp figma

Gemini CLI

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["figma-code-agent-mcp"]
    }
  }
}

2. Install Figma Plugin

  1. Download figma-plugin.zip from Releases (or clone the repo and use figma-plugin/)
  2. In Figma: Plugins > Development > Import plugin from manifest...
  3. Select manifest.json from the plugin folder
  4. Run the plugin — it should show "Connected"

The hub auto-discovers on ports 40001-40010. No configuration needed.

3. Verify

Ask your AI agent:

Check the Figma connection status

What it can do

Create a card with a profile picture, name, and bio
Redesign the selected button to match our design system
Find existing button components and use them
Check accessibility of the current page
Export the hero section as PNG
Generate React code from this design

Example: what the AI generates

// Reuse existing design system components
const matches = await figma.suggestComponent({ query: "button" });
if (matches.count > 0) {
  const btn = await figma.createInstance({ componentId: matches.results[0].id });
}

// Or build from scratch
await figma.create({
  type: 'card',
  name: 'Profile Card',
  children: [
    { type: 'rectangle', width: 64, height: 64, cornerRadius: 32, fill: '#E2E8F0' },
    { type: 'text', content: 'Jane Doe', fontSize: 18, fontWeight: 'Bold' },
    { type: 'text', content: 'Product Designer', fontSize: 14, fill: '#64748B' }
  ]
});

API at a glance

// Create
figma.create({ type, ... })          // Unified create with presets (card, button, nav, input, form)
figma.createFrame / createRectangle / createText / createInstance / cloneNode

// Read
figma.getNode / getChildren / getSelection / getCurrentPage / getStyles
figma.getLocalComponents / getVariables / searchNodes / captureScreenshot
figma.suggestComponent({ query })    // Find matching design system components

// Update
figma.updateNode / moveNode / swapComponent / replaceWithInstance

// Delete
figma.deleteNode

// Components & Tokens
figma.toComponent / createVariants / addComponentProperty / setInstanceOverride
figma.createToken / bindToken

// Accessibility
figma.checkAccessibility   // WCAG contrast & touch target checks

// Batch & FigJam
figma.batch([...])         // Multiple operations in one round-trip
figma.createSection / createSticky / createShape / createConnector

Use search_tools to discover full parameter details for any method.

Architecture

AI Client  <-- stdio -->  MCP Server  <-- WebSocket -->  Figma Plugin
(Claude,                  (Node.js)      hub (ports
 Cursor...)              VM Sandbox      40001-40010)
                          30+ figma.* methods

Multiple AI agents connect through the hub simultaneously — each gets its own session.

Troubleshooting

  • Plugin not connecting? Make sure the MCP server is running; the hub scans ports 40001-40010
  • Timeout errors? Commands auto-retry once; for large operations, use batches
  • Large designs? Use maxNodes in get_design_context to limit response size
  • Plugin doesn't appear? Import via Plugins > Development > Import plugin from manifest

Links

License

MIT