@mithung/vunet-mcp-server 2.0.6 → 2.1.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/index.js CHANGED
@@ -26,7 +26,7 @@ class VunetMCPServer {
26
26
  this.server = new Server(
27
27
  {
28
28
  name: "vunet-mcp-server",
29
- version: "2.0.6",
29
+ version: "2.0.8",
30
30
  },
31
31
  {
32
32
  capabilities: {
@@ -117,6 +117,7 @@ class VunetMCPServer {
117
117
 
118
118
  /**
119
119
  * Login to Vunet tenant
120
+ * Uses /vuSmartMaps/api/1/bu/{buId}/auth/users/login/ endpoint
120
121
  */
121
122
  async login() {
122
123
  const url = `${this.normalizeTenantUrl(this.tenantUrl)}/vuSmartMaps/api/1/bu/${this.buId}/auth/users/login/`;
@@ -129,6 +130,9 @@ class VunetMCPServer {
129
130
  password: this.password,
130
131
  },
131
132
  {
133
+ headers: {
134
+ "Content-Type": "application/json",
135
+ },
132
136
  httpsAgent: this.httpsAgent,
133
137
  }
134
138
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mithung/vunet-mcp-server",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "description": "Model Context Protocol (MCP) Server for Vunet vuSmartMaps - Multi-tenant observability platform integration",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -11,7 +11,15 @@
11
11
  "scripts": {
12
12
  "start": "node index.js",
13
13
  "dev": "node --watch index.js",
14
- "test": "echo \"No tests specified yet\" && exit 0"
14
+ "test": "echo \"No tests specified yet\" && exit 0",
15
+ "build": "npm run validate && npm pack --dry-run",
16
+ "validate": "node --check index.js && node --check cli.js",
17
+ "prepublishOnly": "npm run validate && npm test",
18
+ "publish:dry": "npm publish --dry-run",
19
+ "publish:prod": "npm publish --access public",
20
+ "version:patch": "npm version patch -m \"Release v%s\"",
21
+ "version:minor": "npm version minor -m \"Release v%s\"",
22
+ "version:major": "npm version major -m \"Release v%s\""
15
23
  },
16
24
  "keywords": [
17
25
  "mcp",
@@ -53,12 +61,6 @@
53
61
  "index.js",
54
62
  "cli.js",
55
63
  "README.md",
56
- "SETUP.md",
57
- "QUICKSTART.md",
58
- "DATA_MODELS.md",
59
- "CHANGELOG.md",
60
- "LICENSE",
61
- "config.example.json",
62
- "mcp-config.example.json"
64
+ "LICENSE"
63
65
  ]
64
66
  }
package/CHANGELOG.md DELETED
@@ -1,128 +0,0 @@
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
- ## [2.0.6] - 2026-02-13
9
-
10
- ### Fixed
11
- - **CRITICAL FIX**: Corrected metric query endpoint to use `/api/metrics/` as per VuNet API documentation
12
- - Fixed query parameters to use snake_case format (relative_time, start_time, end_time) per VuNet API spec
13
- - URL encoding for metric names with spaces now works correctly
14
- - Removed incorrect path variations (/query/ and /vuSmartMaps/api/1/bu/1/metrics/)
15
- - Verified working with actual VuNet tenant
16
-
17
- ## [2.0.5] - 2026-02-13
18
-
19
- ### Fixed
20
- - Added URL encoding for metric names in query path (e.g., "Traces Transaction Volume" → "Traces%20Transaction%20Volume")
21
- - Metrics with spaces in names now query correctly
22
-
23
- ## [2.0.4] - 2026-02-13
24
-
25
- ### Fixed
26
- - **CRITICAL FIX**: Changed metric query endpoint from `/metrics/` to `/query/`
27
- - Fixed query parameter names to use VuNet camelCase format (relativeTime, startTime, endTime)
28
- - Metrics now query correctly against VuNet tenant
29
-
30
- ## [2.0.3] - 2026-02-13
31
-
32
- ### Fixed
33
- - Fixed metric query API endpoint to use correct VuNet path structure
34
- - Changed from `/api/metrics/` to `/vuSmartMaps/api/1/bu/{buId}/metrics/`
35
- - Improved error messages to include full error details for better debugging
36
- - Fixed retry logic to use correct URL on re-authentication
37
-
38
- ## [2.0.1] - 2026-02-13
39
-
40
- ### Fixed
41
- - Updated all documentation with correct package name (@mithung/vunet-mcp-server)
42
- - Fixed installation commands in README, SETUP, and QUICKSTART guides
43
- - Updated GitHub repository URLs
44
-
45
- ## [2.0.0] - 2026-02-13
46
-
47
- ### Added
48
- - New tool: `vunet_list_data_models` - List 80+ data models by category
49
- - DATA_MODELS.md - Comprehensive data model reference documentation
50
- - Bearer token authentication support (alternative to username/password)
51
- - Enhanced configuration examples with dual authentication methods
52
-
53
- ### Changed
54
- - Package scoped under @mithung namespace
55
- - Version bumped to 2.0.0 for major feature additions
56
-
57
- ## [1.0.0] - 2026-02-13
58
-
59
- ### Added
60
- - Initial release of @mithung/vunet-mcp-server
61
- - Multi-tenant support for Vunet vuSmartMaps
62
- - MCP tools: `vunet_query_metric` and `vunet_get_status`
63
- - Session-based authentication with automatic token management
64
- - Support for 80+ data models including:
65
- - Trace Map Data (individual spans)
66
- - Traces Transaction Volume (aggregated metrics)
67
- - Kubernetes metrics
68
- - Infrastructure metrics
69
- - Custom business metrics
70
- - Flexible time range queries:
71
- - Relative time (`15m`, `1h`, `1d`, `1w`, `1M`, `1y`)
72
- - Absolute time (epoch timestamps)
73
- - Time shift comparisons
74
- - Dynamic filtering and field selection
75
- - SSL/TLS configuration support
76
- - Comprehensive documentation and examples
77
- - Configuration templates for VS Code MCP integration
78
- - npm package with CLI support (`vunet-mcp` command)
79
-
80
- ### Features
81
- - Automatic session token refresh on expiry
82
- - Graceful cleanup and logout on exit
83
- - HTTPS agent with configurable SSL verification
84
- - Error handling with automatic retry on 401 (expired session)
85
- - Normalized tenant URL handling
86
- - Environment variable configuration
87
- - Compatible with GitHub Copilot, Claude, ChatGPT, and other MCP clients
88
-
89
- ### Documentation
90
- - Comprehensive README.md with:
91
- - Installation guide
92
- - Quick start tutorial
93
- - Multi-tenant configuration examples
94
- - Query examples
95
- - Troubleshooting guide
96
- - API reference
97
- - Configuration templates:
98
- - `config.example.json` - Environment variable schema
99
- - `mcp-config.example.json` - Multi-tenant VS Code setup
100
- - License: MIT
101
- - .npmignore for clean package distribution
102
-
103
- ### Developer Experience
104
- - `npm start` - Run the server
105
- - `npm run dev` - Run with watch mode
106
- - `npm pack` - Create distributable package
107
- - Global installation support via `npm install -g`
108
-
109
- ## [Unreleased]
110
-
111
- ### Planned
112
- - Unit tests and integration tests
113
- - CI/CD pipeline setup
114
- - Additional data model presets
115
- - Performance optimizations
116
- - Enhanced error messages
117
- - TypeScript support
118
- - GraphQL query support
119
- - Dashboard templates library
120
- - Webhook notifications
121
- - Scheduled queries
122
- - Data export utilities
123
-
124
- ---
125
-
126
- ## Version History
127
-
128
- - **1.0.0** (2026-02-13): Initial release with core MCP functionality
package/DATA_MODELS.md DELETED
@@ -1,192 +0,0 @@
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/QUICKSTART.md DELETED
@@ -1,213 +0,0 @@
1
- # 🚀 Vunet MCP Server - Quick Start Card
2
-
3
- ## Package Name
4
- **`@mithung/vunet-mcp-server`** - v2.0.0
5
-
6
- ---
7
-
8
- ## Install
9
-
10
- ### Global (Recommended - After Publishing)
11
- ```bash
12
- npm install -g @mithung/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": ["@mithung/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": ["@mithung/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": ["@mithung/vunet-mcp-server"],
80
- "env": { "VUNET_TENANT_URL": "...", ... }
81
- },
82
- "vunet-staging": {
83
- "command": "npx",
84
- "args": ["@mithung/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 @mithung/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**