builder-proj-mcp 1.0.4 → 1.0.6

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  A powerful Model Context Protocol (MCP) server for building project structures with various frameworks. This tool helps you quickly scaffold projects for Spring Boot, React, Vue, FastAPI, Django, Flask, Express, Fastify, NestJS, and more.
4
4
 
5
+ **Language**: [English](README.md) | [中文](README.zh-CN.md)
6
+
5
7
  ## Features
6
8
 
7
9
  - **Multiple Framework Support**: Build projects for various tech stacks
@@ -41,6 +43,17 @@ A powerful Model Context Protocol (MCP) server for building project structures w
41
43
 
42
44
  ## Installation
43
45
 
46
+ ### Using npx (Recommended)
47
+
48
+ The easiest way to use Builder Project MCP Server is via npx, which downloads and runs the package automatically:
49
+
50
+ ```bash
51
+ # Run directly with npx
52
+ npx builder-proj-mcp
53
+ ```
54
+
55
+ ### From Source
56
+
44
57
  ```bash
45
58
  # Clone the repository
46
59
  git clone <repository-url>
@@ -53,12 +66,37 @@ npm install
53
66
  npm run build
54
67
  ```
55
68
 
69
+ ### Global Installation
70
+
71
+ You can also install it globally to use it from anywhere:
72
+
73
+ ```bash
74
+ # Install globally
75
+ npm install -g builder-proj-mcp
76
+
77
+ # Run the server
78
+ builder-proj-mcp
79
+ ```
80
+
56
81
  ## Usage
57
82
 
58
83
  ### As MCP Server
59
84
 
60
85
  Add to your MCP client configuration:
61
86
 
87
+ **Using npx (Recommended):**
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "builder-proj": {
92
+ "command": "npx",
93
+ "args": ["builder-proj-mcp"]
94
+ }
95
+ }
96
+ }
97
+ ```
98
+
99
+ **Using local installation:**
62
100
  ```json
