@nekzus/mcp-server 1.19.0-alpha.2 → 1.19.0-alpha.20

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 (57) hide show
  1. package/README.md +193 -278
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/index.d.ts +32 -40
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +384 -546
  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 +143 -0
  36. package/dist/src/schemas.d.ts.map +1 -0
  37. package/dist/src/schemas.js +189 -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 +21 -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 +411 -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 +340 -414
  56. package/package.json +15 -16
  57. package/smithery.yaml +10 -2
package/README.md CHANGED
@@ -13,35 +13,37 @@
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.
23
- - **Strict Input Validation**: Protection against Path Traversal, SSRF, and Command Injection via rigorous input sanitization.
24
- - **Package quality metrics**
25
- - **Download trends and statistics**
26
- - **TypeScript support verification**
27
- - **Package size analysis**
28
- - **Maintenance metrics**
29
- - **Real-time package comparisons**
30
- - **Standardized error handling and MCP response formats**
31
- - **Efficient caching for improved performance and API rate limit management**
32
- - **Rigorous schema validation and type safety using Zod**
20
+ ## Key Features
33
21
 
34
- Note: The server provides AI-assisted analysis through MCP integration.
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`).
26
+ - **Strict Input Validation**: Protection against Path Traversal, SSRF, and Command Injection via rigorous input sanitization (`isValidNpmPackageName`).
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.
30
+ - **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.
31
+ - **Efficient Caching System**: Automated cache invalidation on workspace lockfile changes (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) with manual bypass (`ignoreCache: true`).
35
32
 
36
- ## Caching and Invalidation
33
+ ## Security & OWASP LLM01 Compliance
37
34
 
38
- To ensure data accuracy while maintaining performance, the server implements robust caching strategies:
39
- - **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.
40
- - **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the registry.
35
+ This server implements **Defense-in-Depth** controls aligned with OWASP LLM01:2025 (Indirect Prompt Injection):
41
36
 
42
- ### Example Usage (JSON-RPC)
37
+ 1. **XML Data Demarcation**: Content from external packages (`README.md`, GitHub changelogs, release notes) is wrapped inside `<untrusted_external_content source="..." package="..." type="...">` tags so consuming LLM models distinguish untrusted data from instructions.
38
+ 2. **Metadata Signaling (`_meta`)**: Responses include `_meta.untrustedExternalContent = true` and `_meta.sources` arrays for programmatic client-side detection and policy enforcement.
39
+ 3. **Tool & Prompt Safety Warnings**: Tool descriptions and prompt definitions explicitly instruct LLM agents to treat documentation as passive data and ignore embedded execution commands.
40
+ 4. **Prototype Pollution Protection**: Enforces `Object.hasOwn()` checks on dictionary lookups (blocking reserved properties like `constructor` and `__proto__`).
41
+
42
+ To ensure data accuracy while maintaining high performance:
43
+ - **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace.
44
+ - **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the NPM registry.
43
45
 
44
- When calling a tool, simply include `ignoreCache: true` in the arguments:
46
+ ### Example Usage (JSON-RPC)
45
47
 
46
48
  ```json
47
49
  {
@@ -53,38 +55,43 @@ When calling a tool, simply include `ignoreCache: true` in the arguments:
53
55
  }
54
56
  ```
55
57
 
56
- ## Installation
58
+ ## Installation & Transports
57
59
 
58
- ### Migration to HTTP Streamable
60
+ ### STDIO & Streamable HTTP Transports
59
61
 
60
- This MCP server now supports both STDIO and HTTP streamable transport. Your existing STDIO configuration will continue to work without changes.
62
+ This MCP server supports both **STDIO** (standard input/output) and **Streamable HTTP / SSE** transports out of the box.
61
63
 
62
- **New capabilities:**
63
- - HTTP streamable transport via Smithery.ai
64
- - Enhanced scalability and performance
65
- - Interactive testing playground
64
+ - **STDIO Mode**: Default transport for local execution via `npx` or Docker.
65
+ - **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.
66
66
 
67
- **Development commands:**
67
+ **Development Commands:**
68
68
  ```bash
