@nekzus/mcp-server 1.19.0-alpha.2 → 1.19.0-alpha.21
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 +194 -278
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +32 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +384 -546
- 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 +143 -0
- package/dist/src/schemas.d.ts.map +1 -0
- package/dist/src/schemas.js +189 -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 +411 -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 +346 -414
- package/package.json +15 -16
- package/smithery.yaml +10 -2
package/README.md
CHANGED
|
@@ -13,35 +13,38 @@
|
|
|
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
|
-
- **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
|
-
|
|
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
|
+
- **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.
|
|
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.
|
|
32
|
+
- **Efficient Caching System**: Automated cache invalidation on workspace lockfile changes (`pnpm-lock.yaml`, `package-lock.json`, `yarn.lock`) with manual bypass (`ignoreCache: true`).
|
|
35
33
|
|
|
36
|
-
##
|
|
34
|
+
## Security & OWASP LLM01 Compliance
|
|
37
35
|
|
|
38
|
-
|
|
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.
|
|
36
|
+
This server implements **Defense-in-Depth** controls aligned with OWASP LLM01:2025 (Indirect Prompt Injection):
|
|
41
37
|
|
|
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.
|
|
39
|
+
2. **Metadata Signaling (`_meta`)**: Responses include `_meta.untrustedExternalContent = true` and `_meta.sources` arrays for programmatic client-side detection and policy enforcement.
|
|
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.
|
|
41
|
+
4. **Prototype Pollution Protection**: Enforces `Object.hasOwn()` checks on dictionary lookups (blocking reserved properties like `constructor` and `__proto__`).
|
|
42
|
+
|
|
43
|
+
To ensure data accuracy while maintaining high performance:
|
|
44
|
+
- **Automatic Invalidation**: The cache is automatically invalidated whenever `pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock` changes in your workspace.
|
|
45
|
+
- **Force Refresh**: All tools accept an optional `ignoreCache: true` parameter to bypass the cache and force a fresh lookup from the NPM registry.
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
### Example Usage (JSON-RPC)
|
|
45
48
|
|
|
46
49
|
```json
|
|
47
50
|
{
|
|
@@ -53,38 +56,43 @@ When calling a tool, simply include `ignoreCache: true` in the arguments:
|
|
|
53
56
|
}
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
## Installation
|
|
59
|
+
## Installation & Transports
|
|
57
60
|
|
|
58
|
-
###
|
|
61
|
+
### STDIO & Streamable HTTP Transports
|
|
59
62
|
|
|
60
|
-
This MCP server
|
|
63
|
+
This MCP server supports both **STDIO** (standard input/output) and **Streamable HTTP / SSE** transports out of the box.
|
|
61
64
|
|
|
62
|
-
**
|
|
63
|
-
- HTTP
|
|
64
|
-
- Enhanced scalability and performance
|
|
65
|
-
- Interactive testing playground
|
|
65
|
+
- **STDIO Mode**: Default transport for local execution via `npx` or Docker.
|
|
66
|
+
- **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
67
|
|
|
67
|
-
**Development
|
|
68
|
+
**Development Commands:**
|
|
68
69
|
```bash
|
|
69
|
-
#
|
|
70
|
-
|
|
70
|
+
# Install dependencies
|
|
71
|
+
pnpm install
|
|
71
72
|
|
|
72
|
-
#
|
|
73
|
-
|
|
73
|
+
# Compile TypeScript to dist/
|
|
74
|
+
pnpm run build
|
|
74
75
|
|
|
75
|
-
# Start
|
|
76
|
-
|
|
77
|
-
```
|
|
76
|
+
# Start STDIO server
|
|
77
|
+
pnpm run start
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
# Development server with Smithery CLI playground
|
|
80
|
+
pnpm run dev
|
|
80
81
|
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
# Run unit and integration test suite (212+ tests)
|
|
83
|
+
pnpm test -- --run
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
# Run full E2E tarball verification
|
|
86
|
+
node __tests__/full-e2e-pack-validation.js
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Install in VS Code / Cursor
|
|
90
|
+
|
|
91
|
+
Add this to your VS Code / Cursor MCP configuration:
|
|
85
92
|
|
|
86
93
|
```json
|
|
87
94
|
{
|
|
95
|
+
"inputs": [],
|
|
88
96
|
"servers": {
|
|
89
97
|
"npm-sentinel": {
|
|
90
98
|
"type": "stdio",
|
|
@@ -95,306 +103,214 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
|
|
|
95
103
|
}
|
|
96
104
|
```
|
|
97
105
|
|
|
98
|
-
###
|
|
106
|
+
### Install in Claude Desktop
|
|
99
107
|
|
|
100
|
-
|
|
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
|
|
108
|
+
Add this to your `claude_desktop_config.json`:
|
|
107
109
|
|
|
108
|
-
**Configuration for Smithery.ai:**
|
|
109
110
|
```json
|
|
110
111
|
{
|
|
111
112
|
"mcpServers": {
|
|
112
113
|
"npm-sentinel": {
|
|
113
|
-
"
|
|
114
|
-
"
|
|
114
|
+
"command": "npx",
|
|
115
|
+
"args": ["-y", "@nekzus/mcp-server@latest"]
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
```
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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)
|
|
121
|
+
**Configuration File Locations:**
|
|
122
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
123
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
124
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
129
125
|
|
|
130
|
-
|
|
126
|
+
### Smithery.ai Deployment
|
|
131
127
|
|
|
132
128
|
```json
|
|
133
129
|
{
|
|
134
130
|
"mcpServers": {
|
|
135
131
|
"npm-sentinel": {
|
|
136
132
|
"type": "http",
|
|
137
|
-
"url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
|
|
138
|
-
"config": {
|
|
139
|
-
"NPM_REGISTRY_URL": "https://registry.npmjs.org"
|
|
140
|
-
}
|
|
133
|
+
"url": "https://smithery.ai/server/@Nekzus/npm-sentinel-mcp"
|
|
141
134
|
}
|
|
142
135
|
}
|
|
143
136
|
}
|
|
144
137
|
```
|
|
145
|
-
### Docker
|
|
146
138
|
|
|
147
|
-
|
|
139
|
+
### Docker Usage
|
|
140
|
+
|
|
148
141
|
```bash
|
|
149
|
-
# Build
|
|
142
|
+
# Build Docker image
|
|
150
143
|
docker build -t nekzus/npm-sentinel-mcp .
|
|
151
|
-
```
|
|
152
144
|
|
|
153
|
-
|
|
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
|
-
}
|
|
145
|
+
# Run with local volume mount
|
|
146
|
+
docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.js
|
|
175
147
|
```
|
|
176
148
|
|
|
177
|
-
|
|
149
|
+
### Streamable HTTP (POST) & Cloudflare Workers Integration
|
|
178
150
|
|
|
179
|
-
|
|
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
|
-
```
|
|
151
|
+
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
152
|
|
|
200
|
-
|
|
153
|
+
```typescript
|
|
154
|
+
import { handleStreamableHttpRequest } from '@nekzus/mcp-server/http';
|
|
201
155
|
|
|
202
|
-
|
|
156
|
+
export default {
|
|
157
|
+
async fetch(request: Request): Promise<Response> {
|
|
158
|
+
if (request.method !== 'POST') {
|
|
159
|
+
return new Response('NPM Sentinel MCP v2 Streamable HTTP Server', { status: 200 });
|
|
160
|
+
}
|
|
203
161
|
|
|
204
|
-
|
|
162
|
+
try {
|
|
163
|
+
const payload = await request.json();
|
|
164
|
+
const mcpResponse = await handleStreamableHttpRequest(payload);
|
|
205
165
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
166
|
+
return new Response(mcpResponse.body, {
|
|
167
|
+
status: mcpResponse.status,
|
|
168
|
+
headers: mcpResponse.headers,
|
|
169
|
+
});
|
|
170
|
+
} catch {
|
|
171
|
+
return new Response(JSON.stringify({ error: 'Invalid JSON-RPC payload' }), { status: 400 });
|
|
212
172
|
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
173
|
+
},
|
|
174
|
+
};
|
|
215
175
|
```
|
|
216
176
|
|
|
217
|
-
Configuration
|
|
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)
|
|
177
|
+
## Configuration
|
|
221
178
|
|
|
222
|
-
|
|
179
|
+
The server supports the following configuration parameters:
|
|
223
180
|
|
|
224
|
-
|
|
181
|
+
| Environment Variable | Config Object Property | Default | Description |
|
|
182
|
+
| -------------------- | ---------------------- | ------- | ----------- |
|
|
183
|
+
| `NPM_REGISTRY_URL` | `config.NPM_REGISTRY_URL` | `https://registry.npmjs.org` | URL of the NPM registry to use for all requests |
|
|
225
184
|
|
|
226
|
-
|
|
227
|
-
{
|
|
228
|
-
"mcpServers": {
|
|
229
|
-
"npm-sentinel-mcp": {
|
|
230
|
-
"command": "npx",
|
|
231
|
-
"args": [
|
|
232
|
-
"-y",
|
|
233
|
-
"@nekzus/mcp-server@latest"
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
```
|
|
185
|
+
---
|
|
239
186
|
|
|
240
|
-
## API
|
|
187
|
+
## MCP Server Capabilities (v2 API)
|
|
188
|
+
|
|
189
|
+
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
190
|
|
|
242
|
-
The server exposes its tools via the Model Context Protocol. All tools adhere to a standardized response format:
|
|
243
191
|
```json
|
|
244
192
|
{
|
|
245
193
|
"content": [
|
|
246
194
|
{
|
|
247
195
|
"type": "text",
|
|
248
|
-
"text": "
|
|
249
|
-
"isError": boolean // Optional
|
|
196
|
+
"text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
|
|
250
197
|
}
|
|
251
|
-
|
|
252
|
-
|
|
198
|
+
],
|
|
199
|
+
"structuredContent": {
|
|
200
|
+
"queryPackages": ["express"],
|
|
201
|
+
"results": [...]
|
|
202
|
+
}
|
|
253
203
|
}
|
|
254
204
|
```
|
|
255
205
|
|
|
256
|
-
### Resources
|
|
257
|
-
|
|
258
|
-
- `npm://registry`: NPM Registry interface
|
|
259
|
-
- `npm://security`: Security analysis interface
|
|
260
|
-
- `npm://metrics`: Package metrics interface
|
|
261
|
-
|
|
262
206
|
### Server Resources
|
|
263
207
|
|
|
264
|
-
|
|
208
|
+
Accessible via MCP `readResource` requests:
|
|
265
209
|
|
|
266
|
-
- `doc://server/readme
|
|
267
|
-
- **Description**:
|
|
210
|
+
- `doc://server/readme`
|
|
211
|
+
- **Description**: Main documentation file for NPM Sentinel MCP server.
|
|
268
212
|
- **MIME Type**: `text/markdown`
|
|
269
|
-
-
|
|
270
|
-
|
|
213
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
214
|
+
- `doc://mcp/specification`
|
|
215
|
+
- **Description**: Complete Model Context Protocol specification file (`llms-full.txt`).
|
|
271
216
|
- **MIME Type**: `text/plain`
|
|
217
|
+
- **Icon**: Embedded Document SVG Data URI.
|
|
272
218
|
|
|
273
|
-
###
|
|
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
|
|
219
|
+
### Server Prompts
|
|
379
220
|
|
|
380
|
-
|
|
381
|
-
# Install dependencies
|
|
382
|
-
npm install
|
|
221
|
+
Accessible via MCP `getPrompt` requests:
|
|
383
222
|
|
|
384
|
-
|
|
385
|
-
|
|
223
|
+
- `analyze-package`
|
|
224
|
+
- **Description**: Generates a comprehensive prompt template for AI analysis of an NPM package including security, performance, dependencies, and health metrics.
|
|
225
|
+
- **Arguments**: `package` (string, required)
|
|
226
|
+
- **Icon**: Embedded Security SVG Data URI.
|
|
386
227
|
|
|
387
|
-
|
|
388
|
-
npm run build:http
|
|
228
|
+
---
|
|
389
229
|
|
|
390
|
-
|
|
391
|
-
npm run dev
|
|
392
|
-
```
|
|
230
|
+
### Tools Catalog (19 Tools)
|
|
393
231
|
|
|
394
|
-
|
|
232
|
+
All 19 tools define `inputSchema`, `outputSchema`, `annotations` (`title`, `readOnlyHint`), and `icons`:
|
|
233
|
+
|
|
234
|
+
#### 1. `npmLatest`
|
|
235
|
+
- Get latest version information, release dates, SRI integrity hashes, and dist-tags.
|
|
236
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
237
|
+
|
|
238
|
+
#### 2. `npmVersions`
|
|
239
|
+
- Get full version history with release dates and deprecation statuses.
|
|
240
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
241
|
+
|
|
242
|
+
#### 3. `npmDeps`
|
|
243
|
+
- Complete dependency tree analysis including direct dependencies and full transitive graph mapping via `deps.dev`.
|
|
244
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
245
|
+
|
|
246
|
+
#### 4. `npmTypes`
|
|
247
|
+
- Verify TypeScript support (native `index.d.ts` declaration files vs `@types/*` DefinitelyTyped packages).
|
|
248
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
249
|
+
|
|
250
|
+
#### 5. `npmSize`
|
|
251
|
+
- Package bundle size, minified size, and gzip impact analysis.
|
|
252
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
253
|
+
|
|
254
|
+
#### 6. `npmVulnerabilities`
|
|
255
|
+
- Instant transitive vulnerability scanning powered by Google's `deps.dev` and OSV.dev advisories.
|
|
256
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
257
|
+
|
|
258
|
+
#### 7. `npmTrends`
|
|
259
|
+
- Historical download statistics over customizable time ranges (`last-week`, `last-month`, `last-year`).
|
|
260
|
+
- **Input**: `packages` (`string[]`), `period` (`"last-week"` \| `"last-month"` \| `"last-year"`), `ignoreCache` (`boolean`, optional)
|
|
261
|
+
|
|
262
|
+
#### 8. `npmCompare`
|
|
263
|
+
- Side-by-side metric comparison across multiple packages.
|
|
264
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
265
|
+
|
|
266
|
+
#### 9. `npmMaintainers`
|
|
267
|
+
- List of package maintainers, public emails, and publishing activity.
|
|
268
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
269
|
+
|
|
270
|
+
#### 10. `npmScore`
|
|
271
|
+
- Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
|
|
272
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
395
273
|
|
|
396
|
-
|
|
274
|
+
#### 11. `npmPackageReadme`
|
|
275
|
+
- Retrieve full formatted raw README markdown content from NPM registry / CDN.
|
|
276
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
277
|
+
|
|
278
|
+
#### 12. `npmSearch`
|
|
279
|
+
- Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
|
|
280
|
+
- **Input**: `query` (`string`), `limit` (`number`, optional)
|
|
281
|
+
|
|
282
|
+
#### 13. `npmLicenseCompatibility`
|
|
283
|
+
- Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
|
|
284
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
285
|
+
|
|
286
|
+
#### 14. `npmRepoStats`
|
|
287
|
+
- Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
|
|
288
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
289
|
+
|
|
290
|
+
#### 15. `npmDeprecated`
|
|
291
|
+
- Detect deprecation status on package and recursive sub-dependencies.
|
|
292
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
293
|
+
|
|
294
|
+
#### 16. `npmChangelogAnalysis`
|
|
295
|
+
- Extract release notes and GitHub release history.
|
|
296
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
297
|
+
|
|
298
|
+
#### 17. `npmAlternatives`
|
|
299
|
+
- Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes `express-rate-limit` for `express`).
|
|
300
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
301
|
+
|
|
302
|
+
#### 18. `npmQuality`
|
|
303
|
+
- Package code quality score (0–1).
|
|
304
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
305
|
+
|
|
306
|
+
#### 19. `npmMaintenance`
|
|
307
|
+
- Package maintenance activity score (0–1).
|
|
308
|
+
- **Input**: `packages` (`string[]`), `ignoreCache` (`boolean`, optional)
|
|
397
309
|
|
|
398
310
|
---
|
|
399
311
|
|
|
312
|
+
## License
|
|
313
|
+
|
|
314
|
+
This MCP server is licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
|
315
|
+
|
|
400
316
|
MIT © [nekzus](https://github.com/nekzus)
|