mcp-react-toolkit 1.0.1 → 1.3.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.
- package/README.md +194 -44
- package/bin/cli.mjs +59 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.d.ts +18 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.js +74 -0
- package/node_modules/@mcp-showcase/shared/build/McpServerBase.js.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/ToolRegistry.d.ts +9 -0
- package/node_modules/@mcp-showcase/shared/build/ToolRegistry.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/ToolRegistry.js +22 -0
- package/node_modules/@mcp-showcase/shared/build/ToolRegistry.js.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/fs.d.ts +8 -0
- package/node_modules/@mcp-showcase/shared/build/fs.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/fs.js +45 -0
- package/node_modules/@mcp-showcase/shared/build/fs.js.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/index.d.ts +5 -0
- package/node_modules/@mcp-showcase/shared/build/index.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/index.js +5 -0
- package/node_modules/@mcp-showcase/shared/build/index.js.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/types.d.ts +36 -0
- package/node_modules/@mcp-showcase/shared/build/types.d.ts.map +1 -0
- package/node_modules/@mcp-showcase/shared/build/types.js +5 -0
- package/node_modules/@mcp-showcase/shared/build/types.js.map +1 -0
- package/node_modules/@mcp-showcase/shared/package.json +24 -0
- package/node_modules/@mcp-showcase/shared/src/McpServerBase.ts +100 -0
- package/node_modules/@mcp-showcase/shared/src/ToolRegistry.ts +38 -0
- package/node_modules/@mcp-showcase/shared/src/fs.ts +49 -0
- package/node_modules/@mcp-showcase/shared/src/index.ts +12 -0
- package/node_modules/@mcp-showcase/shared/src/types.ts +44 -0
- package/node_modules/@mcp-showcase/shared/tsconfig.json +8 -0
- package/package.json +38 -4
- package/tools/accessibility-checker/build/index.js +9 -5
- package/tools/accessibility-checker/build/index.js.map +1 -1
- package/tools/accessibility-checker/build/rules.d.ts.map +1 -1
- package/tools/accessibility-checker/build/rules.js +325 -94
- package/tools/accessibility-checker/build/rules.js.map +1 -1
- package/tools/code-modernizer/build/tools/01-convert-to-typescript.d.ts.map +1 -1
- package/tools/code-modernizer/build/tools/01-convert-to-typescript.js +65 -50
- package/tools/code-modernizer/build/tools/01-convert-to-typescript.js.map +1 -1
- package/tools/code-modernizer/build/types.d.ts +1 -0
- package/tools/code-modernizer/build/types.d.ts.map +1 -1
- package/tools/code-modernizer/build/utils/ast-parser.d.ts.map +1 -1
- package/tools/code-modernizer/build/utils/ast-parser.js +30 -14
- package/tools/code-modernizer/build/utils/ast-parser.js.map +1 -1
- package/tools/code-modernizer/build/utils/type-generator.d.ts +1 -1
- package/tools/code-modernizer/build/utils/type-generator.d.ts.map +1 -1
- package/tools/code-modernizer/build/utils/type-generator.js +72 -23
- package/tools/code-modernizer/build/utils/type-generator.js.map +1 -1
- package/tools/component-factory/build/index.js +59 -7
- package/tools/component-factory/build/index.js.map +1 -1
- package/tools/component-fixer/README.md +44 -0
- package/tools/component-fixer/build/index.d.ts +3 -0
- package/tools/component-fixer/build/index.d.ts.map +1 -0
- package/tools/component-fixer/build/index.js +647 -0
- package/tools/component-fixer/build/index.js.map +1 -0
- package/tools/component-fixer/package.json +20 -0
- package/tools/component-reviewer/README.md +54 -0
- package/tools/component-reviewer/build/index.d.ts +39 -0
- package/tools/component-reviewer/build/index.d.ts.map +1 -0
- package/tools/component-reviewer/build/index.js +946 -0
- package/tools/component-reviewer/build/index.js.map +1 -0
- package/tools/component-reviewer/package.json +20 -0
- package/tools/dep-auditor/build/index.d.ts +1 -0
- package/tools/dep-auditor/build/index.d.ts.map +1 -1
- package/tools/dep-auditor/build/index.js +71 -16
- package/tools/dep-auditor/build/index.js.map +1 -1
- package/tools/generate-tests/build/analyzer.d.ts +14 -0
- package/tools/generate-tests/build/analyzer.d.ts.map +1 -1
- package/tools/generate-tests/build/analyzer.js +96 -42
- package/tools/generate-tests/build/analyzer.js.map +1 -1
- package/tools/generate-tests/build/generators.d.ts.map +1 -1
- package/tools/generate-tests/build/generators.js +304 -79
- package/tools/generate-tests/build/generators.js.map +1 -1
- package/tools/generate-tests/build/index.js +29 -10
- package/tools/generate-tests/build/index.js.map +1 -1
- package/tools/json-viewer/build/index.js +29 -6
- package/tools/json-viewer/build/index.js.map +1 -1
- package/tools/legacy-analyzer/README.md +66 -0
- package/tools/legacy-analyzer/build/index.d.ts +3 -0
- package/tools/legacy-analyzer/build/index.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/index.js +209 -0
- package/tools/legacy-analyzer/build/index.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.js +115 -0
- package/tools/legacy-analyzer/build/tools/01-detect-project-tech.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/02-analyze-folder-structure.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/02-analyze-folder-structure.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/02-analyze-folder-structure.js +85 -0
- package/tools/legacy-analyzer/build/tools/02-analyze-folder-structure.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/03-analyze-components.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/03-analyze-components.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/03-analyze-components.js +87 -0
- package/tools/legacy-analyzer/build/tools/03-analyze-components.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/04-analyze-state-management.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/04-analyze-state-management.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/04-analyze-state-management.js +133 -0
- package/tools/legacy-analyzer/build/tools/04-analyze-state-management.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.js +160 -0
- package/tools/legacy-analyzer/build/tools/05-analyze-api-layer.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/06-analyze-routing.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/06-analyze-routing.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/06-analyze-routing.js +150 -0
- package/tools/legacy-analyzer/build/tools/06-analyze-routing.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/07-analyze-styling.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/07-analyze-styling.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/07-analyze-styling.js +131 -0
- package/tools/legacy-analyzer/build/tools/07-analyze-styling.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/08-analyze-assets.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/08-analyze-assets.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/08-analyze-assets.js +85 -0
- package/tools/legacy-analyzer/build/tools/08-analyze-assets.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/09-detect-anti-patterns.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/09-detect-anti-patterns.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/09-detect-anti-patterns.js +329 -0
- package/tools/legacy-analyzer/build/tools/09-detect-anti-patterns.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/10-detect-duplication.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/10-detect-duplication.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/10-detect-duplication.js +192 -0
- package/tools/legacy-analyzer/build/tools/10-detect-duplication.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/11-analyze-dependencies-usage.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/11-analyze-dependencies-usage.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/11-analyze-dependencies-usage.js +232 -0
- package/tools/legacy-analyzer/build/tools/11-analyze-dependencies-usage.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/12-analyze-legacy-app.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/12-analyze-legacy-app.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/12-analyze-legacy-app.js +247 -0
- package/tools/legacy-analyzer/build/tools/12-analyze-legacy-app.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/13-detect-features.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/13-detect-features.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/13-detect-features.js +141 -0
- package/tools/legacy-analyzer/build/tools/13-detect-features.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/14-classify-files.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/14-classify-files.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/14-classify-files.js +76 -0
- package/tools/legacy-analyzer/build/tools/14-classify-files.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/15-detect-shared-modules.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/15-detect-shared-modules.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/15-detect-shared-modules.js +70 -0
- package/tools/legacy-analyzer/build/tools/15-detect-shared-modules.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/16-design-target-structure.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/16-design-target-structure.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/16-design-target-structure.js +26 -0
- package/tools/legacy-analyzer/build/tools/16-design-target-structure.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/17-map-files-to-target.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/17-map-files-to-target.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/17-map-files-to-target.js +108 -0
- package/tools/legacy-analyzer/build/tools/17-map-files-to-target.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/18-detect-boundary-violations.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/18-detect-boundary-violations.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/18-detect-boundary-violations.js +137 -0
- package/tools/legacy-analyzer/build/tools/18-detect-boundary-violations.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/19-suggest-module-splitting.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/19-suggest-module-splitting.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/19-suggest-module-splitting.js +160 -0
- package/tools/legacy-analyzer/build/tools/19-suggest-module-splitting.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/20-naming-standardizer.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/20-naming-standardizer.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/20-naming-standardizer.js +162 -0
- package/tools/legacy-analyzer/build/tools/20-naming-standardizer.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/21-generate-refactor-plan.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/21-generate-refactor-plan.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/21-generate-refactor-plan.js +108 -0
- package/tools/legacy-analyzer/build/tools/21-generate-refactor-plan.js.map +1 -0
- package/tools/legacy-analyzer/build/tools/22-refactor-folder-structure.d.ts +3 -0
- package/tools/legacy-analyzer/build/tools/22-refactor-folder-structure.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/tools/22-refactor-folder-structure.js +98 -0
- package/tools/legacy-analyzer/build/tools/22-refactor-folder-structure.js.map +1 -0
- package/tools/legacy-analyzer/build/types.d.ts +413 -0
- package/tools/legacy-analyzer/build/types.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/types.js +12 -0
- package/tools/legacy-analyzer/build/types.js.map +1 -0
- package/tools/legacy-analyzer/build/utils/ast-parser.d.ts +34 -0
- package/tools/legacy-analyzer/build/utils/ast-parser.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/utils/ast-parser.js +394 -0
- package/tools/legacy-analyzer/build/utils/ast-parser.js.map +1 -0
- package/tools/legacy-analyzer/build/utils/file-scanner.d.ts +51 -0
- package/tools/legacy-analyzer/build/utils/file-scanner.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/utils/file-scanner.js +174 -0
- package/tools/legacy-analyzer/build/utils/file-scanner.js.map +1 -0
- package/tools/legacy-analyzer/build/utils/import-tracker.d.ts +38 -0
- package/tools/legacy-analyzer/build/utils/import-tracker.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/utils/import-tracker.js +194 -0
- package/tools/legacy-analyzer/build/utils/import-tracker.js.map +1 -0
- package/tools/legacy-analyzer/build/utils/refactor-helpers.d.ts +88 -0
- package/tools/legacy-analyzer/build/utils/refactor-helpers.d.ts.map +1 -0
- package/tools/legacy-analyzer/build/utils/refactor-helpers.js +538 -0
- package/tools/legacy-analyzer/build/utils/refactor-helpers.js.map +1 -0
- package/tools/legacy-analyzer/package.json +20 -0
- package/tools/lighthouse-runner/README.md +45 -0
- package/tools/lighthouse-runner/build/index.d.ts +6 -0
- package/tools/lighthouse-runner/build/index.d.ts.map +1 -0
- package/tools/lighthouse-runner/build/index.js +295 -0
- package/tools/lighthouse-runner/build/index.js.map +1 -0
- package/tools/lighthouse-runner/package.json +20 -0
- package/tools/monorepo-manager/build/utils.d.ts.map +1 -1
- package/tools/monorepo-manager/build/utils.js +12 -9
- package/tools/monorepo-manager/build/utils.js.map +1 -1
- package/tools/performance-audit/README.md +37 -0
- package/tools/performance-audit/build/index.d.ts +13 -0
- package/tools/performance-audit/build/index.d.ts.map +1 -0
- package/tools/performance-audit/build/index.js +311 -0
- package/tools/performance-audit/build/index.js.map +1 -0
- package/tools/performance-audit/package.json +20 -0
- package/tools/quality-pipeline/build/index.js +55 -15
- package/tools/quality-pipeline/build/index.js.map +1 -1
- package/tools/render-analyzer/README.md +43 -0
- package/tools/render-analyzer/build/index.d.ts +25 -0
- package/tools/render-analyzer/build/index.d.ts.map +1 -0
- package/tools/render-analyzer/build/index.js +342 -0
- package/tools/render-analyzer/build/index.js.map +1 -0
- package/tools/render-analyzer/package.json +20 -0
- package/tools/shared/build/fs.d.ts +8 -0
- package/tools/shared/build/fs.d.ts.map +1 -0
- package/tools/shared/build/fs.js +45 -0
- package/tools/shared/build/fs.js.map +1 -0
- package/tools/shared/build/index.d.ts +1 -0
- package/tools/shared/build/index.d.ts.map +1 -1
- package/tools/shared/build/index.js +1 -0
- package/tools/shared/build/index.js.map +1 -1
- package/tools/shared/package.json +2 -1
- package/tools/storybook-generator/README.md +39 -0
- package/tools/storybook-generator/build/index.d.ts +13 -0
- package/tools/storybook-generator/build/index.d.ts.map +1 -0
- package/tools/storybook-generator/build/index.js +478 -0
- package/tools/storybook-generator/build/index.js.map +1 -0
- package/tools/storybook-generator/package.json +20 -0
- package/tools/test-gap-analyzer/README.md +41 -0
- package/tools/test-gap-analyzer/build/index.d.ts +20 -0
- package/tools/test-gap-analyzer/build/index.d.ts.map +1 -0
- package/tools/test-gap-analyzer/build/index.js +371 -0
- package/tools/test-gap-analyzer/build/index.js.map +1 -0
- package/tools/test-gap-analyzer/package.json +20 -0
- package/tools/typescript-enforcer/build/scanner.d.ts.map +1 -1
- package/tools/typescript-enforcer/build/scanner.js +13 -1
- package/tools/typescript-enforcer/build/scanner.js.map +1 -1
- package/tools/typescript-enforcer/build/types.d.ts +1 -0
- package/tools/typescript-enforcer/build/types.d.ts.map +1 -1
- package/CONTRIBUTING.md +0 -157
- package/demo/legacy-app/src/App.jsx +0 -12
- package/demo/legacy-app/src/components/Dashboard.jsx +0 -51
- package/demo/legacy-app/src/components/UserCard.jsx +0 -32
- package/demo/legacy-app/src/hooks/useUsers.js +0 -38
- package/demo/legacy-app/src/utils/api.js +0 -30
- package/glama.json +0 -4
- package/mcp-publisher +0 -0
- package/server.json +0 -20
- package/tools/accessibility-checker/build/rules.test.d.ts +0 -2
- package/tools/accessibility-checker/build/rules.test.d.ts.map +0 -1
- package/tools/accessibility-checker/build/rules.test.js.map +0 -1
- package/tools/code-modernizer/build/utils/file-ops.test.d.ts +0 -2
- package/tools/code-modernizer/build/utils/file-ops.test.d.ts.map +0 -1
- package/tools/code-modernizer/build/utils/file-ops.test.js.map +0 -1
- package/tools/component-factory/build/utils.test.d.ts +0 -2
- package/tools/component-factory/build/utils.test.d.ts.map +0 -1
- package/tools/component-factory/build/utils.test.js.map +0 -1
- package/tools/dep-auditor/build/index.test.d.ts +0 -2
- package/tools/dep-auditor/build/index.test.d.ts.map +0 -1
- package/tools/dep-auditor/build/index.test.js.map +0 -1
- package/tools/generate-tests/build/analyzer.test.d.ts +0 -2
- package/tools/generate-tests/build/analyzer.test.d.ts.map +0 -1
- package/tools/generate-tests/build/analyzer.test.js.map +0 -1
- package/tools/json-viewer/build/utils.test.d.ts +0 -2
- package/tools/json-viewer/build/utils.test.d.ts.map +0 -1
- package/tools/json-viewer/build/utils.test.js.map +0 -1
- package/tools/monorepo-manager/build/utils.test.d.ts +0 -2
- package/tools/monorepo-manager/build/utils.test.d.ts.map +0 -1
- package/tools/monorepo-manager/build/utils.test.js.map +0 -1
- package/tools/quality-pipeline/build/utils.test.d.ts +0 -2
- package/tools/quality-pipeline/build/utils.test.d.ts.map +0 -1
- package/tools/quality-pipeline/build/utils.test.js.map +0 -1
- package/tools/typescript-enforcer/build/scanner.test.d.ts +0 -2
- package/tools/typescript-enforcer/build/scanner.test.d.ts.map +0 -1
- package/tools/typescript-enforcer/build/scanner.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,53 +2,102 @@
|
|
|
2
2
|
|
|
3
3
|
MCP servers for React + TypeScript development automation. Works with Claude Desktop, Cline, Cursor — and as plain CLI scripts — one protocol, zero duplication.
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/mcp-react-toolkit)
|
|
5
6
|
[](https://github.com/Nishant-Chaudhary5338/mcp-toolkit/actions/workflows/ci.yml)
|
|
6
7
|
[](LICENSE)
|
|
7
8
|
[](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
8
|
-
[](#testing)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Published on npm as [`mcp-react-toolkit`](https://www.npmjs.com/package/mcp-react-toolkit). No clone or build required — run any of the 17 servers straight from npm:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx mcp-react-toolkit --list # list all 17 tools
|
|
19
|
+
npx mcp-react-toolkit legacy-analyzer # run one as an MCP server (stdio)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Add to Claude Desktop / Cursor / Cline
|
|
23
|
+
|
|
24
|
+
```jsonc
|
|
25
|
+
// claude_desktop_config.json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"legacy-analyzer": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["-y", "mcp-react-toolkit", "legacy-analyzer"]
|
|
31
|
+
},
|
|
32
|
+
"component-factory": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "mcp-react-toolkit", "component-factory"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Swap in any tool name from `npx mcp-react-toolkit --list`. Restart your client and the tools appear.
|
|
9
41
|
|
|
10
42
|
---
|
|
11
43
|
|
|
12
44
|
## What's here
|
|
13
45
|
|
|
14
46
|
```
|
|
15
|
-
tools/
|
|
47
|
+
tools/ 17 MCP server packages — each independently buildable and runnable
|
|
16
48
|
server/ Express bridge (port 3002) — proxies calls from the UI to MCP servers
|
|
17
49
|
client/ React 19 showcase SPA — tool catalog, workflow demos, animated flowcharts
|
|
18
50
|
```
|
|
19
51
|
|
|
20
52
|
---
|
|
21
53
|
|
|
54
|
+
## Companion package
|
|
55
|
+
|
|
56
|
+
[`@mcp-toolkit/code-indexer`](https://www.npmjs.com/package/@mcp-toolkit/code-indexer) — a standalone code-intelligence engine that indexes any TS/React repo into a queryable **code graph** (files · components · functions, and the `imports`/`renders`/`calls`/`references` edges between them) and answers structural questions — *who renders this, who calls this, find references, blast radius, cycles* — over a CLI, an HTTP/WS server with a live 3D viewer, and an MCP server. Separate package, same family:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx @mcp-toolkit/code-indexer mcp # stdio MCP server (8 tools)
|
|
60
|
+
npx @mcp-toolkit/code-indexer index . # one-shot index → .code-graph/graph.json
|
|
61
|
+
npx @mcp-toolkit/code-indexer query who-renders --id "cmp:src/Button.tsx#Button"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
22
66
|
## Tools
|
|
23
67
|
|
|
24
|
-
All
|
|
68
|
+
All 17 tools are production-ready: built, tested, and CI-verified on Node 20 + 22.
|
|
69
|
+
|
|
70
|
+
### Component Development
|
|
25
71
|
|
|
26
72
|
| Tool | What it does | MCP tools exposed |
|
|
27
73
|
|---|---|---|
|
|
28
74
|
| `component-factory` | Scaffold React components from 41 shadcn/ui templates — with tests + Storybook | 6 |
|
|
75
|
+
| `component-reviewer` | Audit TypeScript errors, a11y issues, test coverage — graded A+ to F | 3 |
|
|
76
|
+
| `component-fixer` | Auto-fix broken imports, missing deps, inline style refactors | 3 |
|
|
77
|
+
| `storybook-generator` | Auto-generate Storybook stories — Default, variants, sizes, callbacks, play functions | 2 |
|
|
78
|
+
|
|
79
|
+
### Code Quality & Modernisation
|
|
80
|
+
|
|
81
|
+
| Tool | What it does | MCP tools exposed |
|
|
82
|
+
|---|---|---|
|
|
29
83
|
| `code-modernizer` | AST-based JS/JSX → TypeScript conversion, PropTypes → interfaces | 1 |
|
|
30
|
-
| `
|
|
31
|
-
| `json-viewer` | Generate an interactive HTML JSON viewer — collapsible, searchable, dark/light | 3 |
|
|
32
|
-
| `dep-auditor` | Unused deps, duplicate versions, circular imports, bundle impact analysis | 4 |
|
|
84
|
+
| `typescript-enforcer` | Scan for `any` types, unsafe casts, missing modifiers — 7 rules, scored 0–10 | 4 |
|
|
33
85
|
| `accessibility-checker` | WCAG 2.1 audit — alt text, label associations, ARIA roles, keyboard navigation | 3 |
|
|
34
86
|
| `generate-tests` | Analyze a TypeScript/React source file and generate a Vitest test suite | 2 |
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
87
|
+
| `quality-pipeline` | 5-stage audit (tests · types · perf · a11y · design tokens) graded A–F | 2 |
|
|
88
|
+
| `render-analyzer` | Detect unnecessary re-renders, missing memo, inline objects/functions | 3 |
|
|
89
|
+
| `performance-audit` | Memory leaks, heavy imports, unoptimized images, deep nesting | 3 |
|
|
90
|
+
| `test-gap-analyzer` | Find unimplemented functions, uncovered branches, missing edge cases | 3 |
|
|
91
|
+
| `legacy-analyzer` | 22-tool health audit for any React/Next.js/Remix app — scores 0–100, migration hints | 22 |
|
|
37
92
|
|
|
38
|
-
###
|
|
93
|
+
### Monorepo & Infrastructure
|
|
39
94
|
|
|
40
|
-
| Tool |
|
|
95
|
+
| Tool | What it does | MCP tools exposed |
|
|
41
96
|
|---|---|---|
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `performance-audit` | Bundle size analysis, memory leaks, slow component detection | 📋 Planned |
|
|
47
|
-
| `lighthouse-runner` | Web Vitals / Lighthouse audit via CLI | 📋 Planned |
|
|
48
|
-
| `component-reviewer` | Audit TypeScript errors, test coverage gaps, a11y issues | 📋 Planned |
|
|
49
|
-
| `component-fixer` | Auto-fix broken imports, missing dependencies, export corrections | 📋 Planned |
|
|
50
|
-
|
|
51
|
-
Want to implement one of these? See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
97
|
+
| `dep-auditor` | Unused deps, duplicate versions, circular imports, bundle impact analysis | 4 |
|
|
98
|
+
| `monorepo-manager` | Workspace listing, dependency graph, health check, shared dep finder | 6 |
|
|
99
|
+
| `lighthouse-runner` | Static HTML audit — meta tags, a11y, OG/Twitter cards, canonical, JSON-LD | 4 |
|
|
100
|
+
| `json-viewer` | Generate an interactive HTML JSON viewer — collapsible, searchable, dark/light | 3 |
|
|
52
101
|
|
|
53
102
|
---
|
|
54
103
|
|
|
@@ -60,23 +109,29 @@ legacy-analyzer → code-modernizer → typescript-enforcer → generate-tests
|
|
|
60
109
|
```
|
|
61
110
|
Migrate a JS codebase to strict TypeScript with auto-generated test coverage.
|
|
62
111
|
|
|
63
|
-
### 2 ·
|
|
112
|
+
### 2 · Component Quality Pipeline
|
|
64
113
|
```
|
|
65
|
-
|
|
114
|
+
component-factory → component-reviewer → accessibility-checker → storybook-generator
|
|
66
115
|
```
|
|
67
|
-
|
|
116
|
+
Generate a production-ready component, review it, fix a11y issues, and add full story coverage.
|
|
117
|
+
|
|
118
|
+
### 3 · Render Performance Audit
|
|
119
|
+
```
|
|
120
|
+
render-analyzer → performance-audit → quality-pipeline
|
|
121
|
+
```
|
|
122
|
+
Find unnecessary re-renders, memory leaks, and heavy imports — graded A–F.
|
|
68
123
|
|
|
69
|
-
###
|
|
124
|
+
### 4 · App Health Check
|
|
70
125
|
```
|
|
71
|
-
|
|
126
|
+
legacy-analyzer [analyze-legacy-app] → component-reviewer → generate-tests
|
|
72
127
|
```
|
|
73
|
-
|
|
128
|
+
Full health score (0–100) with prioritized migration hints, then fix the top issues.
|
|
74
129
|
|
|
75
|
-
###
|
|
130
|
+
### 5 · Dependency Health
|
|
76
131
|
```
|
|
77
|
-
|
|
132
|
+
dep-auditor [unused] → dep-auditor [duplicates] → dep-auditor [bundle-impact] → monorepo-manager
|
|
78
133
|
```
|
|
79
|
-
|
|
134
|
+
Audit and clean up a monorepo's dependency graph end-to-end.
|
|
80
135
|
|
|
81
136
|
---
|
|
82
137
|
|
|
@@ -120,18 +175,20 @@ new MyTool().run();
|
|
|
120
175
|
|
|
121
176
|
---
|
|
122
177
|
|
|
123
|
-
## Run
|
|
178
|
+
## Run from source (contributors)
|
|
179
|
+
|
|
180
|
+
Prefer npm for everyday use (see [Install](#install)). Clone only to hack on the tools or run the showcase UI:
|
|
124
181
|
|
|
125
182
|
```sh
|
|
126
183
|
git clone https://github.com/Nishant-Chaudhary5338/mcp-toolkit.git
|
|
127
184
|
cd mcp-toolkit
|
|
128
185
|
npm install
|
|
129
186
|
npm run build
|
|
130
|
-
npm test #
|
|
187
|
+
npm test # 450 tests across all 17 tools
|
|
131
188
|
npm run dev # server on :3002, client on :5173
|
|
132
189
|
```
|
|
133
190
|
|
|
134
|
-
###
|
|
191
|
+
### Point Claude Desktop at a local build
|
|
135
192
|
|
|
136
193
|
```jsonc
|
|
137
194
|
// ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
@@ -141,17 +198,37 @@ npm run dev # server on :3002, client on :5173
|
|
|
141
198
|
"command": "node",
|
|
142
199
|
"args": ["/path/to/mcp-toolkit/tools/component-factory/build/index.js"]
|
|
143
200
|
},
|
|
144
|
-
"
|
|
201
|
+
"component-reviewer": {
|
|
145
202
|
"command": "node",
|
|
146
|
-
"args": ["/path/to/mcp-toolkit/tools/
|
|
203
|
+
"args": ["/path/to/mcp-toolkit/tools/component-reviewer/build/index.js"]
|
|
147
204
|
},
|
|
148
|
-
"
|
|
205
|
+
"component-fixer": {
|
|
149
206
|
"command": "node",
|
|
150
|
-
"args": ["/path/to/mcp-toolkit/tools/
|
|
207
|
+
"args": ["/path/to/mcp-toolkit/tools/component-fixer/build/index.js"]
|
|
151
208
|
},
|
|
152
|
-
"
|
|
209
|
+
"storybook-generator": {
|
|
153
210
|
"command": "node",
|
|
154
|
-
"args": ["/path/to/mcp-toolkit/tools/
|
|
211
|
+
"args": ["/path/to/mcp-toolkit/tools/storybook-generator/build/index.js"]
|
|
212
|
+
},
|
|
213
|
+
"render-analyzer": {
|
|
214
|
+
"command": "node",
|
|
215
|
+
"args": ["/path/to/mcp-toolkit/tools/render-analyzer/build/index.js"]
|
|
216
|
+
},
|
|
217
|
+
"performance-audit": {
|
|
218
|
+
"command": "node",
|
|
219
|
+
"args": ["/path/to/mcp-toolkit/tools/performance-audit/build/index.js"]
|
|
220
|
+
},
|
|
221
|
+
"legacy-analyzer": {
|
|
222
|
+
"command": "node",
|
|
223
|
+
"args": ["/path/to/mcp-toolkit/tools/legacy-analyzer/build/index.js"]
|
|
224
|
+
},
|
|
225
|
+
"test-gap-analyzer": {
|
|
226
|
+
"command": "node",
|
|
227
|
+
"args": ["/path/to/mcp-toolkit/tools/test-gap-analyzer/build/index.js"]
|
|
228
|
+
},
|
|
229
|
+
"lighthouse-runner": {
|
|
230
|
+
"command": "node",
|
|
231
|
+
"args": ["/path/to/mcp-toolkit/tools/lighthouse-runner/build/index.js"]
|
|
155
232
|
},
|
|
156
233
|
"dep-auditor": {
|
|
157
234
|
"command": "node",
|
|
@@ -169,9 +246,21 @@ npm run dev # server on :3002, client on :5173
|
|
|
169
246
|
"command": "node",
|
|
170
247
|
"args": ["/path/to/mcp-toolkit/tools/typescript-enforcer/build/index.js"]
|
|
171
248
|
},
|
|
249
|
+
"code-modernizer": {
|
|
250
|
+
"command": "node",
|
|
251
|
+
"args": ["/path/to/mcp-toolkit/tools/code-modernizer/build/index.js"]
|
|
252
|
+
},
|
|
253
|
+
"quality-pipeline": {
|
|
254
|
+
"command": "node",
|
|
255
|
+
"args": ["/path/to/mcp-toolkit/tools/quality-pipeline/build/index.js"]
|
|
256
|
+
},
|
|
172
257
|
"monorepo-manager": {
|
|
173
258
|
"command": "node",
|
|
174
259
|
"args": ["/path/to/mcp-toolkit/tools/monorepo-manager/build/index.js"]
|
|
260
|
+
},
|
|
261
|
+
"json-viewer": {
|
|
262
|
+
"command": "node",
|
|
263
|
+
"args": ["/path/to/mcp-toolkit/tools/json-viewer/build/index.js"]
|
|
175
264
|
}
|
|
176
265
|
}
|
|
177
266
|
}
|
|
@@ -179,14 +268,58 @@ npm run dev # server on :3002, client on :5173
|
|
|
179
268
|
|
|
180
269
|
### Use as a CLI / in CI
|
|
181
270
|
|
|
271
|
+
Every tool's `build/index.js` has a `#!/usr/bin/env node` shebang and is `chmod +x` — pipe a JSON-RPC message to it on stdin and it writes the result to stdout.
|
|
272
|
+
|
|
182
273
|
```sh
|
|
183
|
-
#
|
|
184
|
-
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"
|
|
185
|
-
| node tools/
|
|
274
|
+
# Analyze a full React/Next.js/Vite app — health score 0–100 + migration hints
|
|
275
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analyze-legacy-app","arguments":{"path":"/path/to/app"}}}' \
|
|
276
|
+
| node tools/legacy-analyzer/build/index.js
|
|
277
|
+
|
|
278
|
+
# Detect unnecessary re-renders (missing memo, inline objects)
|
|
279
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"detect_rerenders","arguments":{"path":"src/components"}}}' \
|
|
280
|
+
| node tools/render-analyzer/build/index.js
|
|
281
|
+
|
|
282
|
+
# Audit for memory leaks and heavy imports
|
|
283
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"audit_bundle","arguments":{"path":"src"}}}' \
|
|
284
|
+
| node tools/performance-audit/build/index.js
|
|
285
|
+
|
|
286
|
+
# Review a component — grade A+ to F
|
|
287
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"review","arguments":{"path":"src/components/Button.tsx"}}}' \
|
|
288
|
+
| node tools/component-reviewer/build/index.js
|
|
289
|
+
|
|
290
|
+
# Auto-fix a component
|
|
291
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fix","arguments":{"path":"src/components/Button.tsx"}}}' \
|
|
292
|
+
| node tools/component-fixer/build/index.js
|
|
293
|
+
|
|
294
|
+
# Find untested exports
|
|
295
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analyze_test_gaps","arguments":{"path":"src"}}}' \
|
|
296
|
+
| node tools/test-gap-analyzer/build/index.js
|
|
186
297
|
|
|
187
|
-
#
|
|
298
|
+
# Generate Storybook stories for all components in a directory
|
|
299
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_stories","arguments":{"path":"src/components"}}}' \
|
|
300
|
+
| node tools/storybook-generator/build/index.js
|
|
301
|
+
|
|
302
|
+
# Audit an HTML file — SEO, a11y, OG tags, canonical
|
|
303
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"static_audit","arguments":{"path":"public/index.html"}}}' \
|
|
304
|
+
| node tools/lighthouse-runner/build/index.js
|
|
305
|
+
|
|
306
|
+
# Run a WCAG audit
|
|
188
307
|
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_accessibility","arguments":{"path":"src/components"}}}' \
|
|
189
308
|
| node tools/accessibility-checker/build/index.js
|
|
309
|
+
|
|
310
|
+
# Scan for TypeScript violations
|
|
311
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"scan_directory","arguments":{"path":"src"}}}' \
|
|
312
|
+
| node tools/typescript-enforcer/build/index.js
|
|
313
|
+
|
|
314
|
+
# Find unused and outdated dependencies
|
|
315
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"find_unused_deps","arguments":{"root":"."}}}' \
|
|
316
|
+
| node tools/dep-auditor/build/index.js
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### List a tool's available commands
|
|
320
|
+
|
|
321
|
+
```sh
|
|
322
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node tools/legacy-analyzer/build/index.js
|
|
190
323
|
```
|
|
191
324
|
|
|
192
325
|
---
|
|
@@ -197,11 +330,19 @@ Each tool has a dedicated test file covering its core logic directly — no MCP
|
|
|
197
330
|
|
|
198
331
|
```sh
|
|
199
332
|
npm test # all tools
|
|
200
|
-
npm run test -w tools/
|
|
333
|
+
npm run test -w tools/legacy-analyzer # single tool
|
|
201
334
|
```
|
|
202
335
|
|
|
203
336
|
| Tool | Tests |
|
|
204
337
|
|---|---|
|
|
338
|
+
| render-analyzer | 11 |
|
|
339
|
+
| storybook-generator | 20 |
|
|
340
|
+
| performance-audit | 15 |
|
|
341
|
+
| lighthouse-runner | 13 |
|
|
342
|
+
| test-gap-analyzer | 15 |
|
|
343
|
+
| component-reviewer | 19 |
|
|
344
|
+
| component-fixer | 10 |
|
|
345
|
+
| legacy-analyzer | 14 |
|
|
205
346
|
| json-viewer | 16 |
|
|
206
347
|
| quality-pipeline | 8 |
|
|
207
348
|
| component-factory | 6 |
|
|
@@ -211,6 +352,7 @@ npm run test -w tools/typescript-enforcer # single tool
|
|
|
211
352
|
| generate-tests | 14 |
|
|
212
353
|
| typescript-enforcer | 22 |
|
|
213
354
|
| monorepo-manager | 30 |
|
|
355
|
+
| **Total** | **450** |
|
|
214
356
|
|
|
215
357
|
CI runs on every push and PR against Node 20 and 22.
|
|
216
358
|
|
|
@@ -222,14 +364,22 @@ CI runs on every push and PR against Node 20 and 22.
|
|
|
222
364
|
tools/
|
|
223
365
|
shared/ McpServerBase, ToolRegistry, shared types
|
|
224
366
|
component-factory/ 41 shadcn/ui templates
|
|
367
|
+
component-reviewer/ Review rules engine (7 categories)
|
|
368
|
+
component-fixer/ Fix strategies per issue type
|
|
369
|
+
storybook-generator/ Story generator (Default, variants, play functions)
|
|
370
|
+
render-analyzer/ Re-render profile + memo checker
|
|
371
|
+
performance-audit/ Memory leak + heavy import detector
|
|
372
|
+
legacy-analyzer/ 22-tool analysis engine + health scorer
|
|
373
|
+
test-gap-analyzer/ Export extractor + edge case detector
|
|
374
|
+
lighthouse-runner/ Static HTML auditor
|
|
225
375
|
code-modernizer/ AST-based TS conversion
|
|
226
376
|
quality-pipeline/ 5-stage grading system
|
|
227
|
-
json-viewer/ HTML generation
|
|
228
377
|
dep-auditor/ Dependency graph analysis
|
|
229
378
|
accessibility-checker/ WCAG rule engine (9 rules)
|
|
230
379
|
generate-tests/ Source analyzer + test generator
|
|
231
380
|
typescript-enforcer/ 7-rule type safety scanner
|
|
232
381
|
monorepo-manager/ Workspace operations
|
|
382
|
+
json-viewer/ HTML generation
|
|
233
383
|
|
|
234
384
|
server/ Express bridge — spawns tools as child processes
|
|
235
385
|
client/ React 19 SPA — tool catalog and live demos
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
|
|
6
|
+
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
7
|
+
|
|
8
|
+
const TOOLS = [
|
|
9
|
+
"component-factory",
|
|
10
|
+
"component-reviewer",
|
|
11
|
+
"component-fixer",
|
|
12
|
+
"storybook-generator",
|
|
13
|
+
"code-modernizer",
|
|
14
|
+
"typescript-enforcer",
|
|
15
|
+
"accessibility-checker",
|
|
16
|
+
"generate-tests",
|
|
17
|
+
"quality-pipeline",
|
|
18
|
+
"render-analyzer",
|
|
19
|
+
"performance-audit",
|
|
20
|
+
"test-gap-analyzer",
|
|
21
|
+
"legacy-analyzer",
|
|
22
|
+
"dep-auditor",
|
|
23
|
+
"monorepo-manager",
|
|
24
|
+
"lighthouse-runner",
|
|
25
|
+
"json-viewer",
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const requested = process.argv[2];
|
|
29
|
+
|
|
30
|
+
if (!requested || requested === "--list" || requested === "-l" || requested === "list") {
|
|
31
|
+
const lines = TOOLS.map((t) => ` • ${t}`).join("\n");
|
|
32
|
+
process.stdout.write(
|
|
33
|
+
`mcp-react-toolkit — 17 MCP servers for React + TypeScript\n\n` +
|
|
34
|
+
`Usage:\n npx mcp-react-toolkit <tool>\n\nAvailable tools:\n${lines}\n\n` +
|
|
35
|
+
`Add one to Claude Desktop / Cursor:\n` +
|
|
36
|
+
` "legacy-analyzer": { "command": "npx", "args": ["-y", "mcp-react-toolkit", "legacy-analyzer"] }\n`,
|
|
37
|
+
);
|
|
38
|
+
process.exit(requested ? 0 : 1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!TOOLS.includes(requested)) {
|
|
42
|
+
process.stderr.write(
|
|
43
|
+
`Unknown tool: "${requested}".\nRun \`npx mcp-react-toolkit --list\` to see all 17 tools.\n`,
|
|
44
|
+
);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const entry = path.join(ROOT, "tools", requested, "build", "index.js");
|
|
49
|
+
if (!existsSync(entry)) {
|
|
50
|
+
process.stderr.write(`Tool "${requested}" is missing its build at ${entry}.\n`);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Importing the tool's entry boots its MCP server on stdio.
|
|
55
|
+
await import(pathToFileUrl(entry));
|
|
56
|
+
|
|
57
|
+
function pathToFileUrl(p) {
|
|
58
|
+
return new URL(`file://${p}`).href;
|
|
59
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { ToolRegistry } from './ToolRegistry.js';
|
|
3
|
+
import type { ServerConfig, ToolDefinition, ToolHandler, ToolResult } from './types.js';
|
|
4
|
+
export declare abstract class McpServerBase {
|
|
5
|
+
protected server: Server;
|
|
6
|
+
protected registry: ToolRegistry;
|
|
7
|
+
protected config: ServerConfig;
|
|
8
|
+
constructor(config: ServerConfig);
|
|
9
|
+
protected abstract registerTools(): void;
|
|
10
|
+
protected addTool(name: string, description: string, inputSchema: ToolDefinition['inputSchema'], handler: ToolHandler): void;
|
|
11
|
+
private setupHandlers;
|
|
12
|
+
private setupErrorHandlers;
|
|
13
|
+
protected success<T extends Record<string, unknown>>(data: T): ToolResult;
|
|
14
|
+
protected error(error: unknown): ToolResult;
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
shutdown(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=McpServerBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerBase.d.ts","sourceRoot":"","sources":["../src/McpServerBase.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExF,8BAAsB,aAAa;IACjC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,QAAQ,EAAE,YAAY,CAAC;IACjC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC;gBAEnB,MAAM,EAAE,YAAY;IAchC,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;IAExC,SAAS,CAAC,OAAO,CACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,EAC1C,OAAO,EAAE,WAAW,GACnB,IAAI;IAIP,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,kBAAkB;IAS1B,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU;IAMzE,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU;IAQrC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAMpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAIhC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// MCP SERVER BASE - Abstract base class for all MCP servers
|
|
3
|
+
// ============================================================================
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { ToolRegistry } from './ToolRegistry.js';
|
|
8
|
+
export class McpServerBase {
|
|
9
|
+
server;
|
|
10
|
+
registry;
|
|
11
|
+
config;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
this.registry = new ToolRegistry();
|
|
15
|
+
this.server = new Server({ name: config.name, version: config.version }, { capabilities: { tools: {} } });
|
|
16
|
+
this.setupHandlers();
|
|
17
|
+
this.setupErrorHandlers();
|
|
18
|
+
this.registerTools();
|
|
19
|
+
}
|
|
20
|
+
addTool(name, description, inputSchema, handler) {
|
|
21
|
+
this.registry.register(name, description, inputSchema, handler);
|
|
22
|
+
}
|
|
23
|
+
setupHandlers() {
|
|
24
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
25
|
+
tools: this.registry.getAllDefinitions(),
|
|
26
|
+
}));
|
|
27
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
28
|
+
const { name, arguments: args } = request.params;
|
|
29
|
+
const handler = this.registry.getHandler(name);
|
|
30
|
+
if (!handler) {
|
|
31
|
+
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
32
|
+
}
|
|
33
|
+
try {
|
|
34
|
+
return await handler(args);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
if (error instanceof McpError)
|
|
38
|
+
throw error;
|
|
39
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
40
|
+
throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${message}`);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
setupErrorHandlers() {
|
|
45
|
+
this.server.onerror = (error) => {
|
|
46
|
+
console.error(`[${this.config.name}] MCP Error:`, error);
|
|
47
|
+
};
|
|
48
|
+
process.on('SIGINT', async () => {
|
|
49
|
+
await this.shutdown();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
success(data) {
|
|
53
|
+
return {
|
|
54
|
+
content: [{ type: 'text', text: JSON.stringify({ success: true, ...data }, null, 2) }],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
error(error) {
|
|
58
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
59
|
+
return {
|
|
60
|
+
content: [{ type: 'text', text: JSON.stringify({ success: false, error: msg }, null, 2) }],
|
|
61
|
+
isError: true,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
async run() {
|
|
65
|
+
const transport = new StdioServerTransport();
|
|
66
|
+
await this.server.connect(transport);
|
|
67
|
+
console.error(`${this.config.name} MCP server v${this.config.version} running on stdio`);
|
|
68
|
+
}
|
|
69
|
+
async shutdown() {
|
|
70
|
+
await this.server.close();
|
|
71
|
+
process.exit(0);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=McpServerBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServerBase.js","sourceRoot":"","sources":["../src/McpServerBase.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolDefinition, ToolHandler } from './types.js';
|
|
2
|
+
export declare class ToolRegistry {
|
|
3
|
+
private tools;
|
|
4
|
+
register(name: string, description: string, inputSchema: ToolDefinition['inputSchema'], handler: ToolHandler): void;
|
|
5
|
+
getHandler(name: string): ToolHandler | undefined;
|
|
6
|
+
getAllDefinitions(): ToolDefinition[];
|
|
7
|
+
has(name: string): boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ToolRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolRegistry.d.ts","sourceRoot":"","sources":["../src/ToolRegistry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAO9D,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAA0C;IAEvD,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,EAC1C,OAAO,EAAE,WAAW,GACnB,IAAI;IAOP,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIjD,iBAAiB,IAAI,cAAc,EAAE;IAIrC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAG3B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// TOOL REGISTRY - Tool registration and lookup helper
|
|
3
|
+
// ============================================================================
|
|
4
|
+
export class ToolRegistry {
|
|
5
|
+
tools = new Map();
|
|
6
|
+
register(name, description, inputSchema, handler) {
|
|
7
|
+
if (this.tools.has(name)) {
|
|
8
|
+
throw new Error(`Tool already registered: ${name}`);
|
|
9
|
+
}
|
|
10
|
+
this.tools.set(name, { definition: { name, description, inputSchema }, handler });
|
|
11
|
+
}
|
|
12
|
+
getHandler(name) {
|
|
13
|
+
return this.tools.get(name)?.handler;
|
|
14
|
+
}
|
|
15
|
+
getAllDefinitions() {
|
|
16
|
+
return Array.from(this.tools.values()).map(t => t.definition);
|
|
17
|
+
}
|
|
18
|
+
has(name) {
|
|
19
|
+
return this.tools.has(name);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ToolRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolRegistry.js","sourceRoot":"","sources":["../src/ToolRegistry.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sDAAsD;AACtD,+EAA+E;AAS/E,MAAM,OAAO,YAAY;IACf,KAAK,GAAgC,IAAI,GAAG,EAAE,CAAC;IAEvD,QAAQ,CACN,IAAY,EACZ,WAAmB,EACnB,WAA0C,EAC1C,OAAoB;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED,UAAU,CAAC,IAAY;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACvC,CAAC;IAED,iBAAiB;QACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAChE,CAAC;IAED,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MAX_FILE_BYTES: number;
|
|
2
|
+
export declare const DEFAULT_SKIP_DIRS: Set<string>;
|
|
3
|
+
export declare function safeReadJson<T>(filePath: string): T | null;
|
|
4
|
+
export declare function safeReadFile(filePath: string): string | null;
|
|
5
|
+
export declare function isNextJsProject(dir: string): boolean;
|
|
6
|
+
export declare const NEXTJS_ROUTE_FILES: Set<string>;
|
|
7
|
+
export declare function isServerComponent(filePath: string, content: string): boolean;
|
|
8
|
+
//# sourceMappingURL=fs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C,eAAO,MAAM,iBAAiB,aAG5B,CAAC;AAEH,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAO1D;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ5D;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAMpD;AAED,eAAO,MAAM,kBAAkB,aAK7B,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAI5E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
export const MAX_FILE_BYTES = 10 * 1024 * 1024; // 10 MB
|
|
4
|
+
export const DEFAULT_SKIP_DIRS = new Set([
|
|
5
|
+
'node_modules', 'build', 'dist', '.next', '.turbo', '__tests__',
|
|
6
|
+
'.git', 'coverage', '.cache', 'out', '.vercel', '.svelte-kit',
|
|
7
|
+
]);
|
|
8
|
+
export function safeReadJson(filePath) {
|
|
9
|
+
try {
|
|
10
|
+
const raw = fs.readFileSync(filePath, 'utf-8');
|
|
11
|
+
return JSON.parse(raw);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function safeReadFile(filePath) {
|
|
18
|
+
try {
|
|
19
|
+
const stat = fs.statSync(filePath);
|
|
20
|
+
if (stat.size > MAX_FILE_BYTES)
|
|
21
|
+
return null;
|
|
22
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function isNextJsProject(dir) {
|
|
29
|
+
return (fs.existsSync(path.join(dir, 'next.config.js')) ||
|
|
30
|
+
fs.existsSync(path.join(dir, 'next.config.ts')) ||
|
|
31
|
+
fs.existsSync(path.join(dir, 'next.config.mjs')));
|
|
32
|
+
}
|
|
33
|
+
export const NEXTJS_ROUTE_FILES = new Set([
|
|
34
|
+
'page.tsx', 'page.ts', 'layout.tsx', 'layout.ts',
|
|
35
|
+
'loading.tsx', 'loading.ts', 'error.tsx', 'error.ts',
|
|
36
|
+
'not-found.tsx', 'not-found.ts', 'template.tsx', 'template.ts',
|
|
37
|
+
'route.ts', 'route.tsx',
|
|
38
|
+
]);
|
|
39
|
+
export function isServerComponent(filePath, content) {
|
|
40
|
+
const name = path.basename(filePath);
|
|
41
|
+
if (!NEXTJS_ROUTE_FILES.has(name))
|
|
42
|
+
return false;
|
|
43
|
+
return !content.includes("'use client'") && !content.includes('"use client"');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW;IAC/D,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa;CAC9D,CAAC,CAAC;AAEH,MAAM,UAAU,YAAY,CAAI,QAAgB;IAC9C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,IAAI,GAAG,cAAc;YAAE,OAAO,IAAI,CAAC;QAC5C,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,OAAO,CACL,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC/C,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC/C,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CACjD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACxC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW;IAChD,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU;IACpD,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa;IAC9D,UAAU,EAAE,WAAW;CACxB,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,OAAe;IACjE,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAChD,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export { McpServerBase } from './McpServerBase.js';
|
|
3
|
+
export { ToolRegistry } from './ToolRegistry.js';
|
|
4
|
+
export { safeReadJson, safeReadFile, isNextJsProject, isServerComponent, NEXTJS_ROUTE_FILES, DEFAULT_SKIP_DIRS, MAX_FILE_BYTES, } from './fs.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|