vme-mcp-server 0.1.8 → 0.1.10
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/dist/README.md +42 -9
- package/dist/server.js +29 -3
- package/package.json +14 -6
package/dist/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# VME MCP Server
|
2
2
|
|
3
|
-
Transform
|
3
|
+
Transform HPE VM Essentials infrastructure management into conversational AI interactions with Claude.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -15,8 +15,8 @@ npm install -g vme-mcp-server
|
|
15
15
|
Create a `.env` file:
|
16
16
|
|
17
17
|
```bash
|
18
|
-
#
|
19
|
-
VME_API_BASE_URL=https://your-vme-instance.com/api
|
18
|
+
# HPE VM Essentials Configuration
|
19
|
+
VME_API_BASE_URL=https://your-hpe-vme-instance.com/api
|
20
20
|
VME_API_TOKEN=your-bearer-token
|
21
21
|
|
22
22
|
# Privacy Controls (Optional)
|
@@ -72,7 +72,7 @@ Restart Claude Desktop. You should see the VME MCP Server tools available.
|
|
72
72
|
## Features
|
73
73
|
|
74
74
|
### Intelligent Resource Discovery
|
75
|
-
- Unified API consolidating multiple
|
75
|
+
- Unified API consolidating multiple HPE VM Essentials endpoints
|
76
76
|
- Intent-aware responses based on context
|
77
77
|
- Semantic organization of compute vs infrastructure resources
|
78
78
|
|
@@ -90,11 +90,44 @@ Restart Claude Desktop. You should see the VME MCP Server tools available.
|
|
90
90
|
|
91
91
|
## Configuration
|
92
92
|
|
93
|
+
### Environment Variable Loading (Global Install Support)
|
94
|
+
|
95
|
+
The server automatically searches for `.env` files in multiple locations:
|
96
|
+
|
97
|
+
1. **Current directory**: `./env` (for local development)
|
98
|
+
2. **Home directory**: `~/.env` (for global installs)
|
99
|
+
3. **Config directory**: `~/.config/vme-mcp-server/.env`
|
100
|
+
4. **Documents folder**: `~/Documents/.env.vme-mcp-server`
|
101
|
+
|
102
|
+
### Recommended Configuration Methods
|
103
|
+
|
104
|
+
**Method 1: Direct Environment Variables (Best for Global Install)**
|
105
|
+
|
106
|
+
Add to your Claude Desktop config (`~/.config/claude-desktop/config.json`):
|
107
|
+
|
108
|
+
```json
|
109
|
+
{
|
110
|
+
"mcpServers": {
|
111
|
+
"vme-mcp-server": {
|
112
|
+
"command": "vme-mcp-server",
|
113
|
+
"env": {
|
114
|
+
"VME_API_BASE_URL": "https://your-hpe-vme-instance.com/api",
|
115
|
+
"VME_API_TOKEN": "your-bearer-token"
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
```
|
121
|
+
|
122
|
+
**Method 2: .env File (Good for Local Development)**
|
123
|
+
|
124
|
+
Create `.env` file in any of the supported locations above.
|
125
|
+
|
93
126
|
### Required Environment Variables
|
94
127
|
|
95
128
|
| Variable | Description | Example |
|
96
129
|
|----------|-------------|---------|
|
97
|
-
| `VME_API_BASE_URL` |
|
130
|
+
| `VME_API_BASE_URL` | HPE VM Essentials API endpoint | `https://vme.company.com/api` |
|
98
131
|
| `VME_API_TOKEN` | Bearer token for authentication | `your-bearer-token` |
|
99
132
|
|
100
133
|
### Optional Environment Variables
|
@@ -117,10 +150,10 @@ Restart Claude Desktop. You should see the VME MCP Server tools available.
|
|
117
150
|
**"API connection failed"**
|
118
151
|
- Verify `VME_API_BASE_URL` is correct and accessible
|
119
152
|
- Check that `VME_API_TOKEN` has sufficient permissions
|
120
|
-
- Ensure network connectivity to
|
153
|
+
- Ensure network connectivity to HPE VM Essentials infrastructure
|
121
154
|
|
122
155
|
**"VM creation failed"**
|
123
|
-
- Verify user permissions in
|
156
|
+
- Verify user permissions in HPE VM Essentials for VM creation
|
124
157
|
- Check that specified service plans and templates exist
|
125
158
|
- Ensure target group/zone has available resources
|
126
159
|
|
@@ -128,7 +161,7 @@ Restart Claude Desktop. You should see the VME MCP Server tools available.
|
|
128
161
|
|
129
162
|
- Check the `.env.example` file for configuration templates
|
130
163
|
- Review error messages for specific guidance
|
131
|
-
- Ensure
|
164
|
+
- Ensure HPE VM Essentials infrastructure is accessible and properly configured
|
132
165
|
|
133
166
|
## Architecture
|
134
167
|
|
@@ -143,6 +176,6 @@ Built with TypeScript and the Model Context Protocol for seamless Claude integra
|
|
143
176
|
|
144
177
|
## Version
|
145
178
|
|
146
|
-
Current version: 0.1.
|
179
|
+
Current version: 0.1.10
|
147
180
|
|
148
181
|
For development documentation and contribution guidelines, see the project repository.
|
package/dist/server.js
CHANGED
@@ -9,15 +9,41 @@ const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
9
9
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
10
10
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
11
11
|
const dotenv_1 = __importDefault(require("dotenv"));
|
12
|
+
const fs_1 = require("fs");
|
13
|
+
const path_1 = require("path");
|
14
|
+
const os_1 = require("os");
|
12
15
|
const index_js_2 = require("./tools/index.js");
|
13
|
-
// Load environment variables
|
14
|
-
|
16
|
+
// Load environment variables from multiple locations for global install support
|
17
|
+
function loadEnvironmentConfig() {
|
18
|
+
// Priority order for .env file locations:
|
19
|
+
const envPaths = [
|
20
|
+
// 1. Current working directory (for local development)
|
21
|
+
(0, path_1.join)(process.cwd(), '.env'),
|
22
|
+
// 2. Home directory (for global installs)
|
23
|
+
(0, path_1.join)((0, os_1.homedir)(), '.env'),
|
24
|
+
// 3. XDG config directory (Linux/Mac standard)
|
25
|
+
(0, path_1.join)((0, os_1.homedir)(), '.config', 'vme-mcp-server', '.env'),
|
26
|
+
// 4. User's Documents folder (Windows-friendly)
|
27
|
+
(0, path_1.join)((0, os_1.homedir)(), 'Documents', '.env.vme-mcp-server')
|
28
|
+
];
|
29
|
+
// Try to load .env from the first available location
|
30
|
+
for (const envPath of envPaths) {
|
31
|
+
if ((0, fs_1.existsSync)(envPath)) {
|
32
|
+
dotenv_1.default.config({ path: envPath });
|
33
|
+
console.error(`VME MCP: Loaded config from ${envPath}`);
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
// If no .env file found, that's okay - environment variables may be set directly
|
38
|
+
console.error('VME MCP: No .env file found, using direct environment variables');
|
39
|
+
}
|
40
|
+
loadEnvironmentConfig();
|
15
41
|
// Disable TLS verification for VME API (if needed)
|
16
42
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
|
17
43
|
// Create VME MCP server with modular architecture
|
18
44
|
const server = new index_js_1.Server({
|
19
45
|
name: "vme-mcp-server",
|
20
|
-
version: "1.
|
46
|
+
version: "0.1.10",
|
21
47
|
}, {
|
22
48
|
capabilities: {
|
23
49
|
tools: {},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vme-mcp-server",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.10",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/server.js",
|
6
6
|
"bin": {
|
@@ -10,13 +10,19 @@
|
|
10
10
|
"build": "tsc",
|
11
11
|
"start": "node dist/server.js",
|
12
12
|
"dev": "tsx watch src/server.ts",
|
13
|
+
"prepare": "husky install",
|
13
14
|
"prepublishOnly": "npm run build && echo '#!/usr/bin/env node' | cat - dist/server.js > temp && mv temp dist/server.js && chmod +x dist/server.js && cp README-NPM.md dist/README.md",
|
14
|
-
"test": "
|
15
|
+
"test": "npm run test:critical",
|
15
16
|
"test:unit": "mocha tests/unit/*.test.js",
|
17
|
+
"test:binary": "mocha tests/binary/*.test.js",
|
18
|
+
"test:critical": "npm run test:binary && npm run test:mcp",
|
16
19
|
"test:integration": "mocha tests/integration/*.test.js",
|
17
|
-
"test:
|
18
|
-
"test:
|
19
|
-
"test:
|
20
|
+
"test:mcp": "mocha tests/integration/mcp-protocol.test.js",
|
21
|
+
"test:package": "mocha tests/package/*.test.js",
|
22
|
+
"test:all": "mocha tests/**/*.test.js",
|
23
|
+
"test:coverage": "nyc mocha tests/**/*.test.js",
|
24
|
+
"lint": "echo 'Linting not configured yet'",
|
25
|
+
"precommit": "npm run lint && npm run test:critical && npm run build"
|
20
26
|
},
|
21
27
|
"keywords": [
|
22
28
|
"mcp",
|
@@ -43,11 +49,13 @@
|
|
43
49
|
"axios": "^1.9.0",
|
44
50
|
"dotenv": "^16.5.0",
|
45
51
|
"tsx": "^4.19.4",
|
46
|
-
"typescript": "^5.3.3"
|
52
|
+
"typescript": "^5.3.3",
|
53
|
+
"vme-mcp-server": "^0.1.9"
|
47
54
|
},
|
48
55
|
"devDependencies": {
|
49
56
|
"@types/node": "^22.15.29",
|
50
57
|
"chai": "^5.2.0",
|
58
|
+
"husky": "^9.1.7",
|
51
59
|
"mocha": "^10.2.0",
|
52
60
|
"nyc": "^15.1.0"
|
53
61
|
}
|