dep-context-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +380 -0
- package/dist/analysis/relationships.d.ts +25 -0
- package/dist/analysis/relationships.d.ts.map +1 -0
- package/dist/analysis/relationships.js +26 -0
- package/dist/analysis/relationships.js.map +1 -0
- package/dist/build-info.d.ts +15 -0
- package/dist/build-info.d.ts.map +1 -0
- package/dist/build-info.js +24 -0
- package/dist/build-info.js.map +1 -0
- package/dist/cache/manager.d.ts +19 -0
- package/dist/cache/manager.d.ts.map +1 -0
- package/dist/cache/manager.js +131 -0
- package/dist/cache/manager.js.map +1 -0
- package/dist/cache/registry.d.ts +44 -0
- package/dist/cache/registry.d.ts.map +1 -0
- package/dist/cache/registry.js +92 -0
- package/dist/cache/registry.js.map +1 -0
- package/dist/config/loader.d.ts +62 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +193 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/extraction/examples.d.ts +22 -0
- package/dist/extraction/examples.d.ts.map +1 -0
- package/dist/extraction/examples.js +109 -0
- package/dist/extraction/examples.js.map +1 -0
- package/dist/extraction/external-resolver.d.ts +26 -0
- package/dist/extraction/external-resolver.d.ts.map +1 -0
- package/dist/extraction/external-resolver.js +79 -0
- package/dist/extraction/external-resolver.js.map +1 -0
- package/dist/extraction/import-tracker.d.ts +58 -0
- package/dist/extraction/import-tracker.d.ts.map +1 -0
- package/dist/extraction/import-tracker.js +113 -0
- package/dist/extraction/import-tracker.js.map +1 -0
- package/dist/extraction/readme.d.ts +19 -0
- package/dist/extraction/readme.d.ts.map +1 -0
- package/dist/extraction/readme.js +79 -0
- package/dist/extraction/readme.js.map +1 -0
- package/dist/extraction/snapshot.d.ts +32 -0
- package/dist/extraction/snapshot.d.ts.map +1 -0
- package/dist/extraction/snapshot.js +258 -0
- package/dist/extraction/snapshot.js.map +1 -0
- package/dist/extraction/typescript.d.ts +104 -0
- package/dist/extraction/typescript.d.ts.map +1 -0
- package/dist/extraction/typescript.js +647 -0
- package/dist/extraction/typescript.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +329 -0
- package/dist/index.js.map +1 -0
- package/dist/resolver/package.d.ts +62 -0
- package/dist/resolver/package.d.ts.map +1 -0
- package/dist/resolver/package.js +334 -0
- package/dist/resolver/package.js.map +1 -0
- package/dist/tools/get-dependency.d.ts +55 -0
- package/dist/tools/get-dependency.d.ts.map +1 -0
- package/dist/tools/get-dependency.js +105 -0
- package/dist/tools/get-dependency.js.map +1 -0
- package/dist/tools/index-dependencies.d.ts +51 -0
- package/dist/tools/index-dependencies.d.ts.map +1 -0
- package/dist/tools/index-dependencies.js +90 -0
- package/dist/tools/index-dependencies.js.map +1 -0
- package/dist/tools/index-status.d.ts +36 -0
- package/dist/tools/index-status.d.ts.map +1 -0
- package/dist/tools/index-status.js +45 -0
- package/dist/tools/index-status.js.map +1 -0
- package/dist/tools/list.d.ts +48 -0
- package/dist/tools/list.d.ts.map +1 -0
- package/dist/tools/list.js +55 -0
- package/dist/tools/list.js.map +1 -0
- package/dist/tools/refresh.d.ts +59 -0
- package/dist/tools/refresh.d.ts.map +1 -0
- package/dist/tools/refresh.js +109 -0
- package/dist/tools/refresh.js.map +1 -0
- package/dist/tools/relationships.d.ts +41 -0
- package/dist/tools/relationships.d.ts.map +1 -0
- package/dist/tools/relationships.js +36 -0
- package/dist/tools/relationships.js.map +1 -0
- package/dist/tools/search-codebase.d.ts +64 -0
- package/dist/tools/search-codebase.d.ts.map +1 -0
- package/dist/tools/search-codebase.js +117 -0
- package/dist/tools/search-codebase.js.map +1 -0
- package/dist/tools/search.d.ts +37 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +77 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/utils/logger.d.ts +19 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +71 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/vector/chroma.d.ts +38 -0
- package/dist/vector/chroma.d.ts.map +1 -0
- package/dist/vector/chroma.js +69 -0
- package/dist/vector/chroma.js.map +1 -0
- package/dist/vector/chunker.d.ts +29 -0
- package/dist/vector/chunker.d.ts.map +1 -0
- package/dist/vector/chunker.js +205 -0
- package/dist/vector/chunker.js.map +1 -0
- package/dist/vector/embeddings.d.ts +36 -0
- package/dist/vector/embeddings.d.ts.map +1 -0
- package/dist/vector/embeddings.js +106 -0
- package/dist/vector/embeddings.js.map +1 -0
- package/dist/vector/file-store.d.ts +10 -0
- package/dist/vector/file-store.d.ts.map +1 -0
- package/dist/vector/file-store.js +80 -0
- package/dist/vector/file-store.js.map +1 -0
- package/dist/vector/index-manager.d.ts +39 -0
- package/dist/vector/index-manager.d.ts.map +1 -0
- package/dist/vector/index-manager.js +105 -0
- package/dist/vector/index-manager.js.map +1 -0
- package/dist/vector/provider-factory.d.ts +23 -0
- package/dist/vector/provider-factory.d.ts.map +1 -0
- package/dist/vector/provider-factory.js +50 -0
- package/dist/vector/provider-factory.js.map +1 -0
- package/dist/vector/storage-factory.d.ts +17 -0
- package/dist/vector/storage-factory.d.ts.map +1 -0
- package/dist/vector/storage-factory.js +55 -0
- package/dist/vector/storage-factory.js.map +1 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# Dependency Context MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server that provides AI coding assistants with context about project dependencies by reading directly from `node_modules`. Solves the "dependency blindness" problem with zero network calls and no external service dependencies.
|
|
4
|
+
|
|
5
|
+
## The Problem
|
|
6
|
+
|
|
7
|
+
AI coding assistants don't know what's in your `node_modules`. When you ask "how do I use zod for validation?", they either hallucinate outdated APIs or give generic advice. This MCP server gives them full visibility into your actual installed dependencies.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Local-First Architecture**: Reads dependency metadata and types directly from `node_modules`
|
|
12
|
+
- **Type Extraction**: Parses `.d.ts` files using TypeScript compiler API to extract full public APIs
|
|
13
|
+
- **Semantic Search** (optional): Natural language search across all your dependencies using vector embeddings
|
|
14
|
+
- **Caching**: Generates compact API snapshots, cached locally and invalidated by version changes
|
|
15
|
+
- **Handles Complex Packages**: Follows re-exports, import-then-export patterns, and bundled/minified `.d.ts` files
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
No installation needed - MCP clients run it via `npx`:
|
|
20
|
+
|
|
21
|
+
1. Add to your MCP client config (see [Configuration](#mcp-client-configuration))
|
|
22
|
+
2. Point `cwd` to your project directory
|
|
23
|
+
3. Ask your AI about your dependencies
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"mcpServers": {
|
|
28
|
+
"dep-context": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["dep-context-mcp"],
|
|
31
|
+
"cwd": "/path/to/your/project"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Then just ask:
|
|
38
|
+
|
|
39
|
+
> "Show me the API for lodash"
|
|
40
|
+
> "How do I use fast-check for property testing?"
|
|
41
|
+
> "Search for functions that handle debouncing"
|
|
42
|
+
|
|
43
|
+
## Available Tools
|
|
44
|
+
|
|
45
|
+
| Tool | Description |
|
|
46
|
+
|------|-------------|
|
|
47
|
+
| `get_dependency_context` | Get full API context for an installed dependency |
|
|
48
|
+
| `list_dependencies` | List all dependencies with cache status |
|
|
49
|
+
| `refresh_dependency` | Force regeneration of a dependency snapshot |
|
|
50
|
+
| `search_dependencies` | Text-based search by name/description |
|
|
51
|
+
| `search_codebase` | **Semantic search** across dependency APIs (auto-indexes on first use) |
|
|
52
|
+
| `get_index_status` | Check vector index status |
|
|
53
|
+
| `get_package_relationships` | Analyse package dependencies and relationships |
|
|
54
|
+
|
|
55
|
+
## Semantic Search (Optional)
|
|
56
|
+
|
|
57
|
+
The basic tools work out of the box. For semantic search ("find functions that delay execution"), you need:
|
|
58
|
+
|
|
59
|
+
### Option 1: Ollama (Recommended - Free & Local)
|
|
60
|
+
|
|
61
|
+
1. Install [Ollama](https://ollama.ai)
|
|
62
|
+
2. Pull the embedding model:
|
|
63
|
+
```bash
|
|
64
|
+
ollama pull nomic-embed-text
|
|
65
|
+
```
|
|
66
|
+
3. Enable in config:
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"vectorSearch": {
|
|
70
|
+
"enabled": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
This uses file-based storage by default - fine for small/medium projects (<50 packages). The entire index is rewritten on each update, so indexing many packages will be slow.
|
|
76
|
+
|
|
77
|
+
### Option 2: Ollama + ChromaDB (Better Performance)
|
|
78
|
+
|
|
79
|
+
For larger projects, add ChromaDB for faster vector search and incremental updates.
|
|
80
|
+
|
|
81
|
+
**Docker (recommended):**
|
|
82
|
+
```bash
|
|
83
|
+
# Start ChromaDB container
|
|
84
|
+
docker run -d --name chromadb -p 8000:8000 chromadb/chroma
|
|
85
|
+
|
|
86
|
+
# Verify it's running
|
|
87
|
+
curl http://localhost:8000/api/v2/heartbeat
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Docker Compose:**
|
|
91
|
+
```yaml
|
|
92
|
+
services:
|
|
93
|
+
chromadb:
|
|
94
|
+
image: chromadb/chroma
|
|
95
|
+
ports:
|
|
96
|
+
- "8000:8000"
|
|
97
|
+
volumes:
|
|
98
|
+
- chromadb_data:/chroma/chroma
|
|
99
|
+
volumes:
|
|
100
|
+
chromadb_data:
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Without Docker (pip):**
|
|
104
|
+
```bash
|
|
105
|
+
pip install chromadb
|
|
106
|
+
chroma run --host localhost --port 8000
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The MCP auto-detects ChromaDB on localhost:8000. No config changes needed - just start ChromaDB and reconnect the MCP.
|
|
110
|
+
|
|
111
|
+
To verify ChromaDB is being used, check the MCP logs for:
|
|
112
|
+
```
|
|
113
|
+
[dep-context] Using ChromaDB at http://localhost:8000
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Option 3: OpenAI Embeddings
|
|
117
|
+
|
|
118
|
+
If you prefer OpenAI:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"vector": {
|
|
123
|
+
"enabled": true,
|
|
124
|
+
"embedding": {
|
|
125
|
+
"provider": "openai",
|
|
126
|
+
"openai": {
|
|
127
|
+
"apiKey": "${OPENAI_API_KEY}"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The `${OPENAI_API_KEY}` syntax references an environment variable - safe to commit to source control. Set the actual key in your environment or shell profile.
|
|
135
|
+
|
|
136
|
+
Alternatively, set the key directly (don't commit this):
|
|
137
|
+
```json
|
|
138
|
+
"apiKey": "sk-your-actual-key"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
Create `dep-context.config.json` in your project root (all fields optional):
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"projectRoot": ".",
|
|
148
|
+
"nodeModulesPath": "./node_modules",
|
|
149
|
+
"cacheDir": "./.cache/dep-context",
|
|
150
|
+
|
|
151
|
+
"extraction": {
|
|
152
|
+
"includeReadme": true,
|
|
153
|
+
"includeJsDoc": true,
|
|
154
|
+
"includeExamples": true,
|
|
155
|
+
"maxReadmeLength": 5000,
|
|
156
|
+
"maxExamples": 10
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
"vectorSearch": {
|
|
160
|
+
"enabled": false,
|
|
161
|
+
"embedding": {
|
|
162
|
+
"provider": "ollama",
|
|
163
|
+
"ollama": {
|
|
164
|
+
"baseUrl": "http://localhost:11434",
|
|
165
|
+
"model": "nomic-embed-text"
|
|
166
|
+
},
|
|
167
|
+
"openai": {
|
|
168
|
+
"apiKey": "${OPENAI_API_KEY}",
|
|
169
|
+
"model": "text-embedding-3-small"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"storage": {
|
|
173
|
+
"type": "auto",
|
|
174
|
+
"chromaHost": "http://localhost:8000"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Environment Variables
|
|
181
|
+
|
|
182
|
+
| Variable | Purpose |
|
|
183
|
+
|----------|---------|
|
|
184
|
+
| `OPENAI_API_KEY` | OpenAI API key (when using OpenAI embeddings) |
|
|
185
|
+
|
|
186
|
+
Use `${VAR_NAME}` syntax in config to reference environment variables.
|
|
187
|
+
|
|
188
|
+
Variables can be set via:
|
|
189
|
+
- `.env` file in your project root (recommended - add to `.gitignore`)
|
|
190
|
+
- Shell environment / profile
|
|
191
|
+
- MCP client `env` config
|
|
192
|
+
|
|
193
|
+
Example `.env`:
|
|
194
|
+
```
|
|
195
|
+
OPENAI_API_KEY=sk-your-key-here
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## MCP Client Configuration
|
|
199
|
+
|
|
200
|
+
**Important:** This server needs to know which project to analyse. Specify the project path via `cwd` in your config.
|
|
201
|
+
|
|
202
|
+
### Kiro
|
|
203
|
+
|
|
204
|
+
> **Why workspace-level config?**
|
|
205
|
+
>
|
|
206
|
+
> MCP configs can live in two places:
|
|
207
|
+
> - **User-level** (`~/.kiro/settings/mcp.json`) — shared across all projects
|
|
208
|
+
> - **Workspace-level** (`.kiro/settings/mcp.json` in your project) — project-specific
|
|
209
|
+
>
|
|
210
|
+
> Since `cwd` must point to each project's root directory, configure this MCP at the **workspace level**. This way each project automatically uses its own `node_modules`.
|
|
211
|
+
|
|
212
|
+
Create `.kiro/settings/mcp.json` in your project root:
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"mcpServers": {
|
|
217
|
+
"dep-context": {
|
|
218
|
+
"command": "npx",
|
|
219
|
+
"args": ["dep-context-mcp"],
|
|
220
|
+
"cwd": "/path/to/your/project",
|
|
221
|
+
"disabled": false,
|
|
222
|
+
"autoApprove": [
|
|
223
|
+
"list_dependencies",
|
|
224
|
+
"get_dependency_context",
|
|
225
|
+
"refresh_dependency",
|
|
226
|
+
"search_dependencies",
|
|
227
|
+
"search_codebase",
|
|
228
|
+
"get_index_status",
|
|
229
|
+
"get_package_relationships"
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Claude Desktop
|
|
237
|
+
|
|
238
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"mcpServers": {
|
|
243
|
+
"dep-context": {
|
|
244
|
+
"command": "npx",
|
|
245
|
+
"args": ["dep-context-mcp"],
|
|
246
|
+
"cwd": "/path/to/your/project"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## How to Use
|
|
253
|
+
|
|
254
|
+
Once configured, just ask your AI assistant naturally:
|
|
255
|
+
|
|
256
|
+
### Basic queries (always work)
|
|
257
|
+
> "Show me the API for lodash"
|
|
258
|
+
> "What functions does axios export?"
|
|
259
|
+
> "List all my dependencies"
|
|
260
|
+
|
|
261
|
+
### Semantic search (requires Ollama or OpenAI)
|
|
262
|
+
> "Find functions that handle rate limiting"
|
|
263
|
+
> "Search for validation utilities"
|
|
264
|
+
> "What can I use for debouncing?"
|
|
265
|
+
|
|
266
|
+
### Package relationships
|
|
267
|
+
> "What does axios depend on?"
|
|
268
|
+
> "Which packages depend on lodash?"
|
|
269
|
+
|
|
270
|
+
## What You Get
|
|
271
|
+
|
|
272
|
+
When you ask about a dependency, the AI receives a comprehensive snapshot:
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
# lodash v4.17.21
|
|
276
|
+
|
|
277
|
+
A modern JavaScript utility library delivering modularity, performance & extras.
|
|
278
|
+
|
|
279
|
+
## Functions
|
|
280
|
+
|
|
281
|
+
### debounce
|
|
282
|
+
function debounce<T extends (...args: any) => any>(
|
|
283
|
+
func: T,
|
|
284
|
+
wait?: number,
|
|
285
|
+
options?: DebounceSettings
|
|
286
|
+
): DebouncedFunc<T>
|
|
287
|
+
|
|
288
|
+
Creates a debounced function that delays invoking func...
|
|
289
|
+
|
|
290
|
+
### chunk
|
|
291
|
+
function chunk<T>(array: ArrayLike<T>, size?: number): T[][]
|
|
292
|
+
|
|
293
|
+
Creates an array of elements split into groups the length of size.
|
|
294
|
+
|
|
295
|
+
[... all exported functions, classes, interfaces, types ...]
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Development
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
npm install
|
|
302
|
+
npm run build
|
|
303
|
+
npm test
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## Licence
|
|
307
|
+
|
|
308
|
+
MIT
|
|
309
|
+
|
|
310
|
+
[... hundreds more functions, all with signatures and docs]
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Configuration
|
|
314
|
+
|
|
315
|
+
Create a `config.json` in your project root (optional - sensible defaults are used):
|
|
316
|
+
|
|
317
|
+
```json
|
|
318
|
+
{
|
|
319
|
+
"projectRoot": ".",
|
|
320
|
+
"nodeModulesPath": "./node_modules",
|
|
321
|
+
"cacheDir": "./.cache/dep-context",
|
|
322
|
+
"extraction": {
|
|
323
|
+
"includeReadme": true,
|
|
324
|
+
"includeJsDoc": true,
|
|
325
|
+
"maxReadmeLength": 5000
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## How It Works
|
|
331
|
+
|
|
332
|
+
1. **Package Resolution**: Locates packages in `node_modules`, handling hoisted and nested structures
|
|
333
|
+
2. **Type Extraction**: Uses TypeScript compiler API to parse `.d.ts` files and extract all exports
|
|
334
|
+
3. **Re-export Following**: Follows `export * from` and `export { x } from` patterns recursively
|
|
335
|
+
4. **Snapshot Generation**: Creates AI-optimised markdown with all API information
|
|
336
|
+
5. **Caching**: Stores snapshots locally, keyed by package name and version
|
|
337
|
+
6. **MCP Integration**: Exposes tools via Model Context Protocol for AI assistants
|
|
338
|
+
|
|
339
|
+
## Tips for Better AI Integration
|
|
340
|
+
|
|
341
|
+
The AI won't automatically know to check your dependencies before implementing code. You can guide it with a steering file.
|
|
342
|
+
|
|
343
|
+
### Kiro Steering Example
|
|
344
|
+
|
|
345
|
+
Create `.kiro/steering/dependencies.md`:
|
|
346
|
+
|
|
347
|
+
```markdown
|
|
348
|
+
---
|
|
349
|
+
inclusion: always
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
# Dependency Awareness
|
|
353
|
+
|
|
354
|
+
Before implementing features, check what libraries are available:
|
|
355
|
+
|
|
356
|
+
1. Use `list_dependencies` to see installed packages
|
|
357
|
+
2. Use `search_codebase` to find relevant functions (e.g., "validation", "date formatting")
|
|
358
|
+
3. Use `get_dependency_context` to get full API details for specific packages
|
|
359
|
+
|
|
360
|
+
Prefer using existing dependencies over adding new ones or writing from scratch.
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
This tells the AI to proactively check your dependencies when coding.
|
|
364
|
+
|
|
365
|
+
## Development
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Install dependencies
|
|
369
|
+
npm install
|
|
370
|
+
|
|
371
|
+
# Build
|
|
372
|
+
npm run build
|
|
373
|
+
|
|
374
|
+
# Run tests
|
|
375
|
+
npm test
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## Licence
|
|
379
|
+
|
|
380
|
+
MIT
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package relationship analysis
|
|
3
|
+
*/
|
|
4
|
+
import type { PackageResolverLike } from '../tools/get-dependency.js';
|
|
5
|
+
export interface PackageRelationships {
|
|
6
|
+
dependsOn: string[];
|
|
7
|
+
dependedBy: string[];
|
|
8
|
+
similarTo: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
score: number;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export interface RelationshipAnalyzerDeps {
|
|
14
|
+
resolver: PackageResolverLike;
|
|
15
|
+
listDependencies: () => Promise<Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
version: string;
|
|
18
|
+
dependencies?: Record<string, string>;
|
|
19
|
+
}>>;
|
|
20
|
+
}
|
|
21
|
+
export interface RelationshipAnalyzer {
|
|
22
|
+
analyze(packageName: string): Promise<PackageRelationships>;
|
|
23
|
+
}
|
|
24
|
+
export declare function createRelationshipAnalyzer(deps: RelationshipAnalyzerDeps): RelationshipAnalyzer;
|
|
25
|
+
//# sourceMappingURL=relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/analysis/relationships.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAErE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,gBAAgB,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC,CAAA;CACjH;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;CAC5D;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,wBAAwB,GAAG,oBAAoB,CA0B/F"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package relationship analysis
|
|
3
|
+
*/
|
|
4
|
+
export function createRelationshipAnalyzer(deps) {
|
|
5
|
+
async function analyze(packageName) {
|
|
6
|
+
const allDeps = await deps.listDependencies();
|
|
7
|
+
// Get what this package depends on
|
|
8
|
+
const resolved = await deps.resolver.resolve(packageName);
|
|
9
|
+
const dependsOn = resolved.success && resolved.metadata
|
|
10
|
+
? Object.keys(resolved.metadata.dependencies || {})
|
|
11
|
+
: [];
|
|
12
|
+
// Find packages that depend on this one
|
|
13
|
+
const dependedBy = [];
|
|
14
|
+
for (const dep of allDeps) {
|
|
15
|
+
if (dep.dependencies && dep.dependencies[packageName]) {
|
|
16
|
+
dependedBy.push(dep.name);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Similar packages would require vector search - return empty for now
|
|
20
|
+
// Will be populated when vector search is enabled
|
|
21
|
+
const similarTo = [];
|
|
22
|
+
return { dependsOn, dependedBy, similarTo };
|
|
23
|
+
}
|
|
24
|
+
return { analyze };
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=relationships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/analysis/relationships.ts"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,MAAM,UAAU,0BAA0B,CAAC,IAA8B;IACvE,KAAK,UAAU,OAAO,CAAC,WAAmB;QACxC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAA;QAE7C,mCAAmC;QACnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QACzD,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,QAAQ;YACrD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,IAAI,EAAE,CAAC;YACnD,CAAC,CAAC,EAAE,CAAA;QAEN,wCAAwC;QACxC,MAAM,UAAU,GAAa,EAAE,CAAA;QAC/B,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;YAC1B,IAAI,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;gBACtD,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAC3B,CAAC;QACH,CAAC;QAED,sEAAsE;QACtE,kDAAkD;QAClD,MAAM,SAAS,GAA2C,EAAE,CAAA;QAE5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA;IAC7C,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const BUILD_INFO: {
|
|
2
|
+
readonly version: "1.0.0";
|
|
3
|
+
readonly name: "dep-context-mcp";
|
|
4
|
+
readonly description: "MCP server providing AI coding assistants with dependency context from node_modules";
|
|
5
|
+
readonly author: "Johnny Jarecsni";
|
|
6
|
+
readonly license: "MIT";
|
|
7
|
+
readonly buildTimestamp: "2026-01-21T23:38:18.430Z";
|
|
8
|
+
readonly gitCommit: "85687be";
|
|
9
|
+
readonly gitBranch: "main";
|
|
10
|
+
readonly nodeVersion: "v22.17.0";
|
|
11
|
+
readonly platform: "darwin";
|
|
12
|
+
readonly arch: "arm64";
|
|
13
|
+
};
|
|
14
|
+
export declare const COPYRIGHT_NOTICE: string;
|
|
15
|
+
//# sourceMappingURL=build-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info.d.ts","sourceRoot":"","sources":["../src/build-info.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;CAYb,CAAC;AAEX,eAAO,MAAM,gBAAgB,QAO5B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file is auto-generated during build
|
|
2
|
+
// Do not edit manually - regenerated on each build
|
|
3
|
+
export const BUILD_INFO = {
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"name": "dep-context-mcp",
|
|
6
|
+
"description": "MCP server providing AI coding assistants with dependency context from node_modules",
|
|
7
|
+
"author": "Johnny Jarecsni",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"buildTimestamp": "2026-01-21T23:38:18.430Z",
|
|
10
|
+
"gitCommit": "85687be",
|
|
11
|
+
"gitBranch": "main",
|
|
12
|
+
"nodeVersion": "v22.17.0",
|
|
13
|
+
"platform": "darwin",
|
|
14
|
+
"arch": "arm64"
|
|
15
|
+
};
|
|
16
|
+
export const COPYRIGHT_NOTICE = `dep-context-mcp v${BUILD_INFO.version}
|
|
17
|
+
Copyright (c) 2026 Johnny Jarecsni
|
|
18
|
+
Licensed under the MIT License.
|
|
19
|
+
|
|
20
|
+
Built on ${BUILD_INFO.buildTimestamp} from commit ${BUILD_INFO.gitCommit} (${BUILD_INFO.gitBranch})
|
|
21
|
+
|
|
22
|
+
For more information, visit: https://github.com/jarecsni/dep-context-mcp
|
|
23
|
+
`;
|
|
24
|
+
//# sourceMappingURL=build-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-info.js","sourceRoot":"","sources":["../src/build-info.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,mDAAmD;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,iBAAiB;IACzB,aAAa,EAAE,qFAAqF;IACpG,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,KAAK;IAChB,gBAAgB,EAAE,0BAA0B;IAC5C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,UAAU;IACzB,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,OAAO;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,UAAU,CAAC,OAAO;;;;WAI3D,UAAU,CAAC,cAAc,gBAAgB,UAAU,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS;;;CAGhG,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache manager - handles persistent storage of snapshots
|
|
3
|
+
*/
|
|
4
|
+
import type { Snapshot } from '../extraction/snapshot.js';
|
|
5
|
+
import { type CacheRegistry, type CacheEntry } from './registry.js';
|
|
6
|
+
export type { CacheRegistry, CacheEntry };
|
|
7
|
+
export interface CacheManager {
|
|
8
|
+
get(packageName: string, version: string): Promise<Snapshot | undefined>;
|
|
9
|
+
set(snapshot: Snapshot): Promise<void>;
|
|
10
|
+
invalidate(packageName: string): Promise<void>;
|
|
11
|
+
invalidateAll(): Promise<void>;
|
|
12
|
+
getRegistry(): Promise<CacheRegistry>;
|
|
13
|
+
has(packageName: string, version: string): Promise<boolean>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a CacheManager instance
|
|
17
|
+
*/
|
|
18
|
+
export declare function createCacheManager(cacheDir: string): CacheManager;
|
|
19
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/cache/manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAQL,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,eAAe,CAAA;AAEtB,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,CAAA;AAEzC,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAA;IACxE,GAAG,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,CAAA;IACrC,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC5D;AAiBD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAmIjE"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cache manager - handles persistent storage of snapshots
|
|
3
|
+
*/
|
|
4
|
+
import { readFile, writeFile, unlink, mkdir } from 'node:fs/promises';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { existsSync } from 'node:fs';
|
|
7
|
+
import { loadRegistry, saveRegistry, addEntry, removeEntry, getEntry, hasValidEntry, createEmptyRegistry } from './registry.js';
|
|
8
|
+
/**
|
|
9
|
+
* Converts a package name to a safe filename
|
|
10
|
+
* @scope/package -> @scope__package
|
|
11
|
+
*/
|
|
12
|
+
function toSafeFilename(packageName) {
|
|
13
|
+
return packageName.replace(/\//g, '__');
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gets the snapshot filename for a package
|
|
17
|
+
*/
|
|
18
|
+
function getSnapshotFilename(packageName, version) {
|
|
19
|
+
return `${toSafeFilename(packageName)}@${version}.md`;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Creates a CacheManager instance
|
|
23
|
+
*/
|
|
24
|
+
export function createCacheManager(cacheDir) {
|
|
25
|
+
const snapshotsDir = join(cacheDir, 'snapshots');
|
|
26
|
+
// In-memory registry cache
|
|
27
|
+
let registryCache;
|
|
28
|
+
async function ensureRegistry() {
|
|
29
|
+
if (!registryCache) {
|
|
30
|
+
registryCache = await loadRegistry(cacheDir);
|
|
31
|
+
}
|
|
32
|
+
return registryCache;
|
|
33
|
+
}
|
|
34
|
+
async function persistRegistry() {
|
|
35
|
+
if (registryCache) {
|
|
36
|
+
await saveRegistry(cacheDir, registryCache);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
async get(packageName, version) {
|
|
41
|
+
const registry = await ensureRegistry();
|
|
42
|
+
// Check if we have a valid entry for this version
|
|
43
|
+
if (!hasValidEntry(registry, packageName, version)) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
const entry = getEntry(registry, packageName);
|
|
47
|
+
const snapshotPath = join(cacheDir, entry.snapshotPath);
|
|
48
|
+
// Check if file exists
|
|
49
|
+
if (!existsSync(snapshotPath)) {
|
|
50
|
+
// File missing - remove from registry
|
|
51
|
+
registryCache = removeEntry(registry, packageName);
|
|
52
|
+
await persistRegistry();
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
const content = await readFile(snapshotPath, 'utf-8');
|
|
57
|
+
return {
|
|
58
|
+
packageName: entry.packageName,
|
|
59
|
+
version: entry.version,
|
|
60
|
+
generatedAt: entry.generatedAt,
|
|
61
|
+
content,
|
|
62
|
+
checksum: entry.checksum
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Read error - remove from registry
|
|
67
|
+
registryCache = removeEntry(registry, packageName);
|
|
68
|
+
await persistRegistry();
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
async set(snapshot) {
|
|
73
|
+
// Ensure snapshots directory exists
|
|
74
|
+
await mkdir(snapshotsDir, { recursive: true });
|
|
75
|
+
const filename = getSnapshotFilename(snapshot.packageName, snapshot.version);
|
|
76
|
+
const snapshotPath = join(snapshotsDir, filename);
|
|
77
|
+
const relativePath = `snapshots/${filename}`;
|
|
78
|
+
// Write snapshot file
|
|
79
|
+
await writeFile(snapshotPath, snapshot.content, 'utf-8');
|
|
80
|
+
// Update registry
|
|
81
|
+
const registry = await ensureRegistry();
|
|
82
|
+
registryCache = addEntry(registry, snapshot.packageName, snapshot.version, relativePath, snapshot.generatedAt, snapshot.checksum);
|
|
83
|
+
await persistRegistry();
|
|
84
|
+
},
|
|
85
|
+
async invalidate(packageName) {
|
|
86
|
+
const registry = await ensureRegistry();
|
|
87
|
+
const entry = getEntry(registry, packageName);
|
|
88
|
+
if (entry) {
|
|
89
|
+
// Delete snapshot file
|
|
90
|
+
const snapshotPath = join(cacheDir, entry.snapshotPath);
|
|
91
|
+
if (existsSync(snapshotPath)) {
|
|
92
|
+
try {
|
|
93
|
+
await unlink(snapshotPath);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
// Ignore deletion errors
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Remove from registry
|
|
100
|
+
registryCache = removeEntry(registry, packageName);
|
|
101
|
+
await persistRegistry();
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
async invalidateAll() {
|
|
105
|
+
const registry = await ensureRegistry();
|
|
106
|
+
// Delete all snapshot files
|
|
107
|
+
for (const entry of Object.values(registry.entries)) {
|
|
108
|
+
const snapshotPath = join(cacheDir, entry.snapshotPath);
|
|
109
|
+
if (existsSync(snapshotPath)) {
|
|
110
|
+
try {
|
|
111
|
+
await unlink(snapshotPath);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// Ignore deletion errors
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Reset registry
|
|
119
|
+
registryCache = createEmptyRegistry();
|
|
120
|
+
await persistRegistry();
|
|
121
|
+
},
|
|
122
|
+
async getRegistry() {
|
|
123
|
+
return ensureRegistry();
|
|
124
|
+
},
|
|
125
|
+
async has(packageName, version) {
|
|
126
|
+
const registry = await ensureRegistry();
|
|
127
|
+
return hasValidEntry(registry, packageName, version);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/cache/manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,aAAa,EACb,mBAAmB,EAGpB,MAAM,eAAe,CAAA;AAatB;;;GAGG;AACH,SAAS,cAAc,CAAC,WAAmB;IACzC,OAAO,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACzC,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,WAAmB,EAAE,OAAe;IAC/D,OAAO,GAAG,cAAc,CAAC,WAAW,CAAC,IAAI,OAAO,KAAK,CAAA;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;IAEhD,2BAA2B;IAC3B,IAAI,aAAwC,CAAA;IAE5C,KAAK,UAAU,cAAc;QAC3B,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,aAAa,GAAG,MAAM,YAAY,CAAC,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