mcp-probe-kit 1.2.7 → 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 +5 -4
- package/build/tools/analyze_project.js +157 -67
- package/build/tools/gencommit.js +20 -9
- package/build/version.d.ts +2 -0
- package/build/version.js +11 -0
- package/package.json +65 -65
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:
|
|
9
|
-
version:
|
|
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:
|
|
531
|
-
version:
|
|
531
|
+
name: NAME,
|
|
532
|
+
version: VERSION,
|
|
532
533
|
description: "Cursor 开发增强工具集",
|
|
533
534
|
},
|
|
534
535
|
tools: {
|
|
@@ -1,67 +1,80 @@
|
|
|
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;
|
|
6
7
|
const includeContent = args.include_content !== false;
|
|
7
8
|
try {
|
|
9
|
+
console.error(`开始分析项目: ${projectPath}`);
|
|
8
10
|
const analysis = await performProjectAnalysis(projectPath, maxDepth, includeContent);
|
|
9
11
|
return {
|
|
10
12
|
content: [
|
|
11
13
|
{
|
|
12
14
|
type: "text",
|
|
13
|
-
text: `# 📊 项目分析报告
|
|
14
|
-
|
|
15
|
-
## 🏗️ 项目概览
|
|
16
|
-
- **项目名称**: ${analysis.projectStructure.name}
|
|
17
|
-
- **项目类型**: ${analysis.projectStructure.type}
|
|
18
|
-
- **技术栈**: ${analysis.projectStructure.framework}
|
|
19
|
-
- **主要语言**: ${analysis.projectStructure.language}
|
|
20
|
-
- **包管理器**: ${analysis.projectStructure.packageManager}
|
|
21
|
-
|
|
22
|
-
## 📁 目录结构
|
|
23
|
-
\`\`\`
|
|
24
|
-
${analysis.directoryTree}
|
|
25
|
-
\`\`\`
|
|
26
|
-
|
|
27
|
-
## 🔑 关键文件
|
|
28
|
-
${analysis.keyFiles.map(file => `### ${file.path}
|
|
29
|
-
**用途**: ${file.purpose}
|
|
30
|
-
${includeContent ? `\`\`\`${getFileExtension(file.path)}
|
|
31
|
-
${file.content.substring(0, 500)}${file.content.length > 500 ? '\n...' : ''}
|
|
32
|
-
\`\`\`` : ''}`).join('\n\n')}
|
|
33
|
-
|
|
34
|
-
## 📦 依赖分析
|
|
35
|
-
- **生产依赖**: ${analysis.dependencies.production.length} 个
|
|
36
|
-
- **开发依赖**: ${analysis.dependencies.development.length} 个
|
|
37
|
-
- **总依赖数**: ${analysis.dependencies.total} 个
|
|
38
|
-
|
|
39
|
-
### 主要依赖
|
|
40
|
-
${analysis.dependencies.production.slice(0, 10).map(dep => `- ${dep}`).join('\n')}
|
|
41
|
-
|
|
42
|
-
## 📈 代码指标
|
|
43
|
-
- **总文件数**: ${analysis.codeMetrics.totalFiles}
|
|
44
|
-
- **总行数**: ${analysis.codeMetrics.totalLines}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
${analysis.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
- **文件类型分布**:
|
|
49
|
+
${Object.entries(analysis.codeMetrics.fileTypes)
|
|
50
|
+
.sort(([, a], [, b]) => b - a)
|
|
51
|
+
.slice(0, 10)
|
|
52
|
+
.map(([type, count]) => ` - ${type}: ${count} 个文件`)
|
|
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\` 等
|
|
77
|
+
- 单个文件大小限制: 1MB,超过则跳过`,
|
|
65
78
|
},
|
|
66
79
|
],
|
|
67
80
|
};
|
|
@@ -181,19 +194,34 @@ function detectPackageManager() {
|
|
|
181
194
|
return 'npm';
|
|
182
195
|
}
|
|
183
196
|
function generateDirectoryTree(projectPath, maxDepth) {
|
|
184
|
-
const ignoreDirs = [
|
|
197
|
+
const ignoreDirs = [
|
|
198
|
+
'node_modules', '.git', 'dist', 'build', '.next', '.nuxt',
|
|
199
|
+
'coverage', '.vscode', '.idea', 'tmp', 'temp', 'out',
|
|
200
|
+
'vendor', '__pycache__', '.cache', '.parcel-cache',
|
|
201
|
+
'bower_components', 'jspm_packages'
|
|
202
|
+
];
|
|
203
|
+
const MAX_ITEMS_PER_DIR = 50; // 每个目录最多显示50项
|
|
185
204
|
function buildTree(dir, prefix = '', depth = 0) {
|
|
186
205
|
if (depth >= maxDepth)
|
|
187
206
|
return '';
|
|
188
207
|
try {
|
|
189
|
-
|
|
208
|
+
let items = readdirSync(dir)
|
|
190
209
|
.filter(item => !ignoreDirs.includes(item) && !item.startsWith('.'))
|
|
191
210
|
.map(item => {
|
|
192
211
|
const fullPath = join(dir, item);
|
|
193
|
-
|
|
194
|
-
|
|
212
|
+
try {
|
|
213
|
+
const stat = statSync(fullPath);
|
|
214
|
+
return { name: item, isDir: stat.isDirectory(), path: fullPath };
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
195
219
|
})
|
|
196
|
-
.
|
|
220
|
+
.filter(item => item !== null);
|
|
221
|
+
// 限制每个目录显示的项目数量
|
|
222
|
+
const hasMore = items.length > MAX_ITEMS_PER_DIR;
|
|
223
|
+
items = items.slice(0, MAX_ITEMS_PER_DIR);
|
|
224
|
+
items.sort((a, b) => {
|
|
197
225
|
if (a.isDir && !b.isDir)
|
|
198
226
|
return -1;
|
|
199
227
|
if (!a.isDir && b.isDir)
|
|
@@ -202,7 +230,7 @@ function generateDirectoryTree(projectPath, maxDepth) {
|
|
|
202
230
|
});
|
|
203
231
|
let result = '';
|
|
204
232
|
items.forEach((item, index) => {
|
|
205
|
-
const isLast = index === items.length - 1;
|
|
233
|
+
const isLast = index === items.length - 1 && !hasMore;
|
|
206
234
|
const currentPrefix = isLast ? '└── ' : '├── ';
|
|
207
235
|
const nextPrefix = isLast ? ' ' : '│ ';
|
|
208
236
|
result += `${prefix}${currentPrefix}${item.name}\n`;
|
|
@@ -210,6 +238,9 @@ function generateDirectoryTree(projectPath, maxDepth) {
|
|
|
210
238
|
result += buildTree(item.path, prefix + nextPrefix, depth + 1);
|
|
211
239
|
}
|
|
212
240
|
});
|
|
241
|
+
if (hasMore) {
|
|
242
|
+
result += `${prefix}└── ... (更多项目被省略)\n`;
|
|
243
|
+
}
|
|
213
244
|
return result;
|
|
214
245
|
}
|
|
215
246
|
catch {
|
|
@@ -225,12 +256,31 @@ async function identifyKeyFiles(projectPath, includeContent) {
|
|
|
225
256
|
'webpack.config.js', 'vite.config.js', 'next.config.js', 'nuxt.config.js',
|
|
226
257
|
'tsconfig.json', 'babel.config.js', '.env', '.env.example'
|
|
227
258
|
];
|
|
259
|
+
const MAX_FILE_SIZE = 100 * 1024; // 100KB
|
|
260
|
+
const MAX_CONTENT_LINES = 100; // 最多显示100行
|
|
228
261
|
const keyFiles = [];
|
|
229
262
|
for (const pattern of keyFilePatterns) {
|
|
230
263
|
try {
|
|
231
264
|
const filePath = join(projectPath, pattern);
|
|
232
|
-
const
|
|
265
|
+
const stat = statSync(filePath);
|
|
266
|
+
// 跳过过大的文件
|
|
267
|
+
if (stat.size > MAX_FILE_SIZE) {
|
|
268
|
+
keyFiles.push({
|
|
269
|
+
path: pattern,
|
|
270
|
+
purpose: getFilePurpose(pattern, ''),
|
|
271
|
+
content: includeContent ? `[文件过大 (${Math.round(stat.size / 1024)}KB),已跳过]` : ''
|
|
272
|
+
});
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
let content = readFileSync(filePath, 'utf-8');
|
|
233
276
|
const purpose = getFilePurpose(pattern, content);
|
|
277
|
+
// 限制内容行数
|
|
278
|
+
if (includeContent && content) {
|
|
279
|
+
const lines = content.split('\n');
|
|
280
|
+
if (lines.length > MAX_CONTENT_LINES) {
|
|
281
|
+
content = lines.slice(0, MAX_CONTENT_LINES).join('\n') + `\n... (省略 ${lines.length - MAX_CONTENT_LINES} 行)`;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
234
284
|
keyFiles.push({
|
|
235
285
|
path: pattern,
|
|
236
286
|
purpose,
|
|
@@ -280,16 +330,39 @@ function analyzeDependencies(packageJson) {
|
|
|
280
330
|
async function calculateCodeMetrics(projectPath) {
|
|
281
331
|
const fileTypes = {};
|
|
282
332
|
const largestFiles = [];
|
|
333
|
+
const MAX_FILES_TO_SCAN = 5000; // 最多扫描5000个文件
|
|
334
|
+
const MAX_FILE_SIZE = 1 * 1024 * 1024; // 1MB
|
|
335
|
+
const SAMPLE_LARGE_PROJECTS = true; // 大项目采样
|
|
283
336
|
let totalFiles = 0;
|
|
284
337
|
let totalLines = 0;
|
|
338
|
+
let skippedFiles = 0;
|
|
339
|
+
let scannedFiles = 0;
|
|
285
340
|
function scanDirectory(dir) {
|
|
341
|
+
// 达到文件数量限制
|
|
342
|
+
if (scannedFiles >= MAX_FILES_TO_SCAN) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
286
345
|
try {
|
|
287
346
|
const items = readdirSync(dir);
|
|
288
347
|
for (const item of items) {
|
|
348
|
+
if (scannedFiles >= MAX_FILES_TO_SCAN)
|
|
349
|
+
break;
|
|
289
350
|
const fullPath = join(dir, item);
|
|
290
|
-
|
|
351
|
+
let stat;
|
|
352
|
+
try {
|
|
353
|
+
stat = statSync(fullPath);
|
|
354
|
+
}
|
|
355
|
+
catch {
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
291
358
|
if (stat.isDirectory()) {
|
|
292
|
-
|
|
359
|
+
const ignoreDirs = [
|
|
360
|
+
'node_modules', '.git', 'dist', 'build', '.next', '.nuxt',
|
|
361
|
+
'coverage', '.vscode', '.idea', 'tmp', 'temp', 'out',
|
|
362
|
+
'vendor', '__pycache__', '.cache', '.parcel-cache',
|
|
363
|
+
'bower_components', 'jspm_packages', 'target', 'bin', 'obj'
|
|
364
|
+
];
|
|
365
|
+
if (!ignoreDirs.includes(item) && !item.startsWith('.')) {
|
|
293
366
|
scanDirectory(fullPath);
|
|
294
367
|
}
|
|
295
368
|
}
|
|
@@ -298,14 +371,27 @@ async function calculateCodeMetrics(projectPath) {
|
|
|
298
371
|
const fileType = ext || 'no-extension';
|
|
299
372
|
fileTypes[fileType] = (fileTypes[fileType] || 0) + 1;
|
|
300
373
|
totalFiles++;
|
|
374
|
+
scannedFiles++;
|
|
375
|
+
// 跳过过大的文件
|
|
376
|
+
if (stat.size > MAX_FILE_SIZE) {
|
|
377
|
+
skippedFiles++;
|
|
378
|
+
continue;
|
|
379
|
+
}
|
|
301
380
|
try {
|
|
302
|
-
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
381
|
+
// 只读取文本文件
|
|
382
|
+
const textExtensions = ['.js', '.ts', '.jsx', '.tsx', '.vue', '.py', '.java', '.go', '.rs', '.php', '.rb', '.cpp', '.c', '.h', '.cs', '.swift', '.kt'];
|
|
383
|
+
if (textExtensions.includes(ext.toLowerCase())) {
|
|
384
|
+
const content = readFileSync(fullPath, 'utf-8');
|
|
385
|
+
const lines = content.split('\n').length;
|
|
386
|
+
totalLines += lines;
|
|
387
|
+
// 只保存相对路径
|
|
388
|
+
const relativePath = fullPath.replace(projectPath, '').replace(/\\/g, '/');
|
|
389
|
+
largestFiles.push({ path: relativePath, lines });
|
|
390
|
+
}
|
|
306
391
|
}
|
|
307
392
|
catch {
|
|
308
|
-
//
|
|
393
|
+
// 忽略无法读取的文件(二进制文件等)
|
|
394
|
+
skippedFiles++;
|
|
309
395
|
}
|
|
310
396
|
}
|
|
311
397
|
}
|
|
@@ -314,14 +400,18 @@ async function calculateCodeMetrics(projectPath) {
|
|
|
314
400
|
// 忽略无法访问的目录
|
|
315
401
|
}
|
|
316
402
|
}
|
|
403
|
+
console.error('开始扫描代码文件...');
|
|
404
|
+
console.error('忽略目录: node_modules, dist, build, .git 等');
|
|
317
405
|
scanDirectory(projectPath);
|
|
406
|
+
console.error(`扫描完成: ${totalFiles} 个文件, ${skippedFiles} 个跳过`);
|
|
318
407
|
// 按行数排序,取前10个
|
|
319
408
|
largestFiles.sort((a, b) => b.lines - a.lines);
|
|
320
409
|
return {
|
|
321
410
|
totalFiles,
|
|
322
411
|
totalLines,
|
|
323
412
|
fileTypes,
|
|
324
|
-
largestFiles: largestFiles.slice(0, 10)
|
|
413
|
+
largestFiles: largestFiles.slice(0, 10),
|
|
414
|
+
skippedFiles
|
|
325
415
|
};
|
|
326
416
|
}
|
|
327
417
|
async function analyzeArchitecture(projectPath, keyFiles) {
|
package/build/tools/gencommit.js
CHANGED
|
@@ -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
|
|
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.
|
|
45
|
-
2.
|
|
46
|
-
3.
|
|
47
|
-
4.
|
|
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
|
|
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
|
|
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
|
**第三步:生成并提交**
|
package/build/version.js
ADDED
|
@@ -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.
|
|
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
|
+
}
|