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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@smart-h5/mastergo-mcp

v0.0.1

Published

MasterGo MCP standalone service

Readme

MasterGo Magic MCP

MasterGo Magic MCP 是一个独立的 MCP(Model Context Protocol)服务,旨在连接 MasterGo 设计工具与 AI 模型。它使 AI 模型能够直接从 MasterGo 设计文件中获取 DSL 数据。

主要特性

  • 从 MasterGo 设计文件中获取 DSL 数据
  • 可直接通过 npx 运行
  • 仅需 Node.js 环境,无需其他外部依赖

教程

  • https://mastergo.com/file/155675508499265?page_id=158:0002

使用方法

获取 MG_MCP_TOKEN

  1. 访问 https://mastergo.com
  2. 进入个人设置
  3. 点击安全设置选项卡
  4. 找到个人访问令牌
  5. 点击生成令牌

命令行选项

npx @mastergo/magic-mcp --token=YOUR_TOKEN [--url=API_URL] [--rule=RULE_NAME] [--debug]

参数:

  • --token=YOUR_TOKEN (必需): MasterGo API 认证令牌
  • --url=API_URL (可选): API 基础 URL,默认为 http://localhost:3000
  • --rule=RULE_NAME (可选): 添加要应用的设计规则,可多次使用
  • --debug (可选): 启用调试模式,提供详细错误信息

你也可以使用空格分隔的参数格式:

npx @mastergo/magic-mcp --token YOUR_TOKEN --url API_URL --rule RULE_NAME --debug

Cursor 使用方法

Cursor Mcp 使用指南参考:https://docs.cursor.com/context/model-context-protocol#using-mcp-tools-in-agent

{
  "mcpServers": {
    "mastergo-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mastergo/magic-mcp",
        "--token=<MG_MCP_TOKEN>",
        "--url=https://mastergo.com"
      ],
      "env": {}
    }
  }
}

cline 使用方法

{
  "mcpServers": {
    "@master/mastergo-magic-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mastergo/magic-mcp",
        "--token=<MG_MCP_TOKEN>",
        "--url=https://mastergo.com"
      ],
      "env": {}
    }
  }
}

项目结构

src 目录

src 目录包含 MasterGo Magic MCP 服务的核心实现:

  • index.ts:应用程序入口点,初始化 MCP 服务器并注册所有工具
  • http-util.ts:处理与 MasterGo API 通信的 HTTP 请求工具
  • types.d.ts:项目的 TypeScript 类型定义

src/tools

包含 MCP 工具的实现:

  • base-tool.ts:所有 MCP 工具的基类
  • get-dsl.ts:从 MasterGo 设计文件中获取 DSL(领域特定语言)数据的工具
  • get-component-link.ts:从链接中获取组件文档的工具
  • get-meta.ts:获取元数据信息的工具

src/markdown

包含附加文档的 markdown 文件:

  • meta.md:关于元数据结构和用法的文档

本地运行

  1. 运行yarnyarn build。安装依赖并构建代码
  2. 查看bin/cli.js的绝对路径
  3. 在MCP配置中添加本地MCP配置,其中token为您换区的token
"mastergo-mcp-local": {
  "command": "node",
  "args": [
    "bin/cli.js绝对路径地址",
    "--token=mg_xxxxxx",
    "--url=https://mastergo.com",
    "--debug"
  ],
  "env": {}
},
  1. 重启编辑器,确认本地mcp已开启

运行成功后,就可以基于本地运行的结果进行调试。您可以基于自己的修改构建自己的MCP服务。

欢迎您为我们提供代码贡献,并期待大家一起共建MasterGo的MCP服务。

许可证

ISC