@nekzus/mcp-server 1.1.8 → 1.3.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 CHANGED
@@ -1,4 +1,4 @@
1
- # MCP Server Nekzus
1
+ # @nekzus/mcp-server
2
2
 
3
3
  [![Github Workflow](https://github.com/nekzus/mcp-server/actions/workflows/publish.yml/badge.svg?event=push)](https://github.com/Nekzus/mcp-server/actions/workflows/publish.yml)
4
4
  [![npm-version](https://img.shields.io/npm/v/@nekzus/mcp-server.svg)](https://www.npmjs.com/package/@nekzus/mcp-server)
@@ -8,356 +8,210 @@
8
8
 
9
9
  <div align="center">
10
10
 
11
- **A Model Context Protocol (MCP) server that provides utility tools for
12
- development and testing** </br>_This implementation is built on top of the
13
- official MCP SDK and offers an extensible architecture for adding new tools_
11
+ **A Model Context Protocol (MCP) server for comprehensive NPM package analysis** </br>
12
+ _Built on the MCP SDK, providing real-time insights into package quality, security, dependencies, and metrics_
14
13
 
15
14
  </div>
16
15
 
17
- ## 🌟 Features
16
+ ## Features
17
+
18
+ - **Version Analysis**
19
+ - List all available package versions
20
+ - Get latest version details
21
+ - Track version history
22
+ - Analyze release patterns
23
+
24
+ - **Package Analysis**
25
+ - Check dependencies and devDependencies
26
+ - Verify TypeScript support
27
+ - Analyze package size and dependencies
28
+ - Scan for vulnerabilities
29
+ - Monitor security updates
30
+
31
+ - **Metrics Analysis**
32
+ - Track download trends
33
+ - Compare package metrics
34
+ - Evaluate quality scores
35
+ - Assess maintenance status
36
+ - Monitor popularity trends
37
+
38
+ ## Tools
39
+
40
+ ### Version Analysis Tools
41
+
42
+ - **npmVersions**
43
+ - Get all available versions of a package
44
+ - Input: `packageName` (string, required)
45
+ - Example:
46
+ ```json
47
+ {"packageName": "react"} -> Lists all react versions
48
+ ```
49
+
50
+ - **npmLatest**
51
+ - Get latest version info and changelog
52
+ - Input: `packageName` (string, required)
53
+ - Example:
54
+ ```json
55
+ {"packageName": "react"} -> Latest version details
56
+ ```
57
+
58
+ ### Package Analysis Tools
59
+
60
+ - **npmDeps**
61
+ - Analyze package dependencies
62
+ - Input: `packageName` (string, required)
63
+ - Example:
64
+ ```json
65
+ {"packageName": "react"} -> Dependencies breakdown
66
+ ```
67
+
68
+ - **npmTypes**
69
+ - Check TypeScript support
70
+ - Input: `packageName` (string, required)
71
+ - Example:
72
+ ```json
73
+ {"packageName": "react"} -> TypeScript support info
74
+ ```
75
+
76
+ - **npmSize**
77
+ - Get package size metrics
78
+ - Input: `packageName` (string, required)
79
+ - Example:
80
+ ```json
81
+ {"packageName": "react"} -> Size and dependency info
82
+ ```
83
+
84
+ - **npmVulnerabilities**
85
+ - Check security vulnerabilities
86
+ - Input: `packageName` (string, required)
87
+ - Example:
88
+ ```json
89
+ {"packageName": "react"} -> Security vulnerabilities
90
+ ```
91
+
92
+ ### Metrics Analysis Tools
93
+
94
+ - **npmTrends**
95
+ - Get download trends
96
+ - Inputs:
97
+ - `packageName` (string, required)
98
+ - `period` (string, optional): "last-week" | "last-month" | "last-year"
99
+ - Example:
100
+ ```json
101
+ {
102
+ "packageName": "react",
103
+ "period": "last-month"
104
+ } -> Download trends data
105
+ ```
106
+
107
+ - **npmCompare**
108
+ - Compare multiple packages
109
+ - Input: `packages` (string[], required)
110
+ - Example:
111
+ ```json
112
+ {
113
+ "packages": ["react", "vue", "angular"]
114
+ } -> Comparative metrics
115
+ ```
116
+
117
+ - **npmQuality**
118
+ - Get quality metrics
119
+ - Input: `packageName` (string, required)
120
+ - Example:
121
+ ```json
122
+ {"packageName": "react"} -> Quality score details
123
+ ```
124
+
125
+ - **npmMaintenance**
126
+ - Get maintenance metrics
127
+ - Input: `packageName` (string, required)
128
+ - Example:
129
+ ```json
130
+ {"packageName": "react"} -> Maintenance status
131
+ ```
132
+
133
+ - **npmPopularity**
134
+ - Get popularity metrics
135
+ - Input: `packageName` (string, required)
136
+ - Example:
137
+ ```json
138
+ {"packageName": "react"} -> Popularity metrics
139
+ ```
140
+
141
+ ## Key Features
142
+
143
+ - Real-time package analysis
144
+ - Comprehensive security scanning
145
+ - Detailed dependency tracking
146
+ - TypeScript support verification
147
+ - Performance metrics monitoring
148
+ - Zero configuration required
149
+ - Type-safe implementations
150
+ - Full TypeScript declarations
151
+ - Docker support
152
+ - ESM support
153
+
154
+ ## Installation
18
155
 
19
- - šŸ”„ MCP Protocol Implementation with JSON-RPC 2.0
20
- - šŸ› ļø Seven Integrated Utility Tools
21
- - šŸ“ Input Schema Validation
22
- - šŸš€ ESM Support
23
- - šŸ”’ Strict TypeScript Types
24
- - 🧩 Extensible Tool Architecture
25
- - šŸ” Detailed Error Handling
26
- - šŸŽØ Emoji-Enhanced Output
27
- - šŸ” Secure Expression Evaluation
28
- - šŸ“¦ NPM Package Support
29
-
30
- ## šŸ› ļø Available Tools
31
-
32
- ### 1. greeting
33
-
34
- Generates a personalized greeting message.
35
-
36
- **Parameters:**
37
-
38
- - `name` (string, required): Recipient's name
39
-
40
- **Example:**
41
-
42
- ```typescript
43
- // Input
44
- {
45
- "jsonrpc": "2.0",
46
- "method": "tools/call",
47
- "params": {
48
- "name": "greeting",
49
- "arguments": {
50
- "name": "John"
51
- }
52
- }
53
- }
54
-
55
- // Output
56
- {
57
- "jsonrpc": "2.0",
58
- "result": {
59
- "content": [{
60
- "type": "text",
61
- "text": "šŸ‘‹ Hello John! Welcome to the MCP server!"
62
- }],
63
- "isError": false
64
- }
65
- }
66
- ```
67
-
68
- ### 2. card
69
-
70
- Gets a random card from a standard poker deck.
71
-
72
- **Parameters:**
73
-
74
- - No parameters required
75
-
76
- **Example:**
77
-
78
- ```typescript
79
- // Input
80
- {
81
- "jsonrpc": "2.0",
82
- "method": "tools/call",
83
- "params": {
84
- "name": "card",
85
- "arguments": {}
86
- }
87
- }
88
-
89
- // Output
90
- {
91
- "jsonrpc": "2.0",
92
- "result": {
93
- "content": [{
94
- "type": "text",
95
- "text": "šŸŽ“ You drew: Ace of ā™  Spades"
96
- }],
97
- "isError": false
98
- }
99
- }
100
- ```
101
-
102
- ### 3. datetime
103
-
104
- Gets the current date and time for a specific timezone.
105
-
106
- **Parameters:**
107
-
108
- - `timeZone` (string, optional): Timezone identifier (e.g., "America/New_York")
109
- - `locale` (string, optional): Locale identifier (e.g., "en-US")
110
-
111
- **Example:**
112
-
113
- ```typescript
114
- // Input
115
- {
116
- "jsonrpc": "2.0",
117
- "method": "tools/call",
118
- "params": {
119
- "name": "datetime",
120
- "arguments": {
121
- "timeZone": "America/New_York",
122
- "locale": "en-US"
123
- }
124
- }
125
- }
126
-
127
- // Output
128
- {
129
- "jsonrpc": "2.0",
130
- "result": {
131
- "content": [{
132
- "type": "text",
133
- "text": "šŸ—“ļø Date: March 24, 2024\nā° Time: 3:25:25 PM\nšŸŒ Timezone: America/New_York"
134
- }],
135
- "isError": false
136
- }
137
- }
138
- ```
139
-
140
- ### 4. calculator
141
-
142
- Performs mathematical calculations with support for basic and advanced operations.
143
-
144
- **Parameters:**
145
-
146
- - `expression` (string, required): Mathematical expression (e.g., "2 + 2 * 3")
147
- - `precision` (number, optional): Decimal places in the result (default: 2)
148
-
149
- **Example:**
156
+ ```bash
157
+ # NPM
158
+ npm install @nekzus/mcp-server
150
159
 
151
- ```typescript
152
- // Input
153
- {
154
- "jsonrpc": "2.0",
155
- "method": "tools/call",
156
- "params": {
157
- "name": "calculator",
158
- "arguments": {
159
- "expression": "2 + 2 * 3",
160
- "precision": 2
161
- }
162
- }
163
- }
160
+ # Yarn
161
+ yarn add @nekzus/mcp-server
164
162
 
165
- // Output
166
- {
167
- "jsonrpc": "2.0",
168
- "result": {
169
- "content": [{
170
- "type": "text",
171
- "text": "🧮 Expression: 2 + 2 * 3\nšŸ“Š Result: 8.00"
172
- }],
173
- "isError": false
174
- }
175
- }
163
+ # PNPM
164
+ pnpm add @nekzus/mcp-server
176
165
  ```
177
166
 
178
- ### 5. passwordGen
167
+ ## Configuration
179
168
 
180
- Generates secure passwords with customizable options.
169
+ To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
181
170
 
182
- **Parameters:**
171
+ ### NPX (Recommended)
183
172
 
184
- - `length` (number, optional): Password length (default: 16)
185
- - `includeNumbers` (boolean, optional): Include numbers (default: true)
186
- - `includeSymbols` (boolean, optional): Include special characters (default: true)
187
- - `includeUppercase` (boolean, optional): Include uppercase letters (default: true)
188
-
189
- **Example:**
190
-
191
- ```typescript
192
- // Input
173
+ ```json
193
174
  {
194
- "jsonrpc": "2.0",
195
- "method": "tools/call",
196
- "params": {
197
- "name": "passwordGen",
198
- "arguments": {
199
- "length": 12,
200
- "includeNumbers": true,
201
- "includeSymbols": true,
202
- "includeUppercase": true
175
+ "mcpServers": {
176
+ "nekzus": {
177
+ "transport": "stdio",
178
+ "command": "npx",
179
+ "args": [
180
+ "-y",
181
+ "@nekzus/mcp-server"
182
+ ]
203
183
  }
204
184
  }
205
185
  }
206
-
207
- // Output
208
- {
209
- "jsonrpc": "2.0",
210
- "result": {
211
- "content": [{
212
- "type": "text",
213
- "text": "šŸ” Generated Password:\nKj2$mP9&vN4x\n\nšŸ“‹ Password Properties:\n• Length: 12\n• Includes Numbers: āœ…\n• Includes Symbols: āœ…\n• Includes Uppercase: āœ…"
214
- }],
215
- "isError": false
216
- }
217
- }
218
186
  ```
219
187
 
220
- ### 6. qrGen
188
+ ### Docker
221
189
 
222
- Generates QR codes for text or URLs.
223
-
224
- **Parameters:**
225
-
226
- - `text` (string, required): Text or URL to encode
227
- - `size` (number, optional): Size in pixels (default: 200)
228
- - `dark` (string, optional): Dark module color (default: "#000000")
229
- - `light` (string, optional): Light module color (default: "#ffffff")
230
-
231
- **Example:**
232
-
233
- ```typescript
234
- // Input
190
+ ```json
235
191
  {
236
- "jsonrpc": "2.0",
237
- "method": "tools/call",
238
- "params": {
239
- "name": "qrGen",
240
- "arguments": {
241
- "text": "https://www.nekzus.dev",
242
- "size": 300,
243
- "dark": "#000000",
244
- "light": "#ffffff"
192
+ "mcpServers": {
193
+ "nekzus": {
194
+ "transport": "stdio",
195
+ "command": "docker",
196
+ "args": ["run", "-i", "--rm", "--init", "nekzus/mcp-server"]
245
197
  }
246
198
  }
247
199
  }
248
-
249
- // Output
250
- {
251
- "jsonrpc": "2.0",
252
- "result": {
253
- "content": [{
254
- "type": "text",
255
- "text": "šŸ“± QR Code Properties:\n• Content: https://www.nekzus.dev\n• Size: 300px\n• Dark Color: #000000\n• Light Color: #ffffff\n\nšŸ”„ QR Code generation successful! (Implementation pending)"
256
- }],
257
- "isError": false
258
- }
259
- }
260
200
  ```
261
201
 
262
- ### 7. kitchenConvert
263
-
264
- Converts between common kitchen measurements and weights.
265
-
266
- **Parameters:**
267
-
268
- - `value` (number, required): Value to convert
269
- - `from` (string, required): Source unit
270
- - `to` (string, required): Target unit
271
- - `ingredient` (string, optional): Ingredient for volume-to-weight conversions
272
-
273
- **Supported Units:**
274
-
275
- *Volume:*
276
- - ml (milliliters)
277
- - l (liters)
278
- - cup (US cup)
279
- - tbsp (tablespoon)
280
- - tsp (teaspoon)
281
- - floz (fluid ounce)
282
-
283
- *Weight:*
284
- - g (grams)
285
- - kg (kilograms)
286
- - oz (ounces)
287
- - lb (pounds)
288
-
289
- **Supported Ingredients:**
290
- - water (density: 1.000 g/ml)
291
- - milk (density: 1.030 g/ml)
292
- - flour (density: 0.593 g/ml)
293
- - sugar (density: 0.845 g/ml)
294
- - brown sugar (density: 0.721 g/ml)
295
- - salt (density: 1.217 g/ml)
296
- - butter (density: 0.911 g/ml)
297
- - oil (density: 0.918 g/ml)
298
- - honey (density: 1.420 g/ml)
299
- - maple syrup (density: 1.370 g/ml)
300
-
301
- **Example:**
302
-
303
- ```typescript
304
- // Input
305
- {
306
- "jsonrpc": "2.0",
307
- "method": "tools/call",
308
- "params": {
309
- "name": "kitchenConvert",
310
- "arguments": {
311
- "value": 1,
312
- "from": "cup",
313
- "to": "g",
314
- "ingredient": "flour"
315
- }
316
- }
317
- }
202
+ The configuration file is typically located at:
203
+ - Windows: `%APPDATA%/claude-desktop/claude_desktop_config.json`
204
+ - macOS: `~/Library/Application Support/claude-desktop/claude_desktop_config.json`
205
+ - Linux: `~/.config/claude-desktop/claude_desktop_config.json`
318
206
 
319
- // Output
320
- {
321
- "jsonrpc": "2.0",
322
- "result": {
323
- "content": [{
324
- "type": "text",
325
- "text": "šŸ”„ Conversion Result:\n• 1 cup of flour = 140.30 g\n\nšŸ“ Note: Conversion includes ingredient density"
326
- }],
327
- "isError": false
328
- }
329
- }
330
- ```
331
-
332
- ## šŸš€ Usage
333
-
334
- ### As CLI Tool
207
+ ## Development
335
208
 
336
209
  ```bash
337
- # Global Installation
338
- npm install -g @nekzus/mcp-server
339
-
340
- # Direct Execution
341
- npx @nekzus/mcp-server
342
-
343
- # Example Usage
344
- echo '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"greeting","arguments":{"name":"John"}}}' | npx @nekzus/mcp-server
345
- ```
346
-
347
- ## šŸ”§ Development
348
-
349
- ```bash
350
- # Clone repository
351
- git clone https://github.com/nekzus/mcp-server.git
352
-
353
210
  # Install dependencies
354
211
  npm install
355
212
 
356
- # Build
357
- npm run build
358
-
359
- # Run tests
360
- npm test
213
+ # Run in development mode
214
+ npm run dev
361
215
 
362
216
  # Format code
363
217
  npm run format
@@ -365,46 +219,30 @@ npm run format
365
219
  # Lint code
366
220
  npm run lint
367
221
 
368
- # Check code
369
- npm run check
370
- ```
371
-
372
- ## šŸ“ Project Structure
222
+ # Run tests
223
+ npm run test
373
224
 
374
- ```
375
- /
376
- ā”œā”€ā”€ index.ts # Main server implementation
377
- ā”œā”€ā”€ package.json # Project configuration
378
- ā”œā”€ā”€ tsconfig.json # TypeScript configuration
379
- ā”œā”€ā”€ biome.json # Biome configuration
380
- ā”œā”€ā”€ jest.config.js # Jest configuration
381
- ā”œā”€ā”€ .github/ # GitHub workflows
382
- │ └── workflows/ # CI/CD configuration
383
- └── dist/ # Compiled JavaScript
225
+ # Build
226
+ npm run build
384
227
  ```
385
228
 
386
- ## šŸ” Technical Details
229
+ ## Docker
387
230
 
388
- - **Transport:** Uses `StdioServerTransport` for JSON-RPC communication
389
- - **Input Validation:** Schema validation for tool arguments
390
- - **Error Handling:** Comprehensive error handling with detailed messages
391
- - **Security:** Safe expression evaluation in calculator tool
392
- - **Types:** Full TypeScript type coverage
393
- - **Testing:** Jest test framework integration
394
- - **CI/CD:** Automated publishing with semantic-release
395
- - **Formatting:** Biome for code formatting and linting
231
+ Build and run the Docker image:
396
232
 
397
- ## šŸ“„ License
398
-
399
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
233
+ ```bash
234
+ # Build the image
235
+ docker build -t nekzus/mcp-server .
400
236
 
401
- ## šŸ‘¤ Author
237
+ # Run the container
238
+ docker run -i --rm --init nekzus/mcp-server
239
+ ```
402
240
 
403
- **Nekzus**
241
+ ## Requirements
404
242
 
405
- - GitHub: [@nekzus](https://github.com/nekzus)
406
- - PayPal: [Donate](https://paypal.me/maseortega)
243
+ - Node.js >= 18
244
+ - npm >= 9
407
245
 
408
- ## 🌟 Support
246
+ ## License
409
247
 
410
- Give a ā­ļø if this project helped you!
248
+ MIT Ā© [nekzus](https://github.com/nekzus)
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
3
+ declare function handleNpmVersions(args: {
4
+ packageName: string;
5
+ }): Promise<CallToolResult>;
6
+ declare function handleNpmLatest(args: {
7
+ packageName: string;
8
+ }): Promise<CallToolResult>;
9
+ declare function handleNpmDeps(args: {
10
+ packageName: string;
11
+ }): Promise<CallToolResult>;
12
+ declare function handleNpmTypes(args: {
13
+ packageName: string;
14
+ }): Promise<CallToolResult>;
15
+ declare function handleNpmSize(args: {
16
+ packageName: string;
17
+ }): Promise<CallToolResult>;
18
+ declare function handleNpmVulnerabilities(args: {
19
+ packageName: string;
20
+ }): Promise<CallToolResult>;
21
+ declare function handleNpmTrends(args: {
22
+ packageName: string;
23
+ period?: string;
24
+ }): Promise<CallToolResult>;
25
+ declare function handleNpmCompare(args: {
26
+ packages: string[];
27
+ }): Promise<CallToolResult>;
28
+ declare function handleNpmQuality(args: {
29
+ packageName: string;
30
+ }): Promise<CallToolResult>;
31
+ declare function handleNpmMaintenance(args: {
32
+ packageName: string;
33
+ }): Promise<CallToolResult>;
34
+ declare function handleNpmPopularity(args: {
35
+ packageName: string;
36
+ }): Promise<CallToolResult>;
37
+ export { handleNpmCompare, handleNpmDeps, handleNpmLatest, handleNpmMaintenance, handleNpmPopularity, handleNpmQuality, handleNpmSize, handleNpmTrends, handleNpmTypes, handleNpmVersions, handleNpmVulnerabilities, };
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,cAAc,EAAQ,MAAM,oCAAoC,CAAC;AAiT/E,iBAAe,iBAAiB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAwCvF;AAED,iBAAe,eAAe,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAyDrF;AAED,iBAAe,aAAa,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAqDnF;AAED,iBAAe,cAAc,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAwCpF;AAED,iBAAe,aAAa,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAuCnF;AAED,iBAAe,wBAAwB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA6D9F;AAED,iBAAe,eAAe,CAAC,IAAI,EAAE;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,cAAc,CAAC,CA8B1B;AAED,iBAAe,gBAAgB,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAoDrF;AAGD,iBAAe,gBAAgB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA4CtF;AAGD,iBAAe,oBAAoB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA4C1F;AAGD,iBAAe,mBAAmB,CAAC,IAAI,EAAE;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA4CzF;AAGD,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,wBAAwB,GACxB,CAAC"}