codebase-analyzer-mcp 1.0.1 → 1.0.3
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/.claude-plugin/marketplace.json +4 -4
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +69 -198
- package/dist/cli/index.js +6 -2
- package/dist/mcp/server.js +6 -2
- package/package.json +6 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "codebase-analyzer",
|
|
3
3
|
"owner": {
|
|
4
4
|
"name": "Jake Correa",
|
|
5
5
|
"url": "https://github.com/jaykaycodes"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
|
-
"description": "
|
|
9
|
-
"version": "1.0.
|
|
8
|
+
"description": "Multi-layer codebase analysis tools",
|
|
9
|
+
"version": "1.0.3"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "codebase-analyzer",
|
|
14
14
|
"description": "Multi-layer codebase analysis with Gemini AI. 4 agents, 5 commands, 3 skills for architecture analysis, pattern detection, and dataflow tracing.",
|
|
15
|
-
"version": "1.0.
|
|
15
|
+
"version": "1.0.3",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Jake Correa",
|
|
18
18
|
"url": "https://github.com/jaykaycodes"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebase-analyzer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Multi-layer codebase analysis with Gemini AI. 4 agents, 5 commands, 3 skills for architecture analysis, pattern detection, and dataflow tracing.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jake Correa",
|
package/README.md
CHANGED
|
@@ -1,134 +1,23 @@
|
|
|
1
1
|
# Codebase Analyzer MCP
|
|
2
2
|
|
|
3
|
-
[](https://github.com/jaykaycodes/codebase-analyzer-mcp)
|
|
4
3
|
[](https://www.npmjs.com/package/codebase-analyzer-mcp)
|
|
5
4
|
[](https://opensource.org/licenses/MIT)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
Analyze any codebase with Gemini AI. Progressive disclosure keeps costs low - start with free structural analysis, drill into semantic details only when needed.
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
## Quick Start
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
- Tree-sitter structural analysis (no LLM cost)
|
|
13
|
-
- Gemini semantic analysis (opt-in)
|
|
14
|
-
- Pattern detection, dataflow tracing
|
|
15
|
-
- Agent-optimized output
|
|
16
|
-
- **Standalone binary - no Node/Bun required**
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
### Package Manager (Recommended)
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install -g codebase-analyzer-mcp
|
|
24
|
-
bun install -g codebase-analyzer-mcp
|
|
25
|
-
pnpm install -g codebase-analyzer-mcp
|
|
26
|
-
yarn add -g codebase-analyzer-mcp
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Standalone Binary
|
|
30
|
-
|
|
31
|
-
Download the binary for your platform from [Releases](https://github.com/jaykaycodes/codebase-analyzer-mcp/releases):
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
# macOS (Apple Silicon)
|
|
35
|
-
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-macos-arm64 -o cba
|
|
36
|
-
chmod +x cba
|
|
37
|
-
sudo mv cba /usr/local/bin/
|
|
38
|
-
|
|
39
|
-
# macOS (Intel)
|
|
40
|
-
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-macos-x64 -o cba
|
|
41
|
-
chmod +x cba
|
|
42
|
-
sudo mv cba /usr/local/bin/
|
|
43
|
-
|
|
44
|
-
# Linux (x64)
|
|
45
|
-
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-x64 -o cba
|
|
46
|
-
chmod +x cba
|
|
47
|
-
sudo mv cba /usr/local/bin/
|
|
48
|
-
|
|
49
|
-
# Linux (ARM64)
|
|
50
|
-
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-arm64 -o cba
|
|
51
|
-
chmod +x cba
|
|
52
|
-
sudo mv cba /usr/local/bin/
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### From Source (with Bun)
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
git clone https://github.com/jaykaycodes/codebase-analyzer-mcp.git
|
|
59
|
-
cd codebase-analyzer-mcp
|
|
60
|
-
bun install && bun run build
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Configuration
|
|
64
|
-
|
|
65
|
-
Set your Gemini API key (required for semantic analysis):
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
export GEMINI_API_KEY=your_api_key_here
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Get a key at https://aistudio.google.com/apikey
|
|
72
|
-
|
|
73
|
-
## CLI Usage
|
|
10
|
+
### Claude Code Plugin
|
|
74
11
|
|
|
75
12
|
```bash
|
|
76
|
-
|
|
77
|
-
cba analyze . -d surface
|
|
78
|
-
|
|
79
|
-
# Standard analysis (includes structural)
|
|
80
|
-
cba analyze .
|
|
81
|
-
|
|
82
|
-
# Deep analysis with semantics (uses Gemini)
|
|
83
|
-
cba analyze . -d deep -s
|
|
84
|
-
|
|
85
|
-
# Analyze GitHub repo
|
|
86
|
-
cba analyze https://github.com/user/repo
|
|
87
|
-
|
|
88
|
-
# Focus on specific areas
|
|
89
|
-
cba analyze . --focus src/api
|
|
90
|
-
|
|
91
|
-
# Pattern detection
|
|
92
|
-
cba patterns .
|
|
93
|
-
cba patterns . --types singleton,factory,repository
|
|
94
|
-
|
|
95
|
-
# Data flow tracing
|
|
96
|
-
cba dataflow . "user login"
|
|
97
|
-
cba dataflow . "payment" --to database
|
|
98
|
-
|
|
99
|
-
# Show capabilities
|
|
100
|
-
cba capabilities
|
|
13
|
+
claude /plugin install https://github.com/jaykaycodes/codebase-analyzer-mcp
|
|
101
14
|
```
|
|
102
15
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| Depth | Speed | LLM Cost | Includes |
|
|
106
|
-
| ---------- | ------ | -------- | ------------------------------------------ |
|
|
107
|
-
| `surface` | Fast | ~0 | Files, languages, entry points, modules |
|
|
108
|
-
| `standard` | Medium | Low | + symbols, imports, complexity metrics |
|
|
109
|
-
| `deep` | Slow | High | + semantic analysis, architecture insights |
|
|
16
|
+
Then use `/analyze`, `/patterns`, `/trace`, or `/explore` commands.
|
|
110
17
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Add to Claude Code settings (`~/.claude/settings.json`):
|
|
114
|
-
|
|
115
|
-
### Using standalone binary (recommended)
|
|
116
|
-
|
|
117
|
-
```json
|
|
118
|
-
{
|
|
119
|
-
"mcpServers": {
|
|
120
|
-
"codebase-analyzer": {
|
|
121
|
-
"command": "cba",
|
|
122
|
-
"args": ["--mcp"],
|
|
123
|
-
"env": {
|
|
124
|
-
"GEMINI_API_KEY": "your_api_key"
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
```
|
|
18
|
+
### MCP Server
|
|
130
19
|
|
|
131
|
-
|
|
20
|
+
Add to `~/.claude/settings.json`:
|
|
132
21
|
|
|
133
22
|
```json
|
|
134
23
|
{
|
|
@@ -144,111 +33,93 @@ Add to Claude Code settings (`~/.claude/settings.json`):
|
|
|
144
33
|
}
|
|
145
34
|
```
|
|
146
35
|
|
|
147
|
-
|
|
36
|
+
Get a Gemini API key at https://aistudio.google.com/apikey
|
|
37
|
+
|
|
38
|
+
### CLI
|
|
148
39
|
|
|
149
40
|
```bash
|
|
150
|
-
|
|
41
|
+
npx codebase-analyzer-mcp analyze . # Standard analysis
|
|
42
|
+
npx codebase-analyzer-mcp analyze . -d surface # Fast, free overview
|
|
43
|
+
npx codebase-analyzer-mcp analyze . -d deep -s # Full semantic analysis
|
|
44
|
+
npx codebase-analyzer-mcp patterns . # Find design patterns
|
|
45
|
+
npx codebase-analyzer-mcp dataflow . "user login" # Trace data flow
|
|
151
46
|
```
|
|
152
47
|
|
|
153
|
-
|
|
154
|
-
{
|
|
155
|
-
"mcpServers": {
|
|
156
|
-
"codebase-analyzer": {
|
|
157
|
-
"command": "cba",
|
|
158
|
-
"args": ["--mcp"],
|
|
159
|
-
"env": {
|
|
160
|
-
"GEMINI_API_KEY": "your_api_key"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
48
|
+
## What It Does
|
|
166
49
|
|
|
167
|
-
|
|
50
|
+
| Layer | Cost | What You Get |
|
|
51
|
+
|-------|------|--------------|
|
|
52
|
+
| **Surface** | Free | Files, languages, entry points, modules |
|
|
53
|
+
| **Structural** | Free | Symbols, imports, complexity (via tree-sitter) |
|
|
54
|
+
| **Semantic** | Gemini | Architecture insights, pattern detection |
|
|
168
55
|
|
|
169
|
-
|
|
170
|
-
| --------------------------- | ----------------------------------------- |
|
|
171
|
-
| `analyze_repo` | Full analysis with progressive disclosure |
|
|
172
|
-
| `expand_section` | Drill into specific sections |
|
|
173
|
-
| `find_patterns` | Detect design/architecture patterns |
|
|
174
|
-
| `trace_dataflow` | Trace data flow through the system |
|
|
175
|
-
| `get_analysis_capabilities` | List available options |
|
|
56
|
+
Analysis results include expandable sections - you only pay for what you drill into.
|
|
176
57
|
|
|
177
|
-
##
|
|
58
|
+
## MCP Tools
|
|
178
59
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
"summary": {
|
|
189
|
-
"architectureType": "serverless",
|
|
190
|
-
"primaryPatterns": ["repository", "factory"],
|
|
191
|
-
"complexity": "medium"
|
|
192
|
-
},
|
|
193
|
-
"sections": [
|
|
194
|
-
{
|
|
195
|
-
"id": "module_src_api",
|
|
196
|
-
"title": "API Module",
|
|
197
|
-
"summary": "...",
|
|
198
|
-
"canExpand": true,
|
|
199
|
-
"expansionCost": { "detail": 500, "full": 2000 }
|
|
200
|
-
}
|
|
201
|
-
],
|
|
202
|
-
"forAgent": {
|
|
203
|
-
"quickSummary": "...",
|
|
204
|
-
"keyInsights": [...],
|
|
205
|
-
"suggestedNextSteps": [...]
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
```
|
|
60
|
+
| Tool | Description |
|
|
61
|
+
|------|-------------|
|
|
62
|
+
| `analyze_repo` | Full analysis with progressive disclosure |
|
|
63
|
+
| `expand_section` | Drill into specific sections |
|
|
64
|
+
| `find_patterns` | Detect design/architecture patterns |
|
|
65
|
+
| `trace_dataflow` | Trace data flow through the system |
|
|
66
|
+
|
|
67
|
+
## Plugin Commands & Agents
|
|
209
68
|
|
|
210
|
-
|
|
69
|
+
| Command | Agent | Purpose |
|
|
70
|
+
|---------|-------|---------|
|
|
71
|
+
| `/analyze` | `architecture-analyzer` | Full architecture analysis |
|
|
72
|
+
| `/patterns` | `pattern-detective` | Find design patterns |
|
|
73
|
+
| `/trace` | `dataflow-tracer` | Trace data flow |
|
|
74
|
+
| `/explore` | `codebase-explorer` | Quick exploration |
|
|
75
|
+
| `/compare` | - | Compare repositories |
|
|
211
76
|
|
|
212
|
-
|
|
77
|
+
---
|
|
213
78
|
|
|
214
|
-
|
|
79
|
+
## Alternative Installation
|
|
80
|
+
|
|
81
|
+
### Global Install
|
|
215
82
|
|
|
216
83
|
```bash
|
|
217
|
-
|
|
218
|
-
|
|
84
|
+
npm install -g codebase-analyzer-mcp
|
|
85
|
+
# Then use: cba analyze .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Standalone Binary
|
|
219
89
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
90
|
+
No Node/Bun required. Download from [Releases](https://github.com/jaykaycodes/codebase-analyzer-mcp/releases):
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# macOS Apple Silicon
|
|
94
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-macos-arm64 -o cba
|
|
95
|
+
chmod +x cba && sudo mv cba /usr/local/bin/
|
|
223
96
|
```
|
|
224
97
|
|
|
225
|
-
|
|
98
|
+
<details>
|
|
99
|
+
<summary>Other platforms</summary>
|
|
226
100
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
| `/patterns` | Find design patterns |
|
|
231
|
-
| `/trace` | Trace data flow |
|
|
232
|
-
| `/explore` | Quick exploration |
|
|
233
|
-
| `/compare` | Compare repositories |
|
|
101
|
+
```bash
|
|
102
|
+
# macOS Intel
|
|
103
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-macos-x64 -o cba
|
|
234
104
|
|
|
235
|
-
|
|
105
|
+
# Linux x64
|
|
106
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-x64 -o cba
|
|
236
107
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
| `codebase-explorer` | Quick exploration |
|
|
108
|
+
# Linux ARM64
|
|
109
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-arm64 -o cba
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
</details>
|
|
243
113
|
|
|
244
114
|
## Development
|
|
245
115
|
|
|
246
116
|
```bash
|
|
117
|
+
git clone https://github.com/jaykaycodes/codebase-analyzer-mcp.git
|
|
118
|
+
cd codebase-analyzer-mcp
|
|
247
119
|
bun install
|
|
248
120
|
bun run dev # Watch mode
|
|
249
|
-
bun run build # Build
|
|
250
|
-
bun run
|
|
251
|
-
bun run cba ... # Run CLI
|
|
121
|
+
bun run build # Build JS + binary
|
|
122
|
+
bun run cba analyze . # Test CLI
|
|
252
123
|
```
|
|
253
124
|
|
|
254
125
|
## License
|
package/dist/cli/index.js
CHANGED
|
@@ -44076,7 +44076,7 @@ var package_default;
|
|
|
44076
44076
|
var init_package = __esm(() => {
|
|
44077
44077
|
package_default = {
|
|
44078
44078
|
name: "codebase-analyzer-mcp",
|
|
44079
|
-
version: "1.0.
|
|
44079
|
+
version: "1.0.3",
|
|
44080
44080
|
description: "Multi-layer codebase analysis with Gemini AI. MCP server + Claude plugin with progressive disclosure.",
|
|
44081
44081
|
type: "module",
|
|
44082
44082
|
main: "dist/mcp/server.js",
|
|
@@ -44108,7 +44108,11 @@ var init_package = __esm(() => {
|
|
|
44108
44108
|
test: "bun test",
|
|
44109
44109
|
cli: "bun src/cli/index.ts",
|
|
44110
44110
|
cba: "bun src/cli/index.ts",
|
|
44111
|
-
|
|
44111
|
+
"version:sync": "bun scripts/sync-version.ts",
|
|
44112
|
+
release: "npm version patch && bun run version:sync",
|
|
44113
|
+
"release:minor": "npm version minor && bun run version:sync",
|
|
44114
|
+
"release:major": "npm version major && bun run version:sync",
|
|
44115
|
+
prepublishOnly: "bun run version:sync && bun run build:js"
|
|
44112
44116
|
},
|
|
44113
44117
|
repository: {
|
|
44114
44118
|
type: "git",
|
package/dist/mcp/server.js
CHANGED
|
@@ -70685,7 +70685,7 @@ If you cannot find the entry point, explain what you looked for in the summary a
|
|
|
70685
70685
|
// package.json
|
|
70686
70686
|
var package_default = {
|
|
70687
70687
|
name: "codebase-analyzer-mcp",
|
|
70688
|
-
version: "1.0.
|
|
70688
|
+
version: "1.0.3",
|
|
70689
70689
|
description: "Multi-layer codebase analysis with Gemini AI. MCP server + Claude plugin with progressive disclosure.",
|
|
70690
70690
|
type: "module",
|
|
70691
70691
|
main: "dist/mcp/server.js",
|
|
@@ -70717,7 +70717,11 @@ var package_default = {
|
|
|
70717
70717
|
test: "bun test",
|
|
70718
70718
|
cli: "bun src/cli/index.ts",
|
|
70719
70719
|
cba: "bun src/cli/index.ts",
|
|
70720
|
-
|
|
70720
|
+
"version:sync": "bun scripts/sync-version.ts",
|
|
70721
|
+
release: "npm version patch && bun run version:sync",
|
|
70722
|
+
"release:minor": "npm version minor && bun run version:sync",
|
|
70723
|
+
"release:major": "npm version major && bun run version:sync",
|
|
70724
|
+
prepublishOnly: "bun run version:sync && bun run build:js"
|
|
70721
70725
|
},
|
|
70722
70726
|
repository: {
|
|
70723
70727
|
type: "git",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebase-analyzer-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Multi-layer codebase analysis with Gemini AI. MCP server + Claude plugin with progressive disclosure.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/mcp/server.js",
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
"test": "bun test",
|
|
33
33
|
"cli": "bun src/cli/index.ts",
|
|
34
34
|
"cba": "bun src/cli/index.ts",
|
|
35
|
-
"
|
|
35
|
+
"version:sync": "bun scripts/sync-version.ts",
|
|
36
|
+
"release": "npm version patch && bun run version:sync",
|
|
37
|
+
"release:minor": "npm version minor && bun run version:sync",
|
|
38
|
+
"release:major": "npm version major && bun run version:sync",
|
|
39
|
+
"prepublishOnly": "bun run version:sync && bun run build:js"
|
|
36
40
|
},
|
|
37
41
|
"repository": {
|
|
38
42
|
"type": "git",
|