codebase-analyzer-mcp 2.0.1 → 2.0.2
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 +20 -11
- package/.claude-plugin/plugin.json +7 -6
- package/CLAUDE.md +14 -0
- package/LICENSE +1 -1
- package/README.md +63 -188
- package/dist/cli/index.js +108 -22
- package/dist/mcp/server.js +106 -25
- package/package.json +10 -6
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "codebase-analyzer",
|
|
3
3
|
"owner": {
|
|
4
|
-
"name": "
|
|
5
|
-
"url": "https://github.com/
|
|
4
|
+
"name": "Jake Correa",
|
|
5
|
+
"url": "https://github.com/jaykaycodes"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
|
-
"description": "
|
|
9
|
-
"version": "
|
|
8
|
+
"description": "Multi-layer codebase analysis tools",
|
|
9
|
+
"version": "2.0.2"
|
|
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": "2.0.
|
|
15
|
+
"version": "2.0.2",
|
|
16
16
|
"author": {
|
|
17
|
-
"name": "
|
|
18
|
-
"url": "https://github.com/
|
|
17
|
+
"name": "Jake Correa",
|
|
18
|
+
"url": "https://github.com/jaykaycodes"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://github.com/
|
|
21
|
-
"tags": [
|
|
22
|
-
|
|
20
|
+
"homepage": "https://github.com/jaykaycodes/codebase-analyzer-mcp",
|
|
21
|
+
"tags": [
|
|
22
|
+
"codebase-analysis",
|
|
23
|
+
"architecture",
|
|
24
|
+
"patterns",
|
|
25
|
+
"gemini",
|
|
26
|
+
"mcp"
|
|
27
|
+
],
|
|
28
|
+
"source": {
|
|
29
|
+
"source": "github",
|
|
30
|
+
"repo": "jaykaycodes/codebase-analyzer-mcp"
|
|
31
|
+
}
|
|
23
32
|
}
|
|
24
33
|
]
|
|
25
34
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebase-analyzer",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
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
|
-
"name": "
|
|
7
|
-
"url": "https://github.com/
|
|
6
|
+
"name": "Jake Correa",
|
|
7
|
+
"url": "https://github.com/jaykaycodes"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://github.com/
|
|
9
|
+
"homepage": "https://github.com/jaykaycodes/codebase-analyzer-mcp",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"keywords": [
|
|
12
12
|
"codebase-analysis",
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
"mcpServers": {
|
|
21
21
|
"codebase-analyzer": {
|
|
22
22
|
"command": "node",
|
|
23
|
-
"args": [
|
|
24
|
-
|
|
23
|
+
"args": [
|
|
24
|
+
"dist/mcp/server.js"
|
|
25
|
+
]
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|
package/CLAUDE.md
CHANGED
|
@@ -127,6 +127,20 @@ See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for system design.
|
|
|
127
127
|
GEMINI_API_KEY=... # Required for semantic analysis
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
## Releasing
|
|
131
|
+
|
|
132
|
+
Uses npm trusted publishing (OIDC) - no NPM_TOKEN secret needed.
|
|
133
|
+
|
|
134
|
+
1. Bump version: `npm version patch` (or minor/major)
|
|
135
|
+
2. Sync version to plugin.json: `bun run version:sync`
|
|
136
|
+
3. Push with tags: `git push && git push --tags`
|
|
137
|
+
|
|
138
|
+
CI automatically publishes to npm when version changes on main.
|
|
139
|
+
|
|
140
|
+
**Trusted publisher config:** npm package must be linked to `jaykaycodes/codebase-analyzer-mcp` in npm settings (Settings → Publishing access → Add GitHub Actions as publisher).
|
|
141
|
+
|
|
142
|
+
**Requirements:** npm >= 11.5.1 (CI updates npm automatically). See [npm trusted publishing docs](https://docs.npmjs.com/trusted-publishers/).
|
|
143
|
+
|
|
130
144
|
## Key Learnings
|
|
131
145
|
|
|
132
146
|
_This section captures learnings as we work on this repository._
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,130 +1,23 @@
|
|
|
1
1
|
# Codebase Analyzer MCP
|
|
2
2
|
|
|
3
|
-
[](https://github.com/jkcorrea/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
|
-
|
|
10
|
-
- Progressive disclosure - start cheap, drill down as needed
|
|
11
|
-
- Tree-sitter structural analysis (no LLM cost)
|
|
12
|
-
- Gemini semantic analysis (opt-in)
|
|
13
|
-
- Pattern detection, dataflow tracing
|
|
14
|
-
- Agent-optimized output
|
|
15
|
-
- **Standalone binary - no Node/Bun required**
|
|
8
|
+
## Quick Start
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Standalone Binary (Recommended)
|
|
20
|
-
|
|
21
|
-
Download the binary for your platform from [Releases](https://github.com/jkcorrea/codebase-analyzer-mcp/releases):
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
# macOS (Apple Silicon)
|
|
25
|
-
curl -L https://github.com/jkcorrea/codebase-analyzer-mcp/releases/latest/download/cba-macos-arm64 -o cba
|
|
26
|
-
chmod +x cba
|
|
27
|
-
sudo mv cba /usr/local/bin/
|
|
28
|
-
|
|
29
|
-
# macOS (Intel)
|
|
30
|
-
curl -L https://github.com/jkcorrea/codebase-analyzer-mcp/releases/latest/download/cba-macos-x64 -o cba
|
|
31
|
-
chmod +x cba
|
|
32
|
-
sudo mv cba /usr/local/bin/
|
|
33
|
-
|
|
34
|
-
# Linux (x64)
|
|
35
|
-
curl -L https://github.com/jkcorrea/codebase-analyzer-mcp/releases/latest/download/cba-linux-x64 -o cba
|
|
36
|
-
chmod +x cba
|
|
37
|
-
sudo mv cba /usr/local/bin/
|
|
38
|
-
|
|
39
|
-
# Linux (ARM64)
|
|
40
|
-
curl -L https://github.com/jkcorrea/codebase-analyzer-mcp/releases/latest/download/cba-linux-arm64 -o cba
|
|
41
|
-
chmod +x cba
|
|
42
|
-
sudo mv cba /usr/local/bin/
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### npm
|
|
10
|
+
### Claude Code Plugin
|
|
46
11
|
|
|
47
12
|
```bash
|
|
48
|
-
|
|
13
|
+
claude /plugin install https://github.com/jaykaycodes/codebase-analyzer-mcp
|
|
49
14
|
```
|
|
50
15
|
|
|
51
|
-
|
|
16
|
+
Then use `/analyze`, `/patterns`, `/trace`, or `/explore` commands.
|
|
52
17
|
|
|
53
|
-
|
|
54
|
-
git clone https://github.com/jkcorrea/codebase-analyzer-mcp.git
|
|
55
|
-
cd codebase-analyzer-mcp
|
|
56
|
-
bun install && bun run build
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Configuration
|
|
60
|
-
|
|
61
|
-
Set your Gemini API key (required for semantic analysis):
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
export GEMINI_API_KEY=your_api_key_here
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Get a key at https://aistudio.google.com/apikey
|
|
68
|
-
|
|
69
|
-
## CLI Usage
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Quick overview (surface depth - fast, free)
|
|
73
|
-
cba analyze . -d surface
|
|
74
|
-
|
|
75
|
-
# Standard analysis (includes structural)
|
|
76
|
-
cba analyze .
|
|
77
|
-
|
|
78
|
-
# Deep analysis with semantics (uses Gemini)
|
|
79
|
-
cba analyze . -d deep -s
|
|
80
|
-
|
|
81
|
-
# Analyze GitHub repo
|
|
82
|
-
cba analyze https://github.com/user/repo
|
|
83
|
-
|
|
84
|
-
# Focus on specific areas
|
|
85
|
-
cba analyze . --focus src/api
|
|
86
|
-
|
|
87
|
-
# Pattern detection
|
|
88
|
-
cba patterns .
|
|
89
|
-
cba patterns . --types singleton,factory,repository
|
|
90
|
-
|
|
91
|
-
# Data flow tracing
|
|
92
|
-
cba dataflow . "user login"
|
|
93
|
-
cba dataflow . "payment" --to database
|
|
94
|
-
|
|
95
|
-
# Show capabilities
|
|
96
|
-
cba capabilities
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Analysis Depths
|
|
100
|
-
|
|
101
|
-
| Depth | Speed | LLM Cost | Includes |
|
|
102
|
-
|-------|-------|----------|----------|
|
|
103
|
-
| `surface` | Fast | ~0 | Files, languages, entry points, modules |
|
|
104
|
-
| `standard` | Medium | Low | + symbols, imports, complexity metrics |
|
|
105
|
-
| `deep` | Slow | High | + semantic analysis, architecture insights |
|
|
106
|
-
|
|
107
|
-
## MCP Server Usage
|
|
108
|
-
|
|
109
|
-
Add to Claude Code settings (`~/.claude/settings.json`):
|
|
110
|
-
|
|
111
|
-
### Using standalone binary (recommended)
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"mcpServers": {
|
|
116
|
-
"codebase-analyzer": {
|
|
117
|
-
"command": "cba",
|
|
118
|
-
"args": ["--mcp"],
|
|
119
|
-
"env": {
|
|
120
|
-
"GEMINI_API_KEY": "your_api_key"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
```
|
|
18
|
+
### MCP Server
|
|
126
19
|
|
|
127
|
-
|
|
20
|
+
Add to `~/.claude/settings.json`:
|
|
128
21
|
|
|
129
22
|
```json
|
|
130
23
|
{
|
|
@@ -140,27 +33,29 @@ Add to Claude Code settings (`~/.claude/settings.json`):
|
|
|
140
33
|
}
|
|
141
34
|
```
|
|
142
35
|
|
|
143
|
-
|
|
36
|
+
Get a Gemini API key at https://aistudio.google.com/apikey
|
|
37
|
+
|
|
38
|
+
### CLI
|
|
144
39
|
|
|
145
40
|
```bash
|
|
146
|
-
|
|
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
|
|
147
46
|
```
|
|
148
47
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
```
|
|
48
|
+
## What It Does
|
|
49
|
+
|
|
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 |
|
|
55
|
+
|
|
56
|
+
Analysis results include expandable sections - you only pay for what you drill into.
|
|
162
57
|
|
|
163
|
-
|
|
58
|
+
## MCP Tools
|
|
164
59
|
|
|
165
60
|
| Tool | Description |
|
|
166
61
|
|------|-------------|
|
|
@@ -168,83 +63,63 @@ npm install -g codebase-analyzer-mcp
|
|
|
168
63
|
| `expand_section` | Drill into specific sections |
|
|
169
64
|
| `find_patterns` | Detect design/architecture patterns |
|
|
170
65
|
| `trace_dataflow` | Trace data flow through the system |
|
|
171
|
-
| `get_analysis_capabilities` | List available options |
|
|
172
66
|
|
|
173
|
-
##
|
|
67
|
+
## Plugin Commands & Agents
|
|
174
68
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"entryPoints": [...]
|
|
183
|
-
},
|
|
184
|
-
"summary": {
|
|
185
|
-
"architectureType": "serverless",
|
|
186
|
-
"primaryPatterns": ["repository", "factory"],
|
|
187
|
-
"complexity": "medium"
|
|
188
|
-
},
|
|
189
|
-
"sections": [
|
|
190
|
-
{
|
|
191
|
-
"id": "module_src_api",
|
|
192
|
-
"title": "API Module",
|
|
193
|
-
"summary": "...",
|
|
194
|
-
"canExpand": true,
|
|
195
|
-
"expansionCost": { "detail": 500, "full": 2000 }
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
"forAgent": {
|
|
199
|
-
"quickSummary": "...",
|
|
200
|
-
"keyInsights": [...],
|
|
201
|
-
"suggestedNextSteps": [...]
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
```
|
|
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 |
|
|
205
76
|
|
|
206
|
-
|
|
77
|
+
---
|
|
207
78
|
|
|
208
|
-
|
|
79
|
+
## Alternative Installation
|
|
209
80
|
|
|
210
|
-
### Install
|
|
81
|
+
### Global Install
|
|
211
82
|
|
|
212
83
|
```bash
|
|
213
|
-
|
|
214
|
-
|
|
84
|
+
npm install -g codebase-analyzer-mcp
|
|
85
|
+
# Then use: cba analyze .
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Standalone Binary
|
|
215
89
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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/
|
|
219
96
|
```
|
|
220
97
|
|
|
221
|
-
|
|
98
|
+
<details>
|
|
99
|
+
<summary>Other platforms</summary>
|
|
222
100
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
| `/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
|
|
104
|
+
|
|
105
|
+
# Linux x64
|
|
106
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-x64 -o cba
|
|
230
107
|
|
|
231
|
-
|
|
108
|
+
# Linux ARM64
|
|
109
|
+
curl -L https://github.com/jaykaycodes/codebase-analyzer-mcp/releases/latest/download/cba-linux-arm64 -o cba
|
|
110
|
+
```
|
|
232
111
|
|
|
233
|
-
|
|
234
|
-
|-------|---------|
|
|
235
|
-
| `architecture-analyzer` | Full architecture analysis |
|
|
236
|
-
| `pattern-detective` | Pattern detection |
|
|
237
|
-
| `dataflow-tracer` | Data flow tracing |
|
|
238
|
-
| `codebase-explorer` | Quick exploration |
|
|
112
|
+
</details>
|
|
239
113
|
|
|
240
114
|
## Development
|
|
241
115
|
|
|
242
116
|
```bash
|
|
117
|
+
git clone https://github.com/jaykaycodes/codebase-analyzer-mcp.git
|
|
118
|
+
cd codebase-analyzer-mcp
|
|
243
119
|
bun install
|
|
244
120
|
bun run dev # Watch mode
|
|
245
|
-
bun run build # Build
|
|
246
|
-
bun run
|
|
247
|
-
bun run cba ... # Run CLI
|
|
121
|
+
bun run build # Build JS + binary
|
|
122
|
+
bun run cba analyze . # Test CLI
|
|
248
123
|
```
|
|
249
124
|
|
|
250
125
|
## License
|
package/dist/cli/index.js
CHANGED
|
@@ -8351,13 +8351,13 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
8351
8351
|
var toStr = Object.prototype.toString;
|
|
8352
8352
|
var defineProperty = Object.defineProperty;
|
|
8353
8353
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
8354
|
-
var isArray = function
|
|
8354
|
+
var isArray = function isArray2(arr) {
|
|
8355
8355
|
if (typeof Array.isArray === "function") {
|
|
8356
8356
|
return Array.isArray(arr);
|
|
8357
8357
|
}
|
|
8358
8358
|
return toStr.call(arr) === "[object Array]";
|
|
8359
8359
|
};
|
|
8360
|
-
var isPlainObject = function
|
|
8360
|
+
var isPlainObject = function isPlainObject2(obj) {
|
|
8361
8361
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
8362
8362
|
return false;
|
|
8363
8363
|
}
|
|
@@ -8370,7 +8370,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
8370
8370
|
for (key in obj) {}
|
|
8371
8371
|
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
8372
8372
|
};
|
|
8373
|
-
var setProperty = function
|
|
8373
|
+
var setProperty = function setProperty2(target, options) {
|
|
8374
8374
|
if (defineProperty && options.name === "__proto__") {
|
|
8375
8375
|
defineProperty(target, options.name, {
|
|
8376
8376
|
enumerable: true,
|
|
@@ -8382,7 +8382,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
8382
8382
|
target[options.name] = options.newValue;
|
|
8383
8383
|
}
|
|
8384
8384
|
};
|
|
8385
|
-
var getProperty = function
|
|
8385
|
+
var getProperty = function getProperty2(obj, name) {
|
|
8386
8386
|
if (name === "__proto__") {
|
|
8387
8387
|
if (!hasOwn.call(obj, name)) {
|
|
8388
8388
|
return;
|
|
@@ -12385,7 +12385,7 @@ var require_ponyfill_es2018 = __commonJS((exports, module) => {
|
|
|
12385
12385
|
return isDOMExceptionConstructor(ctor) ? ctor : undefined;
|
|
12386
12386
|
}
|
|
12387
12387
|
function createPolyfill() {
|
|
12388
|
-
const ctor = function
|
|
12388
|
+
const ctor = function DOMException3(message, name) {
|
|
12389
12389
|
this.message = message || "";
|
|
12390
12390
|
this.name = name || "Error";
|
|
12391
12391
|
if (Error.captureStackTrace) {
|
|
@@ -20722,12 +20722,12 @@ var require_jwa = __commonJS((exports, module) => {
|
|
|
20722
20722
|
};
|
|
20723
20723
|
}
|
|
20724
20724
|
var bufferEqual;
|
|
20725
|
-
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function
|
|
20725
|
+
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function timingSafeEqual2(a, b) {
|
|
20726
20726
|
if (a.byteLength !== b.byteLength) {
|
|
20727
20727
|
return false;
|
|
20728
20728
|
}
|
|
20729
20729
|
return crypto2.timingSafeEqual(a, b);
|
|
20730
|
-
} : function
|
|
20730
|
+
} : function timingSafeEqual2(a, b) {
|
|
20731
20731
|
if (!bufferEqual) {
|
|
20732
20732
|
bufferEqual = require_buffer_equal_constant_time();
|
|
20733
20733
|
}
|
|
@@ -21081,7 +21081,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21081
21081
|
function _interopRequireWildcard(e2, t2) {
|
|
21082
21082
|
if (typeof WeakMap == "function")
|
|
21083
21083
|
var r2 = new WeakMap, n = new WeakMap;
|
|
21084
|
-
return (_interopRequireWildcard = function
|
|
21084
|
+
return (_interopRequireWildcard = function _interopRequireWildcard2(e3, t3) {
|
|
21085
21085
|
if (!t3 && e3 && e3.__esModule)
|
|
21086
21086
|
return e3;
|
|
21087
21087
|
var o, i2, f3 = { __proto__: null, default: e3 };
|
|
@@ -21161,7 +21161,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21161
21161
|
}
|
|
21162
21162
|
function _wrapNativeSuper(t2) {
|
|
21163
21163
|
var r2 = typeof Map == "function" ? new Map : undefined;
|
|
21164
|
-
return _wrapNativeSuper = function
|
|
21164
|
+
return _wrapNativeSuper = function _wrapNativeSuper2(t3) {
|
|
21165
21165
|
if (t3 === null || !_isNativeFunction(t3))
|
|
21166
21166
|
return t3;
|
|
21167
21167
|
if (typeof t3 != "function")
|
|
@@ -21189,7 +21189,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21189
21189
|
try {
|
|
21190
21190
|
var t2 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
21191
21191
|
} catch (t3) {}
|
|
21192
|
-
return (_isNativeReflectConstruct = function
|
|
21192
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
|
|
21193
21193
|
return !!t2;
|
|
21194
21194
|
})();
|
|
21195
21195
|
}
|
|
@@ -21235,7 +21235,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21235
21235
|
function i2(r3, n2, o2, i3) {
|
|
21236
21236
|
var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
|
|
21237
21237
|
return _regeneratorDefine2(u2, "_invoke", function(r4, n3, o3) {
|
|
21238
|
-
var i4, c3, u3, f4 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e2, a: d, f: d.bind(e2, 4), d: function
|
|
21238
|
+
var i4, c3, u3, f4 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e2, a: d, f: d.bind(e2, 4), d: function d2(t3, r5) {
|
|
21239
21239
|
return i4 = t3, c3 = 0, u3 = e2, G.n = r5, a;
|
|
21240
21240
|
} };
|
|
21241
21241
|
function d(r5, n4) {
|
|
@@ -21290,7 +21290,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21290
21290
|
return this;
|
|
21291
21291
|
}), _regeneratorDefine2(u, "toString", function() {
|
|
21292
21292
|
return "[object Generator]";
|
|
21293
|
-
}), (_regenerator = function
|
|
21293
|
+
}), (_regenerator = function _regenerator2() {
|
|
21294
21294
|
return { w: i2, m: f3 };
|
|
21295
21295
|
})();
|
|
21296
21296
|
}
|
|
@@ -21305,7 +21305,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
21305
21305
|
if (r3)
|
|
21306
21306
|
i2 ? i2(e3, r3, { value: n2, enumerable: !t3, configurable: !t3, writable: !t3 }) : e3[r3] = n2;
|
|
21307
21307
|
else {
|
|
21308
|
-
var o = function
|
|
21308
|
+
var o = function o2(r4, n3) {
|
|
21309
21309
|
_regeneratorDefine2(e3, r4, function(e4) {
|
|
21310
21310
|
return this._invoke(r4, n3, e4);
|
|
21311
21311
|
});
|
|
@@ -39254,12 +39254,12 @@ var import_google_auth_library, _defaultBaseGeminiUrl = undefined, _defaultBaseV
|
|
|
39254
39254
|
const isOldNode = typeof ((_a = process2 === null || process2 === undefined ? undefined : process2.versions) === null || _a === undefined ? undefined : _a.node) === "string" && parseInt(process2.versions.node.split(".")) < 20;
|
|
39255
39255
|
throw new Error("`File` is not defined as a global, which is required for file uploads." + (isOldNode ? " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." : ""));
|
|
39256
39256
|
}
|
|
39257
|
-
}, isAsyncIterable = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function", isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function", isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value), isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function", EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
39257
|
+
}, isAsyncIterable = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function", isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function", isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value), isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function", EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function path2(statics, ...params) {
|
|
39258
39258
|
if (statics.length === 1)
|
|
39259
39259
|
return statics[0];
|
|
39260
39260
|
let postPath = false;
|
|
39261
39261
|
const invalidSegments = [];
|
|
39262
|
-
const
|
|
39262
|
+
const path3 = statics.reduce((previousValue, currentValue, index) => {
|
|
39263
39263
|
var _a, _b, _c;
|
|
39264
39264
|
if (/[?#]/.test(currentValue)) {
|
|
39265
39265
|
postPath = true;
|
|
@@ -39276,7 +39276,7 @@ var import_google_auth_library, _defaultBaseGeminiUrl = undefined, _defaultBaseV
|
|
|
39276
39276
|
}
|
|
39277
39277
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
39278
39278
|
}, "");
|
|
39279
|
-
const pathOnly =
|
|
39279
|
+
const pathOnly = path3.split(/[?#]/, 1)[0];
|
|
39280
39280
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
39281
39281
|
let match2;
|
|
39282
39282
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -39298,10 +39298,10 @@ var import_google_auth_library, _defaultBaseGeminiUrl = undefined, _defaultBaseV
|
|
|
39298
39298
|
throw new GeminiNextGenAPIClientError(`Path parameters result in path with invalid segments:
|
|
39299
39299
|
${invalidSegments.map((e2) => e2.error).join(`
|
|
39300
39300
|
`)}
|
|
39301
|
-
${
|
|
39301
|
+
${path3}
|
|
39302
39302
|
${underline}`);
|
|
39303
39303
|
}
|
|
39304
|
-
return
|
|
39304
|
+
return path3;
|
|
39305
39305
|
}, path2, BaseInteractions, Interactions, encodeUTF8_, decodeUTF8_, levelNumbers, parseLogLevel = (maybeLevel, sourceName, client) => {
|
|
39306
39306
|
if (!maybeLevel) {
|
|
39307
39307
|
return;
|
|
@@ -44071,6 +44071,90 @@ var init_repo_loader = __esm(() => {
|
|
|
44071
44071
|
init_file_filter();
|
|
44072
44072
|
});
|
|
44073
44073
|
|
|
44074
|
+
// package.json
|
|
44075
|
+
var package_default;
|
|
44076
|
+
var init_package = __esm(() => {
|
|
44077
|
+
package_default = {
|
|
44078
|
+
name: "codebase-analyzer-mcp",
|
|
44079
|
+
version: "2.0.2",
|
|
44080
|
+
description: "Multi-layer codebase analysis with Gemini AI. MCP server + Claude plugin with progressive disclosure.",
|
|
44081
|
+
type: "module",
|
|
44082
|
+
main: "dist/mcp/server.js",
|
|
44083
|
+
bin: {
|
|
44084
|
+
cba: "dist/cli/index.js",
|
|
44085
|
+
"codebase-analyzer": "dist/cli/index.js"
|
|
44086
|
+
},
|
|
44087
|
+
files: [
|
|
44088
|
+
"dist/cli",
|
|
44089
|
+
"dist/mcp",
|
|
44090
|
+
"agents",
|
|
44091
|
+
"commands",
|
|
44092
|
+
"skills",
|
|
44093
|
+
".claude-plugin",
|
|
44094
|
+
"CLAUDE.md",
|
|
44095
|
+
"AGENTS.md"
|
|
44096
|
+
],
|
|
44097
|
+
scripts: {
|
|
44098
|
+
build: "bun run build:js && bun run build:bin",
|
|
44099
|
+
"build:js": "bun build src/mcp/server.ts --outfile dist/mcp/server.js --target node && bun build src/cli/index.ts --outfile dist/cli/index.js --target node && echo '#!/usr/bin/env node' | cat - dist/cli/index.js > /tmp/cba.js && mv /tmp/cba.js dist/cli/index.js",
|
|
44100
|
+
"build:bin": "bun build src/cli/index.ts --compile --outfile dist/cba",
|
|
44101
|
+
"build:bin:all": "bun run build:bin:macos && bun run build:bin:linux && bun run build:bin:windows",
|
|
44102
|
+
"build:bin:macos": "bun build src/cli/index.ts --compile --target=bun-darwin-arm64 --outfile dist/cba-macos-arm64 && bun build src/cli/index.ts --compile --target=bun-darwin-x64 --outfile dist/cba-macos-x64",
|
|
44103
|
+
"build:bin:linux": "bun build src/cli/index.ts --compile --target=bun-linux-x64 --outfile dist/cba-linux-x64 && bun build src/cli/index.ts --compile --target=bun-linux-arm64 --outfile dist/cba-linux-arm64",
|
|
44104
|
+
"build:bin:windows": "bun build src/cli/index.ts --compile --target=bun-windows-x64 --outfile dist/cba-windows-x64.exe",
|
|
44105
|
+
dev: "bun --watch src/cli/index.ts",
|
|
44106
|
+
start: "bun dist/mcp/server.js",
|
|
44107
|
+
typecheck: "tsc --noEmit",
|
|
44108
|
+
test: "bun test",
|
|
44109
|
+
cli: "bun src/cli/index.ts",
|
|
44110
|
+
cba: "bun src/cli/index.ts",
|
|
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"
|
|
44116
|
+
},
|
|
44117
|
+
repository: {
|
|
44118
|
+
type: "git",
|
|
44119
|
+
url: "git+https://github.com/jaykaycodes/codebase-analyzer-mcp.git"
|
|
44120
|
+
},
|
|
44121
|
+
homepage: "https://github.com/jaykaycodes/codebase-analyzer-mcp#readme",
|
|
44122
|
+
bugs: {
|
|
44123
|
+
url: "https://github.com/jaykaycodes/codebase-analyzer-mcp/issues"
|
|
44124
|
+
},
|
|
44125
|
+
author: "Jake Correa",
|
|
44126
|
+
keywords: [
|
|
44127
|
+
"mcp",
|
|
44128
|
+
"gemini",
|
|
44129
|
+
"codebase",
|
|
44130
|
+
"analyzer",
|
|
44131
|
+
"architecture",
|
|
44132
|
+
"patterns",
|
|
44133
|
+
"claude",
|
|
44134
|
+
"ai",
|
|
44135
|
+
"progressive-disclosure",
|
|
44136
|
+
"tree-sitter"
|
|
44137
|
+
],
|
|
44138
|
+
license: "MIT",
|
|
44139
|
+
engines: {
|
|
44140
|
+
node: ">=20"
|
|
44141
|
+
},
|
|
44142
|
+
dependencies: {
|
|
44143
|
+
"@google/genai": "^1.38.0",
|
|
44144
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
44145
|
+
commander: "^14.0.2",
|
|
44146
|
+
glob: "^13.0.0",
|
|
44147
|
+
"web-tree-sitter": "^0.26.3",
|
|
44148
|
+
zod: "^4.3.6"
|
|
44149
|
+
},
|
|
44150
|
+
devDependencies: {
|
|
44151
|
+
"@types/bun": "latest",
|
|
44152
|
+
"@types/node": "^25.1.0",
|
|
44153
|
+
typescript: "^5.9.3"
|
|
44154
|
+
}
|
|
44155
|
+
};
|
|
44156
|
+
});
|
|
44157
|
+
|
|
44074
44158
|
// node_modules/zod/v4/core/core.js
|
|
44075
44159
|
function $constructor(name, initializer, params) {
|
|
44076
44160
|
function init(inst, def) {
|
|
@@ -71656,7 +71740,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
71656
71740
|
}
|
|
71657
71741
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
71658
71742
|
function getTime(strictTimeZone) {
|
|
71659
|
-
return function
|
|
71743
|
+
return function time3(str) {
|
|
71660
71744
|
const matches = TIME.exec(str);
|
|
71661
71745
|
if (!matches)
|
|
71662
71746
|
return false;
|
|
@@ -73319,16 +73403,17 @@ var exports_server = {};
|
|
|
73319
73403
|
async function main() {
|
|
73320
73404
|
const transport = new StdioServerTransport;
|
|
73321
73405
|
await server.connect(transport);
|
|
73322
|
-
console.error(
|
|
73406
|
+
console.error(`Codebase Analyzer MCP server v${package_default.version} running on stdio`);
|
|
73323
73407
|
}
|
|
73324
73408
|
var server;
|
|
73325
73409
|
var init_server2 = __esm(() => {
|
|
73326
73410
|
init_mcp();
|
|
73327
73411
|
init_stdio2();
|
|
73328
73412
|
init_tools();
|
|
73413
|
+
init_package();
|
|
73329
73414
|
server = new McpServer({
|
|
73330
73415
|
name: "codebase-analyzer",
|
|
73331
|
-
version:
|
|
73416
|
+
version: package_default.version
|
|
73332
73417
|
});
|
|
73333
73418
|
server.tool("get_analysis_capabilities", "Discover available analysis types, supported languages, and cost estimates. Call this first to understand what analysis options are available.", {}, async () => {
|
|
73334
73419
|
try {
|
|
@@ -73512,6 +73597,7 @@ var {
|
|
|
73512
73597
|
init_orchestrator();
|
|
73513
73598
|
init_repo_loader();
|
|
73514
73599
|
init_logger();
|
|
73600
|
+
init_package();
|
|
73515
73601
|
import { basename as basename5 } from "path";
|
|
73516
73602
|
function extractSourceName2(source) {
|
|
73517
73603
|
const githubMatch = source.match(/github\.com\/([^\/]+\/[^\/]+)/);
|
|
@@ -73523,7 +73609,7 @@ function extractSourceName2(source) {
|
|
|
73523
73609
|
var program2 = new Command;
|
|
73524
73610
|
program2.name("cba").description(`Codebase Analyzer - Multi-layer repository analysis with Gemini AI
|
|
73525
73611
|
|
|
73526
|
-
Use --mcp to run as MCP server for Claude Code`).version(
|
|
73612
|
+
Use --mcp to run as MCP server for Claude Code`).version(package_default.version);
|
|
73527
73613
|
program2.command("analyze").description("Perform architectural analysis of a repository").argument("<source>", "Local path or GitHub URL").option("-d, --depth <depth>", "Analysis depth: surface, standard, deep", "standard").option("-f, --focus <areas...>", "Specific areas to focus on").option("-e, --exclude <patterns...>", "Glob patterns to exclude").option("-t, --token-budget <tokens>", "Maximum token budget", "800000").option("-s, --semantics", "Include deep semantic analysis (uses LLM)").option("-v, --verbose", "Show detailed progress and subagent activity").option("-q, --quiet", "Only output the final result (no progress)").option("--format <format>", "Output format (json or markdown)", "json").action(async (source, options) => {
|
|
73528
73614
|
try {
|
|
73529
73615
|
if (options.verbose)
|
package/dist/mcp/server.js
CHANGED
|
@@ -6278,7 +6278,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
6278
6278
|
}
|
|
6279
6279
|
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
6280
6280
|
function getTime(strictTimeZone) {
|
|
6281
|
-
return function
|
|
6281
|
+
return function time3(str) {
|
|
6282
6282
|
const matches = TIME.exec(str);
|
|
6283
6283
|
if (!matches)
|
|
6284
6284
|
return false;
|
|
@@ -12030,13 +12030,13 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
12030
12030
|
var toStr = Object.prototype.toString;
|
|
12031
12031
|
var defineProperty = Object.defineProperty;
|
|
12032
12032
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
12033
|
-
var isArray = function
|
|
12033
|
+
var isArray = function isArray2(arr) {
|
|
12034
12034
|
if (typeof Array.isArray === "function") {
|
|
12035
12035
|
return Array.isArray(arr);
|
|
12036
12036
|
}
|
|
12037
12037
|
return toStr.call(arr) === "[object Array]";
|
|
12038
12038
|
};
|
|
12039
|
-
var isPlainObject3 = function
|
|
12039
|
+
var isPlainObject3 = function isPlainObject4(obj) {
|
|
12040
12040
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
12041
12041
|
return false;
|
|
12042
12042
|
}
|
|
@@ -12049,7 +12049,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
12049
12049
|
for (key in obj) {}
|
|
12050
12050
|
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
12051
12051
|
};
|
|
12052
|
-
var setProperty = function
|
|
12052
|
+
var setProperty = function setProperty2(target, options) {
|
|
12053
12053
|
if (defineProperty && options.name === "__proto__") {
|
|
12054
12054
|
defineProperty(target, options.name, {
|
|
12055
12055
|
enumerable: true,
|
|
@@ -12061,7 +12061,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
12061
12061
|
target[options.name] = options.newValue;
|
|
12062
12062
|
}
|
|
12063
12063
|
};
|
|
12064
|
-
var getProperty = function
|
|
12064
|
+
var getProperty = function getProperty2(obj, name) {
|
|
12065
12065
|
if (name === "__proto__") {
|
|
12066
12066
|
if (!hasOwn.call(obj, name)) {
|
|
12067
12067
|
return;
|
|
@@ -12071,7 +12071,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
12071
12071
|
}
|
|
12072
12072
|
return obj[name];
|
|
12073
12073
|
};
|
|
12074
|
-
module.exports = function
|
|
12074
|
+
module.exports = function extend2() {
|
|
12075
12075
|
var options, name, src, copy, copyIsArray, clone2;
|
|
12076
12076
|
var target = arguments[0];
|
|
12077
12077
|
var i = 1;
|
|
@@ -12099,7 +12099,7 @@ var require_extend = __commonJS((exports, module) => {
|
|
|
12099
12099
|
} else {
|
|
12100
12100
|
clone2 = src && isPlainObject3(src) ? src : {};
|
|
12101
12101
|
}
|
|
12102
|
-
setProperty(target, { name, newValue:
|
|
12102
|
+
setProperty(target, { name, newValue: extend2(deep, clone2, copy) });
|
|
12103
12103
|
} else if (typeof copy !== "undefined") {
|
|
12104
12104
|
setProperty(target, { name, newValue: copy });
|
|
12105
12105
|
}
|
|
@@ -16064,7 +16064,7 @@ var require_ponyfill_es2018 = __commonJS((exports, module) => {
|
|
|
16064
16064
|
return isDOMExceptionConstructor(ctor) ? ctor : undefined;
|
|
16065
16065
|
}
|
|
16066
16066
|
function createPolyfill() {
|
|
16067
|
-
const ctor = function
|
|
16067
|
+
const ctor = function DOMException3(message, name) {
|
|
16068
16068
|
this.message = message || "";
|
|
16069
16069
|
this.name = name || "Error";
|
|
16070
16070
|
if (Error.captureStackTrace) {
|
|
@@ -24401,12 +24401,12 @@ var require_jwa = __commonJS((exports, module) => {
|
|
|
24401
24401
|
};
|
|
24402
24402
|
}
|
|
24403
24403
|
var bufferEqual;
|
|
24404
|
-
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function
|
|
24404
|
+
var timingSafeEqual = "timingSafeEqual" in crypto2 ? function timingSafeEqual2(a, b) {
|
|
24405
24405
|
if (a.byteLength !== b.byteLength) {
|
|
24406
24406
|
return false;
|
|
24407
24407
|
}
|
|
24408
24408
|
return crypto2.timingSafeEqual(a, b);
|
|
24409
|
-
} : function
|
|
24409
|
+
} : function timingSafeEqual2(a, b) {
|
|
24410
24410
|
if (!bufferEqual) {
|
|
24411
24411
|
bufferEqual = require_buffer_equal_constant_time();
|
|
24412
24412
|
}
|
|
@@ -24760,7 +24760,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24760
24760
|
function _interopRequireWildcard(e2, t2) {
|
|
24761
24761
|
if (typeof WeakMap == "function")
|
|
24762
24762
|
var r2 = new WeakMap, n = new WeakMap;
|
|
24763
|
-
return (_interopRequireWildcard = function
|
|
24763
|
+
return (_interopRequireWildcard = function _interopRequireWildcard2(e3, t3) {
|
|
24764
24764
|
if (!t3 && e3 && e3.__esModule)
|
|
24765
24765
|
return e3;
|
|
24766
24766
|
var o, i2, f3 = { __proto__: null, default: e3 };
|
|
@@ -24840,7 +24840,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24840
24840
|
}
|
|
24841
24841
|
function _wrapNativeSuper(t2) {
|
|
24842
24842
|
var r2 = typeof Map == "function" ? new Map : undefined;
|
|
24843
|
-
return _wrapNativeSuper = function
|
|
24843
|
+
return _wrapNativeSuper = function _wrapNativeSuper2(t3) {
|
|
24844
24844
|
if (t3 === null || !_isNativeFunction(t3))
|
|
24845
24845
|
return t3;
|
|
24846
24846
|
if (typeof t3 != "function")
|
|
@@ -24868,7 +24868,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24868
24868
|
try {
|
|
24869
24869
|
var t2 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
24870
24870
|
} catch (t3) {}
|
|
24871
|
-
return (_isNativeReflectConstruct = function
|
|
24871
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
|
|
24872
24872
|
return !!t2;
|
|
24873
24873
|
})();
|
|
24874
24874
|
}
|
|
@@ -24914,7 +24914,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24914
24914
|
function i2(r3, n2, o2, i3) {
|
|
24915
24915
|
var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
|
|
24916
24916
|
return _regeneratorDefine2(u2, "_invoke", function(r4, n3, o3) {
|
|
24917
|
-
var i4, c3, u3, f4 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e2, a: d, f: d.bind(e2, 4), d: function
|
|
24917
|
+
var i4, c3, u3, f4 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e2, a: d, f: d.bind(e2, 4), d: function d2(t3, r5) {
|
|
24918
24918
|
return i4 = t3, c3 = 0, u3 = e2, G.n = r5, a;
|
|
24919
24919
|
} };
|
|
24920
24920
|
function d(r5, n4) {
|
|
@@ -24969,7 +24969,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24969
24969
|
return this;
|
|
24970
24970
|
}), _regeneratorDefine2(u, "toString", function() {
|
|
24971
24971
|
return "[object Generator]";
|
|
24972
|
-
}), (_regenerator = function
|
|
24972
|
+
}), (_regenerator = function _regenerator2() {
|
|
24973
24973
|
return { w: i2, m: f3 };
|
|
24974
24974
|
})();
|
|
24975
24975
|
}
|
|
@@ -24984,7 +24984,7 @@ var require_src5 = __commonJS((exports) => {
|
|
|
24984
24984
|
if (r3)
|
|
24985
24985
|
i2 ? i2(e3, r3, { value: n2, enumerable: !t3, configurable: !t3, writable: !t3 }) : e3[r3] = n2;
|
|
24986
24986
|
else {
|
|
24987
|
-
var o = function
|
|
24987
|
+
var o = function o2(r4, n3) {
|
|
24988
24988
|
_regeneratorDefine2(e3, r4, function(e4) {
|
|
24989
24989
|
return this._invoke(r4, n3, e4);
|
|
24990
24990
|
});
|
|
@@ -30792,7 +30792,7 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
30792
30792
|
if (!duplex.push(data))
|
|
30793
30793
|
ws.pause();
|
|
30794
30794
|
});
|
|
30795
|
-
ws.once("error", function
|
|
30795
|
+
ws.once("error", function error48(err) {
|
|
30796
30796
|
if (duplex.destroyed)
|
|
30797
30797
|
return;
|
|
30798
30798
|
terminateOnDestroy = false;
|
|
@@ -30810,7 +30810,7 @@ var require_stream = __commonJS((exports, module) => {
|
|
|
30810
30810
|
return;
|
|
30811
30811
|
}
|
|
30812
30812
|
let called = false;
|
|
30813
|
-
ws.once("error", function
|
|
30813
|
+
ws.once("error", function error48(err2) {
|
|
30814
30814
|
called = true;
|
|
30815
30815
|
callback(err2);
|
|
30816
30816
|
});
|
|
@@ -66863,12 +66863,12 @@ function encodeURIPath(str) {
|
|
|
66863
66863
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
66864
66864
|
}
|
|
66865
66865
|
var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
66866
|
-
var createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
66866
|
+
var createPathTagFunction = (pathEncoder = encodeURIPath) => function path2(statics, ...params) {
|
|
66867
66867
|
if (statics.length === 1)
|
|
66868
66868
|
return statics[0];
|
|
66869
66869
|
let postPath = false;
|
|
66870
66870
|
const invalidSegments = [];
|
|
66871
|
-
const
|
|
66871
|
+
const path3 = statics.reduce((previousValue, currentValue, index) => {
|
|
66872
66872
|
var _a2, _b, _c;
|
|
66873
66873
|
if (/[?#]/.test(currentValue)) {
|
|
66874
66874
|
postPath = true;
|
|
@@ -66885,7 +66885,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path(stati
|
|
|
66885
66885
|
}
|
|
66886
66886
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
66887
66887
|
}, "");
|
|
66888
|
-
const pathOnly =
|
|
66888
|
+
const pathOnly = path3.split(/[?#]/, 1)[0];
|
|
66889
66889
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
66890
66890
|
let match2;
|
|
66891
66891
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -66907,10 +66907,10 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path(stati
|
|
|
66907
66907
|
throw new GeminiNextGenAPIClientError(`Path parameters result in path with invalid segments:
|
|
66908
66908
|
${invalidSegments.map((e2) => e2.error).join(`
|
|
66909
66909
|
`)}
|
|
66910
|
-
${
|
|
66910
|
+
${path3}
|
|
66911
66911
|
${underline}`);
|
|
66912
66912
|
}
|
|
66913
|
-
return
|
|
66913
|
+
return path3;
|
|
66914
66914
|
};
|
|
66915
66915
|
var path2 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
66916
66916
|
|
|
@@ -70682,10 +70682,91 @@ If you cannot find the entry point, explain what you looked for in the summary a
|
|
|
70682
70682
|
}
|
|
70683
70683
|
}
|
|
70684
70684
|
}
|
|
70685
|
+
// package.json
|
|
70686
|
+
var package_default = {
|
|
70687
|
+
name: "codebase-analyzer-mcp",
|
|
70688
|
+
version: "2.0.2",
|
|
70689
|
+
description: "Multi-layer codebase analysis with Gemini AI. MCP server + Claude plugin with progressive disclosure.",
|
|
70690
|
+
type: "module",
|
|
70691
|
+
main: "dist/mcp/server.js",
|
|
70692
|
+
bin: {
|
|
70693
|
+
cba: "dist/cli/index.js",
|
|
70694
|
+
"codebase-analyzer": "dist/cli/index.js"
|
|
70695
|
+
},
|
|
70696
|
+
files: [
|
|
70697
|
+
"dist/cli",
|
|
70698
|
+
"dist/mcp",
|
|
70699
|
+
"agents",
|
|
70700
|
+
"commands",
|
|
70701
|
+
"skills",
|
|
70702
|
+
".claude-plugin",
|
|
70703
|
+
"CLAUDE.md",
|
|
70704
|
+
"AGENTS.md"
|
|
70705
|
+
],
|
|
70706
|
+
scripts: {
|
|
70707
|
+
build: "bun run build:js && bun run build:bin",
|
|
70708
|
+
"build:js": "bun build src/mcp/server.ts --outfile dist/mcp/server.js --target node && bun build src/cli/index.ts --outfile dist/cli/index.js --target node && echo '#!/usr/bin/env node' | cat - dist/cli/index.js > /tmp/cba.js && mv /tmp/cba.js dist/cli/index.js",
|
|
70709
|
+
"build:bin": "bun build src/cli/index.ts --compile --outfile dist/cba",
|
|
70710
|
+
"build:bin:all": "bun run build:bin:macos && bun run build:bin:linux && bun run build:bin:windows",
|
|
70711
|
+
"build:bin:macos": "bun build src/cli/index.ts --compile --target=bun-darwin-arm64 --outfile dist/cba-macos-arm64 && bun build src/cli/index.ts --compile --target=bun-darwin-x64 --outfile dist/cba-macos-x64",
|
|
70712
|
+
"build:bin:linux": "bun build src/cli/index.ts --compile --target=bun-linux-x64 --outfile dist/cba-linux-x64 && bun build src/cli/index.ts --compile --target=bun-linux-arm64 --outfile dist/cba-linux-arm64",
|
|
70713
|
+
"build:bin:windows": "bun build src/cli/index.ts --compile --target=bun-windows-x64 --outfile dist/cba-windows-x64.exe",
|
|
70714
|
+
dev: "bun --watch src/cli/index.ts",
|
|
70715
|
+
start: "bun dist/mcp/server.js",
|
|
70716
|
+
typecheck: "tsc --noEmit",
|
|
70717
|
+
test: "bun test",
|
|
70718
|
+
cli: "bun src/cli/index.ts",
|
|
70719
|
+
cba: "bun src/cli/index.ts",
|
|
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"
|
|
70725
|
+
},
|
|
70726
|
+
repository: {
|
|
70727
|
+
type: "git",
|
|
70728
|
+
url: "git+https://github.com/jaykaycodes/codebase-analyzer-mcp.git"
|
|
70729
|
+
},
|
|
70730
|
+
homepage: "https://github.com/jaykaycodes/codebase-analyzer-mcp#readme",
|
|
70731
|
+
bugs: {
|
|
70732
|
+
url: "https://github.com/jaykaycodes/codebase-analyzer-mcp/issues"
|
|
70733
|
+
},
|
|
70734
|
+
author: "Jake Correa",
|
|
70735
|
+
keywords: [
|
|
70736
|
+
"mcp",
|
|
70737
|
+
"gemini",
|
|
70738
|
+
"codebase",
|
|
70739
|
+
"analyzer",
|
|
70740
|
+
"architecture",
|
|
70741
|
+
"patterns",
|
|
70742
|
+
"claude",
|
|
70743
|
+
"ai",
|
|
70744
|
+
"progressive-disclosure",
|
|
70745
|
+
"tree-sitter"
|
|
70746
|
+
],
|
|
70747
|
+
license: "MIT",
|
|
70748
|
+
engines: {
|
|
70749
|
+
node: ">=20"
|
|
70750
|
+
},
|
|
70751
|
+
dependencies: {
|
|
70752
|
+
"@google/genai": "^1.38.0",
|
|
70753
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
70754
|
+
commander: "^14.0.2",
|
|
70755
|
+
glob: "^13.0.0",
|
|
70756
|
+
"web-tree-sitter": "^0.26.3",
|
|
70757
|
+
zod: "^4.3.6"
|
|
70758
|
+
},
|
|
70759
|
+
devDependencies: {
|
|
70760
|
+
"@types/bun": "latest",
|
|
70761
|
+
"@types/node": "^25.1.0",
|
|
70762
|
+
typescript: "^5.9.3"
|
|
70763
|
+
}
|
|
70764
|
+
};
|
|
70765
|
+
|
|
70685
70766
|
// src/mcp/server.ts
|
|
70686
70767
|
var server = new McpServer({
|
|
70687
70768
|
name: "codebase-analyzer",
|
|
70688
|
-
version:
|
|
70769
|
+
version: package_default.version
|
|
70689
70770
|
});
|
|
70690
70771
|
server.tool("get_analysis_capabilities", "Discover available analysis types, supported languages, and cost estimates. Call this first to understand what analysis options are available.", {}, async () => {
|
|
70691
70772
|
try {
|
|
@@ -70846,7 +70927,7 @@ server.tool("trace_dataflow", "Trace data flow through the codebase from an entr
|
|
|
70846
70927
|
async function main() {
|
|
70847
70928
|
const transport = new StdioServerTransport;
|
|
70848
70929
|
await server.connect(transport);
|
|
70849
|
-
console.error(
|
|
70930
|
+
console.error(`Codebase Analyzer MCP server v${package_default.version} running on stdio`);
|
|
70850
70931
|
}
|
|
70851
70932
|
main().catch((error48) => {
|
|
70852
70933
|
console.error("Fatal error:", error48);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebase-analyzer-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
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,17 +32,21 @@
|
|
|
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",
|
|
39
|
-
"url": "git+https://github.com/
|
|
43
|
+
"url": "git+https://github.com/jaykaycodes/codebase-analyzer-mcp.git"
|
|
40
44
|
},
|
|
41
|
-
"homepage": "https://github.com/
|
|
45
|
+
"homepage": "https://github.com/jaykaycodes/codebase-analyzer-mcp#readme",
|
|
42
46
|
"bugs": {
|
|
43
|
-
"url": "https://github.com/
|
|
47
|
+
"url": "https://github.com/jaykaycodes/codebase-analyzer-mcp/issues"
|
|
44
48
|
},
|
|
45
|
-
"author": "
|
|
49
|
+
"author": "Jake Correa",
|
|
46
50
|
"keywords": [
|
|
47
51
|
"mcp",
|
|
48
52
|
"gemini",
|