69
- # Development server with playground
70
- npm run dev
69
+ # Install dependencies
70
+ pnpm install
71
71
 
72
- # Build for HTTP
73
- npm run build:http
72
+ # Compile TypeScript to dist/
73
+ pnpm run build
74
74
 
75
- # Start HTTP server
76
- npm run start:http
77
- ```
75
+ # Start STDIO server
76
+ pnpm run start
78
77
 
79
- ### Install in VS Code
78
+ # Development server with Smithery CLI playground
79
+ pnpm run dev
80
80
 
81
- [<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)
82
- [<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)
81
+ # Run unit and integration test suite (212+ tests)
82
+ pnpm test -- --run
83
83
 
84
- 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.
84
+ # Run full E2E tarball verification
85
+ node __tests__/full-e2e-pack-validation.js
86
+ ```
87
+
88
+ ### Install in VS Code / Cursor
89
+
90
+ Add this to your VS Code / Cursor MCP configuration:
85
91
 
86
92
  ```json
87
93
  {
94
+ "inputs": [],
88
95
  "servers": {
89
96
  "npm-sentinel": {
90
97
  "type": "stdio",
@@ -95,306 +102,214 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
95
102
  }
96
103
  ```
97
104
 
98
- ### Smithery.ai Deployment (HTTP Streamable)
105
+ ### Install in Claude Desktop
99
106
 
100
- This MCP server now supports HTTP streamable transport through Smithery.ai for enhanced scalability and performance. You can deploy it directly on Smithery.ai:
101
- **Benefits of HTTP deployment:**
102
- - **Scalable**: Handles multiple concurrent connections
103
- - **Streamable**: Real-time streaming responses
104
- - **Managed**: Automatic deployment and monitoring
105
- - **Backward Compatible**: Still supports STDIO for local development
106
- - **Interactive Testing**: Built-in playground for testing tools
107
+ Add this to your `claude_desktop_config.json`:
107
108
 
108
- **Configuration for Smithery.ai:**
109
109
  ```json
110
110
  {
111
111
  "mcpServers": {
112
112
  "npm-sentinel": {
113
- "type": "http",
114
- "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
113
+ "command": "npx",
114
+ "args": ["-y", "@nekzus/mcp-server@latest"]
115
115
  }
116
116
  }
117
117
  }
118
118
  ```
119
119
 
120
- ### Configuration
121
-
122
- The server supports the following configuration options:
123
-
124
- | Environment Variable | CLI Argument | Default | Description |
125
- | -------------------- | ------------ | ------- | ----------- |
126
- | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
127
-
128
- #### HTTP Deployment (Smithery/Docker)
120
+ **Configuration File Locations:**
121
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
122
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
123
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
129
124
 
130
- When deploying via Smithery or Docker, you can configure these options in your configuration file:
125
+ ### Smithery.ai Deployment
131
126
 
132
127
  ```json
133
128
  {
134
129
  "mcpServers": {
135
130
  "npm-sentinel": {
136
131
  "type": "http",
137
- "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp",
138
- "config": {
139
- "NPM_REGISTRY_URL": "https://registry.npmjs.org"
140
- }
132
+ "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
141
133
  }
142
134
  }
143
135
  }
144
136
  ```
145
- ### Docker
146
137
 
147
- #### Build
138
+ ### Docker Usage
139
+
148
140
  ```bash
149
- # Build the Docker image
141
+ # Build Docker image
150
142
  docker build -t nekzus/npm-sentinel-mcp .
151
- ```
152
143
 
153
- #### Usage
154
-
155
- You can run the MCP server using Docker with directory mounting to `/projects`:
156
-
157
- ```json
158
- {
159
- "mcpServers": {
160
- "npm-sentinel-mcp": {
161
- "command": "docker",
162
- "args": [
163
- "run",
164
- "-i",
165
- "--rm",
166
- "-w", "/projects",
167
- "--mount", "type=bind,src=${PWD},dst=/projects",
168
- "nekzus/npm-sentinel-mcp",
169
- "node",
170
- "dist/index.js"
171
- ]
172
- }
173
- }
174
- }
144
+ # Run with local volume mount
145
+ docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
175
146
  ```
