@mithung/vunet-mcp-server 2.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,79 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-13
9
+
10
+ ### Added
11
+ - Initial release of @vunet/mcp-server
12
+ - Multi-tenant support for Vunet vuSmartMaps
13
+ - MCP tools: `vunet_query_metric` and `vunet_get_status`
14
+ - Session-based authentication with automatic token management
15
+ - Support for 80+ data models including:
16
+ - Trace Map Data (individual spans)
17
+ - Traces Transaction Volume (aggregated metrics)
18
+ - Kubernetes metrics
19
+ - Infrastructure metrics
20
+ - Custom business metrics
21
+ - Flexible time range queries:
22
+ - Relative time (`15m`, `1h`, `1d`, `1w`, `1M`, `1y`)
23
+ - Absolute time (epoch timestamps)
24
+ - Time shift comparisons
25
+ - Dynamic filtering and field selection
26
+ - SSL/TLS configuration support
27
+ - Comprehensive documentation and examples
28
+ - Configuration templates for VS Code MCP integration
29
+ - npm package with CLI support (`vunet-mcp` command)
30
+
31
+ ### Features
32
+ - Automatic session token refresh on expiry
33
+ - Graceful cleanup and logout on exit
34
+ - HTTPS agent with configurable SSL verification
35
+ - Error handling with automatic retry on 401 (expired session)
36
+ - Normalized tenant URL handling
37
+ - Environment variable configuration
38
+ - Compatible with GitHub Copilot, Claude, ChatGPT, and other MCP clients
39
+
40
+ ### Documentation
41
+ - Comprehensive README.md with:
42
+ - Installation guide
43
+ - Quick start tutorial
44
+ - Multi-tenant configuration examples
45
+ - Query examples
46
+ - Troubleshooting guide
47
+ - API reference
48
+ - Configuration templates:
49
+ - `config.example.json` - Environment variable schema
50
+ - `mcp-config.example.json` - Multi-tenant VS Code setup
51
+ - License: MIT
52
+ - .npmignore for clean package distribution
53
+
54
+ ### Developer Experience
55
+ - `npm start` - Run the server
56
+ - `npm run dev` - Run with watch mode
57
+ - `npm pack` - Create distributable package
58
+ - Global installation support via `npm install -g`
59
+
60
+ ## [Unreleased]
61
+
62
+ ### Planned
63
+ - Unit tests and integration tests
64
+ - CI/CD pipeline setup
65
+ - Additional data model presets
66
+ - Performance optimizations
67
+ - Enhanced error messages
68
+ - TypeScript support
69
+ - GraphQL query support
70
+ - Dashboard templates library
71
+ - Webhook notifications
72
+ - Scheduled queries
73
+ - Data export utilities
74
+
75
+ ---
76
+
77
+ ## Version History
78
+
79
+ - **1.0.0** (2026-02-13): Initial release with core MCP functionality
package/DATA_MODELS.md ADDED
@@ -0,0 +1,192 @@
1
+ # Vunet Data Models Reference
2
+
3
+ This document lists common data models available in Vunet vuSmartMaps tenants. Use these names with the `vunet_query_metric` tool.
4
+
5
+ > **Note:** Actual available models depend on your tenant configuration. Use the `vunet_list_data_models` tool to get the curated list programmatically.
6
+
7
+ ## Application Performance Monitoring (APM)
8
+
9
+ ### Traces & Transactions
10
+ - `Trace Map Data` - Individual trace spans with detailed timing, status codes, and attributes
11
+ - `Traces Transaction Volume` - Aggregated transaction counts and statistics
12
+ - `Application Response Time` - Response time metrics across services
13
+ - `Error Rate` - Error tracking and failure analysis
14
+ - `Service Dependencies` - Service-to-service relationships
15
+ - `Endpoint Performance` - API endpoint metrics
16
+
17
+ ### Application Metrics
18
+ - `JVM Metrics` - Java Virtual Machine statistics
19
+ - `Thread Pool Metrics` - Thread utilization
20
+ - `GC Metrics` - Garbage collection performance
21
+ - `Hibernate Query Performance` - ORM query performance
22
+ - `Cache Hit Ratio` - Cache effectiveness metrics
23
+
24
+ ## Infrastructure Monitoring
25
+
26
+ ### Kubernetes
27
+ - `Kubernetes Pod Metrics` - Pod-level resource usage and health
28
+ - `Kubernetes Node Metrics` - Node-level system metrics
29
+ - `Kubernetes Deployment Metrics` - Deployment status and scaling
30
+ - `Kubernetes Service Metrics` - Service mesh metrics
31
+ - `Kubernetes Namespace Metrics` - Namespace-level aggregations
32
+ - `Container Metrics` - Container resource consumption
33
+ - `Kubernetes Events` - Cluster events and alerts
34
+
35
+ ### System Resources
36
+ - `CPU Usage` - CPU utilization by host/process
37
+ - `Memory Usage` - Memory consumption and availability
38
+ - `Disk I/O` - Disk read/write operations
39
+ - `Network I/O` - Network traffic metrics
40
+ - `File System Usage` - Disk space utilization
41
+ - `System Load` - System load averages
42
+
43
+ ### Servers
44
+ - `Apache Metrics` - Apache web server statistics
45
+ - `Nginx Metrics` - Nginx performance metrics
46
+ - `Tomcat Metrics` - Tomcat application server metrics
47
+ - `IIS Metrics` - Internet Information Services metrics
48
+
49
+ ## Database Monitoring
50
+
51
+ ### Relational Databases
52
+ - `MySQL Performance` - MySQL query performance and connections
53
+ - `MySQL Slow Queries` - Slow query analysis
54
+ - `PostgreSQL Metrics` - PostgreSQL database metrics
55
+ - `Oracle Metrics` - Oracle database performance
56
+ - `SQL Server Metrics` - Microsoft SQL Server statistics
57
+ - `Database Connection Pool` - Connection pool utilization
58
+
59
+ ### NoSQL Databases
60
+ - `MongoDB Metrics` - MongoDB performance
61
+ - `Redis Metrics` - Redis cache metrics
62
+ - `Cassandra Metrics` - Cassandra cluster health
63
+ - `Elasticsearch Metrics` - Elasticsearch search performance
64
+
65
+ ## Network Monitoring
66
+
67
+ - `Network Latency` - Network response times
68
+ - `Packet Loss` - Network packet loss statistics
69
+ - `Bandwidth Usage` - Network bandwidth consumption
70
+ - `TCP Connections` - TCP connection tracking
71
+ - `DNS Query Performance` - DNS resolution metrics
72
+ - `SSL Certificate Expiry` - Certificate monitoring
73
+
74
+ ## Business Metrics
75
+
76
+ - `VuBank Metrics` - Custom business metrics (example tenant)
77
+ - `Transaction Success Rate` - Business transaction success/failure
78
+ - `User Sessions` - User session analytics
79
+ - `Revenue Metrics` - Business revenue tracking
80
+ - `Conversion Rate` - Conversion funnel metrics
81
+ - `Customer Activity` - User engagement metrics
82
+
83
+ ## Log Analytics
84
+
85
+ - `Application Logs` - Application log aggregations
86
+ - `Error Logs` - Error and exception logs
87
+ - `Security Logs` - Security event logs
88
+ - `Audit Logs` - Audit trail logs
89
+ - `Access Logs` - HTTP access logs
90
+
91
+ ## Security & Compliance
92
+
93
+ - `Security Events` - Security incident tracking
94
+ - `Failed Login Attempts` - Authentication failures
95
+ - `Privileged Access` - Privileged user activity
96
+ - `Vulnerability Scan Results` - Security scan findings
97
+ - `Compliance Metrics` - Compliance status metrics
98
+
99
+ ## Custom & Integration
100
+
101
+ - Custom data models defined in your tenant
102
+ - Third-party integration metrics
103
+ - Business-specific KPIs
104
+
105
+ ---
106
+
107
+ ## Query Examples
108
+
109
+ ### Get Slow Traces (Last 24 Hours)
110
+ ```json
111
+ {
112
+ "metric_name": "Trace Map Data",
113
+ "relative_time": "24h",
114
+ "filters": {
115
+ "span.duration": ">5000000"
116
+ }
117
+ }
118
+ ```
119
+
120
+ ### Kubernetes Pod CPU Usage
121
+ ```json
122
+ {
123
+ "metric_name": "Kubernetes Pod Metrics",
124
+ "relative_time": "1h",
125
+ "include": "pod_name,cpu_usage,namespace"
126
+ }
127
+ ```
128
+
129
+ ### Database Query Performance
130
+ ```json
131
+ {
132
+ "metric_name": "MySQL Performance",
133
+ "relative_time": "30m",
134
+ "filters": {
135
+ "query_time": ">1000"
136
+ }
137
+ }
138
+ ```
139
+
140
+ ### Error Rate by Service
141
+ ```json
142
+ {
143
+ "metric_name": "Error Rate",
144
+ "relative_time": "2h",
145
+ "filters": {
146
+ "service_name": "api-gateway"
147
+ }
148
+ }
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Discovery Methods
154
+
155
+ ### 1. Use MCP Tool (Recommended)
156
+ ```
157
+ vunet_list_data_models
158
+ ```
159
+
160
+ ### 2. Ask via Natural Language
161
+ ```
162
+ "What data models are available?"
163
+ "Show me all Kubernetes metrics"
164
+ "List APM data models"
165
+ ```
166
+
167
+ ### 3. Query Specific Categories
168
+ ```
169
+ "Show infrastructure metrics"
170
+ "List database performance models"
171
+ "What application metrics can I query?"
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Data Model Naming Conventions
177
+
178
+ - **Spaces in Names**: Use exact names with spaces (e.g., `"Trace Map Data"`)
179
+ - **Case Sensitive**: Names are case-sensitive
180
+ - **Special Characters**: Some models may contain hyphens or underscores
181
+ - **Tenant-Specific**: Custom models follow your organization's naming
182
+
183
+ ## Need Help?
184
+
185
+ - Check your Vunet UI for available data models
186
+ - Use `vunet_get_status` to verify connection
187
+ - Contact Vunet support for custom model documentation
188
+
189
+ ---
190
+
191
+ **Last Updated:** February 2026
192
+ **Package Version:** 1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vunet Systems
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/QUICKSTART.md ADDED
@@ -0,0 +1,213 @@
1
+ # 🚀 Vunet MCP Server - Quick Start Card
2
+
3
+ ## Package Name
4
+ **`@vunet/mcp-server`** - v1.0.0
5
+
6
+ ---
7
+
8
+ ## Install
9
+
10
+ ### Global (Recommended - After Publishing)
11
+ ```bash
12
+ npm install -g @vunet/mcp-server
13
+ ```
14
+
15
+ ### From Tarball (Internal Distribution)
16
+ ```bash
17
+ npm pack
18
+ npm install -g vunet-mcp-server-1.0.0.tgz
19
+ ```
20
+
21
+ ### From Source (Development)
22
+ ```bash
23
+ npm install
24
+ npm link
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Configure
30
+
31
+ ### Single Tenant
32
+
33
+ Create `.vscode/mcp.json`:
34
+
35
+ **Username/Password:**
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "vunet": {
40
+ "command": "npx",
41
+ "args": ["@vunet/mcp-server"],
42
+ "env": {
43
+ "VUNET_TENANT_URL": "https://your-tenant.com",
44
+ "VUNET_USERNAME": "username",
45
+ "VUNET_PASSWORD": "password",
46
+ "VUNET_BU_ID": "1",
47
+ "VUNET_VERIFY_SSL": "true"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ **Bearer Token:**
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "vunet": {
59
+ "command": "npx",
60
+ "args": ["@vunet/mcp-server"],
61
+ "env": {
62
+ "VUNET_TENANT_URL": "https://your-tenant.com",
63
+ "VUNET_BEARER_TOKEN": "your-token-here",
64
+ "VUNET_BU_ID": "1",
65
+ "VUNET_VERIFY_SSL": "true"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Multiple Tenants
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "vunet-prod": {
78
+ "command": "npx",
79
+ "args": ["@vunet/mcp-server"],
80
+ "env": { "VUNET_TENANT_URL": "...", ... }
81
+ },
82
+ "vunet-staging": {
83
+ "command": "npx",
84
+ "args": ["@vunet/mcp-server"],
85
+ "env": { "VUNET_TENANT_URL": "...", ... }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Use
94
+
95
+ ### In VS Code (GitHub Copilot Chat)
96
+
97
+ ```
98
+ Show me traces from the last 2 days
99
+ ```
100
+
101
+ ```
102
+ Get Kubernetes metrics for the last 15 minutes
103
+ ```
104
+
105
+ ```
106
+ Create a performance report for slow traces
107
+ ```
108
+
109
+ ### Multi-Tenant
110
+
111
+ ```
112
+ @vunet-prod show error rate for last hour
113
+ @vunet-staging compare with yesterday
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Publish
119
+
120
+ ```bash
121
+ # 1. Login
122
+ npm login
123
+
124
+ # 2. Publish
125
+ npm publish --access public
126
+
127
+ # 3. Done!
128
+ # Team can now: npm install -g @vunet/mcp-server
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Files Created
134
+
135
+ ✅ `package.json` - npm package config
136
+ ✅ `index.js` - MCP server
137
+ ✅ `README.md` - Full documentation (14KB)
138
+ ✅ `SETUP.md` - Quick setup guide
139
+ ✅ `CHANGELOG.md` - Version history
140
+ ✅ `PUBLISHING.md` - Publishing guide
141
+ ✅ `LICENSE` - MIT License
142
+ ✅ `config.example.json` - Config template
143
+ ✅ `mcp-config.example.json` - Multi-tenant template
144
+ ✅ `.npmignore` - Package exclusions
145
+
146
+ ---
147
+
148
+ ## Environment Variables
149
+
150
+ | Variable | Required | Default | Description |
151
+ |----------|----------|---------|-------------|
152
+ | `VUNET_TENANT_URL` | ✅ | - | Tenant URL |
153
+ | `VUNET_USERNAME` | ✅* | - | Username (*or use bearer token) |
154
+ | `VUNET_PASSWORD` | ✅* | - | Password (*or use bearer token) |
155
+ | `VUNET_BEARER_TOKEN` | ✅* | - | Bearer token (*or use username/password) |
156
+ | `VUNET_BU_ID` | ❌ | `1` | Business Unit |
157
+ | `VUNET_VERIFY_SSL` | ❌ | `true` | SSL verify |
158
+
159
+ ---
160
+
161
+ ## MCP Tools
162
+
163
+ 1. **`vunet_query_metric`**
164
+ - Query any data model
165
+ - Flexible time ranges
166
+ - Dynamic filters
167
+
168
+ 2. **`vunet_get_status`**
169
+ - Connection status
170
+ - Authentication status
171
+ - Session info
172
+
173
+ ---
174
+
175
+ ## Data Models (80+)
176
+
177
+ - Trace Map Data
178
+ - Traces Transaction Volume
179
+ - Kubernetes Pod Metrics
180
+ - Kubernetes Node Metrics
181
+ - VuBank Metrics
182
+ - ... and 75+ more
183
+
184
+ ---
185
+
186
+ ## Next Steps
187
+
188
+ 1. ✅ **Test Locally** - Already working!
189
+ 2. 📦 **Publish npm** - `npm publish`
190
+ 3. 👥 **Share Team** - Config template
191
+ 4. 📈 **Monitor** - GitHub Issues
192
+
193
+ ---
194
+
195
+ ## Documentation
196
+
197
+ 📖 Full Guide → [README.md](README.md)
198
+ ⚙️ Setup → [SETUP.md](SETUP.md)
199
+ 📦 Publishing → [PUBLISHING.md](PUBLISHING.md)
200
+ 📋 Summary → [PACKAGE_SUMMARY.md](PACKAGE_SUMMARY.md)
201
+
202
+ ---
203
+
204
+ ## Support
205
+
206
+ 🐛 Issues: GitHub Issues
207
+ 💬 Docs: README.md
208
+ 📧 Email: support@vunetsystems.com
209
+
210
+ ---
211
+
212
+ **Made with ❤️ by Vunet Systems**
213
+ **Powered by Model Context Protocol**