@mastergo/magic-mcp 0.0.4-beta.5 → 0.0.4-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,6 +81,58 @@ Cursor Mcp usage guide reference: https://docs.cursor.com/context/model-context-
81
81
  }
82
82
  ```
83
83
 
84
+ ## Project Structure
85
+
86
+ ### src Directory
87
+
88
+ The `src` directory contains the core implementation of the MasterGo Magic MCP service:
89
+
90
+ - `index.ts`: Entry point of the application that initializes the MCP server and registers all tools
91
+ - `http-util.ts`: Utility for handling HTTP requests to the MasterGo API
92
+ - `types.d.ts`: TypeScript type definitions for the project
93
+
94
+ #### src/tools
95
+
96
+ Contains implementations of MCP tools:
97
+
98
+ - `base-tool.ts`: Base class for all MCP tools
99
+ - `get-dsl.ts`: Tool for retrieving DSL (Domain Specific Language) data from MasterGo design files
100
+ - `get-component-link.ts`: Tool for retrieving component documentation from links
101
+ - `get-meta.ts`: Tool for retrieving metadata information
102
+ - `get-component-workflow.ts`: Tool providing structured component development workflow for Vue and React components, generating workflow files and component specifications
103
+
104
+ #### src/markdown
105
+
106
+ Contains markdown files with additional documentation:
107
+
108
+ - `meta.md`: Documentation about metadata structure and usage
109
+ - `component-workflow.md`: Component development workflow documentation guiding structured component development process
110
+
111
+ ## Local Development
112
+
113
+ 1. Run `yarn` and `yarn build` to install dependencies and build the code
114
+ 2. Find the absolute path of `bin/cli.js`
115
+ 3. Add local MCP configuration with your token
116
+
117
+ ```json
118
+ "mastergo-mcp-local": {
119
+ "command": "node",
120
+ "args": [
121
+ "absolute/path/to/bin/cli.js",
122
+ "--token=mg_xxxxxx",
123
+ "--url=https://mastergo.com",
124
+ "--debug"
125
+ ],
126
+ "env": {}
127
+ },
128
+ ```
129
+
130
+ 4. Restart your editor to ensure the local MCP is enabled
131
+
132
+ After successful execution, you can debug based on the local running results. You can build your own MCP service based on your modifications.
133
+
134
+ We welcome your code contributions and look forward to building MasterGo's MCP service together.
135
+
84
136
  ## License
85
137
 
86
138
  ISC
package/README.zh-CN.md CHANGED
@@ -81,6 +81,58 @@ Cursor Mcp 使用指南参考:https://docs.cursor.com/context/model-context-pr
81
81
  }
82
82
  ```
83
83
 
84
+ ## 项目结构
85
+
86
+ ### src 目录
87
+
88
+ `src` 目录包含 MasterGo Magic MCP 服务的核心实现:
89
+
90
+ - `index.ts`:应用程序入口点,初始化 MCP 服务器并注册所有工具
91
+ - `http-util.ts`:处理与 MasterGo API 通信的 HTTP 请求工具
92
+ - `types.d.ts`:项目的 TypeScript 类型定义
93
+
94
+ #### src/tools
95
+
96
+ 包含 MCP 工具的实现:
97
+
98
+ - `base-tool.ts`:所有 MCP 工具的基类
99
+ - `get-dsl.ts`:从 MasterGo 设计文件中获取 DSL(领域特定语言)数据的工具
100
+ - `get-component-link.ts`:从链接中获取组件文档的工具
101
+ - `get-meta.ts`:获取元数据信息的工具
102
+ - `get-component-workflow.ts`:提供结构化的组件开发工作流工具,支持 Vue 和 React 组件开发,生成所需的工作流文件和组件规范
103
+
104
+ #### src/markdown
105
+
106
+ 包含附加文档的 markdown 文件:
107
+
108
+ - `meta.md`:关于元数据结构和用法的文档
109
+ - `component-workflow.md`:组件开发工作流程文档,指导结构化组件开发过程
110
+
111
+ ## 本地运行
112
+
113
+ 1. 运行`yarn`,`yarn build`。安装依赖并构建代码
114
+ 2. 查看`bin/cli.js`的绝对路径
115
+ 3. 在MCP配置中添加本地MCP配置,其中token为您换区的token
116
+
117
+ ```json
118
+ "mastergo-mcp-local": {
119
+ "command": "node",
120
+ "args": [
121
+ "bin/cli.js绝对路径地址",
122
+ "--token=mg_xxxxxx",
123
+ "--url=https://mastergo.com",
124
+ "--debug"
125
+ ],
126
+ "env": {}
127
+ },
128
+ ```
129
+
130
+ 4. 重启编辑器,确认本地mcp已开启
131
+
132
+ 运行成功后,就可以基于本地运行的结果进行调试。您可以基于自己的修改构建自己的MCP服务。
133
+
134
+ 欢迎您为我们提供代码贡献,并期待大家一起共建MasterGo的MCP服务。
135
+
84
136
  ## 许可证
85
137
 
86
138
  ISC