@axboot-mcp/mcp-server 1.0.0

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.
Files changed (78) hide show
  1. package/CLAUDE.md +119 -0
  2. package/MCP_TOOL_PLAN.md +710 -0
  3. package/MCP_USAGE.md +914 -0
  4. package/README.md +168 -0
  5. package/REPOSITORY_CONVENTIONS.md +250 -0
  6. package/SEARCH_PARAMS_MCP_TOOL_COMPLETE_PLAN.md +646 -0
  7. package/SEARCH_PARAMS_PLAN.md +2570 -0
  8. package/STORE_PATTERNS.md +1178 -0
  9. package/debug-dto.js +72 -0
  10. package/generate-banner-store.js +62 -0
  11. package/generation-plan.json +2176 -0
  12. package/generation-results.json +1817 -0
  13. package/package.json +45 -0
  14. package/scripts/batch-generate-all.js +159 -0
  15. package/scripts/batch-generate-mcp.js +329 -0
  16. package/scripts/batch-generate-stores-v2.js +272 -0
  17. package/scripts/batch-generate-stores.js +179 -0
  18. package/scripts/batch-plan.json +3810 -0
  19. package/scripts/batch-process.py +90 -0
  20. package/scripts/batch-regenerate.js +356 -0
  21. package/scripts/direct-generate.js +227 -0
  22. package/scripts/execute-batches.js +1911 -0
  23. package/scripts/generate-all-stores.js +144 -0
  24. package/scripts/generate-stores-mcp.js +161 -0
  25. package/scripts/generate-stores-v2.js +450 -0
  26. package/scripts/generate-stores-v3.js +412 -0
  27. package/scripts/generate-stores-v4.js +521 -0
  28. package/scripts/generate-stores.js +382 -0
  29. package/scripts/repos-to-process.json +1899 -0
  30. package/src/config/nh-layout-patterns.ts +166 -0
  31. package/src/docs/HOOK_GENERATION_PLAN.md +2226 -0
  32. package/src/docs/NH_STORE_PATTERNS.md +297 -0
  33. package/src/docs/README.md +216 -0
  34. package/src/docs/index.ts +28 -0
  35. package/src/docs/loader.ts +568 -0
  36. package/src/docs/patterns.json +419 -0
  37. package/src/docs/practical-examples.md +732 -0
  38. package/src/docs/quick-start.md +257 -0
  39. package/src/docs/requirements-analysis-guide.md +364 -0
  40. package/src/docs/rules.json +321 -0
  41. package/src/docs/store-pattern-analysis.md +664 -0
  42. package/src/docs/store-patterns-rules.md +1168 -0
  43. package/src/docs/store-patterns-usage-guide.md +1835 -0
  44. package/src/docs/troubleshooting.md +544 -0
  45. package/src/docs/type-selection-guide.md +572 -0
  46. package/src/docs//354/202/254/354/232/251/353/262/225/AntD-/354/273/264/355/217/254/353/204/214/355/212/270-/354/202/254/354/232/251/353/262/225.md +1515 -0
  47. package/src/docs//354/202/254/354/232/251/353/262/225/DataGrid-/354/202/254/354/232/251/353/262/225.md +866 -0
  48. package/src/docs//354/202/254/354/232/251/353/262/225/FormItem-/354/202/254/354/232/251/353/262/225.md +903 -0
  49. package/src/docs//354/202/254/354/232/251/353/262/225/FormModal-/354/202/254/354/232/251/353/262/225.md +1155 -0
  50. package/src/docs//354/202/254/354/232/251/353/262/225/MCP-/353/260/224/354/235/264/353/270/214/354/275/224/353/224/251-/352/260/200/354/235/264/353/223/234.md +1133 -0
  51. package/src/docs//354/202/254/354/232/251/353/262/225/MSW-Mock-/353/215/260/354/235/264/355/204/260-/354/202/254/354/232/251/353/262/225.md +579 -0
  52. package/src/docs//354/202/254/354/232/251/353/262/225/Search-/354/273/264/355/217/254/353/204/214/355/212/270-/354/202/254/354/232/251/353/262/225.md +738 -0
  53. package/src/docs//354/202/254/354/232/251/353/262/225/Store-/355/214/250/355/204/264-/354/202/254/354/232/251/353/262/225.md +1135 -0
  54. package/src/docs//354/202/254/354/232/251/353/262/225//355/231/224/353/251/264/352/265/254/354/204/261-/355/203/200/354/236/205/353/263/204-/352/260/234/353/260/234/354/210/234/354/204/234.md +1805 -0
  55. package/src/docs//354/202/254/354/232/251/353/262/225//355/231/224/353/251/264/355/203/200/354/236/205/353/263/204-/352/260/234/353/260/234-/355/224/204/353/241/254/355/224/204/355/212/270-/352/260/200/354/235/264/353/223/234.md +946 -0
  56. package/src/docs//354/202/254/354/232/251/353/262/225//355/231/225/354/236/245/355/231/224/353/251/264/355/203/200/354/236/205/353/263/204-/354/203/201/354/204/270-/355/224/204/353/241/254/355/224/204/355/212/270/352/260/200/354/235/264/353/223/234.md +2422 -0
  57. package/src/features/store-features.ts +232 -0
  58. package/src/handlers/analyze-requirements.ts +403 -0
  59. package/src/handlers/analyze.ts +1373 -0
  60. package/src/handlers/generate-from-requirements.ts +250 -0
  61. package/src/handlers/generate-hook.ts +950 -0
  62. package/src/handlers/generate-interactive.ts +840 -0
  63. package/src/handlers/generate-listdatagrid.ts +521 -0
  64. package/src/handlers/generate-multi-stores.ts +577 -0
  65. package/src/handlers/generate-requirements-from-layout.ts +160 -0
  66. package/src/handlers/generate-search-params.ts +717 -0
  67. package/src/handlers/generate.ts +911 -0
  68. package/src/handlers/list-templates.ts +104 -0
  69. package/src/handlers/scan-metadata.ts +485 -0
  70. package/src/handlers/suggest-layout.ts +326 -0
  71. package/src/index.ts +959 -0
  72. package/src/prompts/search-params.md +793 -0
  73. package/src/templates/index.ts +107 -0
  74. package/src/templates/unified.ts +462 -0
  75. package/store-generation-error-patterns.md +225 -0
  76. package/test/useAgentStore.ts +136 -0
  77. package/test-server.js +78 -0
  78. package/tsconfig.json +20 -0
