@nekzus/mcp-server 1.23.0 → 1.24.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.
Files changed (56) hide show
  1. package/README.md +180 -275
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/index.d.ts +7 -55
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +242 -609
  6. package/dist/index.js.map +1 -1
  7. package/dist/src/cache.d.ts +22 -0
  8. package/dist/src/cache.d.ts.map +1 -0
  9. package/dist/src/cache.js +68 -0
  10. package/dist/src/cache.js.map +1 -0
  11. package/dist/src/config.d.ts +11 -0
  12. package/dist/src/config.d.ts.map +1 -0
  13. package/dist/src/config.js +45 -0
  14. package/dist/src/config.js.map +1 -0
  15. package/dist/src/handlers/index.d.ts +2 -0
  16. package/dist/src/handlers/index.d.ts.map +1 -0
  17. package/dist/src/handlers/index.js +2 -0
  18. package/dist/src/handlers/index.js.map +1 -0
  19. package/dist/src/http.d.ts +16 -0
  20. package/dist/src/http.d.ts.map +1 -0
  21. package/dist/src/http.js +109 -0
  22. package/dist/src/http.js.map +1 -0
  23. package/dist/src/icons.d.ts +21 -0
  24. package/dist/src/icons.d.ts.map +1 -0
  25. package/dist/src/icons.js +29 -0
  26. package/dist/src/icons.js.map +1 -0
  27. package/dist/src/prompts/index.d.ts +3 -0
  28. package/dist/src/prompts/index.d.ts.map +1 -0
  29. package/dist/src/prompts/index.js +22 -0
  30. package/dist/src/prompts/index.js.map +1 -0
  31. package/dist/src/resources/index.d.ts +3 -0
  32. package/dist/src/resources/index.d.ts.map +1 -0
  33. package/dist/src/resources/index.js +62 -0
  34. package/dist/src/resources/index.js.map +1 -0
  35. package/dist/src/schemas.d.ts +145 -0
  36. package/dist/src/schemas.d.ts.map +1 -0
  37. package/dist/src/schemas.js +201 -0
  38. package/dist/src/schemas.js.map +1 -0
  39. package/dist/src/server.d.ts +7 -0
  40. package/dist/src/server.d.ts.map +1 -0
  41. package/dist/src/server.js +23 -0
  42. package/dist/src/server.js.map +1 -0
  43. package/dist/src/tools/index.d.ts +4 -0
  44. package/dist/src/tools/index.d.ts.map +1 -0
  45. package/dist/src/tools/index.js +407 -0
  46. package/dist/src/tools/index.js.map +1 -0
  47. package/dist/src/utils/fetch-retry.d.ts +5 -0
  48. package/dist/src/utils/fetch-retry.d.ts.map +1 -0
  49. package/dist/src/utils/fetch-retry.js +69 -0
  50. package/dist/src/utils/fetch-retry.js.map +1 -0
  51. package/dist/src/utils/version-resolver.d.ts +14 -0
  52. package/dist/src/utils/version-resolver.d.ts.map +1 -0
  53. package/dist/src/utils/version-resolver.js +76 -0
  54. package/dist/src/utils/version-resolver.js.map +1 -0
  55. package/llms-full.txt +347 -478
  56. package/package.json +5 -3
package/README.md CHANGED
@@ -13,27 +13,23 @@
13
13
 
14
14
  </div>
15
15
 
16
- A powerful Model Context Protocol (MCP) server that revolutionizes NPM package analysis through AI. Built to integrate with Claude and Anthropic AI, it provides real-time intelligence on package security, dependencies, and performance. This MCP server delivers instant insights and smart analysis to safeguard and optimize your npm ecosystem, making package management decisions faster and safer for modern development workflows.
16
+ A powerful **Model Context Protocol (MCP v2)** server built on `@modelcontextprotocol/server` and `@modelcontextprotocol/core` (v2) that revolutionizes NPM package analysis through AI. Built to integrate seamlessly with Claude, Anthropic AI, and any MCP v2 compatible client, it provides real-time intelligence on package security, dependencies, and performance.
17
17
 