176
147
 
177
- For multiple directories:
148
+ ### Streamable HTTP (POST) & Cloudflare Workers Integration
178
149
 
179
- ```json
180
- {
181
- "mcpServers": {
182
- "npm-sentinel-mcp": {
183
- "command": "docker",
184
- "args": [
185
- "run",
186
- "-i",
187
- "--rm",
188
- "-w", "/projects",
189
- "--mount", "type=bind,src=/path/to/workspace,dst=/projects/workspace",
190
- "--mount", "type=bind,src=/path/to/other/dir,dst=/projects/other/dir,ro",
191
- "nekzus/npm-sentinel-mcp",
192
- "node",
193
- "dist/index.js"
194
- ]
195
- }
196
- }
197
- }
198
- ```
150
+ 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:
199
151
 
200
- Note: All mounted directories must be under `/projects` for proper access.
152
+ ```typescript
153
+ import { handleStreamableHttpRequest } from '@nekzus/mcp-server/http';
201
154
 
202
- ### Usage with Claude Desktop
155
+ export default {
156
+ async fetch(request: Request): Promise<Response> {
157
+ if (request.method !== 'POST') {
158
+ return new Response('NPM Sentinel MCP v2 Streamable HTTP Server', { status: 200 });
159
+ }
203
160
 
204
- Add this to your `claude_desktop_config.json`:
161
+ try {
162
+ const payload = await request.json();
163
+ const mcpResponse = await handleStreamableHttpRequest(payload);
205
164
 
206
- ```json
207
- {
208
- "mcpServers": {
209
- "npmsentinel": {
210
- "command": "npx",
211
- "args": ["-y", "@nekzus/mcp-server@latest"]
165
+ return new Response(mcpResponse.body, {
166
+ status: mcpResponse.status,
167
+ headers: mcpResponse.headers,
168
+ });
169
+ } catch {
170
+ return new Response(JSON.stringify({ error: 'Invalid JSON-RPC payload' }), { status: 400 });
212
171
  }
213
- }
214
- }
172
+ },
173
+ };
215
174
  ```
216
175
 
217
- Configuration file locations:
218
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
219
- - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
220
- - Linux: (Claude for Desktop does not officially support Linux at this time)
176
+ ## Configuration
221
177
 
222
- ### NPX
178
+ The server supports the following configuration parameters:
223
179
 
224
- <!-- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.png)](cursor://anysphere.cursor-deeplink/mcp/install?name=npm-sentinel-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuZWt6dXMvbWNwLXNlcnZlckBsYXRlc3QiXX0=) -->
180
+ | Environment Variable | Config Object Property | Default | Description |
181
+ | -------------------- | ---------------------- | ------- | ----------- |
182
+ | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
225
183
 
226
- ```json
227
- {
228
- "mcpServers": {
229
- "npm-sentinel-mcp": {
230
- "command": "npx",
231
- "args": [
232
- "-y",
233
- "@nekzus/mcp-server@latest"
234
- ]
235
- }
236
- }
237
- }
238
- ```
184
+ ---
239
185
 
240
- ## API
186
+ ## MCP Server Capabilities (v2 API)
187
+
188
+ All tool responses conform to the MCP v2 dual output format, providing both human-readable text in `content` and parsed JSON objects in `structuredContent`:
241
189
 
242
- The server exposes its tools via the Model Context Protocol. All tools adhere to a standardized response format:
243
190
  ```json
244
191
  {
245
192
  "content": [
246
193
  {
247
194
  "type": "text",
248
- "text": "string",
249
- "isError": boolean // Optional
195
+ "text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
250
196
  }
251
- // ... more content items if necessary
252
- ]
197
+ ],
198
+ "structuredContent": {
199
+ "queryPackages": ["express"],
200
+ "results": [...]
201
+ }
253
202
  }
254
203
  ```
255
204
 
256
- ### Resources
257
-
258
- - `npm://registry`: NPM Registry interface
259
- - `npm://security`: Security analysis interface
260
- - `npm://metrics`: Package metrics interface
261
-
262
205
  ### Server Resources
263
206
 