63
101
  {
64
102
  "mcpServers": {
@@ -198,3 +236,7 @@ MIT
198
236
  ## Support
199
237
 
200
238
  For issues and questions, please open an issue on the repository.
239
+
240
+ ---
241
+
242
+ **Language**: [English](README.md) | [中文](README.zh-CN.md)
@@ -0,0 +1,269 @@
1
+ # Builder Project MCP 服务器
2
+
3
+ 一个强大的模型上下文协议(MCP)服务器,用于构建各种框架的项目结构。此工具可帮助您快速搭建 Spring Boot、React、Vue、FastAPI、Django、Flask、Express、Fastify、NestJS 等框架的项目。
4
+
5
+ **语言**: [English](README.md) | [中文](README.zh-CN.md)
6
+
7
+ ## 功能特性
8
+
9
+ - **多框架支持**: 支持多种技术栈的项目构建
10
+ - **TypeScript 支持**: 完整的 TypeScript 实现
11
+ - **灵活配置**: 自定义项目选项
12
+ - **MCP 协议**: 与 MCP 兼容的客户端无缝集成
13
+
14
+ ## 支持的框架
15
+
16
+ ### Spring/Java
17
+ - `spring-boot` - Spring Boot + Maven
18
+ - `spring` - 通用 Spring 框架
19
+ - `spring-mvc` - Spring MVC
20
+ - `spring-webflux` - Spring WebFlux
21
+
22
+ ### 前端
23
+ - `react` - React + Vite
24
+ - `react-vite` - React + Vite
25
+ - `react-cra` - React + Create React App
26
+ - `vue` - Vue 3 + Vite
27
+ - `vue3` - Vue 3
28
+ - `vue-vite` - Vue + Vite
29
+ - `vite` - 纯 Vite
30
+ - `vite-vanilla` - 纯 Vite
31
+ - `vite-ts` - Vite + TypeScript
32
+
33
+ ### Python
34
+ - `fastapi` - FastAPI + Uvicorn
35
+ - `fastapi-uvicorn` - FastAPI + Uvicorn
36
+ - `fastapi-gunicorn` - FastAPI + Gunicorn
37
+ - `django` - Django
38
+ - `django-rest` - Django REST Framework
39
+ - `django-cms` - Django CMS
40
+ - `flask` - Flask
41
+ - `flask-rest` - Flask REST API
42
+ - `flask-sqlalchemy` - Flask + SQLAlchemy
43
+
44
+ ## 安装
45
+
46
+ ### 使用 npx(推荐)
47
+
48
+ 使用 npx 是最简单的方式,它会自动下载并运行包:
49
+
50
+ ```bash
51
+ # 直接使用 npx 运行
52
+ npx builder-proj-mcp
53
+ ```
54
+
55
+ ### 从源码安装
56
+
57
+ ```bash
58
+ # 克隆仓库
59
+ git clone <repository-url>
60
+ cd builder-proj-mcp
61
+
62
+ # 安装依赖
63
+ npm install
64
+
65
+ # 构建项目
66
+ npm run build
67
+ ```
68
+
69
+ ### 全局安装
70
+
71
+ 您也可以全局安装以便在任何地方使用:
72
+
73
+ ```bash
74
+ # 全局安装
75
+ npm install -g builder-proj-mcp
76
+
77
+ # 运行服务器
78
+ builder-proj-mcp
79
+ ```
80
+
81
+ ## 使用方法
82
+
83
+ ### 作为 MCP 服务器
84
+
85
+ 添加到您的 MCP 客户端配置中:
86
+
87
+ **使用 npx(推荐):**
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "builder-proj": {
92
+ "command": "npx",
93
+ "args": ["builder-proj-mcp"]
94
+ }
95
+ }
96
+ }
97
+ ```
98
+
99
+ **使用本地安装:**
100
+ ```json
101
+ {
102
+ "mcpServers": {
103
+ "builder-proj": {
104
+ "command": "node",
105
+ "args": ["path/to/builder-proj-mcp/dist/index.js"]
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### 可用工具
112
+
113
+ #### 1. build_project
114
+
115
+ 使用指定框架构建新项目。
116
+
117
+ **参数说明:**
118
+ - `projectName` (string, 必填): 要创建的项目名称
119
+ - `projectType` (string, 可选): 项目类型 (web, api, mobile, desktop)
120
+ - `framework` (string, 必填): 使用的框架
121
+ - `options` (object, 可选): 额外配置选项
122
+
123
+ **示例:**
124
+
125
+ ```typescript
126
+ // 创建 React 项目
127
+ {
128
+ "projectName": "my-react-app",
129
+ "framework": "react",
130
+ "options": {
131
+ "typescript": true,
132
+ "tailwind": true,
133
+ "stateManagement": "zustand",
134
+ "router": true
135
+ }
136
+ }
137
+
138
+ // 创建 Vue 项目
139
+ {
140
+ "projectName": "my-vue-app",
141
+ "framework": "vue",
142
+ "options": {
143
+ "typescript": true,
144
+ "tailwind": true,
145
+ "stateManagement": "pinia",
146
+ "router": true
147
+ }
148
+ }
149
+
150
+ // 创建 Spring Boot 项目
151
+ {
152
+ "projectName": "my-spring-app",
153
+ "framework": "spring-boot",
154
+ "options": {
155
+ "javaVersion": "17",
156
+ "springBootVersion": "3.2.0",
157
+ "groupId": "com.example"
158
+ }
159
+ }
160
+
161
+ // 创建 FastAPI 项目
162
+ {
163
+ "projectName": "my-api",
164
+ "framework": "fastapi",
165
+ "options": {
166
+ "pythonVersion": "3.11",
167
+ "docker": true,
168
+ "tests": true
169
+ }
170
+ }
171
+ ```
172
+
173
+ #### 2. list_frameworks
174
+
175
+ 列出所有支持的项目框架。
176
+
177
+ **示例:**
178
+ ```typescript
179
+ {
180
+ "name": "list_frameworks"
181
+ }
182
+ ```
183
+
184
+ ## 框架特定选项
185
+
186
+ ### React/Vue/Vite
187
+ - `typescript`: 使用 TypeScript(默认: true)
188
+ - `tailwind`: 使用 Tailwind CSS(默认: false)
189
+ - `stateManagement`: 状态管理库(默认: none)
190
+ - `zustand` - React 状态管理
191
+ - `pinia` - Vue 状态管理
192
+ - `redux` - React 状态管理
193
+ - `router`: 包含路由配置(默认: false)
194
+ - `eslint`: 包含 ESLint 配置(默认: false)
195
+ - `prettier`: 包含 Prettier 配置(默认: false)
196
+ - `testing`: 包含测试配置(默认: true)
197
+
198
+ ### Spring Boot
199
+ - `javaVersion`: Java 版本(默认: "17")
200
+ - `springBootVersion`: Spring Boot 版本(默认: "3.2.0")
201
+ - `groupId`: Maven groupId(默认: "com.example")
202
+ - `artifactId`: Maven artifactId(默认: 项目名称)
203
+ - `docker`: 包含 Docker 配置(默认: true)
204
+ - `tests`: 包含测试配置(默认: true)
205
+
206
+ ### Python (FastAPI/Django/Flask)
207
+ - `pythonVersion`: Python 版本(默认: "3.11")
208
+ - `docker`: 包含 Docker 配置(默认: true)
209
+ - `tests`: 包含测试配置(默认: true)
210
+ - `database`: 数据库类型(如 postgresql, mysql, mongodb)
211
+
212
+ ## 项目结构
213
+
214
+ ```
215
+ builder-proj-mcp/
216
+ ├── src/
217
+ │ ├── builders/
218
+ │ │ ├── spring-boot-builder.ts
219
+ │ │ ├── react-builder.ts
220
+ │ │ ├── vue-builder.ts
221
+ │ │ ├── fastapi-builder.ts
222
+ │ │ ├── django-builder.ts
223
+ │ │ ├── flask-builder.ts
224
+ │ │ ├── vite-builder.ts
225
+ │ │ └── index.ts
226
+ │ ├── types.ts
227
+ │ └── index.ts
228
+ ├── package.json
229
+ ├── tsconfig.json
230
+ └── README.md
231
+ ```
232
+
233
+ ## 开发
234
+
235
+ ```bash
236
+ # 开发模式运行
237
+ npm run dev
238
+
239
+ # 构建生产版本
240
+ npm run build
241
+
242
+ # 启动服务器
243
+ npm start
244
+ ```
245
+
246
+ ## 架构
247
+
248
+ 项目采用构建者模式,包含以下组件:
249
+
250
+ - **ProjectBuilder 接口**: 定义所有构建者的契约
251
+ - **BuilderFactory**: 管理和提供对所有构建者的访问
252
+ - **框架构建者**: 每个框架的独立实现
253
+ - **MCP 服务器**: 处理工具注册和请求处理
254
+
255
+ ## 贡献
256
+
257
+ 欢迎贡献!请随时提交 Pull Request。
258
+
259
+ ## 许可证
260
+
261
+ MIT
262
+
263
+ ## 支持
264
+
265
+ 如有问题和疑问,请在该仓库中开启 issue。
266
+
267
+ ---
268
+
269
+ **语言切换**: [English](README.md) | [中文](README.zh-CN.md)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAY7C,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAWrB;IAEF,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAM3D,MAAM,CAAC,sBAAsB,IAAI,MAAM,EAAE;CAG1C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAa7C,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAYrB;IAEF,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI;IAM3D,MAAM,CAAC,sBAAsB,IAAI,MAAM,EAAE;CAG1C"}
@@ -8,6 +8,7 @@ import { ViteBuilder } from './vite-builder.js';
8
8
  import { ExpressBuilder } from './express-builder.js';
9
9
  import { FastifyBuilder } from './fastify-builder.js';
10
10
  import { NestJSBuilder } from './nestjs-builder.js';
11
+ import { NextJSBuilder } from './nextjs-builder.js';
11
12
  export class BuilderFactory {
12
13
  static builders = [
13
14
  new SpringBootBuilder(),
@@ -19,7 +20,8 @@ export class BuilderFactory {
19
20
  new ViteBuilder(),
20
21
  new ExpressBuilder(),
21
22
  new FastifyBuilder(),
22
- new NestJSBuilder()
23
+ new NestJSBuilder(),
24
+ new NextJSBuilder()
23
25
  ];
24
26
  static getBuilder(framework) {
25
27
  return this.builders.find(builder => builder.supportedFrameworks.includes(framework.toLowerCase())) || null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/builders/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,cAAc;IACjB,MAAM,CAAC,QA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EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,cAAc;IACjB,MAAM,CAAC,QAAQ,GAAqB;QAC1C,IAAI,iBAAiB,EAAE;QACvB,IAAI,YAAY,EAAE;QAClB,IAAI,UAAU,EAAE;QAChB,IAAI,cAAc,EAAE;QACpB,IAAI,aAAa,EAAE;QACnB,IAAI,YAAY,EAAE;QAClB,IAAI,WAAW,EAAE;QACjB,IAAI,cAAc,EAAE;QACpB,IAAI,cAAc,EAAE;QACpB,IAAI,aAAa,EAAE;QACnB,IAAI,aAAa,EAAE;KACpB,CAAC;IAEF,MAAM,CAAC,UAAU,CAAC,SAAiB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAClC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAC9D,IAAI,IAAI,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,sBAAsB;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACvE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ProjectBuilder, ProjectConfig, BuilderResult } from '../types.js';
2
+ export declare class NextJSBuilder implements ProjectBuilder {
3
+ supportedFrameworks: string[];
4
+ build(config: ProjectConfig): Promise<BuilderResult>;
5
+ private createNextJSProject;
6
+ private createAppRouterSourceFiles;
7
+ private createPagesRouterSourceFiles;
8
+ private createTailwindConfig;
9
+ private createGitignore;
10
+ private createNextEnvFile;
11
+ }
12
+ //# sourceMappingURL=nextjs-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextjs-builder.d.ts","sourceRoot":"","sources":["../../src/builders/nextjs-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AAI5F,qBAAa,aAAc,YAAW,cAAc;IAClD,mBAAmB,WAAgD;IAE7D,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;YA4B5C,mBAAmB;YAqInB,0BAA0B;YAmO1B,4BAA4B;YAsN5B,oBAAoB;YA6BpB,eAAe;YAuCf,iBAAiB;CAShC"}