18
- ## Features
18
+ This server features **Modular ESM Architecture (`src/`)**, **Dual Output Protocol Returns (`content` + `structuredContent`)**, **Zod Output Schemas (`outputSchema`)**, **Embedded SVG Data URI Icons**, and **Real-Time Context Logging**.
19
19
 
20
- - **Version analysis and tracking**
21
- - **Dependency analysis and mapping**
22
- - **Advanced Security Scanning**: Recursive dependency checks, ecosystem awareness (e.g., React), and accurate version resolution.
20
+ ## Key Features
21
+
22
+ - **MCP v2 Native Protocol**: Fully upgraded to MCP v2 with `outputSchema` Zod validation, dual `structuredContent` returning, and diagnostic context logging (`ctx.mcpReq.log`).
23
+ - **Self-Contained Vector Icons**: Pre-configured SVG Data URIs (`data:image/svg+xml`) embedded across all 19 tools, resources, and prompts for enhanced client UI presentation.
24
+ - **Advanced Security Scanning**: Recursive dependency checks powered by Google's `deps.dev` and OSV.dev, ecosystem awareness, and accurate version resolution.
25
+ - **Smart Alternatives Filtering (`npmAlternatives`)**: Intelligent search based on functional domain keywords with strict ecosystem plugin/extension filtering (e.g., excludes `express-rate-limit` when searching for alternatives to `express`).
23
26
  - **Strict Input Validation & Batch Rate Control**: Input sanitization via Zod against Path Traversal, SSRF, and Command Injection. Search queries (`npmSearch`) are capped at 100 characters and filtered for control characters. Batch analysis tools enforce a strict cap of 25 packages per request to prevent registry enumeration DoS.
27
+ - **Dependency & Transitive Mapping**: Complete dependency tree analysis mapping through `deps.dev`.
28
+ - **Package Quality & Maintenance Metrics**: Real-time scoring using OpenSSF Scorecard, GitHub repository metrics, and npms.io.
29
+ - **Download Trends & Performance**: Real-time download statistics and bundle size analysis.
24
30
  - **Smart SemVer Shorthand & Range Resolution**: Transparently resolves major version shorthands, prefixes, and ranges (e.g., `express@2`, `express@v4`, `zod@3.x`, `react@^18`, `lodash@~4.17`) to the highest matching release without failing on missing exact version keys.
25
31
  - **Indirect Prompt Injection Defense (OWASP LLM01)**: All tools returning raw 3rd-party Markdown/text (`npmPackageReadme`, `npmChangelogAnalysis`) wrap untrusted content in `<untrusted_external_content>` tags, attach `_meta.untrustedExternalContent = true` flags, and enforce strict tool schema warnings.
26
- - **Package quality metrics**
27
- - **Download trends and statistics**
28
- - **TypeScript support verification**
29
- - **Package size analysis**
30
- - **Maintenance metrics**
31
- - **Real-time package comparisons**
32
- - **Standardized error handling and MCP response formats**
33
- - **Efficient caching for improved performance and API rate limit management**
34
- - **Rigorous schema validation and type safety using Zod**
35
-
36
- Note: The server provides AI-assisted analysis through MCP integration.
32
+ - **Efficient Caching System**: Automated cache invalidation on workspace lockfile changes (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) with manual bypass (`ignoreCache: true`).
37
33
 
38
34
  ## Security & OWASP LLM01 Compliance
39
35
 
@@ -45,16 +41,12 @@ This server implements **Defense-in-Depth** controls aligned with OWASP LLM01:20
45
41
  4. **Batch Size Capping & Query Sanitization**: All 18 multi-package analysis tools enforce a 25-package limit per request (`PackageListSchema`). Search queries are sanitized and capped at 100 characters (`SearchQuerySchema`).
