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

wlyd-mg-mcp

v0.1.16

Published

MCP server for WLYD MasterGo Chrome extension - exposes mastergo canvas capabilities (selection export, image export, find-by-text) as MCP tools.

Downloads

488

Readme

wlyd-mg-mcp

WLYD MasterGo MCP server —— 把 mastergo 画布里的能力(选中导出、图片导出、文字反查)通过 Model Context Protocol 暴露给 AI 代理。

这只是"桥"的一半,另一半是配套的 Chrome 扩展;只装这个包不能单独工作。

使用前提

  1. Node 20 及以上
  2. 安装 WLYD Common Tools Chrome 扩展(联系仓库维护者获取安装包)
  3. 打开 mastergo.com 里任意一份设计稿

接入 Claude Code / Claude Desktop

在 mcp.json 里添加:

{
  "mcpServers": {
    "wlyd-mastergo": {
      "command": "npx",
      "args": ["-y", "wlyd-mg-mcp@latest"]
    }
  }
}

mcp.json 的位置:

  • Claude Code:~/.config/claude/mcp.json 或项目根 .mcp.json
  • Claude Desktop:~/Library/Application Support/Claude/claude_desktop_config.json(macOS)

打开 mastergo 页面,扩展会自动连上本地桥。

可用 tools

| tool | 说明 | | --- | --- | | mg_status | 桥的连接状态、当前进程 Leader/Follower 角色、活跃 client 数、粘性选中的 clientId | | mg_list_clients | 列出所有已连接的 mastergo tab(clientId、URL、docId、标题、window.mg 是否就绪) | | mg_select_client | 把某个 clientId 设为当前 MCP 会话的粘性目标;传空清除 | | mg_get_selection | 导出粘性选中 tab 里当前选中图层的 tokens(fonts / colors / radii / shadows)+ tree(保留父子层级) | | mg_find_by_text | 按文字反查 TEXT 图层,无需手动点选。默认子串匹配,exact=true 精确匹配 | | mg_export_image | 把粘性选中 tab 里当前选中图层导出为 PNG(base64 image content),让 AI 也能"看"到设计稿 |

典型用法

多 tab 场景下先挑目标,后续调用都作用在这个 tab 上:

1. mg_list_clients          → 拿到所有活跃 tab 的 clientId
2. mg_select_client(id)     → 粘住其中一个
3. mg_get_selection         → 读当前选中样式
   mg_export_image          → 或导出为图
   mg_find_by_text("货源号") → 或按文字反查

单 tab 时可以跳过 select,工具会自动落到唯一活跃 client。

多进程共存

  • Leader 抢到端口,同时开一个 IPC socket 服务其他 MCP 进程
  • 后启动的 MCP 进程作为 Follower,通过 IPC 把调用转给 Leader
  • Leader 挂了会自动重新推选
  • 每个 MCP 进程各自维护 selectedClientId,互不影响

也就是说,同一台机器上可以同时跑多个 Claude Code / Claude Desktop 实例,共享同一个浏览器扩展连接。

端口

默认监听 127.0.0.1:9736,可用环境变量 WLYD_MG_MCP_PORT 覆盖。

License

MIT