mcp-probe-kit 1.2.8 → 1.2.9

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/build/index.js CHANGED
@@ -3,10 +3,11 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { detectShell, initSetting, initProject, gencommit, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, fix, gensql, resolveConflict, genui, explain, convert, genreadme, split, analyzeProject } from "./tools/index.js";
6
+ import { VERSION, NAME } from "./version.js";
6
7
  // 创建MCP服务器实例
7
8
  const server = new Server({
8
- name: "mcp-probe-kit",
9
- version: "1.2.8",
9
+ name: NAME,
10
+ version: VERSION,
10
11
  }, {
11
12
  capabilities: {
12
13
  tools: {},
@@ -527,8 +528,8 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
527
528
  status: "running",
528
529
  timestamp: new Date().toISOString(),
529
530
  serverInfo: {
530
- name: "mcp-probe-kit",
531
- version: "1.2.8",
531
+ name: NAME,
532
+ version: VERSION,
532
533
  description: "Cursor 开发增强工具集",
533
534
  },
534
535
  tools: {
@@ -1,5 +1,6 @@
1
1
  import { readFileSync, readdirSync, statSync, existsSync } from 'fs';
2
2
  import { join, extname } from 'path';
3
+ import { VERSION } from '../version.js';
3
4
  export async function analyzeProject(args) {
4
5
  const projectPath = args.project_path || process.cwd();
5
6
  const maxDepth = args.max_depth || 5;
@@ -11,68 +12,68 @@ export async function analyzeProject(args) {
11
12
  content: [
12
13
  {
13
14
  type: "text",
14
- text: `# 📊 项目分析报告
15
-
16
- ## 🏗️ 项目概览
17
- - **项目名称**: ${analysis.projectStructure.name}
18
- - **项目类型**: ${analysis.projectStructure.type}
19
- - **技术栈**: ${analysis.projectStructure.framework}
20
- - **主要语言**: ${analysis.projectStructure.language}
21
- - **包管理器**: ${analysis.projectStructure.packageManager}
22
-
23
- ## 📁 目录结构
24
- \`\`\`
25
- ${analysis.directoryTree}
26
- \`\`\`
27
-
28
- ## 🔑 关键文件
29
- ${analysis.keyFiles.map(file => `### ${file.path}
30
- **用途**: ${file.purpose}
31
- ${includeContent ? `\`\`\`${getFileExtension(file.path)}
32
- ${file.content.substring(0, 500)}${file.content.length > 500 ? '\n...' : ''}
33
- \`\`\`` : ''}`).join('\n\n')}
34
-
35
- ## 📦 依赖分析
36
- - **生产依赖**: ${analysis.dependencies.production.length} 个
37
- - **开发依赖**: ${analysis.dependencies.development.length} 个
38
- - **总依赖数**: ${analysis.dependencies.total} 个
39
-
40
- ### 主要依赖
41
- ${analysis.dependencies.production.slice(0, 10).map(dep => `- ${dep}`).join('\n')}
42
-
43
- ## 📈 代码指标
44
- - **总文件数**: ${analysis.codeMetrics.totalFiles}
45
- - **总行数**: ${analysis.codeMetrics.totalLines}
46
- ${analysis.codeMetrics.skippedFiles > 0 ? `- **跳过文件**: ${analysis.codeMetrics.skippedFiles} 个(过大或无法读取)` : ''}
47
- - **文件类型分布**:
15
+ text: `# 📊 项目分析报告
16
+
17
+ ## 🏗️ 项目概览
18
+ - **项目名称**: ${analysis.projectStructure.name}
19
+ - **项目类型**: ${analysis.projectStructure.type}
20
+ - **技术栈**: ${analysis.projectStructure.framework}
21
+ - **主要语言**: ${analysis.projectStructure.language}
22
+ - **包管理器**: ${analysis.projectStructure.packageManager}
23
+
24
+ ## 📁 目录结构
25
+ \`\`\`
26
+ ${analysis.directoryTree}
27
+ \`\`\`
28
+
29
+ ## 🔑 关键文件
30
+ ${analysis.keyFiles.map(file => `### ${file.path}
31
+ **用途**: ${file.purpose}
32
+ ${includeContent ? `\`\`\`${getFileExtension(file.path)}
33
+ ${file.content.substring(0, 500)}${file.content.length > 500 ? '\n...' : ''}
34
+ \`\`\`` : ''}`).join('\n\n')}
35
+
36
+ ## 📦 依赖分析
37
+ - **生产依赖**: ${analysis.dependencies.production.length} 个
38
+ - **开发依赖**: ${analysis.dependencies.development.length} 个
39
+ - **总依赖数**: ${analysis.dependencies.total} 个
40
+
41
+ ### 主要依赖
42
+ ${analysis.dependencies.production.slice(0, 10).map(dep => `- ${dep}`).join('\n')}
43
+
44
+ ## 📈 代码指标
45
+ - **总文件数**: ${analysis.codeMetrics.totalFiles}
46
+ - **总行数**: ${analysis.codeMetrics.totalLines}
47
+ ${analysis.codeMetrics.skippedFiles > 0 ? `- **跳过文件**: ${analysis.codeMetrics.skippedFiles} 个(过大或无法读取)` : ''}
48
+ - **文件类型分布**:
48
49
  ${Object.entries(analysis.codeMetrics.fileTypes)
49
50
  .sort(([, a], [, b]) => b - a)
50
51
  .slice(0, 10)
51
52
  .map(([type, count]) => ` - ${type}: ${count} 个文件`)
52
- .join('\n')}
53
- ${Object.keys(analysis.codeMetrics.fileTypes).length > 10 ? ' - ... (更多类型已省略)' : ''}
54
-
55
- ### 最大文件
56
- ${analysis.codeMetrics.largestFiles.slice(0, 5).map(file => `- ${file.path} (${file.lines} 行)`).join('\n')}
57
-
58
- ## 🏛️ 架构分析
59
- - **设计模式**: ${analysis.architecture.patterns.join(', ')}
60
- - **入口文件**: ${analysis.architecture.entryPoints.join(', ')}
61
- - **核心模块**: ${analysis.architecture.mainModules.join(', ')}
62
-
63
- ## 📋 项目总结
64
- **项目目的**: ${analysis.summary.purpose}
65
- **复杂度**: ${analysis.summary.complexity}
66
- **建议**:
67
- ${analysis.summary.recommendations.map(rec => `- ${rec}`).join('\n')}
68
-
69
- ---
70
- *分析完成时间: ${new Date().toLocaleString('zh-CN')}*
71
- *分析工具: MCP Probe Kit v1.2.8*
72
-
73
- **分析说明**:
74
- - 大型项目会自动采样分析,限制最多扫描 5000 个文件
75
- - 已自动忽略以下目录: \`node_modules\`, \`dist\`, \`build\`, \`.git\`, \`coverage\`, \`.next\`, \`.nuxt\`, \`vendor\` 等
53
+ .join('\n')}
54
+ ${Object.keys(analysis.codeMetrics.fileTypes).length > 10 ? ' - ... (更多类型已省略)' : ''}
55
+
56
+ ### 最大文件
57
+ ${analysis.codeMetrics.largestFiles.slice(0, 5).map(file => `- ${file.path} (${file.lines} 行)`).join('\n')}
58
+
59
+ ## 🏛️ 架构分析
60
+ - **设计模式**: ${analysis.architecture.patterns.join(', ')}
61
+ - **入口文件**: ${analysis.architecture.entryPoints.join(', ')}
62
+ - **核心模块**: ${analysis.architecture.mainModules.join(', ')}
63
+
64
+ ## 📋 项目总结
65
+ **项目目的**: ${analysis.summary.purpose}
66
+ **复杂度**: ${analysis.summary.complexity}
67
+ **建议**:
68
+ ${analysis.summary.recommendations.map(rec => `- ${rec}`).join('\n')}
69
+
70
+ ---
71
+ *分析完成时间: ${new Date().toLocaleString('zh-CN')}*
72
+ *分析工具: MCP Probe Kit v${VERSION}*
73
+
74
+ **分析说明**:
75
+ - 大型项目会自动采样分析,限制最多扫描 5000 个文件
76
+ - 已自动忽略以下目录: \`node_modules\`, \`dist\`, \`build\`, \`.git\`, \`coverage\`, \`.next\`, \`.nuxt\`, \`vendor\` 等
76
77
  - 单个文件大小限制: 1MB,超过则跳过`,
77
78
  },
78
79
  ],
@@ -14,8 +14,9 @@ ${changes ? `已提供变更内容:\n${changes}` : `
14
14
 
15
15
  **第二步:分析变更**
16
16
  - 识别变更类型(新功能、修复、重构等)
17
- - 确定影响范围(哪个模块/功能)
17
+ - 选择对应的 emoji 表情
18
18
  - 总结主要变更点
19
+ - 如需要,在 body 中说明影响的模块/范围
19
20
 
20
21
  ---
21
22
 
@@ -23,9 +24,10 @@ ${changes ? `已提供变更内容:\n${changes}` : `
23
24
 
24
25
  **格式**:
25
26
  \`\`\`
26
- <type>(<scope>): <subject>
27
+ <type>: <emoji> <subject>
27
28
 
28
29
  <body>
30
+ (可在 body 中说明影响范围和详细变更)
29
31
 
30
32
  <footer>
31
33
  \`\`\`
@@ -41,15 +43,17 @@ ${changes ? `已提供变更内容:\n${changes}` : `
41
43
  - test ✅(可选): 测试相关
42
44
 
43
45
  **要求**:
44
- 1. subject 使用中文,简洁明了(不超过 50 字)
45
- 2. body 详细说明变更内容(可选)
46
- 3. footer 引用相关 issue(如有)
47
- 4. 如有破坏性变更,添加 BREAKING CHANGE
46
+ 1. type 后面加冒号和空格,然后是对应的 emoji
47
+ 2. subject 使用中文,简洁明了(不超过 50 字)
48
+ 3. body 详细说明变更内容,可包含影响范围、具体改动等(可选)
49
+ 4. footer 引用相关 issue(如有)
50
+ 5. 如有破坏性变更,添加 BREAKING CHANGE
48
51
 
49
- **示例**:
52
+ **示例 1**(详细版,包含影响范围):
50
53
  \`\`\`
51
- feat(auth): 🎸 添加用户登录功能
54
+ feat: 🎸 添加用户登录功能
52
55
 
56
+ 影响模块: auth
53
57
  - 实现 JWT 认证机制
54
58
  - 添加密码加密存储
55
59
  - 实现登录失败重试限制
@@ -57,15 +61,22 @@ feat(auth): 🎸 添加用户登录功能
57
61
  Closes #123
58
62
  \`\`\`
59
63
 
64
+ **示例 2**(包含模块说明):
60
65
  \`\`\`
61
- fixed(api): 🐛 修复用户数据返回异常
66
+ fixed: 🐛 修复用户数据返回异常
62
67
 
68
+ 模块: api
63
69
  - 修复空值判断逻辑
64
70
  - 优化错误处理机制
65
71
 
66
72
  Closes #456
67
73
  \`\`\`
68
74
 
75
+ **示例 3**(简洁版):
76
+ \`\`\`
77
+ chore: 🤖 升级依赖版本至 1.2.9
78
+ \`\`\`
79
+
69
80
  ---
70
81
 
71
82
  **第三步:生成并提交**
@@ -0,0 +1,2 @@
1
+ export declare const VERSION: any;
2
+ export declare const NAME: any;
@@ -0,0 +1,11 @@
1
+ import { readFileSync } from 'fs';
2
+ import { join, dirname } from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ // 获取当前文件的目录
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+ // 读取 package.json
8
+ const packageJsonPath = join(__dirname, '../package.json');
9
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
10
+ export const VERSION = packageJson.version;
11
+ export const NAME = packageJson.name;
package/package.json CHANGED
@@ -1,65 +1,65 @@
1
- {
2
- "name": "mcp-probe-kit",
3
- "version": "1.2.8",
4
- "description": "Cursor Development Enhancement Toolkit - MCP Server with 23 practical tools for code quality, development efficiency, and project management",
5
- "type": "module",
6
- "main": "build/index.js",
7
- "bin": {
8
- "mcp-probe-kit": "build/index.js"
9
- },
10
- "scripts": {
11
- "build": "tsc",
12
- "watch": "tsc --watch",
13
- "dev": "tsc && node build/index.js",
14
- "test": "npm run build && node test-server.js",
15
- "inspector": "npx @modelcontextprotocol/inspector node build/index.js",
16
- "prepare": "npm run build",
17
- "prepublishOnly": "npm run build"
18
- },
19
- "keywords": [
20
- "mcp",
21
- "model-context-protocol",
22
- "cursor",
23
- "ai-tools",
24
- "development-tools",
25
- "code-quality",
26
- "code-review",
27
- "refactor",
28
- "debugging",
29
- "sql-generator",
30
- "ui-generator",
31
- "react",
32
- "vue",
33
- "typescript",
34
- "git-tools",
35
- "ai-assistant"
36
- ],
37
- "author": {
38
- "name": "小墨 (Kyle)",
39
- "url": "https://www.bytezonex.com/"
40
- },
41
- "license": "MIT",
42
- "repository": {
43
- "type": "git",
44
- "url": "https://github.com/mybolide/mcp-probe-kit.git"
45
- },
46
- "bugs": {
47
- "url": "https://github.com/mybolide/mcp-probe-kit/issues"
48
- },
49
- "homepage": "https://github.com/mybolide/mcp-probe-kit#readme",
50
- "engines": {
51
- "node": ">=16.0.0"
52
- },
53
- "files": [
54
- "build",
55
- "README.md",
56
- "LICENSE"
57
- ],
58
- "dependencies": {
59
- "@modelcontextprotocol/sdk": "^0.5.0"
60
- },
61
- "devDependencies": {
62
- "@types/node": "^20.0.0",
63
- "typescript": "^5.3.0"
64
- }
65
- }
1
+ {
2
+ "name": "mcp-probe-kit",
3
+ "version": "1.2.9",
4
+ "description": "Cursor Development Enhancement Toolkit - MCP Server with 23 practical tools for code quality, development efficiency, and project management",
5
+ "type": "module",
6
+ "main": "build/index.js",
7
+ "bin": {
8
+ "mcp-probe-kit": "build/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "watch": "tsc --watch",
13
+ "dev": "tsc && node build/index.js",
14
+ "test": "npm run build && node test-server.js",
15
+ "inspector": "npx @modelcontextprotocol/inspector node build/index.js",
16
+ "prepare": "npm run build",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "keywords": [
20
+ "mcp",
21
+ "model-context-protocol",
22
+ "cursor",
23
+ "ai-tools",
24
+ "development-tools",
25
+ "code-quality",
26
+ "code-review",
27
+ "refactor",
28
+ "debugging",
29
+ "sql-generator",
30
+ "ui-generator",
31
+ "react",
32
+ "vue",
33
+ "typescript",
34
+ "git-tools",
35
+ "ai-assistant"
36
+ ],
37
+ "author": {
38
+ "name": "小墨 (Kyle)",
39
+ "url": "https://www.bytezonex.com/"
40
+ },
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/mybolide/mcp-probe-kit.git"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/mybolide/mcp-probe-kit/issues"
48
+ },
49
+ "homepage": "https://github.com/mybolide/mcp-probe-kit#readme",
50
+ "engines": {
51
+ "node": ">=16.0.0"
52
+ },
53
+ "files": [
54
+ "build",
55
+ "README.md",
56
+ "LICENSE"
57
+ ],
58
+ "dependencies": {
59
+ "@modelcontextprotocol/sdk": "^0.5.0"
60
+ },
61
+ "devDependencies": {
62
+ "@types/node": "^20.0.0",
63
+ "typescript": "^5.3.0"
64
+ }
65
+ }