46
42
  5. **Prototype Pollution Protection**: Enforces `Object.hasOwn()` checks on dictionary lookups (blocking reserved properties like `constructor` and `__proto__`).
47
43
 
48
- ## Caching and Invalidation
49
-
50
- To ensure data accuracy while maintaining performance, the server implements robust caching strategies:
51
- - **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace. This ensures you always get fresh data after installing or updating dependencies.
52
- - **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the registry.
44
+ To ensure data accuracy while maintaining high performance:
45
+ - **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace.
46
+ - **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the NPM registry.
53
47
 
54
48
  ### Example Usage (JSON-RPC)
55
49
 
56
- When calling a tool, simply include `ignoreCache: true` in the arguments:
57
-
58
50
  ```json
59
51
  {
60
52
  "name": "npmVersions",
@@ -65,38 +57,43 @@ When calling a tool, simply include `ignoreCache: true` in the arguments:
65
57
  }
66
58
  ```
67
59
 
68
- ## Installation
60
+ ## Installation & Transports
69
61
 
70
- ### Migration to HTTP Streamable
62
+ ### STDIO & Streamable HTTP Transports
71
63
 
72
- This MCP server now supports both STDIO and HTTP streamable transport. Your existing STDIO configuration will continue to work without changes.
64
+ This MCP server supports both **STDIO** (standard input/output) and **Streamable HTTP / SSE** transports out of the box.
73
65
 
74
- **New capabilities:**
75
- - HTTP streamable transport via Smithery.ai
76
- - Enhanced scalability and performance
77
- - Interactive testing playground
66
+ - **STDIO Mode**: Default transport for local execution via `npx` or Docker.
67
+ - **Streamable HTTP / SSE Mode**: Decoupled `createServer({ config })` factory exported from `dist/index.js` and `dist/src/server.js` for mounting on Express, Hono, Cloudflare Workers, or Smithery.ai.
78
68
 
79
- **Development commands:**
69
+ **Development Commands:**
80
70
  ```bash
81
- # Compile TypeScript
71
+ # Install dependencies
72
+ pnpm install
73
+
74
+ # Compile TypeScript to dist/
82
75
  pnpm run build
83
76
 
84
77
  # Start STDIO server
85
78
  pnpm run start
86
79
 
87
- # Development server with playground
80
+ # Development server with Smithery CLI playground
88
81
  pnpm run dev
89
- ```
90
82
 
91
- ### Install in VS Code
83
+ # Run unit and integration test suite (212+ tests)
84
+ pnpm test -- --run
85
+
86
+ # Run full E2E tarball verification
87
+ node __tests__/full-e2e-pack-validation.js
88
+ ```
92
89
 
93
- [<img alt="Install in VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20NPM%20Sentinel%20MCP&color=0098FF">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522npm-sentinel%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540nekzus%252Fmcp-server%2540latest%2522%255D%257D%257D)
94
- [<img alt="Install in VS Code Insiders (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20NPM%20Sentinel%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522npm-sentinel%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540nekzus%252Fmcp-server%2540latest%2522%255D%257D%257D)
90
+ ### Install in VS Code / Cursor
95
91
 
96
- Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info.
92
+ Add this to your VS Code / Cursor MCP configuration:
97
93
 
98
94
  ```json
