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

@jacob-z/zz-ui-brigde-mcp

v1.0.0

Published

AI 驱动的 MasterGo 设计稿节点查询 MCP 服务。将 MasterGo 插件中的节点数据通过 MCP protocol 暴露给 Claude Code 等 AI 工具。

Downloads

124

Readme

@zz-mcp/ui-diff-mcp

AI 驱动的 MasterGo 设计稿节点查询 MCP 服务。将 MasterGo 插件中的节点数据通过 MCP protocol 暴露给 Claude Code 等 AI 工具。

功能

  • 实时选中快照:MasterGo 中选中任意节点,AI 可立即获取其属性
  • 按需节点查询:通过 nodeId 精确查询任意节点的详细信息
  • 双通道通信:MCP stdio 通道 + HTTP 本地服务(port 18765)

可用函数

get_selected_node

获取 MasterGo 当前选中节点的属性快照。无需等待,直接返回缓存数据。

参数:无

返回值示例

{
  "selected": {
    "id": "11:809",
    "name": "容器 1117",
    "type": "FRAME",
    "x": 488,
    "y": 24,
    "width": 236,
    "height": 232,
    "fills": [{ "type": "SOLID", "color": { "r": 0.91, "g": 0.79, "b": 0.79, "a": 1 } }],
    "opacity": 1,
    "childrenIds": ["11:0010", "11:0019", "11:0028", "11:0037"]
  },
  "freshAt": 1778263424580
}

get_node_by_id

按 nodeId 精确查询 MasterGo 节点属性。同步阻塞等待插件响应,超时 25 秒。

参数: | 字段 | 类型 | 必填 | 说明 | |------|------|------|------| | nodeId | string | 是 | MasterGo 节点 ID |

返回值:节点属性 JSON,包含 id、name、type、x、y、width、height、opacity、fills、fontSize、characters、fontName 等字段

MCP 配置

Claude Code

.claude/settings.json 中添加:

{
  "mcpServers": {
    "ui-diff-mcp": {
      "command": "npx",
      "args": ["-y", "@zz-mcp/ui-diff-mcp"]
    }
  }
}

重启 Claude Code 后,在对话中执行 /mcp 确认状态为 connected

本地开发(源码运行)

# 进入包目录
cd packages/ui-diff-mcp

# 源码运行(需 tsx)
pnpm mcp:server

# 或构建后运行
pnpm build
node dist/index.js

架构

Claude Code (MCP Client)
    |
    | stdio protocol
    v
MCP Server (@zz-mcp/ui-diff-mcp)
    |
    | HTTP localhost:18765
    v
UI iframe (mcp-bridge.ts)
    |
    | postMessage
    v
MasterGo Sandbox (lib/main.ts)
    |
    v
MasterGo Plugin API (mg.*)

配套插件

本 MCP 服务需要配合 MasterGo 插件使用。插件负责:

  • 监听选择变化,推送节点快照
  • 响应 GET_NODE_INFO 消息,查询指定节点

插件发布地址:MasterGo 插件广场(待补充)

环境要求

  • Node.js >= 18.0.0

版本

当前版本:1.0.0