mcp-probe-kit 3.0.21 → 3.0.23
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 +8 -10
- package/build/index.js +1 -5
- package/build/lib/memory-orchestration.d.ts +1 -0
- package/build/lib/memory-orchestration.js +21 -0
- package/build/lib/shadcn-ui.d.ts +11 -0
- package/build/lib/shadcn-ui.js +78 -0
- package/build/resources/ui-ux-data/guidelines/vercel-web-interface.json +1632 -0
- package/build/resources/ui-ux-data/metadata.json +27 -3
- package/build/resources/ui-ux-data/shadcn/blocks.json +2541 -0
- package/build/resources/ui-ux-data/shadcn/components.json +997 -0
- package/build/resources/ui-ux-data/themes/presets.json +483 -0
- package/build/schemas/index.d.ts +0 -48
- package/build/schemas/memory-tools.d.ts +0 -48
- package/build/schemas/memory-tools.js +0 -29
- package/build/schemas/output/ui-ux-tools.d.ts +16 -0
- package/build/schemas/output/ui-ux-tools.js +4 -0
- package/build/schemas/ui-ux-schemas.js +3 -3
- package/build/tools/__tests__/cursor-history.unit.test.js +0 -49
- package/build/tools/__tests__/search_memory.unit.test.d.ts +1 -0
- package/build/tools/__tests__/search_memory.unit.test.js +83 -0
- package/build/tools/__tests__/start_ui.property.test.js +4 -3
- package/build/tools/index.d.ts +0 -2
- package/build/tools/index.js +0 -2
- package/build/tools/search_memory.js +3 -2
- package/build/tools/start_ui.js +30 -3
- package/build/tools/ui-ux-tools.js +322 -244
- package/build/utils/__tests__/shadcn-sync.unit.test.d.ts +1 -0
- package/build/utils/__tests__/shadcn-sync.unit.test.js +49 -0
- package/build/utils/__tests__/theme-pick.unit.test.d.ts +1 -0
- package/build/utils/__tests__/theme-pick.unit.test.js +9 -0
- package/build/utils/__tests__/themes-sync.unit.test.d.ts +1 -0
- package/build/utils/__tests__/themes-sync.unit.test.js +21 -0
- package/build/utils/__tests__/ui-metadata.unit.test.d.ts +1 -0
- package/build/utils/__tests__/ui-metadata.unit.test.js +35 -0
- package/build/utils/__tests__/vercel-guidelines-sync.unit.test.d.ts +1 -0
- package/build/utils/__tests__/vercel-guidelines-sync.unit.test.js +34 -0
- package/build/utils/bm25.d.ts +2 -1
- package/build/utils/bm25.js +17 -5
- package/build/utils/shadcn-sync.d.ts +55 -0
- package/build/utils/shadcn-sync.js +146 -0
- package/build/utils/themes-sync.d.ts +32 -0
- package/build/utils/themes-sync.js +201 -0
- package/build/utils/ui-data-loader.js +13 -2
- package/build/utils/ui-metadata.d.ts +27 -0
- package/build/utils/ui-metadata.js +39 -0
- package/build/utils/ui-search-engine.d.ts +1 -0
- package/build/utils/ui-search-engine.js +20 -6
- package/build/utils/ui-sync.d.ts +24 -2
- package/build/utils/ui-sync.js +152 -86
- package/build/utils/vercel-guidelines-sync.d.ts +30 -0
- package/build/utils/vercel-guidelines-sync.js +133 -0
- package/docs/data/tools.js +1 -33
- package/docs/i18n/all-tools/en.json +4 -14
- package/docs/i18n/all-tools/ja.json +3 -5
- package/docs/i18n/all-tools/ko.json +3 -5
- package/docs/i18n/all-tools/zh-CN.json +4 -14
- package/docs/i18n/en.json +10 -10
- package/docs/i18n/ja.json +9 -9
- package/docs/i18n/ko.json +9 -9
- package/docs/i18n/zh-CN.json +10 -10
- package/docs/pages/all-tools.html +4 -4
- package/docs/pages/examples.html +2 -2
- package/docs/pages/getting-started.html +1 -1
- package/docs/pages/migration.html +2 -2
- package/package.json +2 -2
- package/build/tools/cursor_list_conversations.d.ts +0 -7
- package/build/tools/cursor_list_conversations.js +0 -35
- package/build/tools/cursor_search_conversations.d.ts +0 -7
- package/build/tools/cursor_search_conversations.js +0 -36
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
> **Talk is cheap, show me the Context.**
|
|
17
17
|
>
|
|
18
|
-
> mcp-probe-kit is a protocol-level toolkit designed for developers who want AI to truly understand their project's intent. It's not just a collection of
|
|
18
|
+
> mcp-probe-kit is a protocol-level toolkit designed for developers who want AI to truly understand their project's intent. It's not just a collection of 27 tools—it's a context-aware system that helps AI agents grasp what you're building.
|
|
19
19
|
|
|
20
20
|
**Languages**: [English](README.md) | [简体中文](i18n/README.zh-CN.md) | [日本語](i18n/README.ja-JP.md) | [한국어](i18n/README.ko-KR.md) | [Español](i18n/README.es-ES.md) | [Français](i18n/README.fr-FR.md) | [Deutsch](i18n/README.de-DE.md) | [Português (BR)](i18n/README.pt-BR.md)
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
> 🚀 AI-Powered Complete Development Toolkit - Covering the Entire Development Lifecycle
|
|
28
28
|
|
|
29
|
-
A powerful MCP (Model Context Protocol) server providing **
|
|
29
|
+
A powerful MCP (Model Context Protocol) server providing **27 tools** covering the complete workflow from product analysis to final release (Requirements → Design → Development → Quality → Release), all tools support **structured output**.
|
|
30
30
|
|
|
31
31
|
**🎉 v3.0 Major Update**: Streamlined tool count, focus on core competencies, eliminate choice paralysis, let AI do more native work
|
|
32
32
|
|
|
@@ -42,7 +42,7 @@ A powerful MCP (Model Context Protocol) server providing **29 tools** covering t
|
|
|
42
42
|
|
|
43
43
|
- [Quick Start](https://mcp-probe-kit.bytezonex.com/pages/getting-started.html) - Setup in 5 minutes
|
|
44
44
|
- [Local Memory Stack (Qdrant + Nomic Embed)](docs/memory-local-setup.md) - Docker Compose, ports `50008` / `50012`, MCP env
|
|
45
|
-
- [All Tools](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - Complete list of
|
|
45
|
+
- [All Tools](https://mcp-probe-kit.bytezonex.com/pages/all-tools.html) - Complete list of 27 tools
|
|
46
46
|
- [Best Practices](https://mcp-probe-kit.bytezonex.com/pages/examples.html) - Full development workflow guide
|
|
47
47
|
- [v3.0 Migration Guide](https://mcp-probe-kit.bytezonex.com/pages/migration.html) - Upgrade from v2.x to v3.0
|
|
48
48
|
|
|
@@ -64,8 +64,8 @@ A powerful MCP (Model Context Protocol) server providing **29 tools** covering t
|
|
|
64
64
|
- `init_project`, `init_project_context`, `add_feature`, `estimate`, `interview`, `ask_user`
|
|
65
65
|
- **🎨 UI/UX Utilities** (3 tools) - Design systems and UI data synchronization
|
|
66
66
|
- `ui_design_system`, `ui_search`, `sync_ui_data`
|
|
67
|
-
- **🧠 Memory & Cursor History** (
|
|
68
|
-
- `search_memory`, `read_memory_asset`, `memorize_asset`, `scan_and_extract_patterns`, `
|
|
67
|
+
- **🧠 Memory & Cursor History** (5 tools) - Reusable asset memory and local Cursor conversation retrieval
|
|
68
|
+
- `search_memory`, `read_memory_asset`, `memorize_asset`, `scan_and_extract_patterns`, `cursor_read_conversation`
|
|
69
69
|
|
|
70
70
|
### 🧠 Code Graph Bridge (GitNexus)
|
|
71
71
|
|
|
@@ -93,14 +93,14 @@ A powerful MCP (Model Context Protocol) server providing **29 tools** covering t
|
|
|
93
93
|
- Embedding service supports two modes:
|
|
94
94
|
- `ollama`
|
|
95
95
|
- `openai-compatible`
|
|
96
|
-
-
|
|
96
|
+
- `cursor_read_conversation` reads the local Cursor database directly through Node.js, without Python bridge
|
|
97
97
|
- Cursor history currently supports:
|
|
98
98
|
- Windows: `%APPDATA%\\Cursor\\User\\globalStorage\\state.vscdb`
|
|
99
99
|
- macOS: `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb`
|
|
100
100
|
- Linux: `~/.config/Cursor/User/globalStorage/state.vscdb`
|
|
101
101
|
|
|
102
102
|
**Memory tools:**
|
|
103
|
-
- `search_memory` - Semantic search across the shared memory pool (optionally prefer `type` / `tags`)
|
|
103
|
+
- `search_memory` - Semantic search across the shared memory pool (optionally prefer `type` / `tags`); returns `id`, `score`, `summary`, and `description` in both text output and `structuredContent` (for MCP clients that only surface `content[0].text`)
|
|
104
104
|
- `memorize_asset` - Persist reusable code/spec/pattern assets into vector memory
|
|
105
105
|
- `read_memory_asset` - Read full asset content by `asset_id`
|
|
106
106
|
- `scan_and_extract_patterns` - Extract reusable patterns from code/file/directory before deciding whether to persist
|
|
@@ -194,8 +194,6 @@ ollama pull nomic-embed-text
|
|
|
194
194
|
```
|
|
195
195
|
|
|
196
196
|
**Cursor history tools:**
|
|
197
|
-
- `cursor_list_conversations` - List recent local Cursor conversations by title/workspace
|
|
198
|
-
- `cursor_search_conversations` - Search local Cursor history by keyword or request id
|
|
199
197
|
- `cursor_read_conversation` - Read a single local Cursor conversation timeline by `composer_id`
|
|
200
198
|
|
|
201
199
|
### 🎯 Structured Output
|
|
@@ -561,7 +559,7 @@ ollama pull nomic-embed-text
|
|
|
561
559
|
|
|
562
560
|
### Cursor History Support
|
|
563
561
|
|
|
564
|
-
|
|
562
|
+
`cursor_read_conversation` does not require Qdrant or embedding configuration.
|
|
565
563
|
|
|
566
564
|
Supported platforms:
|
|
567
565
|
|
package/build/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { InMemoryTaskMessageQueue, InMemoryTaskStore, } from "@modelcontextproto
|
|
|
5
5
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ProgressNotificationSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
6
6
|
import * as fs from "node:fs";
|
|
7
7
|
import * as path from "node:path";
|
|
8
|
-
import { initProject, gencommit, codeReview, codeInsight, gentest, refactor, initProjectContext, addFeature, fixBug, estimate, startFeature, startBugfix, startOnboard, startRalph, interview, askUser, uiDesignSystem, uiSearch, syncUiData, startUi, startProduct, gitWorkReport, searchMemory, readMemoryAsset, memorizeAsset, scanAndExtractPatterns,
|
|
8
|
+
import { initProject, gencommit, codeReview, codeInsight, gentest, refactor, initProjectContext, addFeature, fixBug, estimate, startFeature, startBugfix, startOnboard, startRalph, interview, askUser, uiDesignSystem, uiSearch, syncUiData, startUi, startProduct, gitWorkReport, searchMemory, readMemoryAsset, memorizeAsset, scanAndExtractPatterns, cursorReadConversation } from "./tools/index.js";
|
|
9
9
|
import { VERSION, NAME } from "./version.js";
|
|
10
10
|
import { allToolSchemas } from "./schemas/index.js";
|
|
11
11
|
import { filterTools, getToolsetFromEnv } from "./lib/toolset-manager.js";
|
|
@@ -467,10 +467,6 @@ async function executeTool(name, args, context) {
|
|
|
467
467
|
return await memorizeAsset(args);
|
|
468
468
|
case "scan_and_extract_patterns":
|
|
469
469
|
return await scanAndExtractPatterns(args);
|
|
470
|
-
case "cursor_list_conversations":
|
|
471
|
-
return await cursorListConversations(args);
|
|
472
|
-
case "cursor_search_conversations":
|
|
473
|
-
return await cursorSearchConversations(args);
|
|
474
470
|
case "cursor_read_conversation":
|
|
475
471
|
return await cursorReadConversation(args);
|
|
476
472
|
default:
|
|
@@ -13,6 +13,7 @@ export interface MemoryInjectionContext {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function truncateInjectionText(value: string, maxChars: number): string;
|
|
15
15
|
export declare function loadMemoryInjectionContext(query: string, kind?: MemoryPlanKind): Promise<MemoryInjectionContext>;
|
|
16
|
+
export declare function formatSearchMemoryResultsText(results: MemorySearchResult[], config?: MemoryConfig): string;
|
|
16
17
|
export declare function shouldShowSourceInSearch(item: MemorySearchResult, config?: MemoryConfig): boolean;
|
|
17
18
|
export declare function renderMemoryGuideSection(context: MemoryInjectionContext): string;
|
|
18
19
|
export declare function buildMemoryPlanStep(kind?: MemoryPlanKind): {
|
|
@@ -77,6 +77,27 @@ function formatMemoryResultLabel(item) {
|
|
|
77
77
|
: '历史资产';
|
|
78
78
|
return `${item.name} [${item.type}] (${kind})`;
|
|
79
79
|
}
|
|
80
|
+
export function formatSearchMemoryResultsText(results, config = getMemoryConfig()) {
|
|
81
|
+
if (results.length === 0) {
|
|
82
|
+
return '未找到相关记忆';
|
|
83
|
+
}
|
|
84
|
+
const header = `找到 ${results.length} 条相关记忆`;
|
|
85
|
+
const items = results.map((item, index) => {
|
|
86
|
+
const lines = [
|
|
87
|
+
`${index + 1}. ${item.name} [${item.type}] score=${item.score.toFixed(3)}`,
|
|
88
|
+
` - id: ${item.id}`,
|
|
89
|
+
item.summary ? ` - 摘要: ${item.summary}` : '',
|
|
90
|
+
item.description ? ` - 描述: ${item.description}` : '',
|
|
91
|
+
item.tags.length > 0 ? ` - 标签: ${item.tags.join(', ')}` : '',
|
|
92
|
+
];
|
|
93
|
+
if (shouldShowSourceInSearch(item, config) && item.sourcePath) {
|
|
94
|
+
lines.push(` - 来源: ${item.sourcePath}`);
|
|
95
|
+
}
|
|
96
|
+
lines.push(` - 全文: read_memory_asset {"asset_id": "${item.id}"}`);
|
|
97
|
+
return lines.filter(Boolean).join('\n');
|
|
98
|
+
});
|
|
99
|
+
return `${header}\n\n${items.join('\n\n')}`;
|
|
100
|
+
}
|
|
80
101
|
export function shouldShowSourceInSearch(item, config = getMemoryConfig()) {
|
|
81
102
|
if (config.searchShowSource) {
|
|
82
103
|
return Boolean(item.sourcePath);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否适合使用 shadcn/ui 实现路径
|
|
3
|
+
*/
|
|
4
|
+
export declare function isShadcnStack(stack?: string): boolean;
|
|
5
|
+
export declare function isShadcnCategory(category?: string): boolean;
|
|
6
|
+
export declare function isThemeCategory(category?: string): boolean;
|
|
7
|
+
export declare function isGuidelineCategory(category?: string): boolean;
|
|
8
|
+
export declare function formatShadcnResult(data: Record<string, any>): string;
|
|
9
|
+
export declare function formatThemeResult(data: Record<string, any>): string;
|
|
10
|
+
export declare function formatGuidelineResult(data: Record<string, any>): string;
|
|
11
|
+
export declare function pickThemeForProductType(themes: Record<string, any>[], productType: string): Record<string, any> | undefined;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否适合使用 shadcn/ui 实现路径
|
|
3
|
+
*/
|
|
4
|
+
export function isShadcnStack(stack) {
|
|
5
|
+
if (!stack)
|
|
6
|
+
return false;
|
|
7
|
+
const normalized = stack.toLowerCase();
|
|
8
|
+
return (normalized.includes('react') ||
|
|
9
|
+
normalized.includes('next') ||
|
|
10
|
+
normalized.includes('shadcn') ||
|
|
11
|
+
normalized.includes('tailwind'));
|
|
12
|
+
}
|
|
13
|
+
export function isShadcnCategory(category) {
|
|
14
|
+
return Boolean(category?.startsWith('shadcn-'));
|
|
15
|
+
}
|
|
16
|
+
export function isThemeCategory(category) {
|
|
17
|
+
return category === 'ui-themes';
|
|
18
|
+
}
|
|
19
|
+
export function isGuidelineCategory(category) {
|
|
20
|
+
return category === 'ui-guidelines-vercel';
|
|
21
|
+
}
|
|
22
|
+
export function formatShadcnResult(data) {
|
|
23
|
+
const lines = [
|
|
24
|
+
`- **名称**: ${data.name || data.title}`,
|
|
25
|
+
`- **类型**: ${data.type || 'unknown'}`,
|
|
26
|
+
`- **描述**: ${data.description || '—'}`,
|
|
27
|
+
`- **安装**: \`${data.installCommand || `npx shadcn@latest add ${data.name}`}\``,
|
|
28
|
+
];
|
|
29
|
+
if (Array.isArray(data.registryDependencies) && data.registryDependencies.length > 0) {
|
|
30
|
+
lines.push(`- **依赖组件**: ${data.registryDependencies.join(', ')}`);
|
|
31
|
+
}
|
|
32
|
+
if (Array.isArray(data.files) && data.files.length > 0) {
|
|
33
|
+
lines.push(`- **文件**: ${data.files.slice(0, 5).join(', ')}${data.files.length > 5 ? '…' : ''}`);
|
|
34
|
+
}
|
|
35
|
+
return lines.join('\n');
|
|
36
|
+
}
|
|
37
|
+
export function formatThemeResult(data) {
|
|
38
|
+
const lines = [
|
|
39
|
+
`- **主题**: ${data.title || data.name}`,
|
|
40
|
+
`- **描述**: ${data.description || '—'}`,
|
|
41
|
+
`- **基色**: ${data.baseColor || '—'}`,
|
|
42
|
+
`- **适合**: ${Array.isArray(data.bestFor) ? data.bestFor.join(', ') : '—'}`,
|
|
43
|
+
`- **用法**: 将 \`globalsCssSnippet\` 粘贴到 \`app/globals.css\`(shadcn new-york)`,
|
|
44
|
+
];
|
|
45
|
+
return lines.join('\n');
|
|
46
|
+
}
|
|
47
|
+
export function formatGuidelineResult(data) {
|
|
48
|
+
return [
|
|
49
|
+
`- **级别**: ${data.level || '—'}`,
|
|
50
|
+
`- **章节**: ${data.section || '—'} / ${data.subsection || '—'}`,
|
|
51
|
+
`- **规则**: ${data.rule || data.description || '—'}`,
|
|
52
|
+
`- **来源**: Vercel Web Interface Guidelines`,
|
|
53
|
+
].join('\n');
|
|
54
|
+
}
|
|
55
|
+
export function pickThemeForProductType(themes, productType) {
|
|
56
|
+
if (themes.length === 0)
|
|
57
|
+
return undefined;
|
|
58
|
+
const normalized = productType.toLowerCase();
|
|
59
|
+
const scored = themes.map((theme) => {
|
|
60
|
+
const bestFor = Array.isArray(theme.bestFor) ? theme.bestFor : [];
|
|
61
|
+
const score = bestFor.reduce((acc, item) => {
|
|
62
|
+
const token = item.toLowerCase();
|
|
63
|
+
if (normalized.includes(token) || token.includes(normalized)) {
|
|
64
|
+
return acc + 2;
|
|
65
|
+
}
|
|
66
|
+
if (normalized.split(/\s+/).some((part) => token.includes(part) && part.length > 2)) {
|
|
67
|
+
return acc + 1;
|
|
68
|
+
}
|
|
69
|
+
return acc;
|
|
70
|
+
}, 0);
|
|
71
|
+
return { theme, score };
|
|
72
|
+
});
|
|
73
|
+
scored.sort((a, b) => b.score - a.score);
|
|
74
|
+
if (scored[0]?.score > 0) {
|
|
75
|
+
return scored[0].theme;
|
|
76
|
+
}
|
|
77
|
+
return themes.find((theme) => theme.name === 'zinc-neutral') || themes[0];
|
|
78
|
+
}
|