@nekzus/mcp-server 1.23.0 → 1.24.1
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 +171 -275
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +7 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +254 -610
- package/dist/index.js.map +1 -1
- package/dist/src/cache.d.ts +22 -0
- package/dist/src/cache.d.ts.map +1 -0
- package/dist/src/cache.js +68 -0
- package/dist/src/cache.js.map +1 -0
- package/dist/src/config.d.ts +11 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +45 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/handlers/index.d.ts +2 -0
- package/dist/src/handlers/index.d.ts.map +1 -0
- package/dist/src/handlers/index.js +2 -0
- package/dist/src/handlers/index.js.map +1 -0
- package/dist/src/http.d.ts +13 -0
- package/dist/src/http.d.ts.map +1 -0
- package/dist/src/http.js +31 -0
- package/dist/src/http.js.map +1 -0
- package/dist/src/icons.d.ts +21 -0
- package/dist/src/icons.d.ts.map +1 -0
- package/dist/src/icons.js +29 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/prompts/index.d.ts +3 -0
- package/dist/src/prompts/index.d.ts.map +1 -0
- package/dist/src/prompts/index.js +22 -0
- package/dist/src/prompts/index.js.map +1 -0
- package/dist/src/resources/index.d.ts +3 -0
- package/dist/src/resources/index.d.ts.map +1 -0
- package/dist/src/resources/index.js +62 -0
- package/dist/src/resources/index.js.map +1 -0
- package/dist/src/schemas.d.ts +145 -0
- package/dist/src/schemas.d.ts.map +1 -0
- package/dist/src/schemas.js +201 -0
- package/dist/src/schemas.js.map +1 -0
- package/dist/src/server.d.ts +7 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +23 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/tools/index.d.ts +4 -0
- package/dist/src/tools/index.d.ts.map +1 -0
- package/dist/src/tools/index.js +407 -0
- package/dist/src/tools/index.js.map +1 -0
- package/dist/src/utils/fetch-retry.d.ts +5 -0
- package/dist/src/utils/fetch-retry.d.ts.map +1 -0
- package/dist/src/utils/fetch-retry.js +69 -0
- package/dist/src/utils/fetch-retry.js.map +1 -0
- package/dist/src/utils/version-resolver.d.ts +14 -0
- package/dist/src/utils/version-resolver.d.ts.map +1 -0
- package/dist/src/utils/version-resolver.js +76 -0
- package/dist/src/utils/version-resolver.js.map +1 -0
- package/llms-full.txt +339 -479
- package/package.json +15 -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
|
|
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
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
- **
|
|
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
|
-
- **
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
###
|
|
62
|
+
### STDIO & Streamable HTTP Transports
|
|
71
63
|
|
|
72
|
-
This MCP server
|
|
64
|
+
This MCP server supports both **STDIO** (standard input/output) and **Streamable HTTP / SSE** transports out of the box.
|
|
73
65
|
|
|
74
|
-
**
|
|
75
|
-
- HTTP
|
|
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
|
|
69
|
+
**Development Commands:**
|
|
80
70
|
```bash
|
|
81
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,205 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
|
|
|
107
104
|
}
|
|
108
105
|
```
|
|
109
106
|
|
|
110
|
-
###
|
|
107
|
+
### Install in Claude Desktop
|
|
111
108
|
|
|
112
|
-
|
|
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
|
-
"
|
|
126
|
-
"
|
|
115
|
+
"command": "npx",
|
|
116
|
+
"args": ["-y", "@nekzus/mcp-server@latest"]
|
|
127
117
|
}
|
|
128
118
|
}
|
|
129
119
|
}
|
|
130
120
|
```
|
|
131
121
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
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
|
-
|
|
140
|
+
### Docker Usage
|
|
141
|
+
|
|
160
142
|
```bash
|
|
161
|
-
# Build
|
|
143
|
+
# Build Docker image
|
|
162
144
|
docker build -t nekzus/npm-sentinel-mcp .
|
|
145
|
+
|
|
146
|
+
# Run with local volume mount
|
|
147
|
+
docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
|
|
163
148
|
```
|
|
164
149
|
|
|
165
|
-
|
|
150
|
+
### Web Standard Streamable HTTP & Cloudflare Workers Integration
|
|
166
151
|
|
|
167
|
-
|
|
152
|
+
The package exports `createMcpHttpHandler` and `WebStandardStreamableHTTPServerTransport` for serverless platforms (Cloudflare Workers, Hono, Vercel, Express, Fastify, Next.js API routes) requiring official Web Standard Streamable HTTP transport under MCP v2:
|
|
168
153
|
|
|
169
|
-
```
|
|
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
|
-
}
|
|
187
|
-
```
|
|
154
|
+
```typescript
|
|
155
|
+
import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
|
|
188
156
|
|
|
189
|
-
|
|
157
|
+
const handleMcpRequest = createMcpHttpHandler();
|
|
190
158
|
|
|
191
|
-
|
|
192
|
-
{
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
}
|
|
159
|
+
export default {
|
|
160
|
+
async fetch(request: Request): Promise<Response> {
|
|
161
|
+
return handleMcpRequest(request);
|
|
162
|
+
},
|
|
163
|
+
};
|
|
210
164
|
```
|
|
211
165
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
### Usage with Claude Desktop
|
|
166
|
+
**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.
|
|
215
167
|
|
|
216
|
-
Add this to your `claude_desktop_config.json`:
|
|
217
168
|
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
"mcpServers": {
|
|
221
|
-
"npmsentinel": {
|
|
222
|
-
"command": "npx",
|
|
223
|
-
"args": ["-y", "@nekzus/mcp-server@latest"]
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
169
|
+
## Configuration
|
|
228
170
|
|
|
229
|
-
|
|
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)
|
|
171
|
+
The server supports the following configuration parameters:
|
|
233
172
|
|
|
234
|
-
|
|
173
|
+
| Environment Variable | Config Object Property | Default | Description |
|
|
174
|
+
| -------------------- | ---------------------- | ------- | ----------- |
|
|
175
|
+
| `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
|
|
235
176
|
|
|
236
|
-
|
|
177
|
+
---
|
|
237
178
|
|
|
238
|
-
|
|
239
|
-
{
|
|
240
|
-
"mcpServers": {
|
|
241
|
-
"npm-sentinel-mcp": {
|
|
242
|
-
"command": "npx",
|
|
243
|
-
"args": [
|
|
244
|
-
"-y",
|
|
245
|
-
"@nekzus/mcp-server@latest"
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
```
|
|
179
|
+
## MCP Server Capabilities (v2 API)
|
|
251
180
|
|
|
252
|
-
|
|
181
|
+
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
182
|
|
|
254
|
-
The server exposes its tools via the Model Context Protocol. All tools adhere to a standardized response format:
|
|
255
183
|
```json
|
|
256
184
|
{
|
|
257
185
|
"content": [
|
|
258
186
|
{
|
|
259
187
|
"type": "text",
|
|
260
|
-
"text": "
|
|
261
|
-
"isError": boolean // Optional
|
|
188
|
+
"text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
|
|
262
189
|
}
|
|
263
|
-
|
|
264
|
-
|
|
190
|
+
],
|
|
191
|
+
"structuredContent": {
|
|
192
|
+
"queryPackages": ["express"],
|
|
193
|
+
"results": [...]
|
|
194
|
+
}
|
|
265
195
|
}
|
|
266
196
|
```
|
|
267
197
|
|
|
268
|
-
### Resources
|
|
269
|
-
|
|
270
|
-
- `npm://registry`: NPM Registry interface
|
|
271
|
-
- `npm://security`: Security analysis interface
|
|
272
|
-
- `npm://metrics`: Package metrics interface
|
|
273
|
-
|
|
274
198
|
### Server Resources
|
|
275
199
|
|
|
276
|
-
|
|
200
|
+
Accessible via MCP `readResource` requests:
|
|
277
201
|
|
|
278
|
-
- `doc://server/readme
|
|
279
|
-
- **Description**:
|
|
202
|
+
- `doc://server/readme`
|
|
203
|
+
- **Description**: Main documentation file for NPM Sentinel MCP server.
|
|
280
204
|
- **MIME Type**: `text/markdown`
|
|
281
|
-
-
|
|
282
|
-
|
|
205
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
206
|
+
- `doc://mcp/specification`
|
|
207
|
+
- **Description**: Complete Model Context Protocol specification file (`llms-full.txt`).
|
|
283
208
|
- **MIME Type**: `text/plain`
|
|
209
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
284
210
|
|
|
285
|
-
###
|
|
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
|
|
211
|
+
### Server Prompts
|
|
391
212
|
|
|
392
|
-
|
|
393
|
-
# Install dependencies
|
|
394
|
-
pnpm install
|
|
213
|
+
Accessible via MCP `getPrompt` requests:
|
|
395
214
|
|
|
396
|
-
|
|
397
|
-
|
|
215
|
+
- `analyze-package`
|
|
216
|
+
- **Description**: Generates a comprehensive prompt template for AI analysis of an NPM package including security, performance, dependencies, and health metrics.
|
|
217
|
+
- **Arguments**: `package` (string, required)
|
|
218
|
+
- **Icon**: Embedded Security SVG Data URI.
|
|
398
219
|
|
|
399
|
-
|
|
400
|
-
pnpm run start
|
|
220
|
+
---
|
|
401
221
|
|
|
402
|
-
|
|
403
|
-
pnpm run dev
|
|
404
|
-
```
|
|
222
|
+
### Tools Catalog (19 Tools)
|
|
405
223
|
|
|
406
|
-
|
|
224
|
+
All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `readOnlyHint`), and `icons`:
|
|
225
|
+
|
|
226
|
+
#### 1. `npmLatest`
|
|
227
|
+
- Get latest version information, release dates, SRI integrity hashes, and dist-tags.
|
|
228
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
229
|
+
|
|
230
|
+
#### 2. `npmVersions`
|
|
231
|
+
- Get full version history with release dates and deprecation statuses.
|
|
232
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
233
|
+
|
|
234
|
+
#### 3. `npmDeps`
|
|
235
|
+
- Complete dependency tree analysis including direct dependencies and full transitive graph mapping via `deps.dev`.
|
|
236
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
237
|
+
|
|
238
|
+
#### 4. `npmTypes`
|
|
239
|
+
- Verify TypeScript support (native `index.d.ts` declaration files vs `@types/*` DefinitelyTyped packages).
|
|
240
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
241
|
+
|
|
242
|
+
#### 5. `npmSize`
|
|
243
|
+
- Package bundle size, minified size, and gzip impact analysis.
|
|
244
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
245
|
+
|
|
246
|
+
#### 6. `npmVulnerabilities`
|
|
247
|
+
- Instant transitive vulnerability scanning powered by Google's `deps.dev` and OSV.dev advisories.
|
|
248
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
249
|
+
|
|
250
|
+
#### 7. `npmTrends`
|
|
251
|
+
- Historical download statistics over customizable time ranges (`last-week`, `last-month`, `last-year`).
|
|
252
|
+
- **Input**: `packages` (`string[]`), `period` (`"last-week"` \| `"last-month"` \| `"last-year"`), `ignoreCache` (`boolean`, optional)
|
|
253
|
+
|
|
254
|
+
#### 8. `npmCompare`
|
|
255
|
+
- Side-by-side metric comparison across multiple packages.
|
|
256
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
257
|
+
|
|
258
|
+
#### 9. `npmMaintainers`
|
|
259
|
+
- List of package maintainers, public emails, and publishing activity.
|
|
260
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
261
|
+
|
|
262
|
+
#### 10. `npmScore`
|
|
263
|
+
- Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
|
|
264
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
407
265
|
|
|
408
|
-
|
|
266
|
+
#### 11. `npmPackageReadme`
|
|
267
|
+
- Retrieve full formatted raw README markdown content from NPM registry / CDN.
|
|
268
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
269
|
+
|
|
270
|
+
#### 12. `npmSearch`
|
|
271
|
+
- Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
|
|
272
|
+
- **Input**: `query` (`string`), `limit` (`number`, optional)
|
|
273
|
+
|
|
274
|
+
#### 13. `npmLicenseCompatibility`
|
|
275
|
+
- Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
|
|
276
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
277
|
+
|
|
278
|
+
#### 14. `npmRepoStats`
|
|
279
|
+
- Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
|
|
280
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
281
|
+
|
|
282
|
+
#### 15. `npmDeprecated`
|
|
283
|
+
- Detect deprecation status on package and recursive sub-dependencies.
|
|
284
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
285
|
+
|
|
286
|
+
#### 16. `npmChangelogAnalysis`
|
|
287
|
+
- Extract release notes and GitHub release history.
|
|
288
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
289
|
+
|
|
290
|
+
#### 17. `npmAlternatives`
|
|
291
|
+
- Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes `express-rate-limit` for `express`).
|
|
292
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
293
|
+
|
|
294
|
+
#### 18. `npmQuality`
|
|
295
|
+
- Package code quality score (0–1).
|
|
296
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
297
|
+
|
|
298
|
+
#### 19. `npmMaintenance`
|
|
299
|
+
- Package maintenance activity score (0–1).
|
|
300
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
409
301
|
|
|
410
302
|
---
|
|
411
303
|
|
|
304
|
+
## License
|
|
305
|
+
|
|
306
|
+
This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
307
|
+
|
|
412
308
|
MIT © [nekzus](https://github.com/nekzus)
|