mcp-probe-kit 1.2.2 → 1.2.4
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 +45 -82
- package/build/index.js +1 -1
- package/build/tools/analyze_project.js +4 -4
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -450,7 +450,7 @@ npm install mcp-probe-kit
|
|
|
450
450
|
|
|
451
451
|
**参数**:
|
|
452
452
|
- `project_path` - 项目路径(默认当前目录)
|
|
453
|
-
- `max_depth` - 目录树最大深度(默认
|
|
453
|
+
- `max_depth` - 目录树最大深度(默认 5)
|
|
454
454
|
- `include_content` - 是否包含文件内容(默认 true)
|
|
455
455
|
|
|
456
456
|
**分析内容**:
|
|
@@ -469,60 +469,6 @@ npm install mcp-probe-kit
|
|
|
469
469
|
- 📚 项目文档生成
|
|
470
470
|
- 🤖 AI助手更好地理解项目上下文
|
|
471
471
|
|
|
472
|
-
**输出示例**:
|
|
473
|
-
```markdown
|
|
474
|
-
# 📊 项目分析报告
|
|
475
|
-
|
|
476
|
-
## 🏗️ 项目概览
|
|
477
|
-
- **项目名称**: my-project
|
|
478
|
-
- **项目类型**: React 应用
|
|
479
|
-
- **技术栈**: React, Next.js
|
|
480
|
-
- **主要语言**: TypeScript
|
|
481
|
-
- **包管理器**: npm
|
|
482
|
-
|
|
483
|
-
## 📁 目录结构
|
|
484
|
-
```
|
|
485
|
-
my-project/
|
|
486
|
-
├── src/
|
|
487
|
-
│ ├── components/
|
|
488
|
-
│ ├── pages/
|
|
489
|
-
│ └── utils/
|
|
490
|
-
├── public/
|
|
491
|
-
└── package.json
|
|
492
|
-
```
|
|
493
|
-
|
|
494
|
-
## 🔑 关键文件
|
|
495
|
-
### package.json
|
|
496
|
-
**用途**: 项目配置和依赖管理
|
|
497
|
-
|
|
498
|
-
### src/pages/index.tsx
|
|
499
|
-
**用途**: Next.js 首页组件
|
|
500
|
-
|
|
501
|
-
## 📦 依赖分析
|
|
502
|
-
- **生产依赖**: 15 个
|
|
503
|
-
- **开发依赖**: 8 个
|
|
504
|
-
- **总依赖数**: 23 个
|
|
505
|
-
|
|
506
|
-
## 📈 代码指标
|
|
507
|
-
- **总文件数**: 45
|
|
508
|
-
- **总行数**: 2,350
|
|
509
|
-
- **文件类型分布**:
|
|
510
|
-
- .tsx: 12 个文件
|
|
511
|
-
- .ts: 8 个文件
|
|
512
|
-
- .css: 5 个文件
|
|
513
|
-
|
|
514
|
-
## 🏛️ 架构分析
|
|
515
|
-
- **设计模式**: 组件化, Hooks
|
|
516
|
-
- **入口文件**: src/pages/index.tsx
|
|
517
|
-
- **核心模块**: components, pages, utils
|
|
518
|
-
|
|
519
|
-
## 📋 项目总结
|
|
520
|
-
**项目目的**: React 应用,使用 Next.js 框架,主要语言为 TypeScript
|
|
521
|
-
**复杂度**: medium
|
|
522
|
-
**建议**:
|
|
523
|
-
- 考虑模块化重构,减少文件数量
|
|
524
|
-
- 引入设计模式,提高代码组织性
|
|
525
|
-
```
|
|
526
472
|
|
|
527
473
|
---
|
|
528
474
|
|
|
@@ -585,23 +531,31 @@ my-project/
|
|
|
585
531
|
mcp-probe-kit/
|
|
586
532
|
├── src/
|
|
587
533
|
│ ├── index.ts # MCP 服务器主入口
|
|
588
|
-
│ └── tools/ # 工具实现(
|
|
589
|
-
│ ├── index.ts
|
|
590
|
-
│ ├── detect_shell.ts
|
|
591
|
-
│ ├── code_review.ts
|
|
592
|
-
│ ├── debug.ts
|
|
593
|
-
│ ├── gentest.ts
|
|
594
|
-
│ ├── refactor.ts
|
|
595
|
-
│ ├── perf.ts
|
|
596
|
-
│ ├──
|
|
597
|
-
│ ├──
|
|
598
|
-
│ ├──
|
|
599
|
-
│ ├──
|
|
600
|
-
│ ├──
|
|
601
|
-
│ ├──
|
|
602
|
-
│ ├──
|
|
603
|
-
│ ├──
|
|
604
|
-
│
|
|
534
|
+
│ └── tools/ # 工具实现(23 个)
|
|
535
|
+
│ ├── index.ts # 工具导出
|
|
536
|
+
│ ├── detect_shell.ts # 套壳检测
|
|
537
|
+
│ ├── code_review.ts # 代码审查
|
|
538
|
+
│ ├── debug.ts # 调试助手
|
|
539
|
+
│ ├── gentest.ts # 测试生成
|
|
540
|
+
│ ├── refactor.ts # 重构建议
|
|
541
|
+
│ ├── perf.ts # 性能分析
|
|
542
|
+
│ ├── fix.ts # 自动修复
|
|
543
|
+
│ ├── gencommit.ts # 提交生成
|
|
544
|
+
│ ├── genapi.ts # 文档生成
|
|
545
|
+
│ ├── gendoc.ts # 注释生成
|
|
546
|
+
│ ├── genpr.ts # PR 生成
|
|
547
|
+
│ ├── genchangelog.ts # Changelog 生成
|
|
548
|
+
│ ├── gensql.ts # SQL 生成器
|
|
549
|
+
│ ├── genui.ts # UI 组件生成器
|
|
550
|
+
│ ├── explain.ts # 代码解释器
|
|
551
|
+
│ ├── convert.ts # 代码转换器
|
|
552
|
+
│ ├── genreadme.ts # README 生成器
|
|
553
|
+
│ ├── split.ts # 文件拆分工具
|
|
554
|
+
│ ├── init_setting.ts # 配置初始化
|
|
555
|
+
│ ├── init_project.ts # 项目初始化
|
|
556
|
+
│ ├── check_deps.ts # 依赖检查
|
|
557
|
+
│ ├── resolve_conflict.ts # Git 冲突解决
|
|
558
|
+
│ └── analyze_project.ts # 项目分析
|
|
605
559
|
├── build/ # 编译输出
|
|
606
560
|
├── package.json
|
|
607
561
|
├── tsconfig.json
|
|
@@ -733,30 +687,39 @@ MIT License
|
|
|
733
687
|
### 为什么叫 Probe Kit?
|
|
734
688
|
|
|
735
689
|
- **Probe(探针)**:探测代码质量、性能瓶颈、依赖健康度
|
|
736
|
-
- **Kit(工具集)**:
|
|
690
|
+
- **Kit(工具集)**:23 个工具覆盖开发全流程
|
|
737
691
|
|
|
738
692
|
### 工具分类
|
|
739
693
|
|
|
740
694
|
```
|
|
741
|
-
代码质量 (
|
|
695
|
+
代码质量 (7)
|
|
742
696
|
├── detect_shell 套壳检测
|
|
743
697
|
├── code_review 代码审查
|
|
744
698
|
├── debug 调试助手
|
|
745
699
|
├── gentest 测试生成
|
|
746
700
|
├── refactor 重构建议
|
|
747
|
-
|
|
701
|
+
├── perf 性能分析
|
|
702
|
+
└── fix 自动修复
|
|
748
703
|
|
|
749
|
-
开发效率 (
|
|
704
|
+
开发效率 (11)
|
|
750
705
|
├── gencommit 提交生成
|
|
751
706
|
├── genapi 文档生成
|
|
752
707
|
├── gendoc 注释生成
|
|
753
708
|
├── genpr PR 生成
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
├──
|
|
758
|
-
├──
|
|
759
|
-
|
|
709
|
+
├── genchangelog Changelog 生成
|
|
710
|
+
├── gensql SQL 生成器
|
|
711
|
+
├── genui UI 组件生成器
|
|
712
|
+
├── explain 代码解释器
|
|
713
|
+
├── convert 代码转换器
|
|
714
|
+
├── genreadme README 生成器
|
|
715
|
+
└── split 文件拆分工具
|
|
716
|
+
|
|
717
|
+
项目管理 (5)
|
|
718
|
+
├── init_setting 配置初始化
|
|
719
|
+
├── init_project 项目初始化
|
|
720
|
+
├── check_deps 依赖检查
|
|
721
|
+
├── resolve_conflict Git 冲突解决
|
|
722
|
+
└── analyze_project 项目分析工具
|
|
760
723
|
```
|
|
761
724
|
|
|
762
725
|
---
|
package/build/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { readFileSync, readdirSync, statSync } from 'fs';
|
|
1
|
+
import { readFileSync, readdirSync, statSync, existsSync } from 'fs';
|
|
2
2
|
import { join, extname } from 'path';
|
|
3
3
|
export async function analyzeProject(args) {
|
|
4
4
|
const projectPath = args.project_path || process.cwd();
|
|
5
|
-
const maxDepth = args.max_depth ||
|
|
5
|
+
const maxDepth = args.max_depth || 5;
|
|
6
6
|
const includeContent = args.include_content !== false;
|
|
7
7
|
try {
|
|
8
8
|
const analysis = await performProjectAnalysis(projectPath, maxDepth, includeContent);
|
|
@@ -174,9 +174,9 @@ function detectLanguage(packageJson) {
|
|
|
174
174
|
return 'JavaScript';
|
|
175
175
|
}
|
|
176
176
|
function detectPackageManager() {
|
|
177
|
-
if (
|
|
177
|
+
if (existsSync('yarn.lock'))
|
|
178
178
|
return 'Yarn';
|
|
179
|
-
if (
|
|
179
|
+
if (existsSync('pnpm-lock.yaml'))
|
|
180
180
|
return 'pnpm';
|
|
181
181
|
return 'npm';
|
|
182
182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Cursor Development Enhancement Toolkit - MCP Server with 23 practical tools for code quality, development efficiency, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -63,4 +63,3 @@
|
|
|
63
63
|
"typescript": "^5.3.0"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|