99
95
  {
96
+ "inputs": [],
100
97
  "servers": {
101
98
  "npm-sentinel": {
102
99
  "type": "stdio",
@@ -107,306 +104,214 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
107
104
  }
108
105
  ```
109
106
 
110
- ### Smithery.ai Deployment (HTTP Streamable)
107
+ ### Install in Claude Desktop
111
108
 
112
- This MCP server now supports HTTP streamable transport through Smithery.ai for enhanced scalability and performance. You can deploy it directly on Smithery.ai:
113
- **Benefits of HTTP deployment:**
114
- - **Scalable**: Handles multiple concurrent connections
115
- - **Streamable**: Real-time streaming responses
116
- - **Managed**: Automatic deployment and monitoring
117
- - **Backward Compatible**: Still supports STDIO for local development
118
- - **Interactive Testing**: Built-in playground for testing tools
109
+ Add this to your `claude_desktop_config.json`:
119
110
 
120
- **Configuration for Smithery.ai:**
121
111
  ```json
122
112
  {
123
113
  "mcpServers": {
124
114
  "npm-sentinel": {
125
- "type": "http",
126
- "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
115
+ "command": "npx",
116
+ "args": ["-y", "@nekzus/mcp-server@latest"]
127
117
  }
128
118
  }
129
119
  }
130
120
  ```
131
121
 
132
- ### Configuration
133
-
134
- The server supports the following configuration options:
135
-
136
- | Environment Variable | CLI Argument | Default | Description |
137
- | -------------------- | ------------ | ------- | ----------- |
138
- | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
139
-
140
- #### HTTP Deployment (Smithery/Docker)
122
+ **Configuration File Locations:**
123
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
124
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
125
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
141
126
 
142
- When deploying via Smithery or Docker, you can configure these options in your configuration file:
127
+ ### Smithery.ai Deployment
143
128
 
144
129
  ```json
145
130
  {
146
131
  "mcpServers": {
147
132
  "npm-sentinel": {
148
133
  "type": "http",
149
- "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp",
150
- "config": {
151
- "NPM_REGISTRY_URL": "https://registry.npmjs.org"
152
- }
134
+ "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
153
135
  }
154
136
  }
155
137
  }
156
138
  ```
157
- ### Docker
158
139
 
159
- #### Build
140
+ ### Docker Usage
141
+
160
142
  ```bash
161
- # Build the Docker image
143
+ # Build Docker image
162
144
  docker build -t nekzus/npm-sentinel-mcp .
163
- ```
164
-
165
- #### Usage
166
145
 
167
- You can run the MCP server using Docker with directory mounting to `/projects`:
168
-
169
- ```json
170
- {
171
- "mcpServers": {
172
- "npm-sentinel-mcp": {
173
- "command": "docker",
174
- "args": [
175
- "run",
176
- "-i",
177
- "--rm",
178
- "-w", "/projects",
179
- "--mount", "type=bind,src=${PWD},dst=/projects",
180
- "nekzus/npm-sentinel-mcp",
181
- "node",
182
- "dist/index.js"
183
- ]
184
- }
185
- }
186
- }
146
+ # Run with local volume mount
147
+ docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
187
148
  ```
188
149
 
189
- For multiple directories:
150
+ ### Streamable HTTP (POST) & Cloudflare Workers Integration
190
151
 
191
- ```json
192
- {
193
- "mcpServers": {
194
- "npm-sentinel-mcp": {
195
- "command": "docker",
196
- "args": [
197
- "run",
198
- "-i",
199
- "--rm",
200
- "-w", "/projects",
201
- "--mount", "type=bind,src=/path/to/workspace,dst=/projects/workspace",
202
- "--mount", "type=bind,src=/path/to/other/dir,dst=/projects/other/dir,ro",
203
- "nekzus/npm-sentinel-mcp",
204
- "node",
205
- "dist/index.js"
206
- ]
207
- }
208
- }
209
- }
210
- ```
152
+ The package exports a stateless HTTP handler `handleStreamableHttpRequest` designed for serverless platforms (Cloudflare Workers, Vercel, Express, Fastify, Next.js API routes) requiring Streamable HTTP POST transport under MCP v2:
211
153
 
212
- Note: All mounted directories must be under `/projects` for proper access.
154
+ ```typescript
155
+ import { handleStreamableHttpRequest } from '@nekzus/mcp-server/http';
213
156
 
214
- ### Usage with Claude Desktop
157
+ export default {
158
+ async fetch(request: Request): Promise<Response> {
159
+ if (request.method !== 'POST') {
160
+ return new Response('NPM Sentinel MCP v2 Streamable HTTP Server', { status: 200 });
161
+ }
215
162
 
216
- Add this to your `claude_desktop_config.json`:
163
+ try {
164
+ const payload = await request.json();
165
+ const mcpResponse = await handleStreamableHttpRequest(payload);
217
166
 
218
- ```json
219
- {
220
- "mcpServers": {
221
- "npmsentinel": {
222
- "command": "npx",
223
- "args": ["-y", "@nekzus/mcp-server@latest"]
167
+ return new Response(mcpResponse.body, {
168
+ status: mcpResponse.status,
169
+ headers: mcpResponse.headers,
170
+ });
171
+ } catch {
172
+ return new Response(JSON.stringify({ error: 'Invalid JSON-RPC payload' }), { status: 400 });
224
173
  }
225
- }
226
- }
174
+ },
175
+ };
227
176
  ```
228
177
 
229
- Configuration file locations:
230
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
231
- - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
232
- - Linux: (Claude for Desktop does not officially support Linux at this time)
178
+ ## Configuration
233
179
 
234
- ### NPX
180
+ The server supports the following configuration parameters:
235
181
 
236
- <!-- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.png)](cursor://anysphere.cursor-deeplink/mcp/install?name=npm-sentinel-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuZWt6dXMvbWNwLXNlcnZlckBsYXRlc3QiXX0=) -->
182
+ | Environment Variable | Config Object Property | Default | Description |
183
+ | -------------------- | ---------------------- | ------- | ----------- |
184
+ | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
237
185
 
238
- ```json
239
- {
240
- "mcpServers": {
241
- "npm-sentinel-mcp": {
242
- "command": "npx",
243
- "args": [
244
- "-y",
245
- "@nekzus/mcp-server@latest"
246
- ]
247
- }
248
- }
249
- }
250
- ```
186
+ ---
251
187
 
252
- ## API
188
+ ## MCP Server Capabilities (v2 API)
189
+
190
+ All tool responses conform to the MCP v2 dual output format, providing both human-readable text in `content` and parsed JSON objects in `structuredContent`:
253
191
 
254
- The server exposes its tools via the Model Context Protocol. All tools adhere to a standardized response format:
255
192
  ```json
256
193
  {
257
194
  "content": [
258
195
  {
259
196
  "type": "text",
260
- "text": "string",
261
- "isError": boolean // Optional
197
+ "text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
262
198
  }
263
- // ... more content items if necessary
264
- ]
199
+ ],
200
+ "structuredContent": {
201
+ "queryPackages": ["express"],
202
+ "results": [...]
203
+ }
265
204
  }
266
205
  ```
267
206
 
268
- ### Resources
269
-
270
- - `npm://registry`: NPM Registry interface
271
- - `npm://security`: Security analysis interface
272
- - `npm://metrics`: Package metrics interface
273
-
274
207
  ### Server Resources
275
208
 
276
- The server also provides the following informational resources accessible via MCP `GetResource` requests:
209
+ Accessible via MCP `readResource` requests:
277
210
 
278
- - `doc://server/readme`:
279
- - **Description**: Retrieves the main `README.md` file content for this NPM Sentinel MCP server.
211
+ - `doc://server/readme`
212
+ - **Description**: Main documentation file for NPM Sentinel MCP server.
280
213
  - **MIME Type**: `text/markdown`
281
- - `doc://mcp/specification`:
282
- - **Description**: Retrieves the `llms-full.txt` content, providing the comprehensive Model Context Protocol specification.
214
+ - **Icon**: Embedded Document SVG Data URI.
215
+ - `doc://mcp/specification`
216
+ - **Description**: Complete Model Context Protocol specification file (`llms-full.txt`).
283
217
  - **MIME Type**: `text/plain`
218
+ - **Icon**: Embedded Document SVG Data URI.
284
219
 
285
- ### Tools
286
-
287
- #### npmVersions
288
- - Get all versions of a package
289
- - Input: `packages` (string[])
290
- - Returns: Version history with release dates
291
-
292
- #### npmLatest
293
- - Get latest version information
294
- - Input: `packages` (string[])
295
- - Returns: Latest version details and changelog
296
-
297
- #### npmDeps
298
- - Analyze package dependencies
299
- - Input: `packages` (string[])
300
- - Returns: Complete dependency tree analysis including direct dependencies and full transitive graph (count and explicit flatten list) mapping through deps.dev.
301
-
302
- #### npmTypes
303
- - Check TypeScript support
304
- - Input: `packages` (string[])
305
- - Returns: TypeScript compatibility status
306
-
307
- #### npmSize
308
- - Analyze package size
309
- - Input: `packages` (string[])
310
- - Returns: Bundle size and import cost analysis
311
-
312
- #### npmVulnerabilities
313
- - Scan for security vulnerabilities
314
- - Features:
315
- - **Instant Transitive Scanning**: Powered by Google's `deps.dev` API to resolve massive dependency trees (e.g. Next.js, Astro) in a single request, bypassing deep recursion limitations.
316
- - **Ecosystem Awareness**: Automatically scans related packages efficiently.
317
- - **Rich Reports**: Includes CVE IDs and full summaries from OSV.dev.
318
- - Input: `packages` (string[])
319
- - Returns: Detailed security advisories, CVEs, and severity ratings
320
-
321
- #### npmTrends
322
- - Get download trends
323
- - Input:
324
- - `packages` (string[])
325
- - `period` ("last-week" | "last-month" | "last-year")
326
- - Returns: Download statistics over time
327
-
328
- #### npmCompare
329
- - Compare multiple packages
330
- - Input: `packages` (string[])
331
- - Returns: Detailed comparison metrics
332
-
333
- #### npmMaintainers
334
- - Get package maintainers
335
- - Input: `packages` (string[])
336
- - Returns: Maintainer information and activity
337
-
338
- #### npmScore
339
- - Get package quality score
340
- - Input: `packages` (string[])
341
- - Returns: Comprehensive quality metrics, scoring details, and OpenSSF Scorecard.
342
-
343
- #### npmPackageReadme
344
- - Get package README
345
- - Input: `packages` (string[])
346
- - Returns: Formatted README content
347
-
348
- #### npmSearch
349
- - Search for packages
350
- - Input:
351
- - `query` (string)
352
- - `limit` (number, optional)
353
- - Returns: Matching packages with metadata
354
-
355
- #### npmLicenseCompatibility
356
- - Check license compatibility
357
- - Input: `packages` (string[])
358
- - Returns: License analysis and compatibility info
359
-
360
- #### npmRepoStats
361
- - Get repository statistics
362
- - Input: `packages` (string[])
363
- - Returns: GitHub/repository metrics (stars, forks, open issues) along with OpenSSF Scorecard checks and scores via deps.dev.
364
-
365
- #### npmDeprecated
366
- - Check for deprecation
367
- - Input: `packages` (string[])
368
- - Returns: Deprecation status and alternatives
369
-
370
- #### npmChangelogAnalysis
371
- - Analyze package changelogs
372
- - Input: `packages` (string[])
373
- - Returns: Changelog summaries and impact analysis
374
-
375
- #### npmAlternatives
376
- - Find package alternatives
377
- - Input: `packages` (string[])
378
- - Returns: Similar packages with comparisons
379
-
380
- #### npmQuality
381
- - Assess package quality
382
- - Input: `packages` (string[])
383
- - Returns: Quality metrics and scores
384
-
385
- #### npmMaintenance
386
- - Check maintenance status
387
- - Input: `packages` (string[])
388
- - Returns: Maintenance activity metrics
389
-
390
- ## Build
220
+ ### Server Prompts
391
221
 
392
- ```bash
393
- # Install dependencies
394
- pnpm install
222
+ Accessible via MCP `getPrompt` requests:
395
223
 
396
- # Build TypeScript
397
- pnpm run build
224
+ - `analyze-package`
225
+ - **Description**: Generates a comprehensive prompt template for AI analysis of an NPM package including security, performance, dependencies, and health metrics.
226
+ - **Arguments**: `package` (string, required)
227
+ - **Icon**: Embedded Security SVG Data URI.
398
228
 
399
- # Start the STDIO server
400
- pnpm run start
229
+ ---
401
230
 
402
- # Development server
403
- pnpm run dev
404
- ```
231
+ ### Tools Catalog (19 Tools)
405
232
 
406
- ## License
233
+ All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `readOnlyHint`), and `icons`:
234
+
235
+ #### 1. `npmLatest`
236
+ - Get latest version information, release dates, SRI integrity hashes, and dist-tags.
237
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
238
+
239
+ #### 2. `npmVersions`
240
+ - Get full version history with release dates and deprecation statuses.
241
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
242
+
243
+ #### 3. `npmDeps`
244
+ - Complete dependency tree analysis including direct dependencies and full transitive graph mapping via `deps.dev`.
245
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
246
+
247
+ #### 4. `npmTypes`
248
+ - Verify TypeScript support (native `index.d.ts` declaration files vs `@types/*` DefinitelyTyped packages).
249
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
250
+
251
+ #### 5. `npmSize`
252
+ - Package bundle size, minified size, and gzip impact analysis.
253
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
254
+
255
+ #### 6. `npmVulnerabilities`
256
+ - Instant transitive vulnerability scanning powered by Google's `deps.dev` and OSV.dev advisories.
257
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
258
+
259
+ #### 7. `npmTrends`
260
+ - Historical download statistics over customizable time ranges (`last-week`, `last-month`, `last-year`).
261
+ - **Input**: `packages` (`string[]`), `period` (`"last-week"` \| `"last-month"` \| `"last-year"`), `ignoreCache` (`boolean`, optional)
262
+
263
+ #### 8. `npmCompare`
264
+ - Side-by-side metric comparison across multiple packages.
265
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
266
+
267
+ #### 9. `npmMaintainers`
268
+ - List of package maintainers, public emails, and publishing activity.
269
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
270
+
271
+ #### 10. `npmScore`
272
+ - Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
273
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
407
274
 
408
- This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
275
+ #### 11. `npmPackageReadme`
276
+ - Retrieve full formatted raw README markdown content from NPM registry / CDN.
277
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
278
+
279
+ #### 12. `npmSearch`
280
+ - Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
281
+ - **Input**: `query` (`string`), `limit` (`number`, optional)
282
+
283
+ #### 13. `npmLicenseCompatibility`
284
+ - Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
285
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
286
+
287
+ #### 14. `npmRepoStats`
288
+ - Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
289
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
290
+
291
+ #### 15. `npmDeprecated`
292
+ - Detect deprecation status on package and recursive sub-dependencies.
293
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
294
+
295
+ #### 16. `npmChangelogAnalysis`
296
+ - Extract release notes and GitHub release history.
297
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
298
+
299
+ #### 17. `npmAlternatives`
300
+ - Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes `express-rate-limit` for `express`).
301
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
302
+
303
+ #### 18. `npmQuality`
304
+ - Package code quality score (0–1).
305
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
306
+
307
+ #### 19. `npmMaintenance`
308
+ - Package maintenance activity score (0–1).
309
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
409
310
 
410
311
  ---
411
312
 
313
+ ## License
314
+
315
+ This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
316
+
412
317
  MIT © [nekzus](https://github.com/nekzus)