@liangshanli/mcp-server-project-standards 5.1.0 โ 5.1.1
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 +836 -832
- package/README.zh-CN.md +843 -839
- package/bin/cli.js +224 -224
- package/package.json +42 -42
- package/src/server-final.js +1287 -1261
- package/src/utils/api_common.js +152 -152
- package/src/utils/api_config.js +276 -276
- package/src/utils/api_debug.js +362 -362
- package/src/utils/api_execute.js +164 -164
- package/src/utils/api_help.js +224 -224
- package/src/utils/api_login.js +178 -178
- package/src/utils/create_custom_tool.js +54 -54
- package/src/utils/database_standards.js +147 -147
- package/src/utils/download_file.js +76 -76
- package/src/utils/execute_custom_tool.js +51 -51
- package/src/utils/generate_cursorrules.js +172 -172
- package/src/utils/get_api_standards.js +203 -203
- package/src/utils/get_development_standards.js +139 -139
- package/src/utils/get_project_info.js +86 -86
- package/src/utils/get_project_structure.js +139 -139
- package/src/utils/list_custom_tools.js +15 -15
- package/src/utils/list_directory.js +85 -85
- package/src/utils/update_config.js +36 -36
- package/start-server.js +108 -108
package/README.md
CHANGED
|
@@ -1,832 +1,836 @@
|
|
|
1
|
-
# MCP Project Standards Server
|
|
2
|
-
|
|
3
|
-
A MCP (Model Context Protocol) server for project standards management, designed for AI-assisted development to help teams maintain unified development standards and specifications across multiple machines.
|
|
4
|
-
|
|
5
|
-
## ๐ Version Updates
|
|
6
|
-
|
|
7
|
-
### v5.1.
|
|
8
|
-
- **
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
### v5.
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
- `tools/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- `
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
###
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
99
|
-
|
|
100
|
-
###
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- **
|
|
108
|
-
- **
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- โ
**
|
|
118
|
-
- โ
**
|
|
119
|
-
- โ
**
|
|
120
|
-
- โ
**
|
|
121
|
-
- โ
**
|
|
122
|
-
- โ
**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **
|
|
133
|
-
- **
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
|
171
|
-
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
|
|
|
176
|
-
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
"
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
"
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- **
|
|
215
|
-
|
|
216
|
-
**
|
|
217
|
-
- **
|
|
218
|
-
- **
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
"
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"
|
|
352
|
-
"
|
|
353
|
-
"
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
"
|
|
365
|
-
"
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
- `
|
|
519
|
-
- `
|
|
520
|
-
- `
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
-
|
|
524
|
-
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
- **
|
|
528
|
-
- **
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
-
|
|
541
|
-
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
-
|
|
546
|
-
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
**
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
**
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
**
|
|
649
|
-
- **
|
|
650
|
-
- **
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
**
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
**
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
**
|
|
670
|
-
-
|
|
671
|
-
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
-
|
|
676
|
-
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
"
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
โ
|
|
797
|
-
โ
|
|
798
|
-
โ โโโ
|
|
799
|
-
โ โโโ
|
|
800
|
-
โ
|
|
801
|
-
โโโ
|
|
802
|
-
โ
|
|
803
|
-
โโโ
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
```
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
##
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
##
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1
|
+
# MCP Project Standards Server
|
|
2
|
+
|
|
3
|
+
A MCP (Model Context Protocol) server for project standards management, designed for AI-assisted development to help teams maintain unified development standards and specifications across multiple machines.
|
|
4
|
+
|
|
5
|
+
## ๐ Version Updates
|
|
6
|
+
|
|
7
|
+
### v5.1.1 (2026-02-26)
|
|
8
|
+
- **Bug Fix**: Fixed MCP tool parameter validation error in VS Code - "tool parameters array type must have items"
|
|
9
|
+
- Added `items` property to all `type: 'array'` definitions in tool input schemas to comply with MCP's JSON Schema validation requirements
|
|
10
|
+
|
|
11
|
+
### v5.1.0 (2025-12-22)
|
|
12
|
+
- **New Tool**: Added `download_file` tool to download files from URL to project path.
|
|
13
|
+
- **Version Sync**: Updated server and package versions to 5.1.0.
|
|
14
|
+
|
|
15
|
+
### v5.0.0 (2025-12-19) - Major Release
|
|
16
|
+
- **Project Path Support**: Added `PROJECT_PATH` environment variable for resolving relative paths.
|
|
17
|
+
- **Cursor Detection**: Automatic identification of Cursor IDE for enhanced features.
|
|
18
|
+
- **New Tools**: Added `list_directory`, `generate_cursorrules`, and `generate_rules`.
|
|
19
|
+
- **AI Guidance**: Integrated AI Enforcement Rules into rule generation templates.
|
|
20
|
+
- **Security**: Added path validation for directory listing.
|
|
21
|
+
|
|
22
|
+
### v3.0.0 (2025-10-31) - Major Release
|
|
23
|
+
|
|
24
|
+
#### ๐ Breaking Changes
|
|
25
|
+
- Config directory resolution now depends on both `CONFIG_DIR` and `TOOL_PREFIX`:
|
|
26
|
+
- If `CONFIG_DIR` is set, it is used as-is
|
|
27
|
+
- If `CONFIG_DIR` is not set and `TOOL_PREFIX` is set, use `./.setting.<TOOL_PREFIX>`
|
|
28
|
+
- Otherwise default to `./.setting`
|
|
29
|
+
- `tools/call` now strips the `TOOL_PREFIX` from tool names before method dispatch. If you call `xxx_api_debug` (with `TOOL_PREFIX=xxx`), the server routes the call to `api_debug` internally.
|
|
30
|
+
|
|
31
|
+
#### โจ New/Improved
|
|
32
|
+
- Unified `getConfigDir()` used by both `server-final.js` and `api_common.js`
|
|
33
|
+
- `tools/list` shows environment with resolved `CONFIG_DIR`
|
|
34
|
+
- Prefixed tool names and project-branded descriptions when both `TOOL_PREFIX` and `PROJECT_NAME` are provided
|
|
35
|
+
|
|
36
|
+
#### ๐งน Cleanup
|
|
37
|
+
- Removed duplicate legacy `api_debug` method definition
|
|
38
|
+
|
|
39
|
+
#### ๐ก Benefits
|
|
40
|
+
- Multi-project isolation: simple per-project segregation via `TOOL_PREFIX` without code changes
|
|
41
|
+
- Zero-friction switching: swap project context by environment only
|
|
42
|
+
- Smoother tool calling: clients can call prefixed names, server auto-routes
|
|
43
|
+
|
|
44
|
+
### v2.0.0 (2024-12-19) - Major Release
|
|
45
|
+
|
|
46
|
+
#### ๐ New Tools & Features
|
|
47
|
+
- **API Login Tool** (`api_login`): Direct login authentication using environment variables
|
|
48
|
+
- **API Debug Tool** (`api_debug`): Simplified API request execution
|
|
49
|
+
- **API Config Tool** (`api_config`): Comprehensive configuration management
|
|
50
|
+
- **Code Refactoring**: Eliminated duplicate code with shared utilities
|
|
51
|
+
- **Enhanced Environment Variable Support**: Flexible login body formats (JSON/string)
|
|
52
|
+
|
|
53
|
+
#### ๐ง Technical Improvements
|
|
54
|
+
- **Reduced Code Duplication**: ~70% reduction in duplicate code
|
|
55
|
+
- **Better Error Handling**: Unified error management across tools
|
|
56
|
+
- **Improved Performance**: Faster module loading and execution
|
|
57
|
+
- **Enhanced Maintainability**: Centralized configuration management
|
|
58
|
+
|
|
59
|
+
### v1.1.0 (2024-12-19)
|
|
60
|
+
|
|
61
|
+
#### ๐ New Features
|
|
62
|
+
- **API Debug Tool Environment Variable Support**:
|
|
63
|
+
- `API_DEBUG_ALLOWED_METHODS` - Control allowed request methods (default: GET)
|
|
64
|
+
- `API_DEBUG_LOGIN_URL` - Set login API URL (default: /api/login)
|
|
65
|
+
- `API_DEBUG_LOGIN_METHOD` - Set login request method (default: POST)
|
|
66
|
+
- `API_DEBUG_LOGIN_BODY` - Set login request body (default: {"username":"","password":""})
|
|
67
|
+
- `API_DEBUG_LOGIN_DESCRIPTION` - Set login API description (default: Save returned token to common headers in debug tool, field name Authorization, field value Bearer token)
|
|
68
|
+
|
|
69
|
+
#### ๐ง Feature Improvements
|
|
70
|
+
- **Smart Login API Recognition**:
|
|
71
|
+
- Support for full URL and relative path matching
|
|
72
|
+
- Automatic login API recognition using environment variable configuration
|
|
73
|
+
- Non-login APIs strictly follow allowed method restrictions
|
|
74
|
+
|
|
75
|
+
- **Error Handling Optimization**:
|
|
76
|
+
- Only request-related errors are saved to api.json
|
|
77
|
+
- Method validation errors don't pollute execution records
|
|
78
|
+
- More precise error classification and handling
|
|
79
|
+
|
|
80
|
+
- **Dynamic Tool Description**:
|
|
81
|
+
- Display login authentication information based on environment variable configuration
|
|
82
|
+
- Real-time display of allowed request methods and usage instructions
|
|
83
|
+
|
|
84
|
+
#### ๐ก๏ธ Security Enhancements
|
|
85
|
+
- **Request Method Restrictions**: Default only allows GET requests to prevent accidental operations
|
|
86
|
+
- **Login API Exception**: Login APIs can use methods configured in environment variables
|
|
87
|
+
- **Flexible Configuration**: Can open more request methods as needed
|
|
88
|
+
|
|
89
|
+
#### ๐ Documentation Updates
|
|
90
|
+
- Added environment variable configuration instructions
|
|
91
|
+
- Updated API debug tool usage guide
|
|
92
|
+
- Improved login authentication flow documentation
|
|
93
|
+
|
|
94
|
+
## ๐ Core Advantages
|
|
95
|
+
|
|
96
|
+
### ๐ฐ Token Cost Optimization
|
|
97
|
+
- **Efficient Context Caching**: By using MCP tools to retrieve short, structured standard data instead of reading long documents, it triggers model Context Caching more effectively (e.g., Gemini 3 Flash), significantly reducing input costs (down to $0.05/1M).
|
|
98
|
+
- **Incremental Output**: Enforces minimal code diffs and precise tool responses, minimizing high-cost output token consumption.
|
|
99
|
+
|
|
100
|
+
### ๐ฏ Solving Multi-Machine Development Chaos
|
|
101
|
+
- **Unified Standards**: AI assistants on multiple machines use the same project standards, avoiding inconsistent development styles
|
|
102
|
+
- **Team Collaboration**: Eliminates code style differences caused by different developers using different AI configurations
|
|
103
|
+
|
|
104
|
+
### ๐ก๏ธ Enterprise-Grade Development Standards Management
|
|
105
|
+
- **Project Information Management**: Unified management of basic project information, tech stack, versions, etc.
|
|
106
|
+
- **API Standards Specification**: Define unified interface design standards to ensure API consistency
|
|
107
|
+
- **Development Standards**: Code style, naming conventions, architecture standards, etc.
|
|
108
|
+
- **Database Standards**: Table structure, naming conventions, indexing strategies, etc.
|
|
109
|
+
|
|
110
|
+
### ๐ง Simple Configuration Management
|
|
111
|
+
- **JSON Configuration**: Simple configuration storage based on JSON files
|
|
112
|
+
- **Environment Variables**: Support for specifying configuration file paths through environment variables
|
|
113
|
+
- **Auto-Creation**: Automatically creates default configuration files on first run
|
|
114
|
+
|
|
115
|
+
## โจ Main Features
|
|
116
|
+
|
|
117
|
+
- โ
**Project Information Management** - Unified management of project basic information and configuration
|
|
118
|
+
- โ
**Project Structure Analysis** - Intelligent analysis of project directory structure and dependencies
|
|
119
|
+
- โ
**API Interface Standards** - Define unified API design specifications and best practices
|
|
120
|
+
- โ
**Development Standards** - Code style, naming conventions, architecture standards management
|
|
121
|
+
- โ
**Database Standards** - Table structure design, naming conventions, indexing strategies standardization
|
|
122
|
+
- โ
**API Debugging Tool** - Complete API interface testing and debugging functionality
|
|
123
|
+
- โ
**Configuration Management** - JSON-based configuration storage and management
|
|
124
|
+
- โ
**Auto-Restart** - Intelligent process management and fault recovery
|
|
125
|
+
- โ
**Health Checks** - Real-time service status and performance monitoring
|
|
126
|
+
- โ
**File Downloader** - Download files from URLs directly to the project directory
|
|
127
|
+
|
|
128
|
+
## ๐ฏ Application Scenarios
|
|
129
|
+
|
|
130
|
+
### Team Collaborative Development
|
|
131
|
+
- **Multi-Developer Environment**: Ensure each developer's AI assistant follows the same project standards
|
|
132
|
+
- **Code Review**: Unified code style and standards, reducing review time
|
|
133
|
+
- **New Team Member Training**: Quickly help new team members understand project standards and best practices
|
|
134
|
+
|
|
135
|
+
### Enterprise Projects
|
|
136
|
+
- **Large Projects**: Manage complex project structures and multi-module development
|
|
137
|
+
- **Microservices Architecture**: Unify API design and database standards across services
|
|
138
|
+
- **Multi-Environment Deployment**: Standard consistency across development, testing, and production environments
|
|
139
|
+
|
|
140
|
+
### AI-Assisted Development
|
|
141
|
+
- **Intelligent Code Generation**: AI generates code that conforms to project standards
|
|
142
|
+
- **Automatic Refactoring**: Automatically optimize and refactor code based on standards
|
|
143
|
+
- **Standards Checking**: Real-time checking of code compliance with project standards
|
|
144
|
+
|
|
145
|
+
## Installation
|
|
146
|
+
|
|
147
|
+
### Global Installation (Recommended)
|
|
148
|
+
```bash
|
|
149
|
+
npm install -g @liangshanli/mcp-server-project-standards
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Local Installation
|
|
153
|
+
```bash
|
|
154
|
+
npm install @liangshanli/mcp-server-project-standards
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### From Source
|
|
158
|
+
```bash
|
|
159
|
+
git clone https://github.com/liliangshan/mcp-server-project-standards.git
|
|
160
|
+
cd mcp-server-project-standards
|
|
161
|
+
npm install
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## โ๏ธ Configuration Management
|
|
165
|
+
|
|
166
|
+
The server uses the `./.setting/` directory to store configuration files by default. You can specify a different directory using environment variables.
|
|
167
|
+
|
|
168
|
+
### Environment Variables
|
|
169
|
+
|
|
170
|
+
| Variable | Default | Description | Example |
|
|
171
|
+
|----------|---------|-------------|---------|
|
|
172
|
+
| PROJECT_PATH | . | Root path of the project. Supports both absolute (e.g., `/` or `C:\`) and relative paths. Used to resolve all relative paths. | `export PROJECT_PATH="/path/to/project"` |
|
|
173
|
+
| CONFIG_DIR | ./.setting or ./.setting.<TOOL_PREFIX> | Configuration directory. Resolved relative to PROJECT_PATH. | `export CONFIG_DIR="./config"` |
|
|
174
|
+
| TOOL_PREFIX | | Optional tool prefix for tool names and config isolation | `export TOOL_PREFIX="projA"` |
|
|
175
|
+
| PROJECT_NAME | | Optional project branding for tool descriptions | `export PROJECT_NAME="MyProject"` |
|
|
176
|
+
| API_DEBUG_ALLOWED_METHODS | GET | Control allowed request methods (supports: GET,POST,PUT,DELETE,PATCH, etc.) | `export API_DEBUG_ALLOWED_METHODS="GET,POST"` |
|
|
177
|
+
| API_DEBUG_LOGIN_URL | /api/login | Set login API URL | `export API_DEBUG_LOGIN_URL="/api/auth/login"` |
|
|
178
|
+
| API_DEBUG_LOGIN_METHOD | POST | Set login request method | `export API_DEBUG_LOGIN_METHOD="POST"` |
|
|
179
|
+
| API_DEBUG_LOGIN_BODY | {"username":"","password":""} | Set login request body | `export API_DEBUG_LOGIN_BODY='{"mobile":"","password":""}'` |
|
|
180
|
+
| API_DEBUG_LOGIN_DESCRIPTION | Save returned token to common headers in debug tool, field name Authorization, field value Bearer token | Set login API description | `export API_DEBUG_LOGIN_DESCRIPTION="User Login API"` |
|
|
181
|
+
|
|
182
|
+
### Configuration Files
|
|
183
|
+
|
|
184
|
+
The server uses two configuration files:
|
|
185
|
+
- `config.json` - Project standards configuration
|
|
186
|
+
- `api.json` - API debugging configuration
|
|
187
|
+
|
|
188
|
+
**config.json default values:**
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"project_info": {},
|
|
192
|
+
"project_structure": [],
|
|
193
|
+
"api_standards": {},
|
|
194
|
+
"development_standards": [],
|
|
195
|
+
"database_standards": []
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**api.json default values:**
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"baseUrl": "",
|
|
203
|
+
"headers": {
|
|
204
|
+
"Content-Type": "application/json",
|
|
205
|
+
"Accept": "application/json"
|
|
206
|
+
},
|
|
207
|
+
"list": []
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Configuration Field Description
|
|
212
|
+
|
|
213
|
+
**config.json fields:**
|
|
214
|
+
- **project_info** - Project basic information (project name, development language, description, etc.)
|
|
215
|
+
- **project_structure** - Project structure definition (directory and file descriptions)
|
|
216
|
+
- **api_standards** - API interface standards (interface type, response structure, request headers, etc.)
|
|
217
|
+
- **development_standards** - Development standards (code style, naming conventions, etc.)
|
|
218
|
+
- **database_standards** - Database standards (table naming, field naming, etc.)
|
|
219
|
+
|
|
220
|
+
**api.json fields:**
|
|
221
|
+
- **baseUrl** - API base URL
|
|
222
|
+
- **headers** - Common request headers (authentication, Content-Type, etc.)
|
|
223
|
+
- **list** - API interface list (includes request parameters, response data, execution history, etc.)
|
|
224
|
+
|
|
225
|
+
## ๐ Quick Start
|
|
226
|
+
|
|
227
|
+
### 1. Direct Run (Global Installation)
|
|
228
|
+
```bash
|
|
229
|
+
mcp-server-project-standards
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### 2. Using npx (Recommended)
|
|
233
|
+
```bash
|
|
234
|
+
npx @liangshanli/mcp-server-project-standards
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 3. Direct Start (Source Installation)
|
|
238
|
+
```bash
|
|
239
|
+
npm start
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### 4. Managed Start (Recommended for Production)
|
|
243
|
+
```bash
|
|
244
|
+
npm run start-managed
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Managed start provides:
|
|
248
|
+
- Auto-restart (up to 10 times)
|
|
249
|
+
- Error recovery
|
|
250
|
+
- Process management
|
|
251
|
+
- Logging
|
|
252
|
+
|
|
253
|
+
### 5. Development Mode
|
|
254
|
+
```bash
|
|
255
|
+
npm run dev
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Editor Integration
|
|
259
|
+
|
|
260
|
+
### Cursor Editor Configuration
|
|
261
|
+
|
|
262
|
+
1) Single-project example (no prefix isolation):
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"mcpServers": {
|
|
267
|
+
"project-standards": {
|
|
268
|
+
"command": "npx",
|
|
269
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
270
|
+
"env": {
|
|
271
|
+
"PROJECT_PATH": ".",
|
|
272
|
+
"CONFIG_DIR": "./.setting",
|
|
273
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
274
|
+
"API_DEBUG_LOGIN_URL": "/api/login",
|
|
275
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
276
|
+
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}",
|
|
277
|
+
"API_DEBUG_LOGIN_DESCRIPTION": "Save returned token to common headers in debug tool, field name Authorization, field value Bearer token"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
2) Multi-project example (with TOOL_PREFIX + PROJECT_NAME):
|
|
285
|
+
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"mcpServers": {
|
|
289
|
+
"project-standards-A": {
|
|
290
|
+
"command": "npx",
|
|
291
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
292
|
+
"env": {
|
|
293
|
+
"PROJECT_PATH": ".",
|
|
294
|
+
"TOOL_PREFIX": "projA",
|
|
295
|
+
"PROJECT_NAME": "Project A",
|
|
296
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
297
|
+
"API_DEBUG_LOGIN_URL": "/api/login",
|
|
298
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
299
|
+
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"project-standards-B": {
|
|
303
|
+
"command": "npx",
|
|
304
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
305
|
+
"env": {
|
|
306
|
+
"PROJECT_PATH": ".",
|
|
307
|
+
"TOOL_PREFIX": "projB",
|
|
308
|
+
"PROJECT_NAME": "Project B",
|
|
309
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
310
|
+
"API_DEBUG_LOGIN_URL": "/api/auth/login",
|
|
311
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
312
|
+
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"\",\"password\":\"\"}"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### VS Code Configuration
|
|
320
|
+
|
|
321
|
+
1) Single-project example (no prefix isolation):
|
|
322
|
+
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"mcp.servers": {
|
|
326
|
+
"project-standards": {
|
|
327
|
+
"command": "npx",
|
|
328
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
329
|
+
"env": {
|
|
330
|
+
"PROJECT_PATH": ".",
|
|
331
|
+
"CONFIG_DIR": "./.setting",
|
|
332
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
333
|
+
"API_DEBUG_LOGIN_URL": "/api/login",
|
|
334
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
335
|
+
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
2) Multi-project example (with TOOL_PREFIX + PROJECT_NAME):
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"mcp.servers": {
|
|
347
|
+
"project-standards-A": {
|
|
348
|
+
"command": "npx",
|
|
349
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
350
|
+
"env": {
|
|
351
|
+
"PROJECT_PATH": ".",
|
|
352
|
+
"TOOL_PREFIX": "projA",
|
|
353
|
+
"PROJECT_NAME": "Project A",
|
|
354
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
355
|
+
"API_DEBUG_LOGIN_URL": "/api/login",
|
|
356
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
357
|
+
"API_DEBUG_LOGIN_BODY": "{\"username\":\"\",\"password\":\"\"}"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"project-standards-B": {
|
|
361
|
+
"command": "npx",
|
|
362
|
+
"args": ["@liangshanli/mcp-server-project-standards"],
|
|
363
|
+
"env": {
|
|
364
|
+
"PROJECT_PATH": ".",
|
|
365
|
+
"TOOL_PREFIX": "projB",
|
|
366
|
+
"PROJECT_NAME": "Project B",
|
|
367
|
+
"API_DEBUG_ALLOWED_METHODS": "GET,POST,PUT,DELETE",
|
|
368
|
+
"API_DEBUG_LOGIN_URL": "/api/auth/login",
|
|
369
|
+
"API_DEBUG_LOGIN_METHOD": "POST",
|
|
370
|
+
"API_DEBUG_LOGIN_BODY": "{\"mobile\":\"\",\"password\":\"\"}"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
## ๐ ๏ธ Available Tools
|
|
378
|
+
|
|
379
|
+
### 1. Project Information Management (project_info)
|
|
380
|
+
Get and manage project basic information, including project name, development language, description, etc.
|
|
381
|
+
|
|
382
|
+
**Parameters:**
|
|
383
|
+
- `action` (required): Operation type - "get" to retrieve info, "set" to set info
|
|
384
|
+
- `key` (optional): Field to set - "projectName", "developmentLanguage", "basicInfo"
|
|
385
|
+
- `value` (optional): Value to set
|
|
386
|
+
|
|
387
|
+
**Example:**
|
|
388
|
+
```json
|
|
389
|
+
{
|
|
390
|
+
"jsonrpc": "2.0",
|
|
391
|
+
"id": 1,
|
|
392
|
+
"method": "tools/call",
|
|
393
|
+
"params": {
|
|
394
|
+
"name": "project_info",
|
|
395
|
+
"arguments": {
|
|
396
|
+
"action": "set",
|
|
397
|
+
"key": "projectName",
|
|
398
|
+
"value": "My Project"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### 2. Project Structure Management (project_structure)
|
|
405
|
+
Get and manage project directory structure with depth control and hidden file inclusion.
|
|
406
|
+
|
|
407
|
+
**Parameters:**
|
|
408
|
+
- `action` (required): Operation type - "get" to retrieve structure, "set" to set structure, "delete" to delete structure item
|
|
409
|
+
- `structure` (optional): Structure item array (required for set action)
|
|
410
|
+
- `path` (optional): Path to delete (required for delete action)
|
|
411
|
+
|
|
412
|
+
**Example:**
|
|
413
|
+
```json
|
|
414
|
+
{
|
|
415
|
+
"jsonrpc": "2.0",
|
|
416
|
+
"id": 2,
|
|
417
|
+
"method": "tools/call",
|
|
418
|
+
"params": {
|
|
419
|
+
"name": "project_structure",
|
|
420
|
+
"arguments": {
|
|
421
|
+
"action": "set",
|
|
422
|
+
"structure": [
|
|
423
|
+
{
|
|
424
|
+
"path": "/src",
|
|
425
|
+
"description": "Source code directory"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 3. API Standards Management (api_standards)
|
|
434
|
+
Get and manage API interface standards and best practices.
|
|
435
|
+
|
|
436
|
+
**Parameters:**
|
|
437
|
+
- `action` (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standards
|
|
438
|
+
- `key` (optional): Field to set - "interfaceType", "successStructure", "errorStructure", "basicHeaders", "requirements"
|
|
439
|
+
- `value` (optional): Value to set
|
|
440
|
+
- `forceOverwrite` (optional): Whether to force overwrite array values (default: false)
|
|
441
|
+
|
|
442
|
+
**Example:**
|
|
443
|
+
```json
|
|
444
|
+
{
|
|
445
|
+
"jsonrpc": "2.0",
|
|
446
|
+
"id": 3,
|
|
447
|
+
"method": "tools/call",
|
|
448
|
+
"params": {
|
|
449
|
+
"name": "api_standards",
|
|
450
|
+
"arguments": {
|
|
451
|
+
"action": "set",
|
|
452
|
+
"key": "requirements",
|
|
453
|
+
"value": ["Unified response format", "Error code standards", "Parameter validation"],
|
|
454
|
+
"forceOverwrite": true
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### 4. Development Standards Management (development_standards)
|
|
461
|
+
Get and manage development standards, including code style, Git workflow, testing, and documentation.
|
|
462
|
+
|
|
463
|
+
**Parameters:**
|
|
464
|
+
- `action` (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standards
|
|
465
|
+
- `standards` (optional): Standards array (required for set action)
|
|
466
|
+
- `forceOverwrite` (optional): Whether to force overwrite array values (default: false)
|
|
467
|
+
|
|
468
|
+
**Example:**
|
|
469
|
+
```json
|
|
470
|
+
{
|
|
471
|
+
"jsonrpc": "2.0",
|
|
472
|
+
"id": 4,
|
|
473
|
+
"method": "tools/call",
|
|
474
|
+
"params": {
|
|
475
|
+
"name": "development_standards",
|
|
476
|
+
"arguments": {
|
|
477
|
+
"action": "set",
|
|
478
|
+
"standards": ["Use 2 spaces for indentation", "Use single quotes", "Use camelCase naming"],
|
|
479
|
+
"forceOverwrite": false
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### 5. Database Standards Management (database_standards)
|
|
486
|
+
Get and manage database standards, including table structure design, naming conventions, indexing strategies, etc.
|
|
487
|
+
|
|
488
|
+
**Parameters:**
|
|
489
|
+
- `action` (required): Operation type - "get" to retrieve standards, "set" to set standards, "delete" to delete standards
|
|
490
|
+
- `standards` (optional): Standards array (required for set action)
|
|
491
|
+
- `forceOverwrite` (optional): Whether to force overwrite array values (default: false)
|
|
492
|
+
|
|
493
|
+
**Example:**
|
|
494
|
+
```json
|
|
495
|
+
{
|
|
496
|
+
"jsonrpc": "2.0",
|
|
497
|
+
"id": 5,
|
|
498
|
+
"method": "tools/call",
|
|
499
|
+
"params": {
|
|
500
|
+
"name": "database_standards",
|
|
501
|
+
"arguments": {
|
|
502
|
+
"action": "set",
|
|
503
|
+
"standards": [
|
|
504
|
+
"Use test_ prefix for all table names",
|
|
505
|
+
"Use snake_case for table and field names",
|
|
506
|
+
"Use singular form for table names"
|
|
507
|
+
],
|
|
508
|
+
"forceOverwrite": true
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### 6. API Debugging Tool (api_debug)
|
|
515
|
+
Complete API interface testing and debugging functionality, supporting multiple HTTP methods, authentication, parameter passing, etc.
|
|
516
|
+
|
|
517
|
+
**Parameters:**
|
|
518
|
+
- `action` (required): Operation type - "get" to retrieve config, "set" to update config, "delete" to delete API, "execute" to execute API, "updateBaseUrl" to update base URL, "updateHeaders" to update headers, "deleteHeader" to delete specific header, "search" to search APIs
|
|
519
|
+
- `config` (optional): API debug configuration (required for set action)
|
|
520
|
+
- `index` (optional): API index (required for execute/delete actions)
|
|
521
|
+
- `baseUrl` (optional): New base URL (required for updateBaseUrl action)
|
|
522
|
+
- `headers` (optional): New headers (required for updateHeaders action)
|
|
523
|
+
- `headerName` (optional): Header name to delete (required for deleteHeader action)
|
|
524
|
+
- `keyword` (optional): Search keyword (required for search action)
|
|
525
|
+
|
|
526
|
+
**Features:**
|
|
527
|
+
- **Smart Content-Type Detection**: Automatically detect request body type (JSON, XML, HTML, URL-encoded, etc.)
|
|
528
|
+
- **Authentication Management**: Support Bearer Token and other authentication methods
|
|
529
|
+
- **URL Deduplication**: Same URL only saves one copy of data, avoiding duplicates
|
|
530
|
+
- **Execution Recording**: Record execution history regardless of success or failure
|
|
531
|
+
- **Search Function**: Support searching APIs by URL or description
|
|
532
|
+
- **Parameter Management**: Support query parameters, request body, custom headers, etc.
|
|
533
|
+
|
|
534
|
+
**๐ Special Note - Login Authentication Flow:**
|
|
535
|
+
|
|
536
|
+
The API debugging tool supports a complete login authentication flow, making it easy to manage API access permissions:
|
|
537
|
+
|
|
538
|
+
1. **Login API Configuration**:
|
|
539
|
+
- First configure the login API (e.g., `/api/login`)
|
|
540
|
+
- Set login request parameters (username, password, etc.)
|
|
541
|
+
- Execute login request to obtain authentication information
|
|
542
|
+
|
|
543
|
+
2. **Automatic Token Management**:
|
|
544
|
+
- After successful login, the tool automatically extracts returned `token` or `cookie`
|
|
545
|
+
- Automatically writes authentication information to common request headers (e.g., `Authorization: Bearer token`)
|
|
546
|
+
- All subsequent API requests automatically carry authentication information
|
|
547
|
+
|
|
548
|
+
3. **Authentication Expiration Handling**:
|
|
549
|
+
- When API returns authentication expired error
|
|
550
|
+
- Re-execute the original login API to get new token
|
|
551
|
+
- Use `updateHeaders` operation to update common request headers
|
|
552
|
+
- Continue debugging other APIs that require authentication
|
|
553
|
+
|
|
554
|
+
4. **Usage Flow Example**:
|
|
555
|
+
```bash
|
|
556
|
+
# 1. Configure login API
|
|
557
|
+
api_debug set config={login_api_config}
|
|
558
|
+
|
|
559
|
+
# 2. Execute login to get token
|
|
560
|
+
api_debug execute index=0
|
|
561
|
+
|
|
562
|
+
# 3. Update common request headers (automatic)
|
|
563
|
+
api_debug updateHeaders headers={Authorization: Bearer token}
|
|
564
|
+
|
|
565
|
+
# 4. Debug other APIs that require authentication
|
|
566
|
+
api_debug execute index=1
|
|
567
|
+
|
|
568
|
+
# 5. If token expires, re-login
|
|
569
|
+
api_debug execute index=0 # Re-execute login
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
This design eliminates the need for manual authentication state management, as the tool automatically handles login and token updates, greatly simplifying the API debugging process!
|
|
573
|
+
|
|
574
|
+
### 7. Directory Listing (list_directory)
|
|
575
|
+
Recursively explores the directory structure relative to the project root.
|
|
576
|
+
|
|
577
|
+
**Parameters:**
|
|
578
|
+
- `path` (optional): Subdirectory path to list.
|
|
579
|
+
- `depth` (optional): Max recursion depth (default: 2).
|
|
580
|
+
|
|
581
|
+
**Example:**
|
|
582
|
+
```json
|
|
583
|
+
{
|
|
584
|
+
"jsonrpc": "2.0",
|
|
585
|
+
"id": 10,
|
|
586
|
+
"method": "tools/call",
|
|
587
|
+
"params": {
|
|
588
|
+
"name": "list_directory",
|
|
589
|
+
"arguments": {
|
|
590
|
+
"depth": 3
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### 8. Rule Generation (generate_cursorrules / generate_rules)
|
|
597
|
+
Generates AI project guidance files (`.cursorrules` for Cursor, `PROJECT_RULES.md` for others) based on your standards.
|
|
598
|
+
|
|
599
|
+
**Parameters:**
|
|
600
|
+
- `save` (optional): Whether to save content to disk (default: false).
|
|
601
|
+
|
|
602
|
+
**Example:**
|
|
603
|
+
```json
|
|
604
|
+
{
|
|
605
|
+
"jsonrpc": "2.0",
|
|
606
|
+
"id": 11,
|
|
607
|
+
"method": "tools/call",
|
|
608
|
+
"params": {
|
|
609
|
+
"name": "generate_cursorrules",
|
|
610
|
+
"arguments": {
|
|
611
|
+
"save": true
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
### 9. File Download Tool (download_file)
|
|
618
|
+
Download a file from a URL and save it to a specified path within the project.
|
|
619
|
+
|
|
620
|
+
**Parameters:**
|
|
621
|
+
- `url` (required): The URL of the file to download.
|
|
622
|
+
- `savePath` (required): The path where the file should be saved (relative to project path or absolute).
|
|
623
|
+
|
|
624
|
+
**Example:**
|
|
625
|
+
```json
|
|
626
|
+
{
|
|
627
|
+
"jsonrpc": "2.0",
|
|
628
|
+
"id": 12,
|
|
629
|
+
"method": "tools/call",
|
|
630
|
+
"params": {
|
|
631
|
+
"name": "download_file",
|
|
632
|
+
"arguments": {
|
|
633
|
+
"url": "https://example.com/logo.png",
|
|
634
|
+
"savePath": "assets/logo.png"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
## ๐ Related Tools for Collaborative Use
|
|
641
|
+
|
|
642
|
+
To provide a more complete development experience, we recommend using the following MCP tools in collaboration:
|
|
643
|
+
|
|
644
|
+
### ๐๏ธ Database Management Tools
|
|
645
|
+
|
|
646
|
+
**MySQL Database Support**
|
|
647
|
+
- **NPM Package**: [@liangshanli/mcp-server-mysql](https://www.npmjs.com/package/@liangshanli/mcp-server-mysql)
|
|
648
|
+
- **GitHub Repository**: [mcp-server-mysql](https://github.com/liliangshan/mcp-server-mysql)
|
|
649
|
+
- **Features**: DDL operations, permission control, operation logs, connection pool management
|
|
650
|
+
- **Highlights**: Supports DDL SQL logging for easy database structure synchronization
|
|
651
|
+
|
|
652
|
+
**SQL Server Database Support**
|
|
653
|
+
- **NPM Package**: [@liangshanli/mcp-server-mssqlserver](https://www.npmjs.com/package/@liangshanli/mcp-server-mssqlserver)
|
|
654
|
+
- **GitHub Repository**: [mcp-server-mssqlserver](https://github.com/liliangshan/mcp-server-mssqlserver)
|
|
655
|
+
- **Features**: SQL Server database operations, DDL support, permission management
|
|
656
|
+
- **Highlights**: Optimized specifically for SQL Server database operations
|
|
657
|
+
|
|
658
|
+
### ๐จ Icon Management Tools
|
|
659
|
+
|
|
660
|
+
**Icon Resource Management**
|
|
661
|
+
- **NPM Package**: [@liangshanli/mcp-server-icon](https://www.npmjs.com/package/@liangshanli/mcp-server-icon)
|
|
662
|
+
- **GitHub Repository**: [mcp-server-icon](https://github.com/liliangshan/mcp-server-icon)
|
|
663
|
+
- **Features**: Icon resource management, icon search, icon library integration
|
|
664
|
+
- **Highlights**: Supports multiple icon libraries for convenient UI development
|
|
665
|
+
|
|
666
|
+
### ๐ Collaborative Development Benefits
|
|
667
|
+
|
|
668
|
+
**Complete Development Stack**:
|
|
669
|
+
- **Project Standards** + **Database Management** + **API Debugging** + **Icon Resources** = Full-stack development solution
|
|
670
|
+
- Unified MCP protocol for seamless integration of all tools
|
|
671
|
+
- Consistent configuration management and error handling mechanisms
|
|
672
|
+
|
|
673
|
+
**Team Collaboration**:
|
|
674
|
+
- All tools support unified standards across multi-machine environments
|
|
675
|
+
- Shared configuration files and logging systems
|
|
676
|
+
- Easy onboarding and collaboration for team members
|
|
677
|
+
|
|
678
|
+
**Development Efficiency**:
|
|
679
|
+
- One-stop solution from project standards to database operations to API debugging
|
|
680
|
+
- Reduced tool switching costs and improved development efficiency
|
|
681
|
+
- Unified error handling and logging
|
|
682
|
+
|
|
683
|
+
**Usage Example**:
|
|
684
|
+
```bash
|
|
685
|
+
# 1. Install project standards management tool
|
|
686
|
+
npm install -g @liangshanli/mcp-server-project-standards
|
|
687
|
+
|
|
688
|
+
# 2. Install database management tools (choose as needed)
|
|
689
|
+
npm install -g @liangshanli/mcp-server-mysql
|
|
690
|
+
# or
|
|
691
|
+
npm install -g @liangshanli/mcp-server-mssqlserver
|
|
692
|
+
|
|
693
|
+
# 3. Install icon management tool
|
|
694
|
+
npm install -g @liangshanli/mcp-server-icon
|
|
695
|
+
|
|
696
|
+
# 4. Configure multiple MCP servers in your editor
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
**Example:**
|
|
700
|
+
|
|
701
|
+
**Set API Configuration:**
|
|
702
|
+
```json
|
|
703
|
+
{
|
|
704
|
+
"jsonrpc": "2.0",
|
|
705
|
+
"id": 6,
|
|
706
|
+
"method": "tools/call",
|
|
707
|
+
"params": {
|
|
708
|
+
"name": "api_debug",
|
|
709
|
+
"arguments": {
|
|
710
|
+
"action": "set",
|
|
711
|
+
"config": {
|
|
712
|
+
"baseUrl": "https://api.example.com",
|
|
713
|
+
"headers": {
|
|
714
|
+
"Content-Type": "application/json",
|
|
715
|
+
"Authorization": "Bearer your-token"
|
|
716
|
+
},
|
|
717
|
+
"list": [
|
|
718
|
+
{
|
|
719
|
+
"description": "User Login",
|
|
720
|
+
"url": "/api/login",
|
|
721
|
+
"method": "POST",
|
|
722
|
+
"body": {
|
|
723
|
+
"username": "user",
|
|
724
|
+
"password": "pass"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
**Execute API Request:**
|
|
735
|
+
```json
|
|
736
|
+
{
|
|
737
|
+
"jsonrpc": "2.0",
|
|
738
|
+
"id": 7,
|
|
739
|
+
"method": "tools/call",
|
|
740
|
+
"params": {
|
|
741
|
+
"name": "api_debug",
|
|
742
|
+
"arguments": {
|
|
743
|
+
"action": "execute",
|
|
744
|
+
"index": 0
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
**Search API:**
|
|
751
|
+
```json
|
|
752
|
+
{
|
|
753
|
+
"jsonrpc": "2.0",
|
|
754
|
+
"id": 8,
|
|
755
|
+
"method": "tools/call",
|
|
756
|
+
"params": {
|
|
757
|
+
"name": "api_debug",
|
|
758
|
+
"arguments": {
|
|
759
|
+
"action": "search",
|
|
760
|
+
"keyword": "login"
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
```
|
|
765
|
+
|
|
766
|
+
**Update Authentication Headers:**
|
|
767
|
+
```json
|
|
768
|
+
{
|
|
769
|
+
"jsonrpc": "2.0",
|
|
770
|
+
"id": 9,
|
|
771
|
+
"method": "tools/call",
|
|
772
|
+
"params": {
|
|
773
|
+
"name": "api_debug",
|
|
774
|
+
"arguments": {
|
|
775
|
+
"action": "updateHeaders",
|
|
776
|
+
"headers": {
|
|
777
|
+
"Authorization": "Bearer new-token"
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
## ๐ก๏ธ Error Handling
|
|
786
|
+
|
|
787
|
+
- Individual request errors don't affect the entire server
|
|
788
|
+
- Configuration errors are automatically recovered
|
|
789
|
+
- Process exceptions are automatically restarted (managed mode)
|
|
790
|
+
|
|
791
|
+
## ๐ Project Structure
|
|
792
|
+
|
|
793
|
+
```
|
|
794
|
+
mcp-server-project-standards/
|
|
795
|
+
โโโ src/
|
|
796
|
+
โ โโโ server-final.js # Main server file
|
|
797
|
+
โ โโโ utils/ # Utility functions directory
|
|
798
|
+
โ โโโ get_project_info.js # Project information management
|
|
799
|
+
โ โโโ get_project_structure.js # Project structure management
|
|
800
|
+
โ โโโ get_api_standards.js # API standards management
|
|
801
|
+
โ โโโ get_development_standards.js # Development standards management
|
|
802
|
+
โ โโโ database_standards.js # Database standards management
|
|
803
|
+
โ โโโ api_debug.js # API debugging tool
|
|
804
|
+
โ โโโ ... # Other tools
|
|
805
|
+
โโโ bin/
|
|
806
|
+
โ โโโ cli.js # CLI startup script
|
|
807
|
+
โโโ start-server.js # Managed startup script
|
|
808
|
+
โโโ package.json
|
|
809
|
+
โโโ README.md
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
## ๐งช Testing
|
|
813
|
+
|
|
814
|
+
```bash
|
|
815
|
+
npm test
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
## ๐ License
|
|
819
|
+
|
|
820
|
+
MIT
|
|
821
|
+
|
|
822
|
+
## ๐ค Contributing
|
|
823
|
+
|
|
824
|
+
Welcome to submit Issues and Pull Requests to improve this project!
|
|
825
|
+
|
|
826
|
+
## ๐ Support
|
|
827
|
+
|
|
828
|
+
If you encounter problems during use, please:
|
|
829
|
+
|
|
830
|
+
1. Check the [Issues](https://github.com/liliangshan/mcp-server-project-standards/issues) page
|
|
831
|
+
2. Create a new Issue describing your problem
|
|
832
|
+
3. Provide detailed error information and reproduction steps
|
|
833
|
+
|
|
834
|
+
---
|
|
835
|
+
|
|
836
|
+
**Make AI-assisted development more standardized and efficient!** ๐
|