@nekzus/mcp-server 1.4.2 → 1.5.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 +212 -166
- package/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +455 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1380 -288
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MCP Package Analyzer - Intelligent NPM Analysis Server
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
@@ -10,88 +10,61 @@
|
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
[](https://paypal.me/maseortega)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
_Built on the MCP SDK, providing real-time insights into package quality, security, dependencies, and metrics_
|
|
13
|
+
<h2>🤖 Model Context Protocol Server for NPM Analysis</h2>
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
**AI-Powered Analysis • MCP Integration • Package Intelligence**
|
|
16
|
+
|
|
17
|
+
_Advanced NPM package analysis through Model Context Protocol (MCP) for AI-assisted development_
|
|
18
|
+
|
|
19
|
+
<hr>
|
|
20
|
+
|
|
21
|
+
<h3>🔗 MCP-Ready • 📊 AI-Enhanced • 🚀 Real-Time Analysis</h3>
|
|
22
|
+
|
|
23
|
+
_Seamlessly integrate NPM package analysis with Claude and other AI assistants through MCP_
|
|
24
|
+
|
|
25
|
+
[Key Features](#key-features) •
|
|
26
|
+
[Quick Start](#quick-start) •
|
|
27
|
+
[Documentation](#documentation) •
|
|
28
|
+
[Examples](#examples) •
|
|
29
|
+
[Support](#support)
|
|
21
30
|
|
|
22
31
|
</div>
|
|
23
32
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- [Contributing](#contributing)
|
|
38
|
-
- [License](#license)
|
|
39
|
-
|
|
40
|
-
## ✨ Features
|
|
41
|
-
|
|
42
|
-
### 📦 Version Analysis
|
|
43
|
-
- List all available package versions
|
|
44
|
-
- Get latest version details and changelog
|
|
45
|
-
- Track version history
|
|
46
|
-
- Analyze release patterns
|
|
47
|
-
|
|
48
|
-
### 🔍 Package Analysis
|
|
49
|
-
- Check dependencies and devDependencies
|
|
50
|
-
- Verify TypeScript support and types
|
|
51
|
-
- Analyze package size and bundle metrics
|
|
52
|
-
- Scan for security vulnerabilities
|
|
53
|
-
- Monitor security updates
|
|
54
|
-
|
|
55
|
-
### 📊 Metrics Analysis
|
|
56
|
-
- Track download trends and patterns
|
|
57
|
-
- Compare package metrics
|
|
58
|
-
- Evaluate quality scores
|
|
59
|
-
- Assess maintenance status
|
|
60
|
-
- Monitor popularity trends
|
|
61
|
-
|
|
62
|
-
### 🛠 Technical Features
|
|
63
|
-
- Full TypeScript support with type definitions
|
|
64
|
-
- Zero configuration required
|
|
65
|
-
- ESM support
|
|
66
|
-
- Real-time analysis
|
|
67
|
-
- Type-safe implementations
|
|
68
|
-
- Comprehensive error handling
|
|
69
|
-
|
|
70
|
-
## 🚀 Installation
|
|
33
|
+
## 🚀 Installation & Setup
|
|
34
|
+
|
|
35
|
+
### Using with MCP Inspector
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Inspect the server using MCP Inspector
|
|
39
|
+
npx @modelcontextprotocol/inspector npx -y @nekzus/mcp-server
|
|
40
|
+
|
|
41
|
+
# For local development
|
|
42
|
+
npx @modelcontextprotocol/inspector node path/to/server/index.js
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Direct Installation
|
|
71
46
|
|
|
72
47
|
```bash
|
|
73
|
-
#
|
|
48
|
+
# Using npm
|
|
74
49
|
npm install @nekzus/mcp-server
|
|
75
50
|
|
|
76
|
-
#
|
|
51
|
+
# Using yarn
|
|
77
52
|
yarn add @nekzus/mcp-server
|
|
78
53
|
|
|
79
|
-
#
|
|
54
|
+
# Using pnpm
|
|
80
55
|
pnpm add @nekzus/mcp-server
|
|
81
56
|
```
|
|
82
57
|
|
|
83
|
-
## 📖
|
|
84
|
-
|
|
85
|
-
### Configuration
|
|
58
|
+
## 📖 MCP Configuration
|
|
86
59
|
|
|
87
|
-
|
|
60
|
+
### With Claude or other AI Assistants
|
|
88
61
|
|
|
89
|
-
Add
|
|
62
|
+
Add to your configuration file (`claude_desktop_config.json` or similar):
|
|
90
63
|
|
|
91
64
|
```json
|
|
92
65
|
{
|
|
93
66
|
"mcpServers": {
|
|
94
|
-
"
|
|
67
|
+
"npmAnalyzer": {
|
|
95
68
|
"transport": "stdio",
|
|
96
69
|
"command": "npx",
|
|
97
70
|
"args": ["-y", "@nekzus/mcp-server"]
|
|
@@ -105,156 +78,229 @@ Configuration file locations:
|
|
|
105
78
|
- macOS: `~/Library/Application Support/claude-desktop/claude_desktop_config.json`
|
|
106
79
|
- Linux: `~/.config/claude-desktop/claude_desktop_config.json`
|
|
107
80
|
|
|
108
|
-
### Basic Usage
|
|
81
|
+
### Basic Usage as MCP Server
|
|
109
82
|
|
|
110
83
|
```typescript
|
|
111
84
|
import { McpServer } from '@nekzus/mcp-server';
|
|
112
85
|
|
|
113
|
-
//
|
|
86
|
+
// Initialize MCP server with required metadata
|
|
114
87
|
const server = new McpServer({
|
|
115
|
-
name: '
|
|
116
|
-
version: '1.0.0'
|
|
88
|
+
name: 'npm-analyzer',
|
|
89
|
+
version: '1.0.0',
|
|
90
|
+
description: 'MCP-compliant NPM package analysis server'
|
|
117
91
|
});
|
|
118
92
|
|
|
119
|
-
//
|
|
93
|
+
// Connect using MCP stdio transport
|
|
120
94
|
await server.connect(new StdioServerTransport());
|
|
95
|
+
|
|
96
|
+
// Server automatically registers all available NPM analysis tools
|
|
97
|
+
// and handles MCP protocol communication
|
|
121
98
|
```
|
|
122
99
|
|
|
123
|
-
|
|
100
|
+
### Development Testing
|
|
124
101
|
|
|
125
|
-
|
|
102
|
+
For development and testing:
|
|
126
103
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```
|
|
104
|
+
1. Start the server in development mode
|
|
105
|
+
2. Use MCP Inspector to verify:
|
|
106
|
+
- Tool availability and schemas
|
|
107
|
+
- Response formats
|
|
108
|
+
- Error handling
|
|
109
|
+
3. Test with Claude or other AI assistants
|
|
134
110
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
interface Input {
|
|
139
|
-
packageName: string;
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Package Analysis
|
|
111
|
+
```bash
|
|
112
|
+
# Test with MCP Inspector during development
|
|
113
|
+
npx @modelcontextprotocol/inspector node ./dist/index.js
|
|
144
114
|
|
|
145
|
-
|
|
146
|
-
Analyze package dependencies.
|
|
147
|
-
```typescript
|
|
148
|
-
interface Input {
|
|
149
|
-
packageName: string;
|
|
150
|
-
}
|
|
115
|
+
# Monitor server logs and tool execution
|
|
151
116
|
```
|
|
152
117
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
118
|
+
## 🎯 What is @nekzus/mcp-server?
|
|
119
|
+
|
|
120
|
+
@nekzus/mcp-server is a specialized server implementation that provides deep insights into NPM packages through the Model Context Protocol (MCP). It offers a comprehensive suite of analysis tools designed to help developers make informed decisions about package selection, security, and maintenance.
|
|
121
|
+
|
|
122
|
+
### 🌟 Why Choose This Package?
|
|
123
|
+
|
|
124
|
+
- **Comprehensive Analysis**: Get detailed insights into package quality, security, dependencies, and usage metrics
|
|
125
|
+
- **Real-Time Data**: Access up-to-date information directly from npm and related services
|
|
126
|
+
- **Batch Processing**: Analyze multiple packages simultaneously for efficient comparisons
|
|
127
|
+
- **Type Safety**: Full TypeScript support with comprehensive type definitions
|
|
128
|
+
- **MCP Integration**: Seamless integration with Claude and other AI assistants through MCP
|
|
129
|
+
- **Performance Focused**: Optimized for speed with concurrent processing and caching capabilities
|
|
130
|
+
|
|
131
|
+
## 📊 Key Features
|
|
132
|
+
|
|
133
|
+
### 📦 Package Intelligence
|
|
134
|
+
- **Version Analysis**
|
|
135
|
+
- Track all available versions and release patterns
|
|
136
|
+
- Get detailed changelogs and version histories
|
|
137
|
+
- Monitor latest releases and updates
|
|
138
|
+
- Compare version differences
|
|
139
|
+
|
|
140
|
+
- **Dependency Analysis**
|
|
141
|
+
- Map complete dependency trees
|
|
142
|
+
- Identify potential conflicts
|
|
143
|
+
- Track outdated dependencies
|
|
144
|
+
- Analyze peer dependencies
|
|
145
|
+
- Check for circular dependencies
|
|
146
|
+
|
|
147
|
+
- **Security Assessment**
|
|
148
|
+
- Scan for known vulnerabilities
|
|
149
|
+
- Monitor security advisories
|
|
150
|
+
- Track patch availability
|
|
151
|
+
- Assess dependency security
|
|
152
|
+
- Get severity ratings
|
|
153
|
+
|
|
154
|
+
### 🔍 Quality Metrics
|
|
155
|
+
- **Code Quality**
|
|
156
|
+
- Maintenance scores
|
|
157
|
+
- Code coverage metrics
|
|
158
|
+
- Documentation quality
|
|
159
|
+
- Type definitions status
|
|
160
|
+
- Best practices compliance
|
|
161
|
+
|
|
162
|
+
- **Community Health**
|
|
163
|
+
- Download trends
|
|
164
|
+
- GitHub activity
|
|
165
|
+
- Contributor metrics
|
|
166
|
+
- Issue response times
|
|
167
|
+
- Release frequency
|
|
168
|
+
|
|
169
|
+
- **Performance Metrics**
|
|
170
|
+
- Bundle size analysis
|
|
171
|
+
- Tree-shaking effectiveness
|
|
172
|
+
- Runtime performance
|
|
173
|
+
- Memory footprint
|
|
174
|
+
- Load time impact
|
|
175
|
+
|
|
176
|
+
### 🛠 Technical Capabilities
|
|
177
|
+
- **Multi-Package Processing**
|
|
178
|
+
- Concurrent analysis
|
|
179
|
+
- Batch comparisons
|
|
180
|
+
- Aggregate metrics
|
|
181
|
+
- Cross-package insights
|
|
182
|
+
|
|
183
|
+
- **Data Integration**
|
|
184
|
+
- NPM Registry
|
|
185
|
+
- GitHub API
|
|
186
|
+
- Security Databases
|
|
187
|
+
- Download Statistics
|
|
188
|
+
- Quality Metrics
|
|
189
|
+
|
|
190
|
+
## 🚀 Quick Start
|
|
191
|
+
|
|
192
|
+
### Installation
|
|
160
193
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
interface Input {
|
|
165
|
-
packageName: string;
|
|
166
|
-
}
|
|
167
|
-
```
|
|
194
|
+
```bash
|
|
195
|
+
# Using npm
|
|
196
|
+
npm install @nekzus/mcp-server
|
|
168
197
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
198
|
+
# Using yarn
|
|
199
|
+
yarn add @nekzus/mcp-server
|
|
200
|
+
|
|
201
|
+
# Using pnpm
|
|
202
|
+
pnpm add @nekzus/mcp-server
|
|
175
203
|
```
|
|
176
204
|
|
|
177
|
-
###
|
|
205
|
+
### Basic Usage
|
|
178
206
|
|
|
179
|
-
#### npmTrends
|
|
180
|
-
Get download trends.
|
|
181
207
|
```typescript
|
|
182
|
-
|
|
183
|
-
packageName: string;
|
|
184
|
-
period: "last-week" | "last-month" | "last-year";
|
|
185
|
-
}
|
|
186
|
-
```
|
|
208
|
+
import { McpServer } from '@nekzus/mcp-server';
|
|
187
209
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
210
|
+
// Initialize the server
|
|
211
|
+
const server = new McpServer({
|
|
212
|
+
name: 'npm-analysis',
|
|
213
|
+
version: '1.0.0'
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Start the server with stdio transport
|
|
217
|
+
await server.connect(new StdioServerTransport());
|
|
194
218
|
```
|
|
195
219
|
|
|
196
|
-
##
|
|
220
|
+
## 📖 Documentation
|
|
197
221
|
|
|
198
|
-
|
|
222
|
+
### Tool Categories
|
|
199
223
|
|
|
224
|
+
#### 1. Version Analysis Tools
|
|
200
225
|
```typescript
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
NpmPackageData,
|
|
204
|
-
BundlephobiaData,
|
|
205
|
-
NpmDownloadsData
|
|
206
|
-
} from '@nekzus/mcp-server';
|
|
207
|
-
```
|
|
226
|
+
// Get all versions of a package
|
|
227
|
+
const versions = await npmVersions({ packageName: 'react' });
|
|
208
228
|
|
|
209
|
-
|
|
229
|
+
// Get latest version details
|
|
230
|
+
const latest = await npmLatest({ packageName: 'express' });
|
|
231
|
+
```
|
|
210
232
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
233
|
+
#### 2. Package Analysis Tools
|
|
234
|
+
```typescript
|
|
235
|
+
// Check dependencies
|
|
236
|
+
const deps = await npmDeps({ packageName: 'next' });
|
|
214
237
|
|
|
215
|
-
|
|
216
|
-
|
|
238
|
+
// Verify TypeScript support
|
|
239
|
+
const types = await npmTypes({ packageName: 'lodash' });
|
|
240
|
+
```
|
|
217
241
|
|
|
218
|
-
|
|
219
|
-
|
|
242
|
+
#### 3. Metrics Analysis Tools
|
|
243
|
+
```typescript
|
|
244
|
+
// Compare multiple packages
|
|
245
|
+
const comparison = await npmCompare({
|
|
246
|
+
packages: ['react', 'preact', 'vue']
|
|
247
|
+
});
|
|
220
248
|
|
|
221
|
-
|
|
222
|
-
|
|
249
|
+
// Get download trends
|
|
250
|
+
const trends = await npmTrends({
|
|
251
|
+
packages: ['axios', 'fetch'],
|
|
252
|
+
period: 'last-month'
|
|
253
|
+
});
|
|
254
|
+
```
|
|
223
255
|
|
|
224
|
-
|
|
225
|
-
npm run test
|
|
256
|
+
## 🎯 Examples
|
|
226
257
|
|
|
227
|
-
|
|
228
|
-
|
|
258
|
+
### Analyzing Multiple Packages
|
|
259
|
+
```typescript
|
|
260
|
+
// Compare security of multiple packages
|
|
261
|
+
const security = await npmVulnerabilities({
|
|
262
|
+
packages: ['express', 'fastify', 'koa']
|
|
263
|
+
});
|
|
229
264
|
|
|
230
|
-
|
|
231
|
-
|
|
265
|
+
// Get quality metrics for frameworks
|
|
266
|
+
const quality = await npmQuality({
|
|
267
|
+
packages: ['next', 'nuxt', 'remix']
|
|
268
|
+
});
|
|
232
269
|
```
|
|
233
270
|
|
|
234
|
-
|
|
271
|
+
### Tracking Package Health
|
|
272
|
+
```typescript
|
|
273
|
+
// Get comprehensive package score
|
|
274
|
+
const score = await npmScore({
|
|
275
|
+
packageName: 'react'
|
|
276
|
+
});
|
|
235
277
|
|
|
236
|
-
|
|
278
|
+
// Check maintenance status
|
|
279
|
+
const maintenance = await npmMaintenance({
|
|
280
|
+
packageName: 'typescript'
|
|
281
|
+
});
|
|
282
|
+
```
|
|
237
283
|
|
|
238
284
|
## 🤝 Contributing
|
|
239
285
|
|
|
240
|
-
|
|
286
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
287
|
+
|
|
288
|
+
## 📄 License
|
|
241
289
|
|
|
242
|
-
|
|
243
|
-
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
244
|
-
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
245
|
-
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
246
|
-
5. Open a Pull Request
|
|
290
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
247
291
|
|
|
248
|
-
## 📫 Contact
|
|
292
|
+
## 📫 Contact & Support
|
|
249
293
|
|
|
250
|
-
- GitHub
|
|
251
|
-
- Email
|
|
294
|
+
- **GitHub**: [@nekzus](https://github.com/nekzus)
|
|
295
|
+
- **Email**: nekzus.dev@gmail.com
|
|
296
|
+
- **Support**: [PayPal](https://paypal.me/maseortega)
|
|
252
297
|
|
|
253
|
-
## ⭐️ Support
|
|
298
|
+
## ⭐️ Show Your Support
|
|
254
299
|
|
|
255
300
|
If you find this project helpful, please consider:
|
|
256
|
-
- Giving it a
|
|
257
|
-
-
|
|
301
|
+
- Giving it a star on GitHub
|
|
302
|
+
- Sharing it with others
|
|
303
|
+
- [Supporting the development](https://paypal.me/maseortega)
|
|
258
304
|
|
|
259
305
|
---
|
|
260
306
|
|