vcf-automation-mcp 0.2.0 → 0.2.1
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 +33 -4
- package/dist/executor.js +12 -0
- package/dist/setup.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,13 +40,30 @@ There are also two helper tools:
|
|
|
40
40
|
|
|
41
41
|
Login works the same way as [vcf-orchestrator-mcp](https://github.com/imtrinity94/vcf-orchestrator-mcp). A one-time `setup` creates a VCF Automation **service account** and stores its refresh token on your machine. After that the server keeps its own login alive, so no token or password goes into your MCP config.
|
|
42
42
|
|
|
43
|
-
### 1.
|
|
43
|
+
### 1. Install globally
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
npm i -g vcf-automation-mcp
|
|
47
|
-
vcf-automation-mcp setup --url "https://auto.vmw.lab" --org "vmapps-org" --user "<local-admin>" --name "Lab-VCFA-MCP" --role "Organization Owner" --insecure
|
|
48
47
|
```
|
|
49
48
|
|
|
49
|
+
The MCP config below runs the `vcf-automation-mcp` command, so the global install is required. If you only run setup with `npx`, there's no command for the client to start and Claude Desktop shows **"vcf-automation couldn't start. Its command wasn't found."**
|
|
50
|
+
|
|
51
|
+
### 2. Run setup once
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
vcf-automation-mcp setup --url "https://auto.vmw.lab" --org "vmapps-org" --user "admin" --name "Lab-VCFA-MCP" --role "Service Broker Administrator,Orchestrator Administrator,Assembler Administrator" --insecure
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This exact command was tested end to end against a VCF Automation 9 VM Apps org (Windows 11, Claude Desktop).
|
|
58
|
+
|
|
59
|
+
**Role names must exist in your org exactly as typed.** Each name becomes a `urn:vcloud:role:<name>` scope. A name the org doesn't have fails registration with HTTP 500, for example:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Registering service account failed: HTTP 500 ... Unable to find the following role(s) in org <id>: [Organization Administrator].
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The error names only the roles it couldn't find, so drop or rename those and run setup again (the failed run creates nothing, so you can reuse the same `--name`). Role names vary per org: check **Access Control > Roles** in the tenant UI, or the role list in setup's first line (`1/5 Logged in as admin@vmapps-org (..., role ...)`). Leave `--role` out to copy the role of the user you log in with.
|
|
66
|
+
|
|
50
67
|
Setup asks for the password with a masked prompt. It uses it once to log in and never stores it. Then it:
|
|
51
68
|
|
|
52
69
|
1. Logs in as `user@org` at `/cloudapi/1.0.0/sessions`.
|
|
@@ -70,7 +87,7 @@ It saves the refresh token to `~/.vcf-automation-mcp/tokens.json` (on Windows, `
|
|
|
70
87
|
|
|
71
88
|
> If the access check shows **403** for an API, the service account's role doesn't cover it. Give it a broader role (e.g. Organization Owner), then restart your MCP client.
|
|
72
89
|
|
|
73
|
-
###
|
|
90
|
+
### 3. Add it to your MCP client
|
|
74
91
|
|
|
75
92
|
```json
|
|
76
93
|
{
|
|
@@ -89,7 +106,19 @@ It saves the refresh token to `~/.vcf-automation-mcp/tokens.json` (on Windows, `
|
|
|
89
106
|
}
|
|
90
107
|
```
|
|
91
108
|
|
|
92
|
-
The config file is at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS and `%APPDATA%\Claude\claude_desktop_config.json` on Windows.
|
|
109
|
+
The config file is at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS and `%APPDATA%\Claude\claude_desktop_config.json` on Windows. After editing it, quit Claude Desktop completely (on Windows, from the system tray) and reopen it.
|
|
110
|
+
|
|
111
|
+
**Windows: if the command still isn't found** after the global install, Claude Desktop isn't seeing the npm folder on its PATH. Run `where vcf-automation-mcp` and put the full path in `command`, with doubled backslashes:
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
"command": "C:\\Users\\<you>\\AppData\\Roaming\\npm\\vcf-automation-mcp.cmd"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Without a global install, `"command": "cmd"` with `"args": ["/c", "npx", "-y", "vcf-automation-mcp"]` also works, but it's slower to start.
|
|
118
|
+
|
|
119
|
+
### 4. Check the connection
|
|
120
|
+
|
|
121
|
+
Ask your client to run `vcfa_connection_status` with `test: true`. A working setup shows `"modeInUse": "api-token"`, the token file under your home folder, and `GET /iaas/api/about -> HTTP 200 OK`. On VCF Automation 9 the token endpoint resolves to `/tm/oauth/tenant/<org>/token`. With the `VCFA_SERVICES` list above, 182 of the 696 tools load.
|
|
93
122
|
|
|
94
123
|
## Configuration
|
|
95
124
|
|
package/dist/executor.js
CHANGED
|
@@ -20,6 +20,18 @@ export function buildUrl(cfg, op, args) {
|
|
|
20
20
|
else if (prm.in === 'query' && v !== undefined && v !== null && v !== '') {
|
|
21
21
|
if (Array.isArray(v))
|
|
22
22
|
v.forEach(x => qs.append(prm.name, stringifyParam(x)));
|
|
23
|
+
else if (typeof v === 'object') {
|
|
24
|
+
// OpenAPI default for object query params is style=form, explode=true:
|
|
25
|
+
// { page: 0, size: 5, sort: ['name,asc'] } -> page=0&size=5&sort=name,asc (e.g. Spring Pageable on /vro/workflows)
|
|
26
|
+
for (const [k, x] of Object.entries(v)) {
|
|
27
|
+
if (x === undefined || x === null || x === '')
|
|
28
|
+
continue;
|
|
29
|
+
if (Array.isArray(x))
|
|
30
|
+
x.forEach(y => qs.append(k, stringifyParam(y)));
|
|
31
|
+
else
|
|
32
|
+
qs.append(k, stringifyParam(x));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
23
35
|
else
|
|
24
36
|
qs.append(prm.name, stringifyParam(v));
|
|
25
37
|
}
|
package/dist/setup.js
CHANGED
|
@@ -327,4 +327,10 @@ export async function runSetup(argv) {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
}, null, 2));
|
|
330
|
+
console.log('\n"command": "vcf-automation-mcp" needs the global install: npm i -g vcf-automation-mcp');
|
|
331
|
+
console.log('If you ran setup with npx, install it globally now, or the MCP client reports "command not found".');
|
|
332
|
+
if (process.platform === 'win32') {
|
|
333
|
+
console.log('Windows: if the client still cannot find it, run "where vcf-automation-mcp" and put that full path');
|
|
334
|
+
console.log('(e.g. C:\\\\Users\\\\<you>\\\\AppData\\\\Roaming\\\\npm\\\\vcf-automation-mcp.cmd) in "command".');
|
|
335
|
+
}
|
|
330
336
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vcf-automation-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP server for VCF Automation 9 (VM Apps organization) — one MCP tool per REST operation across ABX, Approvals, Blueprint, Catalog, Deployment, Policies, Custom Forms, Content, Event Broker, IaaS, Identity, Onboarding, Orchestrator Gateway, Projects and Provider Management APIs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|