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.5

Published

MCP server for Figma integration via WebSocket bridge

Readme

figma-code-agent-mcp

AI agents design in Figma through code execution. Works with Claude Code, Cursor, Codex, Gemini, and any MCP-compatible client.

Instead of dozens of individual tools (which bloat the context window), this MCP server exposes 4 focused tools and a 26-method JavaScript sandbox — the AI writes code, Figma executes it.

| Tool | Description | |------|-------------| | execute | Run JavaScript with 26 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"

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
Check accessibility of the current page
Export the hero section as PNG
Generate React code from this design

Example: what the AI generates

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 / getSelection / getCurrentPage / getStyles / getLocalComponents
figma.getVariables / searchNodes / captureScreenshot

// Update
figma.updateNode / moveNode / swapComponent

// Delete
figma.deleteNode

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

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

Use search_tools to discover full parameter details for any method.

Architecture

AI Client  ←— stdio —→  MCP Server  ←— WebSocket —→  Figma Plugin
(Claude,                 (Node.js)      port 3001
 Cursor…)               VM Sandbox
                         26 figma.* methods

Troubleshooting

  • Plugin not connecting? Make sure the MCP server is running and port 3001 is free
  • Timeout errors? The sandbox has a 60s limit — break large operations into batches
  • Plugin doesn't appear? Import via Plugins > Development > Import plugin from manifest

Links

License

MIT