264
- The server also provides the following informational resources accessible via MCP `GetResource` requests:
207
+ Accessible via MCP `readResource` requests:
265
208
 
266
- - `doc://server/readme`:
267
- - **Description**: Retrieves the main `README.md` file content for this NPM Sentinel MCP server.
209
+ - `doc://server/readme`
210
+ - **Description**: Main documentation file for NPM Sentinel MCP server.
268
211
  - **MIME Type**: `text/markdown`
269
- - `doc://mcp/specification`:
270
- - **Description**: Retrieves the `llms-full.txt` content, providing the comprehensive Model Context Protocol specification.
212
+ - **Icon**: Embedded Document SVG Data URI.
213
+ - `doc://mcp/specification`
214
+ - **Description**: Complete Model Context Protocol specification file (`llms-full.txt`).
271
215
  - **MIME Type**: `text/plain`
216
+ - **Icon**: Embedded Document SVG Data URI.
272
217
 
273
- ### Tools
274
-
275
- #### npmVersions
276
- - Get all versions of a package
277
- - Input: `packages` (string[])
278
- - Returns: Version history with release dates
279
-
280
- #### npmLatest
281
- - Get latest version information
282
- - Input: `packages` (string[])
283
- - Returns: Latest version details and changelog
284
-
285
- #### npmDeps
286
- - Analyze package dependencies
287
- - Input: `packages` (string[])
288
- - Returns: Complete dependency tree analysis including direct dependencies and full transitive graph (count and explicit flatten list) mapping through deps.dev.
289
-
290
- #### npmTypes
291
- - Check TypeScript support
292
- - Input: `packages` (string[])
293
- - Returns: TypeScript compatibility status
294
-
295
- #### npmSize
296
- - Analyze package size
297
- - Input: `packages` (string[])
298
- - Returns: Bundle size and import cost analysis
299
-
300
- #### npmVulnerabilities
301
- - Scan for security vulnerabilities
302
- - Features:
303
- - **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.
304
- - **Ecosystem Awareness**: Automatically scans related packages efficiently.
305
- - **Rich Reports**: Includes CVE IDs and full summaries from OSV.dev.
306
- - Input: `packages` (string[])
307
- - Returns: Detailed security advisories, CVEs, and severity ratings
308
-
309
- #### npmTrends
310
- - Get download trends
311
- - Input:
312
- - `packages` (string[])
313
- - `period` ("last-week" | "last-month" | "last-year")
314
- - Returns: Download statistics over time
315
-
316
- #### npmCompare
317
- - Compare multiple packages
318
- - Input: `packages` (string[])
319
- - Returns: Detailed comparison metrics
320
-
321
- #### npmMaintainers
322
- - Get package maintainers
323
- - Input: `packages` (string[])
324
- - Returns: Maintainer information and activity
325
-
326
- #### npmScore
327
- - Get package quality score
328
- - Input: `packages` (string[])
329
- - Returns: Comprehensive quality metrics
330
-
331
- #### npmPackageReadme
332
- - Get package README
333
- - Input: `packages` (string[])
334
- - Returns: Formatted README content
335
-
336
- #### npmSearch
337
- - Search for packages
338
- - Input:
339
- - `query` (string)
340
- - `limit` (number, optional)
341
- - Returns: Matching packages with metadata
342
-
343
- #### npmLicenseCompatibility
344
- - Check license compatibility
345
- - Input: `packages` (string[])
346
- - Returns: License analysis and compatibility info
347
-
348
- #### npmRepoStats
349
- - Get repository statistics
350
- - Input: `packages` (string[])
351
- - Returns: GitHub/repository metrics
352
-
353
- #### npmDeprecated
354
- - Check for deprecation
355
- - Input: `packages` (string[])
356
- - Returns: Deprecation status and alternatives
357
-
358
- #### npmChangelogAnalysis
359
- - Analyze package changelogs
360
- - Input: `packages` (string[])
361
- - Returns: Changelog summaries and impact analysis
362
-
363
- #### npmAlternatives
364
- - Find package alternatives
365
- - Input: `packages` (string[])
366
- - Returns: Similar packages with comparisons
367
-
368
- #### npmQuality
369
- - Assess package quality
370
- - Input: `packages` (string[])
371
- - Returns: Quality metrics and scores
372
-
373
- #### npmMaintenance
374
- - Check maintenance status
375
- - Input: `packages` (string[])
376
- - Returns: Maintenance activity metrics
377
-
378
- ## Build
218
+ ### Server Prompts
379
219
 
