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

spark-figma-mcp

v0.1.4

Published

Spark Figma MCP server — bridges Cursor/AI tools to the Spark Figma plugin over localhost WebSocket

Readme

spark-figma-mcp

Spark Figma MCP Server — bridges Cursor / Claude Code / Codex to the Spark Figma plugin over localhost WebSocket.

发布者:lazykids119 · 包页面:https://www.npmjs.com/package/spark-figma-mcp

完整多端说明见仓库根文档 docs/spark-figma-mcp.md

Cursor 配置(推荐)

~/.cursor/mcp.json(或项目 .cursor/mcp.json)中:外层 mcpServers 为 Cursor 固定字段;其下的 server 名与包名统一为 spark-figma-mcp(Cursor MCP 列表显示此名):

{
  "mcpServers": {
    "spark-figma-mcp": {
      "command": "npx",
      "args": ["-y", "spark-figma-mcp"]
    }
  }
}

前提: Figma 桌面端或浏览器 Web已打开目标文件,且 Spark 插件已运行(插件 UI 连 ws://localhost:1994/ws,状态为 Mcp Bridge已启动)。不需要 Figma API Key;Web 端用账号登录 + 跑插件即可。

URL / 选中说明: 把 Figma 设计链接交给 Agent 时,URL 给的是「读哪个节点」的 ID(node-id=1812-7 → MCP 用 1812:7);不必先在画布选中该节点。必须满足的是:该文件在本地 Figma 里打开,且插件 Bridge 已连上。详见 docs/mcp-bridge-workflow.md 第 5 节。
Web 端注意事项:docs/mcp-bridge-workflow.md 第 4 节(同机 localhost、关标签即断桥、不能仅凭链接远程拉稿等)。

关掉旧版、启用 npm 最新版

lsof -tiTCP:1994 -sTCP:LISTEN 2>/dev/null | xargs kill -9 2>/dev/null
pkill -f 'spark-figma-mcp' 2>/dev/null
find ~/.npm/_npx -type d -name 'spark-figma-mcp' -prune -exec rm -rf {} + 2>/dev/null
echo "已清理。请在 Cursor Reload MCP,并重新打开 Spark 插件。"

然后 curl -sS http://127.0.0.1:1994/ping 核对 version。完整说明见 docs/mcp-bridge-workflow.md §7、docs/spark-figma-mcp.md §7。

Claude Code / Codex 配置见 docs/spark-figma-mcp.md

本地开发

从 monorepo 根目录:

pnpm install
pnpm build:mcp
# 或
pnpm --filter spark-figma-mcp build

Cursor 指向本地构建产物:

{
  "mcpServers": {
    "spark-figma-mcp": {
      "command": "node",
      "args": [
        "/ABS/PATH/TO/spark-figma-plugin/packages/mcp-server/dist/index.js"
      ]
    }
  }
}

更多联调说明见 docs/mcp-bridge-workflow.md

发版

在 monorepo 根目录(需已 npm login,账号 lazykids119):

# 预览(不改文件、不发布)
cd packages/mcp-server && node scripts/release.mjs patch --dry-run

# bump patch + 写 CHANGELOG + build + npm publish
pnpm release:mcp:patch

# 只 bump,不发布
cd packages/mcp-server && node scripts/release.mjs patch --no-publish

# 带发布说明
cd packages/mcp-server && node scripts/release.mjs minor --notes "支持某某工具"

不要写成 pnpm release:mcp:patch -- --dry-run:多出来的 -- 会传给脚本并报错。

也可用:

| 命令 | 含义 | |------|------| | pnpm release:mcp:patch | patch:x.y.zx.y.(z+1) | | pnpm release:mcp:minor | minor:x.y.zx.(y+1).0 | | pnpm release:mcp:major | major:x.y.z(x+1).0.0 |

变更记录见 CHANGELOG.md

PNG compression on save

save_screenshots compresses PNG files by default (same TinyPNG-style pipeline as the plugin UI). Compression lives inside this package (src/compress-png.ts).

{
  "items": [{ "nodeId": "1623:1515", "outputPath": "./out/slice.png" }],
  "scale": 3,
  "clip": true,
  "compress": true
}

Set compress: false to keep the raw Figma PNG.