package/CLAUDE.md ADDED
@@ -0,0 +1,119 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ **mcp-axboot** is a Model Context Protocol (MCP) server that automatically generates Zustand store files from TypeScript interface definitions. It accelerates React/TypeScript development for Axboot projects by analyzing repository interfaces and generating standardized store code based on UI patterns.
8
+
9
+ ## Development Commands
10
+
11
+ ```bash
12
+ # Build the project
13
+ npm run build
14
+
15
+ # Watch mode for development
16
+ npm run dev
17
+
18
+ # Start the MCP server (after build)
19
+ npm run start
20
+
21
+ # Clean build output
22
+ npm run clean
23
+ ```
24
+
25
+ ## Architecture
26
+
27
+ ### MCP Server Structure
28
+
29
+ The server uses the Model Context Protocol SDK with stdio transport. Entry point is `src/index.ts` which:
30
+ 1. Creates an MCP server instance
31
+ 2. Registers available tools via `ListToolsRequestSchema`
32
+ 3. Handles tool execution via `CallToolRequestSchema`
33
+
34
+ ### Tool Handlers (`src/handlers/`)
35
+
36
+ | Handler | Purpose |
37
+ |---------|---------|
38
+ | `analyze.ts` | Parses TypeScript interfaces to extract methods and types |
39
+ | `generate.ts` | Generates store files with explicit type selection |
40
+ | `list-templates.ts` | Returns available store template information |
41
+ | `analyze-requirements.ts` | NLP analysis of Korean requirements to extract features |
42
+ | `generate-from-requirements.ts` | Auto-selects type and generates store |
43
+ | `generate-multi-stores.ts` | Handles multi-list patterns (e.g., left/top/bottom lists) |
44
+
45
+ ### Template System (`src/templates/`)
46
+
47
+ Templates are modular files (type1.ts through type11.ts) that generate Zustand store code. Note the numbering offset: template file `typeN.ts` corresponds to store type `N-1` (e.g., type6.ts → Type 5 store).
48
+
49
+ Each template uses variable substitution via `TemplateVariables` interface for type-safe code generation.
50
+
51
+ ### Feature Definitions (`src/features/store-features.ts`)
52
+
53
+ Central registry of store features (LIST, SEARCH, SAVE, DELETE, etc.) with:
54
+ - Korean/English keywords for NLP matching
55
+ - Associated states and actions
56
+ - Type-to-feature mappings in `TYPE_FEATURES`
57
+
58
+ ### Store Type Mapping (10 Types)
59
+
60
+ | Type | Template File | Pattern |
61
+ |------|---------------|---------|
62
+ | 1 | type1.ts | Basic List + Detail |
63
+ | 2 | type2.ts | Master-Detail + Modal + Delete |
64
+ | 3 | type3.ts | Tree-based |
65
+ | 4 | type4.ts | Dashboard |
66
+ | 5 | type6.ts | Simple List |
67
+ | 6 | type7.ts | Reorderable List |
68
+ | 7 | type8.ts | Master-Detail + Modal + Delete + Excel |
69
+ | 8 | type9.ts | List + Selection + Excel |
70
+ | 9 | type10.ts | Master-Detail + Modal + Detail API |
71
+ | 10 | type11.ts | Master-Detail + Excel |
72
+
73
+ ## Natural Language Processing
74
+
75
+ The requirement analyzer in `analyze-requirements.ts` matches Korean keywords to predefined features:
76
+
77
+ | Keywords | Feature |
78
+ |----------|---------|
79
+ | 리스트, 목록, 조회 | LIST |
80
+ | 검색, 찾기 | SEARCH |
81
+ | 상세, 디테일 | DETAIL_PANEL |
82
+ | 모달, 팝업 | MODAL |
83
+ | 저장, 수정, 등록 | SAVE |
84
+ | 삭제 | DELETE |
85
+ | 엑셀, excel | EXCEL_DOWNLOAD |
86
+ | 체크, checkbox | CHECKBOX |
87
+ | 트리, 카테고리 | TREE |
88
+
89
+ ## Integration
90
+
91
+ ### Claude Desktop Configuration
92
+
93
+ Server must be registered in Claude's config:
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "mcp-axboot": {
99
+ "command": "node",
100
+ "args": ["/Users/kyle/Desktop/mcp-axboot/dist/index.js"]
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ ### Testing
107
+
108
+ Use `test-server.js` for manual testing. The server communicates via stdio - no HTTP server is involved.
109
+
110
+ ## Language Context
111
+
112
+ This project is primarily for Korean-speaking users (Axboot is a Korean framework). Natural language processing is Korean-focused, and most documentation is in Korean.
113
+
114
+ ## Type System Notes
115
+
116
+ - TypeScript strict mode is enabled
117
+ - Target: ES2020, Module: CommonJS
118
+ - All template variables must be of type `TemplateVariables`
119
+ - Template files use string substitution - ensure all variables are defined