380
- ```bash
381
- # Install dependencies
382
- npm install
220
+ Accessible via MCP `getPrompt` requests:
383
221
 
384
- # Build for STDIO (traditional)
385
- npm run build:stdio
222
+ - `analyze-package`
223
+ - **Description**: Generates a comprehensive prompt template for AI analysis of an NPM package including security, performance, dependencies, and health metrics.
224
+ - **Arguments**: `package` (string, required)
225
+ - **Icon**: Embedded Security SVG Data URI.
386
226
 
387
- # Build for HTTP (Smithery)
388
- npm run build:http
227
+ ---
389
228
 
390
- # Development server
391
- npm run dev
392
- ```
229
+ ### Tools Catalog (19 Tools)
393
230
 
394
- ## License
231
+ All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `readOnlyHint`), and `icons`:
232
+
233
+ #### 1. `npmLatest`
234
+ - Get latest version information, release dates, SRI integrity hashes, and dist-tags.
235
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
236
+
237
+ #### 2. `npmVersions`
238
+ - Get full version history with release dates and deprecation statuses.
239
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
240
+
241
+ #### 3. `npmDeps`
242
+ - Complete dependency tree analysis including direct dependencies and full transitive graph mapping via `deps.dev`.
243
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
244
+
245
+ #### 4. `npmTypes`
246
+ - Verify TypeScript support (native `index.d.ts` declaration files vs `@types/*` DefinitelyTyped packages).
247
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
248
+
249
+ #### 5. `npmSize`
250
+ - Package bundle size, minified size, and gzip impact analysis.
251
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
252
+
253
+ #### 6. `npmVulnerabilities`
254
+ - Instant transitive vulnerability scanning powered by Google's `deps.dev` and OSV.dev advisories.
255
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
256
+
257
+ #### 7. `npmTrends`
258
+ - Historical download statistics over customizable time ranges (`last-week`, `last-month`, `last-year`).
259
+ - **Input**: `packages` (`string[]`), `period` (`"last-week"` \| `"last-month"` \| `"last-year"`), `ignoreCache` (`boolean`, optional)
260
+
261
+ #### 8. `npmCompare`
262
+ - Side-by-side metric comparison across multiple packages.
263
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
264
+
265
+ #### 9. `npmMaintainers`
266
+ - List of package maintainers, public emails, and publishing activity.
267
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
268
+
269
+ #### 10. `npmScore`
270
+ - Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
271
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
395
272
 
396
- 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.
273
+ #### 11. `npmPackageReadme`
274
+ - Retrieve full formatted raw README markdown content from NPM registry / CDN.
275
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
276
+
277
+ #### 12. `npmSearch`
278
+ - Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
279
+ - **Input**: `query` (`string`), `limit` (`number`, optional)
280
+
281
+ #### 13. `npmLicenseCompatibility`
282
+ - Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
283
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
284
+
285
+ #### 14. `npmRepoStats`
286
+ - Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
287
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
288
+
289
+ #### 15. `npmDeprecated`
290
+ - Detect deprecation status on package and recursive sub-dependencies.
291
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
292
+
293
+ #### 16. `npmChangelogAnalysis`
294
+ - Extract release notes and GitHub release history.
295
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
296
+
297
+ #### 17. `npmAlternatives`
298
+ - Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes `express-rate-limit` for `express`).
299
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
300
+
301
+ #### 18. `npmQuality`
302
+ - Package code quality score (0–1).
303
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
304
+
305
+ #### 19. `npmMaintenance`
306
+ - Package maintenance activity score (0–1).
307
+ - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
397
308
 
398
309
  ---
399
310
 
311
+ ## License
312
+
313
+ This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
314
+
400
315
  MIT © [nekzus](https://github.com/nekzus)