@nekzus/mcp-server 1.26.0 → 1.26.1-alpha.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/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- [![smithery badge](https://smithery.ai/badge/@Nekzus/npm-sentinel-mcp)](https://smithery.ai/server/@Nekzus/npm-sentinel-mcp)
6
5
  [![Github Workflow](https://github.com/nekzus/NPM-Sentinel-MCP/actions/workflows/publish.yml/badge.svg?event=push)](https://github.com/Nekzus/npm-sentinel-mcp/actions/workflows/publish.yml)
7
6
  [![npm version](https://img.shields.io/npm/v/@nekzus/mcp-server.svg)](https://www.npmjs.com/package/@nekzus/mcp-server)
8
7
  [![npm-month](https://img.shields.io/npm/dm/@nekzus/mcp-server.svg)](https://www.npmjs.com/package/@nekzus/mcp-server)
@@ -42,6 +41,7 @@ This server implements **Defense-in-Depth** controls aligned with OWASP LLM01:20
42
41
  5. **Prototype Pollution Protection**: Enforces `Object.hasOwn()` checks on dictionary lookups (blocking reserved properties like `constructor` and `__proto__`).
43
42
 
44
43
  To ensure data accuracy while maintaining high performance:
44
+
45
45
  - **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace.
46
46
  - **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the NPM registry.
47
47
 
@@ -64,22 +64,24 @@ To ensure data accuracy while maintaining high performance:
64
64
  This MCP server features native **Dual-Era Protocol Compatibility**, seamlessly serving both modern MCP v2 clients (`2026-07-28`) and legacy MCP v1 clients (`2025-11-25`) out of the box across both **STDIO** and **Streamable HTTP** transports:
65
65
 
66
66
  - **STDIO Mode (`npx @nekzus/mcp-server`)**: Powered by `serveStdio({ legacy: "serve" })`. Handles modern `server/discover` probes sessionlessly and conjoins seamlessly with legacy `initialize` handshakes for local execution (Claude Desktop, Cursor, Docker).
67
- - **Streamable HTTP / SSE Mode (`@nekzus/mcp-server/http`)**: Powered by `createMcpHandler({ legacy: "stateless" })`. Designed for serverless and web-standard runtimes (Cloudflare Workers, Hono, Express, Vercel API Routes, Smithery.ai).
67
+ - **Streamable HTTP / SSE Mode (`@nekzus/mcp-server/http`)**: Powered by `createMcpHandler({ legacy: "stateless" })`. Designed for serverless and web-standard runtimes (Cloudflare Workers, Hono, Express, Vercel API Routes).
68
68
 
69
69
  **Example: Mounting HTTP Handler (Cloudflare Workers / Hono / Express)**
70
+
70
71
  ```typescript
71
72
  import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
72
73
 
73
74
  const handleRequest = createMcpHttpHandler();
74
75
 
75
76
  export default {
76
- async fetch(request, env, ctx) {
77
- return handleRequest(request);
78
- }
77
+ async fetch(request, env, ctx) {
78
+ return handleRequest(request);
79
+ },
79
80
  };
80
81
  ```
81
82
 
82
83
  **Development Commands:**
84
+
83
85
  ```bash
84
86
  # Install dependencies
85
87
  pnpm install
@@ -90,7 +92,7 @@ pnpm run build
90
92
  # Start STDIO server (Dual-Era)
91
93
  pnpm run start
92
94
 
93
- # Development server with Smithery CLI playground
95
+ # Development server
94
96
  pnpm run dev
95
97
 
96
98
  # Run full unit and integration test suite (238 tests)
@@ -133,23 +135,11 @@ Add this to your `claude_desktop_config.json`:
133
135
  ```
134
136
 
135
137
  **Configuration File Locations:**
138
+
136
139
  - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
137
140
  - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
138
141
  - Linux: `~/.config/Claude/claude_desktop_config.json`
139
142
 
140
- ### Smithery.ai Deployment
141
-
142
- ```json
143
- {
144
- "mcpServers": {
145
- "npm-sentinel": {
146
- "type": "http",
147
- "url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
148
- }
149
- }
150
- }
151
- ```
152
-
153
143
  ### Docker Usage
154
144
 
155
145
  ```bash
@@ -170,22 +160,21 @@ import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
170
160
  const handleMcpRequest = createMcpHttpHandler();
171
161
 
172
162
  export default {
173
- async fetch(request: Request): Promise<Response> {
174
- return handleMcpRequest(request);
175
- },
163
+ async fetch(request: Request): Promise<Response> {
164
+ return handleMcpRequest(request);
165
+ },
176
166
  };
177
167
  ```
178
168
 
179
169
  **100% MCP v2 Compliance**: Powered by `WebStandardStreamableHTTPServerTransport`, this handler natively activates all 3 MCP primitives (**Tools**, **Resources**, and **Prompts**) with peak performance, SSE streaming support, and full Web Standard `Request` $\rightarrow$ `Response` compatibility.
180
170
 
181
-
182
171
  ## Configuration
183
172
 
184
173
  The server supports the following configuration parameters:
185
174
 
186
- | Environment Variable | Config Object Property | Default | Description |
187
- | -------------------- | ---------------------- | ------- | ----------- |
188
- | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
175
+ | Environment Variable | Config Object Property | Default | Description |
176
+ | -------------------- | ------------------------- | ---------------------------- | ----------------------------------------------- |
177
+ | `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
189
178
 
190
179
  ---
191
180
 
@@ -237,78 +226,97 @@ Accessible via MCP `getPrompt` requests:
237
226
  All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `readOnlyHint`), and `icons`:
238
227
 
239
228
  #### 1. `npmLatest`
229
+
240
230
  - Get latest version information, release dates, SRI integrity hashes, and dist-tags.
241
231
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
242
232
 
243
233
  #### 2. `npmVersions`
234
+
244
235
  - Get full version history with release dates and deprecation statuses.
245
236
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
246
237
 
247
238
  #### 3. `npmDeps`
239
+
248
240
  - Complete dependency tree analysis including direct dependencies and full transitive graph mapping via `deps.dev`.
249
241
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
250
242
 
251
243
  #### 4. `npmTypes`
244
+
252
245
  - Verify TypeScript support (native `index.d.ts` declaration files vs `@types/*` DefinitelyTyped packages).
253
246
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
254
247
 
255
248
  #### 5. `npmSize`
249
+
256
250
  - Package bundle size, minified size, and gzip impact analysis.
257
251
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
258
252
 
259
253
  #### 6. `npmVulnerabilities`
254
+
260
255
  - Instant transitive vulnerability scanning powered by Google's `deps.dev` and OSV.dev advisories.
261
256
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
262
257
 
263
258
  #### 7. `npmTrends`
259
+
264
260
  - Historical download statistics over customizable time ranges (`last-week`, `last-month`, `last-year`).
265
261
  - **Input**: `packages` (`string[]`), `period` (`"last-week"` \| `"last-month"` \| `"last-year"`), `ignoreCache` (`boolean`, optional)
266
262
 
267
263
  #### 8. `npmCompare`
264
+
268
265
  - Side-by-side metric comparison across multiple packages.
269
266
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
270
267
 
271
268
  #### 9. `npmMaintainers`
269
+
272
270
  - List of package maintainers, public emails, and publishing activity.
273
271
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
274
272
 
275
273
  #### 10. `npmScore`
274
+
276
275
  - Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
277
276
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
278
277
 
279
278
  #### 11. `npmPackageReadme`
279
+
280
280
  - Retrieve full formatted raw README markdown content from NPM registry / CDN.
281
281
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
282
282
 
283
283
  #### 12. `npmSearch`
284
+
284
285
  - Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
285
286
  - **Input**: `query` (`string`), `limit` (`number`, optional)
286
287
 
287
288
  #### 13. `npmLicenseCompatibility`
289
+
288
290
  - Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
289
291
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
290
292
 
291
293
  #### 14. `npmRepoStats`
294
+
292
295
  - Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
293
296
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
294
297
 
295
298
  #### 15. `npmDeprecated`
299
+
296
300
  - Detect deprecation status on package and recursive sub-dependencies.
297
301
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
298
302
 
299
303
  #### 16. `npmChangelogAnalysis`
304
+
300
305
  - Extract release notes and GitHub release history.
301
306
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
302
307
 
303
308
  #### 17. `npmAlternatives`
309
+
304
310
  - Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes `express-rate-limit` for `express`).
305
311
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
306
312
 
307
313
  #### 18. `npmQuality`
314
+
308
315
  - Package code quality score (0–1).
309
316
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
310
317
 
311
318
  #### 19. `npmMaintenance`
319
+
312
320
  - Package maintenance activity score (0–1).
313
321
  - **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
314
322
 
@@ -318,4 +326,4 @@ All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `read
318
326
 
319
327
  This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
320
328
 
321
- MIT © [nekzus](https://github.com/nekzus)
329
+ MIT © [nekzus](https://github.com/nekzus)