@nekzus/mcp-server 1.22.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.
- package/README.md +183 -277
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +7 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +242 -602
- 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 +16 -0
- package/dist/src/http.d.ts.map +1 -0
- package/dist/src/http.js +109 -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 +350 -477
- 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
|
|
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
|
-
- **
|
|
23
|
-
- **
|
|
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`).
|
|
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
|
|
|
@@ -42,18 +38,15 @@ This server implements **Defense-in-Depth** controls aligned with OWASP LLM01:20
|
|
|
42
38
|
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.
|
|
43
39
|
2. **Metadata Signaling (`_meta`)**: Responses include `_meta.untrustedExternalContent = true` and `_meta.sources` arrays for programmatic client-side detection and policy enforcement.
|
|
44
40
|
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.
|
|
45
|
-
4. **
|
|
46
|
-
|
|
47
|
-
## Caching and Invalidation
|
|
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`).
|
|
42
|
+
5. **Prototype Pollution Protection**: Enforces `Object.hasOwn()` checks on dictionary lookups (blocking reserved properties like `constructor` and `__proto__`).
|
|
48
43
|
|
|
49
|
-
To ensure data accuracy while maintaining performance
|
|
50
|
-
- **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace.
|
|
51
|
-
- **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.
|
|
52
47
|
|
|
53
48
|
### Example Usage (JSON-RPC)
|
|
54
49
|
|
|
55
|
-
When calling a tool, simply include `ignoreCache: true` in the arguments:
|
|
56
|
-
|
|
57
50
|
```json
|
|
58
51
|
{
|
|
59
52
|
"name": "npmVersions",
|
|
@@ -64,38 +57,43 @@ When calling a tool, simply include `ignoreCache: true` in the arguments:
|
|
|
64
57
|
}
|
|
65
58
|
```
|
|
66
59
|
|
|
67
|
-
## Installation
|
|
60
|
+
## Installation & Transports
|
|
68
61
|
|
|
69
|
-
###
|
|
62
|
+
### STDIO & Streamable HTTP Transports
|
|
70
63
|
|
|
71
|
-
This MCP server
|
|
64
|
+
This MCP server supports both **STDIO** (standard input/output) and **Streamable HTTP / SSE** transports out of the box.
|
|
72
65
|
|
|
73
|
-
**
|
|
74
|
-
- HTTP
|
|
75
|
-
- Enhanced scalability and performance
|
|
76
|
-
- 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.
|
|
77
68
|
|
|
78
|
-
**Development
|
|
69
|
+
**Development Commands:**
|
|
79
70
|
```bash
|
|
80
|
-
#
|
|
71
|
+
# Install dependencies
|
|
72
|
+
pnpm install
|
|
73
|
+
|
|
74
|
+
# Compile TypeScript to dist/
|
|
81
75
|
pnpm run build
|
|
82
76
|
|
|
83
77
|
# Start STDIO server
|
|
84
78
|
pnpm run start
|
|
85
79
|
|
|
86
|
-
# Development server with playground
|
|
80
|
+
# Development server with Smithery CLI playground
|
|
87
81
|
pnpm run dev
|
|
88
|
-
```
|
|
89
82
|
|
|
90
|
-
|
|
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
|
+
```
|
|
91
89
|
|
|
92
|
-
|
|
93
|
-
[<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
|
|
94
91
|
|
|
95
|
-
Add this to your VS Code
|
|
92
|
+
Add this to your VS Code / Cursor MCP configuration:
|
|
96
93
|
|
|
97
94
|
```json
|
|
98
95
|
{
|
|
96
|
+
"inputs": [],
|
|
99
97
|
"servers": {
|
|
100
98
|
"npm-sentinel": {
|
|
101
99
|
"type": "stdio",
|
|
@@ -106,306 +104,214 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
|
|
|
106
104
|
}
|
|
107
105
|
```
|
|
108
106
|
|
|
109
|
-
###
|
|
107
|
+
### Install in Claude Desktop
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
**Benefits of HTTP deployment:**
|
|
113
|
-
- **Scalable**: Handles multiple concurrent connections
|
|
114
|
-
- **Streamable**: Real-time streaming responses
|
|
115
|
-
- **Managed**: Automatic deployment and monitoring
|
|
116
|
-
- **Backward Compatible**: Still supports STDIO for local development
|
|
117
|
-
- **Interactive Testing**: Built-in playground for testing tools
|
|
109
|
+
Add this to your `claude_desktop_config.json`:
|
|
118
110
|
|
|
119
|
-
**Configuration for Smithery.ai:**
|
|
120
111
|
```json
|
|
121
112
|
{
|
|
122
113
|
"mcpServers": {
|
|
123
114
|
"npm-sentinel": {
|
|
124
|
-
"
|
|
125
|
-
"
|
|
115
|
+
"command": "npx",
|
|
116
|
+
"args": ["-y", "@nekzus/mcp-server@latest"]
|
|
126
117
|
}
|
|
127
118
|
}
|
|
128
119
|
}
|
|
129
120
|
```
|
|
130
121
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
| Environment Variable | CLI Argument | Default | Description |
|
|
136
|
-
| -------------------- | ------------ | ------- | ----------- |
|
|
137
|
-
| `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
|
|
138
|
-
|
|
139
|
-
#### 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`
|
|
140
126
|
|
|
141
|
-
|
|
127
|
+
### Smithery.ai Deployment
|
|
142
128
|
|
|
143
129
|
```json
|
|
144
130
|
{
|
|
145
131
|
"mcpServers": {
|
|
146
132
|
"npm-sentinel": {
|
|
147
133
|
"type": "http",
|
|
148
|
-
"url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
|
|
149
|
-
"config": {
|
|
150
|
-
"NPM_REGISTRY_URL": "https://registry.npmjs.org"
|
|
151
|
-
}
|
|
134
|
+
"url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
|
|
152
135
|
}
|
|
153
136
|
}
|
|
154
137
|
}
|
|
155
138
|
```
|
|
156
|
-
### Docker
|
|
157
139
|
|
|
158
|
-
|
|
140
|
+
### Docker Usage
|
|
141
|
+
|
|
159
142
|
```bash
|
|
160
|
-
# Build
|
|
143
|
+
# Build Docker image
|
|
161
144
|
docker build -t nekzus/npm-sentinel-mcp .
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
#### Usage
|
|
165
145
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
```json
|
|
169
|
-
{
|
|
170
|
-
"mcpServers": {
|
|
171
|
-
"npm-sentinel-mcp": {
|
|
172
|
-
"command": "docker",
|
|
173
|
-
"args": [
|
|
174
|
-
"run",
|
|
175
|
-
"-i",
|
|
176
|
-
"--rm",
|
|
177
|
-
"-w", "/projects",
|
|
178
|
-
"--mount", "type=bind,src=${PWD},dst=/projects",
|
|
179
|
-
"nekzus/npm-sentinel-mcp",
|
|
180
|
-
"node",
|
|
181
|
-
"dist/index.js"
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
146
|
+
# Run with local volume mount
|
|
147
|
+
docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
|
|
186
148
|
```
|
|
187
149
|
|
|
188
|
-
|
|
150
|
+
### Streamable HTTP (POST) & Cloudflare Workers Integration
|
|
189
151
|
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
"mcpServers": {
|
|
193
|
-
"npm-sentinel-mcp": {
|
|
194
|
-
"command": "docker",
|
|
195
|
-
"args": [
|
|
196
|
-
"run",
|
|
197
|
-
"-i",
|
|
198
|
-
"--rm",
|
|
199
|
-
"-w", "/projects",
|
|
200
|
-
"--mount", "type=bind,src=/path/to/workspace,dst=/projects/workspace",
|
|
201
|
-
"--mount", "type=bind,src=/path/to/other/dir,dst=/projects/other/dir,ro",
|
|
202
|
-
"nekzus/npm-sentinel-mcp",
|
|
203
|
-
"node",
|
|
204
|
-
"dist/index.js"
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
```
|
|
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:
|
|
210
153
|
|
|
211
|
-
|
|
154
|
+
```typescript
|
|
155
|
+
import { handleStreamableHttpRequest } from '@nekzus/mcp-server/http';
|
|
212
156
|
|
|
213
|
-
|
|
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
|
+
}
|
|
214
162
|
|
|
215
|
-
|
|
163
|
+
try {
|
|
164
|
+
const payload = await request.json();
|
|
165
|
+
const mcpResponse = await handleStreamableHttpRequest(payload);
|
|
216
166
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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 });
|
|
223
173
|
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
174
|
+
},
|
|
175
|
+
};
|
|
226
176
|
```
|
|
227
177
|
|
|
228
|
-
Configuration
|
|
229
|
-
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
230
|
-
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
231
|
-
- Linux: (Claude for Desktop does not officially support Linux at this time)
|
|
178
|
+
## Configuration
|
|
232
179
|
|
|
233
|
-
|
|
180
|
+
The server supports the following configuration parameters:
|
|
234
181
|
|
|
235
|
-
|
|
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 |
|
|
236
185
|
|
|
237
|
-
|
|
238
|
-
{
|
|
239
|
-
"mcpServers": {
|
|
240
|
-
"npm-sentinel-mcp": {
|
|
241
|
-
"command": "npx",
|
|
242
|
-
"args": [
|
|
243
|
-
"-y",
|
|
244
|
-
"@nekzus/mcp-server@latest"
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
```
|
|
186
|
+
---
|
|
250
187
|
|
|
251
|
-
## 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`:
|
|
252
191
|
|
|
253
|
-
The server exposes its tools via the Model Context Protocol. All tools adhere to a standardized response format:
|
|
254
192
|
```json
|
|
255
193
|
{
|
|
256
194
|
"content": [
|
|
257
195
|
{
|
|
258
196
|
"type": "text",
|
|
259
|
-
"text": "
|
|
260
|
-
"isError": boolean // Optional
|
|
197
|
+
"text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
|
|
261
198
|
}
|
|
262
|
-
|
|
263
|
-
|
|
199
|
+
],
|
|
200
|
+
"structuredContent": {
|
|
201
|
+
"queryPackages": ["express"],
|
|
202
|
+
"results": [...]
|
|
203
|
+
}
|
|
264
204
|
}
|
|
265
205
|
```
|
|
266
206
|
|
|
267
|
-
### Resources
|
|
268
|
-
|
|
269
|
-
- `npm://registry`: NPM Registry interface
|
|
270
|
-
- `npm://security`: Security analysis interface
|
|
271
|
-
- `npm://metrics`: Package metrics interface
|
|
272
|
-
|
|
273
207
|
### Server Resources
|
|
274
208
|
|
|
275
|
-
|
|
209
|
+
Accessible via MCP `readResource` requests:
|
|
276
210
|
|
|
277
|
-
- `doc://server/readme
|
|
278
|
-
- **Description**:
|
|
211
|
+
- `doc://server/readme`
|
|
212
|
+
- **Description**: Main documentation file for NPM Sentinel MCP server.
|
|
279
213
|
- **MIME Type**: `text/markdown`
|
|
280
|
-
-
|
|
281
|
-
|
|
214
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
215
|
+
- `doc://mcp/specification`
|
|
216
|
+
- **Description**: Complete Model Context Protocol specification file (`llms-full.txt`).
|
|
282
217
|
- **MIME Type**: `text/plain`
|
|
218
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
283
219
|
|
|
284
|
-
###
|
|
285
|
-
|
|
286
|
-
#### npmVersions
|
|
287
|
-
- Get all versions of a package
|
|
288
|
-
- Input: `packages` (string[])
|
|
289
|
-
- Returns: Version history with release dates
|
|
290
|
-
|
|
291
|
-
#### npmLatest
|
|
292
|
-
- Get latest version information
|
|
293
|
-
- Input: `packages` (string[])
|
|
294
|
-
- Returns: Latest version details and changelog
|
|
295
|
-
|
|
296
|
-
#### npmDeps
|
|
297
|
-
- Analyze package dependencies
|
|
298
|
-
- Input: `packages` (string[])
|
|
299
|
-
- Returns: Complete dependency tree analysis including direct dependencies and full transitive graph (count and explicit flatten list) mapping through deps.dev.
|
|
300
|
-
|
|
301
|
-
#### npmTypes
|
|
302
|
-
- Check TypeScript support
|
|
303
|
-
- Input: `packages` (string[])
|
|
304
|
-
- Returns: TypeScript compatibility status
|
|
305
|
-
|
|
306
|
-
#### npmSize
|
|
307
|
-
- Analyze package size
|
|
308
|
-
- Input: `packages` (string[])
|
|
309
|
-
- Returns: Bundle size and import cost analysis
|
|
310
|
-
|
|
311
|
-
#### npmVulnerabilities
|
|
312
|
-
- Scan for security vulnerabilities
|
|
313
|
-
- Features:
|
|
314
|
-
- **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.
|
|
315
|
-
- **Ecosystem Awareness**: Automatically scans related packages efficiently.
|
|
316
|
-
- **Rich Reports**: Includes CVE IDs and full summaries from OSV.dev.
|
|
317
|
-
- Input: `packages` (string[])
|
|
318
|
-
- Returns: Detailed security advisories, CVEs, and severity ratings
|
|
319
|
-
|
|
320
|
-
#### npmTrends
|
|
321
|
-
- Get download trends
|
|
322
|
-
- Input:
|
|
323
|
-
- `packages` (string[])
|
|
324
|
-
- `period` ("last-week" | "last-month" | "last-year")
|
|
325
|
-
- Returns: Download statistics over time
|
|
326
|
-
|
|
327
|
-
#### npmCompare
|
|
328
|
-
- Compare multiple packages
|
|
329
|
-
- Input: `packages` (string[])
|
|
330
|
-
- Returns: Detailed comparison metrics
|
|
331
|
-
|
|
332
|
-
#### npmMaintainers
|
|
333
|
-
- Get package maintainers
|
|
334
|
-
- Input: `packages` (string[])
|
|
335
|
-
- Returns: Maintainer information and activity
|
|
336
|
-
|
|
337
|
-
#### npmScore
|
|
338
|
-
- Get package quality score
|
|
339
|
-
- Input: `packages` (string[])
|
|
340
|
-
- Returns: Comprehensive quality metrics, scoring details, and OpenSSF Scorecard.
|
|
341
|
-
|
|
342
|
-
#### npmPackageReadme
|
|
343
|
-
- Get package README
|
|
344
|
-
- Input: `packages` (string[])
|
|
345
|
-
- Returns: Formatted README content
|
|
346
|
-
|
|
347
|
-
#### npmSearch
|
|
348
|
-
- Search for packages
|
|
349
|
-
- Input:
|
|
350
|
-
- `query` (string)
|
|
351
|
-
- `limit` (number, optional)
|
|
352
|
-
- Returns: Matching packages with metadata
|
|
353
|
-
|
|
354
|
-
#### npmLicenseCompatibility
|
|
355
|
-
- Check license compatibility
|
|
356
|
-
- Input: `packages` (string[])
|
|
357
|
-
- Returns: License analysis and compatibility info
|
|
358
|
-
|
|
359
|
-
#### npmRepoStats
|
|
360
|
-
- Get repository statistics
|
|
361
|
-
- Input: `packages` (string[])
|
|
362
|
-
- Returns: GitHub/repository metrics (stars, forks, open issues) along with OpenSSF Scorecard checks and scores via deps.dev.
|
|
363
|
-
|
|
364
|
-
#### npmDeprecated
|
|
365
|
-
- Check for deprecation
|
|
366
|
-
- Input: `packages` (string[])
|
|
367
|
-
- Returns: Deprecation status and alternatives
|
|
368
|
-
|
|
369
|
-
#### npmChangelogAnalysis
|
|
370
|
-
- Analyze package changelogs
|
|
371
|
-
- Input: `packages` (string[])
|
|
372
|
-
- Returns: Changelog summaries and impact analysis
|
|
373
|
-
|
|
374
|
-
#### npmAlternatives
|
|
375
|
-
- Find package alternatives
|
|
376
|
-
- Input: `packages` (string[])
|
|
377
|
-
- Returns: Similar packages with comparisons
|
|
378
|
-
|
|
379
|
-
#### npmQuality
|
|
380
|
-
- Assess package quality
|
|
381
|
-
- Input: `packages` (string[])
|
|
382
|
-
- Returns: Quality metrics and scores
|
|
383
|
-
|
|
384
|
-
#### npmMaintenance
|
|
385
|
-
- Check maintenance status
|
|
386
|
-
- Input: `packages` (string[])
|
|
387
|
-
- Returns: Maintenance activity metrics
|
|
388
|
-
|
|
389
|
-
## Build
|
|
220
|
+
### Server Prompts
|
|
390
221
|
|
|
391
|
-
|
|
392
|
-
# Install dependencies
|
|
393
|
-
pnpm install
|
|
222
|
+
Accessible via MCP `getPrompt` requests:
|
|
394
223
|
|
|
395
|
-
|
|
396
|
-
|
|
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.
|
|
397
228
|
|
|
398
|
-
|
|
399
|
-
pnpm run start
|
|
229
|
+
---
|
|
400
230
|
|
|
401
|
-
|
|
402
|
-
pnpm run dev
|
|
403
|
-
```
|
|
231
|
+
### Tools Catalog (19 Tools)
|
|
404
232
|
|
|
405
|
-
|
|
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)
|
|
406
274
|
|
|
407
|
-
|
|
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)
|
|
408
310
|
|
|
409
311
|
---
|
|
410
312
|
|
|
313
|
+
## License
|
|
314
|
+
|
|
315
|
+
This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
316
|
+
|
|
411
317
|
MIT © [nekzus](https://github.com/nekzus)
|