@voxslopuli/moveit-mcp 0.1.0 → 0.1.2
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 +66 -22
- package/dist/index.js +131 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
# @voxslopuli/moveit-mcp
|
|
2
2
|
|
|
3
|
-
MCP server exposing the MOVEit Automation REST API over stdio —
|
|
3
|
+
MCP server exposing the MOVEit Automation REST API over stdio — 29 tools for browsing configuration, controlling tasks and the scheduler, running audit, file-activity, and task-runs reports, and editing tasks and the configuration.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/voxslopuli/moveit-mcp/actions)
|
|
6
6
|
[](https://www.npmjs.com/package/@voxslopuli/moveit-mcp)
|
|
7
7
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
|
-
-
|
|
10
|
+
- 29 tools covering the MOVEit Automation REST API (`/api/v1`)
|
|
11
11
|
- Browse configuration objects: hosts, task groups, global parameters, custom scripts, date lists, PGP keys, SSH keys, tasks
|
|
12
12
|
- Control task execution and scheduler: start/stop task runs (with optional task parameters), enable/disable the global scheduler
|
|
13
|
+
- Edit tasks and configuration: create/update/delete tasks, export/import the full configuration (config import = full overwrite)
|
|
13
14
|
- Web Admin-equivalent reports: audit (failed transfers), file activity (file/folder errors), task runs (completed runs)
|
|
14
15
|
- OAuth token lifecycle handled transparently: automatic refresh, revocation on shutdown
|
|
15
16
|
- Strict TLS by default; opt-out flag for self-signed certificates
|
|
@@ -41,13 +42,13 @@ npm run build
|
|
|
41
42
|
|
|
42
43
|
All configuration is via environment variables (see `.env.example`):
|
|
43
44
|
|
|
44
|
-
| Variable | Required | Default | Description
|
|
45
|
-
| -------------------------------- | -------- | ------- |
|
|
46
|
-
| `MOVEIT_BASE_URL` | yes | — |
|
|
47
|
-
| `MOVEIT_USERNAME` | yes | — | MOVEit account username
|
|
48
|
-
| `MOVEIT_PASSWORD` | yes | — | MOVEit account password
|
|
49
|
-
| `MOVEIT_SERVER_HOST` | no | — | Server hostname sent in the token request when different from the base URL host
|
|
50
|
-
| `MOVEIT_TLS_REJECT_UNAUTHORIZED` | no | `true` | Set `"false"` to accept self-signed certificates
|
|
45
|
+
| Variable | Required | Default | Description |
|
|
46
|
+
| -------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
+
| `MOVEIT_BASE_URL` | yes | — | Server root **without** `/api/v1` — e.g. `https://moveit.example.com` (API at host root) or `https://host/webadmin` (Web Admin-served). A trailing `/api/v1` is tolerated and stripped. |
|
|
48
|
+
| `MOVEIT_USERNAME` | yes | — | MOVEit account username |
|
|
49
|
+
| `MOVEIT_PASSWORD` | yes | — | MOVEit account password |
|
|
50
|
+
| `MOVEIT_SERVER_HOST` | no | — | Server hostname sent in the token request when different from the base URL host |
|
|
51
|
+
| `MOVEIT_TLS_REJECT_UNAUTHORIZED` | no | `true` | Set `"false"` to accept self-signed certificates |
|
|
51
52
|
|
|
52
53
|
Missing required variables fail startup with a list of what is missing.
|
|
53
54
|
|
|
@@ -61,9 +62,35 @@ Missing required variables fail startup with a list of what is missing.
|
|
|
61
62
|
|
|
62
63
|
## Client setup
|
|
63
64
|
|
|
64
|
-
###
|
|
65
|
+
### OpenCode
|
|
65
66
|
|
|
66
|
-
`
|
|
67
|
+
Add the server to `~/.config/opencode/opencode.json` (global) or `.opencode/opencode.json` (project):
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"$schema": "https://opencode.ai/config.json",
|
|
72
|
+
"mcp": {
|
|
73
|
+
"servers": {
|
|
74
|
+
"moveit-mcp": {
|
|
75
|
+
"type": "local",
|
|
76
|
+
"command": ["npx", "-y", "@voxslopuli/moveit-mcp"],
|
|
77
|
+
"environment": {
|
|
78
|
+
"MOVEIT_BASE_URL": "https://moveit.example.com",
|
|
79
|
+
"MOVEIT_USERNAME": "svc-account",
|
|
80
|
+
"MOVEIT_PASSWORD": "changeme",
|
|
81
|
+
"MOVEIT_TLS_REJECT_UNAUTHORIZED": "true"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Verify the connection with `opencode mcp list`. Set `"disabled": true` on a server to keep it configured without connecting.
|
|
90
|
+
|
|
91
|
+
### Other clients
|
|
92
|
+
|
|
93
|
+
`claude_desktop_config.json` (Claude Desktop):
|
|
67
94
|
|
|
68
95
|
```json
|
|
69
96
|
{
|
|
@@ -72,7 +99,7 @@ Missing required variables fail startup with a list of what is missing.
|
|
|
72
99
|
"command": "npx",
|
|
73
100
|
"args": ["-y", "@voxslopuli/moveit-mcp"],
|
|
74
101
|
"env": {
|
|
75
|
-
"MOVEIT_BASE_URL": "https://moveit.example.com
|
|
102
|
+
"MOVEIT_BASE_URL": "https://moveit.example.com",
|
|
76
103
|
"MOVEIT_USERNAME": "svc-account",
|
|
77
104
|
"MOVEIT_PASSWORD": "changeme",
|
|
78
105
|
"MOVEIT_TLS_REJECT_UNAUTHORIZED": "true"
|
|
@@ -82,9 +109,7 @@ Missing required variables fail startup with a list of what is missing.
|
|
|
82
109
|
}
|
|
83
110
|
```
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Any client that supports `mcpServers`:
|
|
112
|
+
Generic MCP client — any client that supports `mcpServers`:
|
|
88
113
|
|
|
89
114
|
```json
|
|
90
115
|
{
|
|
@@ -93,7 +118,7 @@ Any client that supports `mcpServers`:
|
|
|
93
118
|
"command": "npx",
|
|
94
119
|
"args": ["-y", "@voxslopuli/moveit-mcp"],
|
|
95
120
|
"env": {
|
|
96
|
-
"MOVEIT_BASE_URL": "https://moveit.example.com
|
|
121
|
+
"MOVEIT_BASE_URL": "https://moveit.example.com",
|
|
97
122
|
"MOVEIT_USERNAME": "svc-account",
|
|
98
123
|
"MOVEIT_PASSWORD": "changeme",
|
|
99
124
|
"MOVEIT_SERVER_HOST": "",
|
|
@@ -104,18 +129,27 @@ Any client that supports `mcpServers`:
|
|
|
104
129
|
}
|
|
105
130
|
```
|
|
106
131
|
|
|
107
|
-
> **`MOVEIT_BASE_URL`
|
|
132
|
+
> **`MOVEIT_BASE_URL` is the server root WITHOUT `/api/v1`** — deployments serve the API at different roots: some at `https://<host>/api/v1` (set `https://moveit.cnyric.org`), others under Web Admin at `https://<host>/webadmin/api/v1` (set `https://host/webadmin`). A trailing `/api/v1` is tolerated and stripped automatically.
|
|
108
133
|
|
|
109
134
|
## Tool reference
|
|
110
135
|
|
|
111
136
|
Pagination tools accept `page`, `perPage`, `fields`, and (where noted) a `name`/`uid` filter — all optional.
|
|
112
137
|
|
|
138
|
+
> **Dangerous operations:** `moveit_put_config` (full config overwrite), `moveit_update_task` (full task replacement), and `moveit_delete_task` are destructive — get the current object before writing; there is no undo.
|
|
139
|
+
|
|
113
140
|
### Info
|
|
114
141
|
|
|
115
142
|
| Tool | Input | Description |
|
|
116
143
|
| ----------------- | ----- | -------------------------------------- |
|
|
117
144
|
| `moveit_get_info` | none | Server info including product version. |
|
|
118
145
|
|
|
146
|
+
### Config
|
|
147
|
+
|
|
148
|
+
| Tool | Input | Description |
|
|
149
|
+
| ---------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
150
|
+
| `moveit_get_config` 🔒 | none | Export the full configuration (`AdminConfigModel`). Admin-only read. |
|
|
151
|
+
| `moveit_put_config` ⚠️ | `config` (AdminConfigModel) | **DESTRUCTIVE:** import (full overwrite) of the entire configuration. Get first, modify, then import. |
|
|
152
|
+
|
|
119
153
|
### Hosts
|
|
120
154
|
|
|
121
155
|
| Tool | Input | Description |
|
|
@@ -176,9 +210,17 @@ Pagination tools accept `page`, `perPage`, `fields`, and (where noted) a `name`/
|
|
|
176
210
|
| `moveit_stop_task` ⚠️ | `taskId` | **Mutating:** stop a running task. |
|
|
177
211
|
| `moveit_set_scheduler` ⚠️ | `action`: `"start"` or `"stop"` | **Mutating:** start or stop the global scheduler. |
|
|
178
212
|
|
|
213
|
+
### Task CRUD
|
|
214
|
+
|
|
215
|
+
| Tool | Input | Description |
|
|
216
|
+
| ----------------------- | ---------------------------------- | ---------------------------------------------------------------- |
|
|
217
|
+
| `moveit_create_task` | `task` (Task model JSON) | Create a new traditional task. |
|
|
218
|
+
| `moveit_update_task` ⚠️ | `taskId`, `task` (Task model JSON) | **DESTRUCTIVE:** replace a task — full replacement, not a merge. |
|
|
219
|
+
| `moveit_delete_task` ⚠️ | `taskId` | **DESTRUCTIVE:** delete a task permanently. |
|
|
220
|
+
|
|
179
221
|
### Reports
|
|
180
222
|
|
|
181
|
-
All report tools take `predicate` (required), optional `orderBy`, optional `maxCount` (positive integer, max 10000).
|
|
223
|
+
All report tools take `predicate` (required), optional `orderBy`, optional `maxCount` (positive integer, max 10000). MOVEit accepts single-quoted strings in predicates, e.g. `Status=in=('Success','Failure')`, which is convenient when embedding in JSON bodies.
|
|
182
224
|
|
|
183
225
|
| Tool | Input | Description |
|
|
184
226
|
| ----------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -201,18 +243,20 @@ Example:
|
|
|
201
243
|
- Combining: `;` or `and` for AND, `,` or `or` for OR.
|
|
202
244
|
- Operators: `==`, `!=`, `=lt=` (`<`), `=le=` (`<=`), `=gt=` (`>`), `=ge=` (`>=`), `=in=`, `=out=`, `=like=`.
|
|
203
245
|
- `=like=` supports `%` (any string) and `_` (any single character) wildcards.
|
|
204
|
-
- String values are quoted; `=in=`/`=out=` take a parenthesized, comma-separated list of quoted values, e.g. `Status=in=("Success","Failure")`.
|
|
246
|
+
- String values are quoted; `=in=`/`=out=` take a parenthesized, comma-separated list of quoted values, e.g. `Status=in=("Success","Failure")`. MOVEit also accepts single quotes in predicates, e.g. `Status=in=('Success','Failure')`, which is convenient when embedding the predicate in a JSON body.
|
|
205
247
|
- A leading `!` in `orderBy` values sorts descending (`!LogTime` = newest first).
|
|
206
248
|
|
|
207
249
|
## Out of scope (v1)
|
|
208
250
|
|
|
209
|
-
-
|
|
210
|
-
-
|
|
251
|
+
- SSH key / PGP key write operations (import/delete) — read-only today
|
|
252
|
+
- Host management (create/update/delete hosts)
|
|
253
|
+
- Schedule CRUD (date lists are readable only)
|
|
254
|
+
- ASx host config editing (AS1/AS2/AS3 details beyond listing)
|
|
211
255
|
|
|
212
256
|
## Troubleshooting
|
|
213
257
|
|
|
214
258
|
- **Missing environment variables** — startup fails with a list naming exactly which required variables are missing.
|
|
215
|
-
- **401 loops** — usually wrong credentials, or `MOVEIT_BASE_URL`
|
|
259
|
+
- **401 loops** — usually wrong credentials, or `MOVEIT_BASE_URL` pointing at the wrong root (bare host for a Web Admin-served deployment, or `/webadmin` where the API lives at the host root) while `MOVEIT_SERVER_HOST` diverges from the base URL host. Verify all three.
|
|
216
260
|
- **Self-signed certificate errors** — set `MOVEIT_TLS_REJECT_UNAUTHORIZED=false` (non-production only).
|
|
217
261
|
- **HTTP 422 on reports** — invalid `page`/`perPage` combinations or out-of-range `maxCount`; both must be positive integers (`maxCount` ≤ 10000).
|
|
218
262
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import { realpathSync } from "fs";
|
|
4
5
|
import { pathToFileURL } from "url";
|
|
5
6
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
6
7
|
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
@@ -8,7 +9,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
|
8
9
|
// package.json
|
|
9
10
|
var package_default = {
|
|
10
11
|
name: "@voxslopuli/moveit-mcp",
|
|
11
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.2",
|
|
12
13
|
type: "module",
|
|
13
14
|
engines: {
|
|
14
15
|
node: ">=20"
|
|
@@ -19,7 +20,8 @@ var package_default = {
|
|
|
19
20
|
test: "vitest run",
|
|
20
21
|
lint: "biome check .",
|
|
21
22
|
format: "biome check --write .",
|
|
22
|
-
prepare: "husky"
|
|
23
|
+
prepare: "husky",
|
|
24
|
+
"test:coverage": "vitest run --coverage"
|
|
23
25
|
},
|
|
24
26
|
"lint-staged": {
|
|
25
27
|
"*.{ts,tsx}": [
|
|
@@ -39,7 +41,8 @@ var package_default = {
|
|
|
39
41
|
tsup: "^9.0.0",
|
|
40
42
|
tsx: "^4.23.15",
|
|
41
43
|
typescript: "^7.0.2",
|
|
42
|
-
vitest: "^5.1.0"
|
|
44
|
+
vitest: "^5.1.0",
|
|
45
|
+
"@vitest/coverage-v8": "^5.1.0"
|
|
43
46
|
},
|
|
44
47
|
license: "MIT",
|
|
45
48
|
repository: {
|
|
@@ -121,6 +124,21 @@ var MoveitClient = class {
|
|
|
121
124
|
async setScheduler(action) {
|
|
122
125
|
await this.request("PUT", `/api/v1/tasks/scheduler/${action}`);
|
|
123
126
|
}
|
|
127
|
+
async getConfig() {
|
|
128
|
+
return this.request("GET", "/api/v1/config");
|
|
129
|
+
}
|
|
130
|
+
async putConfig(config) {
|
|
131
|
+
return this.request("PUT", "/api/v1/config", config);
|
|
132
|
+
}
|
|
133
|
+
async createTask(task) {
|
|
134
|
+
return this.request("POST", "/api/v1/tasks", task);
|
|
135
|
+
}
|
|
136
|
+
async updateTask(id, task) {
|
|
137
|
+
return this.request("PUT", `/api/v1/tasks/${id}`, task);
|
|
138
|
+
}
|
|
139
|
+
async deleteTask(id) {
|
|
140
|
+
return this.request("DELETE", `/api/v1/tasks/${id}`);
|
|
141
|
+
}
|
|
124
142
|
async report(kind, q) {
|
|
125
143
|
const body = { predicate: q.predicate };
|
|
126
144
|
if (q.orderBy !== void 0) body.orderBy = q.orderBy;
|
|
@@ -200,7 +218,7 @@ function loadConfig(env) {
|
|
|
200
218
|
);
|
|
201
219
|
const tlsRaw = env.MOVEIT_TLS_REJECT_UNAUTHORIZED;
|
|
202
220
|
return {
|
|
203
|
-
baseUrl: baseUrl.replace(/\/+$/, ""),
|
|
221
|
+
baseUrl: baseUrl.replace(/\/+$/, "").replace(/\/api\/v1$/i, "").replace(/\/+$/, ""),
|
|
204
222
|
username,
|
|
205
223
|
password,
|
|
206
224
|
serverHost: env.MOVEIT_SERVER_HOST,
|
|
@@ -303,19 +321,50 @@ var TokenManager = class {
|
|
|
303
321
|
}
|
|
304
322
|
};
|
|
305
323
|
|
|
324
|
+
// src/tools/config.ts
|
|
325
|
+
import { z } from "zod/v4";
|
|
326
|
+
|
|
327
|
+
// src/tools/util.ts
|
|
328
|
+
function jsonResult(data) {
|
|
329
|
+
return {
|
|
330
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// src/tools/config.ts
|
|
335
|
+
var NonEmptyRecord = z.record(z.string(), z.unknown()).refine((o) => Object.keys(o).length > 0, "must be a non-empty object");
|
|
336
|
+
function registerMoveitConfig(server, client) {
|
|
337
|
+
server.registerTool(
|
|
338
|
+
"moveit_get_config",
|
|
339
|
+
{
|
|
340
|
+
description: "Export the MOVEit Automation configuration (admin-only; returns the full AdminConfigModel).",
|
|
341
|
+
inputSchema: z.object({})
|
|
342
|
+
},
|
|
343
|
+
async () => jsonResult(await client.getConfig())
|
|
344
|
+
);
|
|
345
|
+
server.registerTool(
|
|
346
|
+
"moveit_put_config",
|
|
347
|
+
{
|
|
348
|
+
description: "IMPORT (overwrite) the entire MOVEit Automation configuration with the given AdminConfigModel. DESTRUCTIVE: replaces all existing configuration. Get the current config first, modify, then import.",
|
|
349
|
+
inputSchema: z.object({ config: NonEmptyRecord })
|
|
350
|
+
},
|
|
351
|
+
async ({ config }) => jsonResult(await client.putConfig(config))
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
|
|
306
355
|
// src/tools/customscripts.ts
|
|
307
|
-
import { z as
|
|
356
|
+
import { z as z3 } from "zod/v4";
|
|
308
357
|
|
|
309
358
|
// src/schemas.ts
|
|
310
|
-
import { z } from "zod/v4";
|
|
311
|
-
var ListParamsSchema =
|
|
312
|
-
page:
|
|
313
|
-
perPage:
|
|
314
|
-
fields:
|
|
315
|
-
name:
|
|
359
|
+
import { z as z2 } from "zod/v4";
|
|
360
|
+
var ListParamsSchema = z2.object({
|
|
361
|
+
page: z2.number().int().positive().optional(),
|
|
362
|
+
perPage: z2.number().int().positive().optional(),
|
|
363
|
+
fields: z2.string().optional(),
|
|
364
|
+
name: z2.string().optional()
|
|
316
365
|
});
|
|
317
366
|
var HostListParamsSchema = ListParamsSchema.extend({
|
|
318
|
-
type:
|
|
367
|
+
type: z2.enum([
|
|
319
368
|
"FileSystem",
|
|
320
369
|
"FTP",
|
|
321
370
|
"POP3",
|
|
@@ -329,26 +378,19 @@ var HostListParamsSchema = ListParamsSchema.extend({
|
|
|
329
378
|
"S3"
|
|
330
379
|
]).optional()
|
|
331
380
|
});
|
|
332
|
-
var PgpListParamsSchema =
|
|
333
|
-
page:
|
|
334
|
-
perPage:
|
|
335
|
-
fields:
|
|
336
|
-
uid:
|
|
381
|
+
var PgpListParamsSchema = z2.object({
|
|
382
|
+
page: z2.number().int().positive().optional(),
|
|
383
|
+
perPage: z2.number().int().positive().optional(),
|
|
384
|
+
fields: z2.string().optional(),
|
|
385
|
+
uid: z2.string().optional()
|
|
337
386
|
});
|
|
338
|
-
var IdParamsSchema =
|
|
339
|
-
var ReportQuerySchema =
|
|
340
|
-
predicate:
|
|
341
|
-
orderBy:
|
|
342
|
-
maxCount:
|
|
387
|
+
var IdParamsSchema = z2.object({ id: z2.string().min(1) });
|
|
388
|
+
var ReportQuerySchema = z2.object({
|
|
389
|
+
predicate: z2.string().min(1),
|
|
390
|
+
orderBy: z2.string().optional(),
|
|
391
|
+
maxCount: z2.number().int().positive().max(1e4).optional()
|
|
343
392
|
});
|
|
344
393
|
|
|
345
|
-
// src/tools/util.ts
|
|
346
|
-
function jsonResult(data) {
|
|
347
|
-
return {
|
|
348
|
-
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
|
|
352
394
|
// src/tools/customscripts.ts
|
|
353
395
|
function registerMoveitCustomScripts(server, client) {
|
|
354
396
|
server.registerTool(
|
|
@@ -363,14 +405,14 @@ function registerMoveitCustomScripts(server, client) {
|
|
|
363
405
|
"moveit_get_custom_script",
|
|
364
406
|
{
|
|
365
407
|
description: "Get a single custom script by its custom script ID (script name).",
|
|
366
|
-
inputSchema:
|
|
408
|
+
inputSchema: z3.object({ customScriptId: z3.string().min(1) })
|
|
367
409
|
},
|
|
368
410
|
async ({ customScriptId }) => jsonResult(await client.get("customscripts", customScriptId))
|
|
369
411
|
);
|
|
370
412
|
}
|
|
371
413
|
|
|
372
414
|
// src/tools/datelists.ts
|
|
373
|
-
import { z as
|
|
415
|
+
import { z as z4 } from "zod/v4";
|
|
374
416
|
function registerMoveitDateLists(server, client) {
|
|
375
417
|
server.registerTool(
|
|
376
418
|
"moveit_list_date_lists",
|
|
@@ -384,14 +426,14 @@ function registerMoveitDateLists(server, client) {
|
|
|
384
426
|
"moveit_get_date_list",
|
|
385
427
|
{
|
|
386
428
|
description: "Get a single date list by its date list ID (list name).",
|
|
387
|
-
inputSchema:
|
|
429
|
+
inputSchema: z4.object({ dateListId: z4.string().min(1) })
|
|
388
430
|
},
|
|
389
431
|
async ({ dateListId }) => jsonResult(await client.get("datelists", dateListId))
|
|
390
432
|
);
|
|
391
433
|
}
|
|
392
434
|
|
|
393
435
|
// src/tools/globalparameters.ts
|
|
394
|
-
import { z as
|
|
436
|
+
import { z as z5 } from "zod/v4";
|
|
395
437
|
function registerMoveitGlobalParameters(server, client) {
|
|
396
438
|
server.registerTool(
|
|
397
439
|
"moveit_list_global_parameters",
|
|
@@ -405,14 +447,14 @@ function registerMoveitGlobalParameters(server, client) {
|
|
|
405
447
|
"moveit_get_global_parameter",
|
|
406
448
|
{
|
|
407
449
|
description: "Get a single MOVEit Transfer global parameter by its exact name.",
|
|
408
|
-
inputSchema:
|
|
450
|
+
inputSchema: z5.object({ name: z5.string().min(1) })
|
|
409
451
|
},
|
|
410
452
|
async ({ name }) => jsonResult(await client.get("globalparameters", name))
|
|
411
453
|
);
|
|
412
454
|
}
|
|
413
455
|
|
|
414
456
|
// src/tools/hosts.ts
|
|
415
|
-
import { z as
|
|
457
|
+
import { z as z6 } from "zod/v4";
|
|
416
458
|
function registerMoveitHosts(server, client) {
|
|
417
459
|
server.registerTool(
|
|
418
460
|
"moveit_list_hosts",
|
|
@@ -426,7 +468,7 @@ function registerMoveitHosts(server, client) {
|
|
|
426
468
|
"moveit_get_host",
|
|
427
469
|
{
|
|
428
470
|
description: "Get a single MOVEit Transfer host by its host ID (host name).",
|
|
429
|
-
inputSchema:
|
|
471
|
+
inputSchema: z6.object({ hostId: z6.string().min(1) })
|
|
430
472
|
},
|
|
431
473
|
async ({ hostId }) => jsonResult(await client.get("hosts", hostId))
|
|
432
474
|
);
|
|
@@ -444,7 +486,7 @@ function registerMoveitInfo(server, client) {
|
|
|
444
486
|
}
|
|
445
487
|
|
|
446
488
|
// src/tools/pgpkeys.ts
|
|
447
|
-
import { z as
|
|
489
|
+
import { z as z7 } from "zod/v4";
|
|
448
490
|
function registerMoveitPgpKeys(server, client) {
|
|
449
491
|
server.registerTool(
|
|
450
492
|
"moveit_list_pgp_keys",
|
|
@@ -458,7 +500,7 @@ function registerMoveitPgpKeys(server, client) {
|
|
|
458
500
|
"moveit_get_pgp_key",
|
|
459
501
|
{
|
|
460
502
|
description: "Get a single OpenPGP key by its PGP key ID.",
|
|
461
|
-
inputSchema:
|
|
503
|
+
inputSchema: z7.object({ pGPKeyId: z7.string().min(1) })
|
|
462
504
|
},
|
|
463
505
|
async ({ pGPKeyId }) => jsonResult(await client.get("pgpkeys", pGPKeyId))
|
|
464
506
|
);
|
|
@@ -493,7 +535,7 @@ function registerMoveitReports(server, client) {
|
|
|
493
535
|
}
|
|
494
536
|
|
|
495
537
|
// src/tools/sshkeys.ts
|
|
496
|
-
import { z as
|
|
538
|
+
import { z as z8 } from "zod/v4";
|
|
497
539
|
function registerMoveitSshKeys(server, client) {
|
|
498
540
|
server.registerTool(
|
|
499
541
|
"moveit_list_ssh_keys",
|
|
@@ -507,14 +549,50 @@ function registerMoveitSshKeys(server, client) {
|
|
|
507
549
|
"moveit_get_ssh_key",
|
|
508
550
|
{
|
|
509
551
|
description: "Get a single SSH key by its SSH key ID (key name).",
|
|
510
|
-
inputSchema:
|
|
552
|
+
inputSchema: z8.object({ sshKeyId: z8.string().min(1) })
|
|
511
553
|
},
|
|
512
554
|
async ({ sshKeyId }) => jsonResult(await client.get("sshkeys", sshKeyId))
|
|
513
555
|
);
|
|
514
556
|
}
|
|
515
557
|
|
|
558
|
+
// src/tools/taskcrud.ts
|
|
559
|
+
import { z as z9 } from "zod/v4";
|
|
560
|
+
var NonEmptyRecord2 = z9.record(z9.string(), z9.unknown()).refine((o) => Object.keys(o).length > 0, "must be a non-empty object");
|
|
561
|
+
function registerMoveitTaskCrud(server, client) {
|
|
562
|
+
server.registerTool(
|
|
563
|
+
"moveit_create_task",
|
|
564
|
+
{
|
|
565
|
+
description: "Create a new traditional task from a Task model JSON. Tip: model the JSON on a moveit_get_task result for a similar task.",
|
|
566
|
+
inputSchema: z9.object({ task: NonEmptyRecord2 })
|
|
567
|
+
},
|
|
568
|
+
async ({ task }) => jsonResult(await client.createTask(task))
|
|
569
|
+
);
|
|
570
|
+
server.registerTool(
|
|
571
|
+
"moveit_update_task",
|
|
572
|
+
{
|
|
573
|
+
description: "Replace a task with the given Task model JSON (full replacement, not a merge).",
|
|
574
|
+
inputSchema: z9.object({
|
|
575
|
+
taskId: z9.string().min(1),
|
|
576
|
+
task: NonEmptyRecord2
|
|
577
|
+
})
|
|
578
|
+
},
|
|
579
|
+
async ({ taskId, task }) => jsonResult(await client.updateTask(taskId, task))
|
|
580
|
+
);
|
|
581
|
+
server.registerTool(
|
|
582
|
+
"moveit_delete_task",
|
|
583
|
+
{
|
|
584
|
+
description: "Delete a task permanently (destructive, no undo).",
|
|
585
|
+
inputSchema: z9.object({ taskId: z9.string().min(1) })
|
|
586
|
+
},
|
|
587
|
+
async ({ taskId }) => {
|
|
588
|
+
await client.deleteTask(taskId);
|
|
589
|
+
return jsonResult({ deleted: taskId });
|
|
590
|
+
}
|
|
591
|
+
);
|
|
592
|
+
}
|
|
593
|
+
|
|
516
594
|
// src/tools/taskgroups.ts
|
|
517
|
-
import { z as
|
|
595
|
+
import { z as z10 } from "zod/v4";
|
|
518
596
|
function registerMoveitTaskGroups(server, client) {
|
|
519
597
|
server.registerTool(
|
|
520
598
|
"moveit_list_task_groups",
|
|
@@ -528,14 +606,14 @@ function registerMoveitTaskGroups(server, client) {
|
|
|
528
606
|
"moveit_get_task_group",
|
|
529
607
|
{
|
|
530
608
|
description: "Get a single MOVEit Transfer task group by its name.",
|
|
531
|
-
inputSchema:
|
|
609
|
+
inputSchema: z10.object({ taskGroupName: z10.string().min(1) })
|
|
532
610
|
},
|
|
533
611
|
async ({ taskGroupName }) => jsonResult(await client.get("taskgroups", taskGroupName))
|
|
534
612
|
);
|
|
535
613
|
}
|
|
536
614
|
|
|
537
615
|
// src/tools/tasks.ts
|
|
538
|
-
import { z as
|
|
616
|
+
import { z as z11 } from "zod/v4";
|
|
539
617
|
function registerMoveitTasks(server, client) {
|
|
540
618
|
server.registerTool(
|
|
541
619
|
"moveit_list_tasks",
|
|
@@ -549,7 +627,7 @@ function registerMoveitTasks(server, client) {
|
|
|
549
627
|
"moveit_get_task",
|
|
550
628
|
{
|
|
551
629
|
description: "Get a single MOVEit Automation task by its task ID.",
|
|
552
|
-
inputSchema:
|
|
630
|
+
inputSchema: z11.object({ taskId: z11.string().min(1) })
|
|
553
631
|
},
|
|
554
632
|
async ({ taskId }) => jsonResult(await client.get("tasks", taskId))
|
|
555
633
|
);
|
|
@@ -557,7 +635,7 @@ function registerMoveitTasks(server, client) {
|
|
|
557
635
|
"moveit_list_running_tasks",
|
|
558
636
|
{
|
|
559
637
|
description: "List currently running MOVEit Automation task runs.",
|
|
560
|
-
inputSchema:
|
|
638
|
+
inputSchema: z11.object({})
|
|
561
639
|
},
|
|
562
640
|
async () => jsonResult(await client.runningTasks())
|
|
563
641
|
);
|
|
@@ -565,9 +643,9 @@ function registerMoveitTasks(server, client) {
|
|
|
565
643
|
"moveit_start_task",
|
|
566
644
|
{
|
|
567
645
|
description: "Start a run of a MOVEit Automation task on the server (mutating action). Optionally accepts task parameters as string key/value pairs.",
|
|
568
|
-
inputSchema:
|
|
569
|
-
taskId:
|
|
570
|
-
parameters:
|
|
646
|
+
inputSchema: z11.object({
|
|
647
|
+
taskId: z11.string().min(1),
|
|
648
|
+
parameters: z11.record(z11.string(), z11.string()).optional()
|
|
571
649
|
})
|
|
572
650
|
},
|
|
573
651
|
async ({ taskId, parameters }) => jsonResult(await client.startTask(taskId, parameters))
|
|
@@ -576,7 +654,7 @@ function registerMoveitTasks(server, client) {
|
|
|
576
654
|
"moveit_stop_task",
|
|
577
655
|
{
|
|
578
656
|
description: "Stop a running MOVEit Automation task on the server (mutating action).",
|
|
579
|
-
inputSchema:
|
|
657
|
+
inputSchema: z11.object({ taskId: z11.string().min(1) })
|
|
580
658
|
},
|
|
581
659
|
async ({ taskId }) => jsonResult(await client.stopTask(taskId))
|
|
582
660
|
);
|
|
@@ -584,7 +662,7 @@ function registerMoveitTasks(server, client) {
|
|
|
584
662
|
"moveit_set_scheduler",
|
|
585
663
|
{
|
|
586
664
|
description: "Start or stop the global MOVEit Automation scheduler on the server (mutating action).",
|
|
587
|
-
inputSchema:
|
|
665
|
+
inputSchema: z11.object({ action: z11.enum(["start", "stop"]) })
|
|
588
666
|
},
|
|
589
667
|
async ({ action }) => {
|
|
590
668
|
await client.setScheduler(action);
|
|
@@ -610,6 +688,8 @@ function createServer(cfg) {
|
|
|
610
688
|
registerMoveitPgpKeys(server, client);
|
|
611
689
|
registerMoveitSshKeys(server, client);
|
|
612
690
|
registerMoveitTasks(server, client);
|
|
691
|
+
registerMoveitTaskCrud(server, client);
|
|
692
|
+
registerMoveitConfig(server, client);
|
|
613
693
|
registerMoveitReports(server, client);
|
|
614
694
|
let shuttingDown = false;
|
|
615
695
|
const shutdown = async () => {
|
|
@@ -637,7 +717,7 @@ async function main() {
|
|
|
637
717
|
throw err;
|
|
638
718
|
}
|
|
639
719
|
}
|
|
640
|
-
if (process.argv[1] &&
|
|
720
|
+
if (process.argv[1] && pathToFileURL(realpathSync(process.argv[1])).href === import.meta.url) {
|
|
641
721
|
void main();
|
|
642
722
|
}
|
|
643
723
|
export {
|