@unraid-toolkit/mcp 0.2.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/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/approval.d.ts +72 -0
- package/dist/approval.d.ts.map +1 -0
- package/dist/approval.js +106 -0
- package/dist/approval.js.map +1 -0
- package/dist/audit.d.ts +41 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +38 -0
- package/dist/audit.js.map +1 -0
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +88 -0
- package/dist/config.js.map +1 -0
- package/dist/format.d.ts +14 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +15 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/log.d.ts +17 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +36 -0
- package/dist/log.js.map +1 -0
- package/dist/server.d.ts +25 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +16 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/annotations.d.ts +38 -0
- package/dist/tools/annotations.d.ts.map +1 -0
- package/dist/tools/annotations.js +38 -0
- package/dist/tools/annotations.js.map +1 -0
- package/dist/tools/array.d.ts +10 -0
- package/dist/tools/array.d.ts.map +1 -0
- package/dist/tools/array.js +145 -0
- package/dist/tools/array.js.map +1 -0
- package/dist/tools/confirm.d.ts +14 -0
- package/dist/tools/confirm.d.ts.map +1 -0
- package/dist/tools/confirm.js +17 -0
- package/dist/tools/confirm.js.map +1 -0
- package/dist/tools/destructive.d.ts +34 -0
- package/dist/tools/destructive.d.ts.map +1 -0
- package/dist/tools/destructive.js +84 -0
- package/dist/tools/destructive.js.map +1 -0
- package/dist/tools/disks.d.ts +8 -0
- package/dist/tools/disks.d.ts.map +1 -0
- package/dist/tools/disks.js +17 -0
- package/dist/tools/disks.js.map +1 -0
- package/dist/tools/docker.d.ts +8 -0
- package/dist/tools/docker.d.ts.map +1 -0
- package/dist/tools/docker.js +105 -0
- package/dist/tools/docker.js.map +1 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/notifications.d.ts +8 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +60 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/pagination.d.ts +14 -0
- package/dist/tools/pagination.d.ts.map +1 -0
- package/dist/tools/pagination.js +14 -0
- package/dist/tools/pagination.js.map +1 -0
- package/dist/tools/policy.d.ts +39 -0
- package/dist/tools/policy.d.ts.map +1 -0
- package/dist/tools/policy.js +72 -0
- package/dist/tools/policy.js.map +1 -0
- package/dist/tools/shares.d.ts +8 -0
- package/dist/tools/shares.d.ts.map +1 -0
- package/dist/tools/shares.js +17 -0
- package/dist/tools/shares.js.map +1 -0
- package/dist/tools/system.d.ts +9 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +37 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/tools/ups.d.ts +8 -0
- package/dist/tools/ups.d.ts.map +1 -0
- package/dist/tools/ups.js +17 -0
- package/dist/tools/ups.js.map +1 -0
- package/dist/tools/vm.d.ts +10 -0
- package/dist/tools/vm.d.ts.map +1 -0
- package/dist/tools/vm.js +64 -0
- package/dist/tools/vm.js.map +1 -0
- package/dist/transports/http.d.ts +18 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +92 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/stdio.d.ts +10 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +13 -0
- package/dist/transports/stdio.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User-share tools. Thin adapter over the SDK share operations.
|
|
3
|
+
*/
|
|
4
|
+
import { listShares } from '@unraid-toolkit/sdk';
|
|
5
|
+
import { formatResult } from '../format.js';
|
|
6
|
+
import { READ_ONLY_ANNOTATIONS } from './annotations.js';
|
|
7
|
+
import { PAGINATION_INPUT } from './pagination.js';
|
|
8
|
+
/** Register user-share tools on the given server. */
|
|
9
|
+
export function registerShareTools(server, ctx) {
|
|
10
|
+
server.registerTool('unraid_list_shares', {
|
|
11
|
+
title: 'List Unraid User Shares',
|
|
12
|
+
description: `List Unraid user shares with capacity (free/used/total, in KB), included/excluded disks, cache setting, allocation policy, and comment. Use limit/offset to page.`,
|
|
13
|
+
inputSchema: { ...PAGINATION_INPUT },
|
|
14
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
15
|
+
}, async ({ limit, offset }) => formatResult(await listShares(ctx.client, { limit, offset })));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=shares.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shares.js","sourceRoot":"","sources":["../../src/tools/shares.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,qDAAqD;AACrD,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,GAAkB;IACtE,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,mKAAmK;QAChL,WAAW,EAAE,EAAE,GAAG,gBAAgB,EAAE;QACpC,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAC3F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System / connection tools. Each handler is a thin adapter: call the SDK
|
|
3
|
+
* operation, then convert its envelope with {@link formatResult}.
|
|
4
|
+
*/
|
|
5
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
import type { ServerContext } from '../server.js';
|
|
7
|
+
/** Register system/connection tools on the given server. */
|
|
8
|
+
export declare function registerSystemTools(server: McpServer, ctx: ServerContext): void;
|
|
9
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAyC/E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System / connection tools. Each handler is a thin adapter: call the SDK
|
|
3
|
+
* operation, then convert its envelope with {@link formatResult}.
|
|
4
|
+
*/
|
|
5
|
+
import { getHealth, getSystemInfo, getSystemMetrics } from '@unraid-toolkit/sdk';
|
|
6
|
+
import { formatResult } from '../format.js';
|
|
7
|
+
import { READ_ONLY_ANNOTATIONS } from './annotations.js';
|
|
8
|
+
/** Register system/connection tools on the given server. */
|
|
9
|
+
export function registerSystemTools(server, ctx) {
|
|
10
|
+
server.registerTool('unraid_connection_health', {
|
|
11
|
+
title: 'Check Unraid API Connection',
|
|
12
|
+
description: `Verify that the Unraid GraphQL API is reachable and the configured API key is accepted.
|
|
13
|
+
|
|
14
|
+
Performs a lightweight probe — it does not read array, Docker, or system data. Use it first to confirm connectivity and authentication, or to diagnose why other tools are failing.
|
|
15
|
+
|
|
16
|
+
Returns a JSON envelope: on success, the reachable endpoint; on failure, a structured error (auth, network, ...).`,
|
|
17
|
+
inputSchema: {},
|
|
18
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
19
|
+
}, async () => formatResult(await getHealth(ctx.client)));
|
|
20
|
+
server.registerTool('unraid_system_info', {
|
|
21
|
+
title: 'Get Unraid System Info',
|
|
22
|
+
description: `Get static system information for the server: OS (distro, release, kernel, hostname, uptime), CPU (model, cores, threads), physical memory layout, motherboard, and software versions (Unraid, API, Docker, etc.).
|
|
23
|
+
|
|
24
|
+
This is identity/inventory data, not live load. For current CPU/memory utilization use unraid_system_metrics.`,
|
|
25
|
+
inputSchema: {},
|
|
26
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
27
|
+
}, async () => formatResult(await getSystemInfo(ctx.client)));
|
|
28
|
+
server.registerTool('unraid_system_metrics', {
|
|
29
|
+
title: 'Get Unraid System Metrics',
|
|
30
|
+
description: `Get live system utilization: overall and per-core CPU load (percent), and memory usage (total/used/free/available and swap, in bytes plus percentages).
|
|
31
|
+
|
|
32
|
+
This is a point-in-time snapshot. For static hardware/OS details use unraid_system_info.`,
|
|
33
|
+
inputSchema: {},
|
|
34
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
35
|
+
}, async () => formatResult(await getSystemMetrics(ctx.client)));
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../src/tools/system.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,4DAA4D;AAC5D,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,GAAkB;IACvE,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,KAAK,EAAE,6BAA6B;QACpC,WAAW,EAAE;;;;kHAI+F;QAC5G,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CACtD,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE;;8GAE2F;QACxG,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAC1D,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE;;yFAEsE;QACnF,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UPS tools. Thin adapter over the SDK UPS operations.
|
|
3
|
+
*/
|
|
4
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
+
import type { ServerContext } from '../server.js';
|
|
6
|
+
/** Register UPS tools on the given server. */
|
|
7
|
+
export declare function registerUpsTools(server: McpServer, ctx: ServerContext): void;
|
|
8
|
+
//# sourceMappingURL=ups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ups.d.ts","sourceRoot":"","sources":["../../src/tools/ups.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,8CAA8C;AAC9C,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CAW5E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UPS tools. Thin adapter over the SDK UPS operations.
|
|
3
|
+
*/
|
|
4
|
+
import { getUpsStatus } from '@unraid-toolkit/sdk';
|
|
5
|
+
import { formatResult } from '../format.js';
|
|
6
|
+
import { READ_ONLY_ANNOTATIONS } from './annotations.js';
|
|
7
|
+
import { PAGINATION_INPUT } from './pagination.js';
|
|
8
|
+
/** Register UPS tools on the given server. */
|
|
9
|
+
export function registerUpsTools(server, ctx) {
|
|
10
|
+
server.registerTool('unraid_ups_status', {
|
|
11
|
+
title: 'Get Unraid UPS Status',
|
|
12
|
+
description: `List connected UPS devices with battery telemetry (charge %, estimated runtime, health) and power telemetry (input/output voltage, load %, current/nominal watts). Use limit/offset if multiple UPS units are attached.`,
|
|
13
|
+
inputSchema: { ...PAGINATION_INPUT },
|
|
14
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
15
|
+
}, async ({ limit, offset }) => formatResult(await getUpsStatus(ctx.client, { limit, offset })));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ups.js","sourceRoot":"","sources":["../../src/tools/ups.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,8CAA8C;AAC9C,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,GAAkB;IACpE,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,yNAAyN;QACtO,WAAW,EAAE,EAAE,GAAG,gBAAgB,EAAE;QACpC,WAAW,EAAE,qBAAqB;KACnC,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAC7F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Virtual machine tools. Thin adapters over the SDK VM operations — a read-only
|
|
3
|
+
* list plus the Phase 2 safe lifecycle controls (start/stop/pause/resume), each
|
|
4
|
+
* gated by the read-only policy floor.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type { ServerContext } from '../server.js';
|
|
8
|
+
/** Register VM tools on the given server. */
|
|
9
|
+
export declare function registerVmTools(server: McpServer, ctx: ServerContext): void;
|
|
10
|
+
//# sourceMappingURL=vm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm.d.ts","sourceRoot":"","sources":["../../src/tools/vm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwBzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAwBlD,6CAA6C;AAC7C,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA6C3E"}
|
package/dist/tools/vm.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Virtual machine tools. Thin adapters over the SDK VM operations — a read-only
|
|
3
|
+
* list plus the Phase 2 safe lifecycle controls (start/stop/pause/resume), each
|
|
4
|
+
* gated by the read-only policy floor.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { listVms, startVm, stopVm, pauseVm, resumeVm, forceStopVm, rebootVm, resetVm, } from '@unraid-toolkit/sdk';
|
|
8
|
+
import { formatResult } from '../format.js';
|
|
9
|
+
import { READ_ONLY_ANNOTATIONS, SAFE_WRITE_ANNOTATIONS, DESTRUCTIVE_ANNOTATIONS, } from './annotations.js';
|
|
10
|
+
import { PAGINATION_INPUT } from './pagination.js';
|
|
11
|
+
import { CONFIRM_TOKEN_INPUT } from './confirm.js';
|
|
12
|
+
import { readOnlyBlock } from './policy.js';
|
|
13
|
+
import { runDestructive } from './destructive.js';
|
|
14
|
+
/** The Phase 2 VM lifecycle actions, each a `(client, id)` SDK operation. */
|
|
15
|
+
const VM_ACTIONS = [
|
|
16
|
+
{ tool: 'unraid_vm_start', title: 'Start Unraid VM', verb: 'Start', op: startVm },
|
|
17
|
+
{ tool: 'unraid_vm_stop', title: 'Stop Unraid VM', verb: 'Gracefully stop', op: stopVm },
|
|
18
|
+
{ tool: 'unraid_vm_pause', title: 'Pause Unraid VM', verb: 'Pause', op: pauseVm },
|
|
19
|
+
{ tool: 'unraid_vm_resume', title: 'Resume Unraid VM', verb: 'Resume', op: resumeVm },
|
|
20
|
+
];
|
|
21
|
+
/** The Phase 3 destructive VM actions (ungraceful — risk guest data loss). */
|
|
22
|
+
const VM_DESTRUCTIVE_ACTIONS = [
|
|
23
|
+
{
|
|
24
|
+
tool: 'unraid_vm_force_stop',
|
|
25
|
+
title: 'Force-Stop Unraid VM',
|
|
26
|
+
verb: 'Force-stop',
|
|
27
|
+
op: forceStopVm,
|
|
28
|
+
},
|
|
29
|
+
{ tool: 'unraid_vm_reboot', title: 'Reboot Unraid VM', verb: 'Reboot', op: rebootVm },
|
|
30
|
+
{ tool: 'unraid_vm_reset', title: 'Reset Unraid VM', verb: 'Hard-reset', op: resetVm },
|
|
31
|
+
];
|
|
32
|
+
/** Register VM tools on the given server. */
|
|
33
|
+
export function registerVmTools(server, ctx) {
|
|
34
|
+
server.registerTool('unraid_list_vms', {
|
|
35
|
+
title: 'List Unraid Virtual Machines',
|
|
36
|
+
description: `List the virtual machines (libvirt domains) known to Unraid with their id, name, and current run state (RUNNING/SHUTOFF/PAUSED/...). Use limit/offset to page.`,
|
|
37
|
+
inputSchema: { ...PAGINATION_INPUT },
|
|
38
|
+
annotations: READ_ONLY_ANNOTATIONS,
|
|
39
|
+
}, async ({ limit, offset }) => formatResult(await listVms(ctx.client, { limit, offset })));
|
|
40
|
+
for (const { tool, title, verb, op } of VM_ACTIONS) {
|
|
41
|
+
server.registerTool(tool, {
|
|
42
|
+
title,
|
|
43
|
+
description: `${verb} the virtual machine with the given id. Returns whether the hypervisor accepted the request.`,
|
|
44
|
+
inputSchema: { id: z.string().describe('The VM id (PrefixedID)') },
|
|
45
|
+
annotations: SAFE_WRITE_ANNOTATIONS,
|
|
46
|
+
}, async ({ id }) => readOnlyBlock(ctx) ?? formatResult(await op(ctx.client, id)));
|
|
47
|
+
}
|
|
48
|
+
// --- Phase 3: destructive VM control ---
|
|
49
|
+
for (const { tool, title, verb, op } of VM_DESTRUCTIVE_ACTIONS) {
|
|
50
|
+
server.registerTool(tool, {
|
|
51
|
+
title,
|
|
52
|
+
description: `${verb} the virtual machine with the given id (ungraceful — may cause data loss in the guest). Destructive — requires human approval.`,
|
|
53
|
+
inputSchema: { id: z.string().describe('The VM id (PrefixedID)'), ...CONFIRM_TOKEN_INPUT },
|
|
54
|
+
annotations: DESTRUCTIVE_ANNOTATIONS,
|
|
55
|
+
}, async ({ id, confirm_token }) => runDestructive(server, ctx, {
|
|
56
|
+
tool,
|
|
57
|
+
summary: `${verb} VM ${id}`,
|
|
58
|
+
targets: [id],
|
|
59
|
+
token: confirm_token,
|
|
60
|
+
run: () => op(ctx.client, id),
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=vm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vm.js","sourceRoot":"","sources":["../../src/tools/vm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,OAAO,GAIR,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,6EAA6E;AAC7E,MAAM,UAAU,GAAG;IACjB,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE;IACjF,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE;IACxF,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO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ClE,WAAW,EAAE,sBAAsB;SACpC,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAC/E,CAAC;IACJ,CAAC;IAED,0CAA0C;IAC1C,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,sBAAsB,EAAE,CAAC;QAC/D,MAAM,CAAC,YAAY,CACjB,IAAI,EACJ;YACE,KAAK;YACL,WAAW,EAAE,GAAG,IAAI,gIAAgI;YACpJ,WAAW,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,GAAG,mBAAmB,EAAE;YAC1F,WAAW,EAAE,uBAAuB;SACrC,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAC9B,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;YAC1B,IAAI;YACJ,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,EAAE;YAC3B,OAAO,EAAE,CAAC,EAAE,CAAC;YACb,KAAK,EAAE,aAAa;YACpB,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;SAC9B,CAAC,CACL,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streamable HTTP transport runner — the primary transport for a hosted Unraid
|
|
3
|
+
* "App". Runs a stateless JSON endpoint at `POST /mcp` plus a `GET /healthz`
|
|
4
|
+
* liveness probe. Validates the `Origin` header (DNS-rebinding protection) and
|
|
5
|
+
* optionally enforces a bearer token, since this transport is network-exposed.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
8
|
+
import type { McpConfig } from '../config.js';
|
|
9
|
+
import type { Logger } from '../log.js';
|
|
10
|
+
/** Factory that produces a fresh server instance per request (stateless mode). */
|
|
11
|
+
export type ServerFactory = () => McpServer;
|
|
12
|
+
/**
|
|
13
|
+
* Start the Streamable HTTP transport server.
|
|
14
|
+
*
|
|
15
|
+
* @returns A function that gracefully closes the HTTP server.
|
|
16
|
+
*/
|
|
17
|
+
export declare function startHttp(serverFactory: ServerFactory, config: McpConfig, logger: Logger): Promise<() => Promise<void>>;
|
|
18
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC;AAc5C;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CA0B9B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streamable HTTP transport runner — the primary transport for a hosted Unraid
|
|
3
|
+
* "App". Runs a stateless JSON endpoint at `POST /mcp` plus a `GET /healthz`
|
|
4
|
+
* liveness probe. Validates the `Origin` header (DNS-rebinding protection) and
|
|
5
|
+
* optionally enforces a bearer token, since this transport is network-exposed.
|
|
6
|
+
*/
|
|
7
|
+
import express, {} from 'express';
|
|
8
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
9
|
+
const JSONRPC_AUTH_ERROR = {
|
|
10
|
+
jsonrpc: '2.0',
|
|
11
|
+
error: { code: -32001, message: 'Unauthorized' },
|
|
12
|
+
id: null,
|
|
13
|
+
};
|
|
14
|
+
const JSONRPC_ORIGIN_ERROR = {
|
|
15
|
+
jsonrpc: '2.0',
|
|
16
|
+
error: { code: -32001, message: 'Forbidden: cross-origin request rejected' },
|
|
17
|
+
id: null,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Start the Streamable HTTP transport server.
|
|
21
|
+
*
|
|
22
|
+
* @returns A function that gracefully closes the HTTP server.
|
|
23
|
+
*/
|
|
24
|
+
export async function startHttp(serverFactory, config, logger) {
|
|
25
|
+
const app = express();
|
|
26
|
+
app.use(express.json());
|
|
27
|
+
app.get('/healthz', (_req, res) => {
|
|
28
|
+
res.json({ status: 'ok' });
|
|
29
|
+
});
|
|
30
|
+
app.post('/mcp', (req, res) => {
|
|
31
|
+
void handleMcpRequest(req, res, serverFactory, config, logger);
|
|
32
|
+
});
|
|
33
|
+
return new Promise((resolve) => {
|
|
34
|
+
const httpServer = app.listen(config.httpPort, () => {
|
|
35
|
+
logger.info(`MCP server listening on http://0.0.0.0:${String(config.httpPort)}/mcp`);
|
|
36
|
+
resolve(() => new Promise((res, rej) => {
|
|
37
|
+
httpServer.close((err) => {
|
|
38
|
+
if (err)
|
|
39
|
+
rej(err);
|
|
40
|
+
else
|
|
41
|
+
res();
|
|
42
|
+
});
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function handleMcpRequest(req, res, serverFactory, config, logger) {
|
|
48
|
+
// DNS-rebinding protection: reject any request carrying a browser Origin.
|
|
49
|
+
// Legitimate MCP clients connect server-to-server and omit Origin.
|
|
50
|
+
const origin = req.headers.origin;
|
|
51
|
+
if (typeof origin === 'string' && origin.length > 0) {
|
|
52
|
+
res.status(403).json(JSONRPC_ORIGIN_ERROR);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (config.httpAuthToken !== undefined && !hasValidBearer(req, config.httpAuthToken)) {
|
|
56
|
+
res.status(401).json(JSONRPC_AUTH_ERROR);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// Stateless: a fresh server + transport per request avoids cross-request
|
|
60
|
+
// state and request-ID collisions.
|
|
61
|
+
const server = serverFactory();
|
|
62
|
+
const transport = new StreamableHTTPServerTransport({ enableJsonResponse: true });
|
|
63
|
+
res.on('close', () => {
|
|
64
|
+
void transport.close();
|
|
65
|
+
void server.close();
|
|
66
|
+
});
|
|
67
|
+
try {
|
|
68
|
+
await server.connect(transport);
|
|
69
|
+
await transport.handleRequest(req, res, req.body);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
logger.error('Error handling MCP request', {
|
|
73
|
+
error: error instanceof Error ? error.message : String(error),
|
|
74
|
+
});
|
|
75
|
+
if (!res.headersSent) {
|
|
76
|
+
res.status(500).json({
|
|
77
|
+
jsonrpc: '2.0',
|
|
78
|
+
error: { code: -32603, message: 'Internal server error' },
|
|
79
|
+
id: null,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** Check for a matching `Authorization: Bearer <token>` header. */
|
|
85
|
+
function hasValidBearer(req, expected) {
|
|
86
|
+
const header = req.headers.authorization;
|
|
87
|
+
if (typeof header !== 'string')
|
|
88
|
+
return false;
|
|
89
|
+
const match = /^Bearer\s+(.+)$/i.exec(header);
|
|
90
|
+
return match?.[1] === expected;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,EAAE,EAA+B,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAo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AChC,MAAM,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE;YACzC,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;YACrB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACnB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,uBAAuB,EAAE;gBACzD,EAAE,EAAE,IAAI;aACT,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC;AAED,mEAAmE;AACnE,SAAS,cAAc,CAAC,GAAY,EAAE,QAAgB;IACpD,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;IACzC,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7C,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stdio transport runner — for local MCP clients that spawn the server as a
|
|
3
|
+
* child process. All logging goes to stderr so stdout stays a clean JSON-RPC
|
|
4
|
+
* stream.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
7
|
+
import type { Logger } from '../log.js';
|
|
8
|
+
/** Connect the given server to a stdio transport. */
|
|
9
|
+
export declare function startStdio(server: McpServer, logger: Logger): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,qDAAqD;AACrD,wBAAsB,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stdio transport runner — for local MCP clients that spawn the server as a
|
|
3
|
+
* child process. All logging goes to stderr so stdout stays a clean JSON-RPC
|
|
4
|
+
* stream.
|
|
5
|
+
*/
|
|
6
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
|
+
/** Connect the given server to a stdio transport. */
|
|
8
|
+
export async function startStdio(server, logger) {
|
|
9
|
+
const transport = new StdioServerTransport();
|
|
10
|
+
await server.connect(transport);
|
|
11
|
+
logger.info('MCP server listening on stdio');
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/transports/stdio.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAIjF,qDAAqD;AACrD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAiB,EAAE,MAAc;IAChE,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;AAC/C,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unraid-toolkit/mcp",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Model Context Protocol server for the Unraid GraphQL API, built on @unraid-toolkit/sdk.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mike-north/unraid-toolkit.git",
|
|
9
|
+
"directory": "packages/mcp"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/mike-north/unraid-toolkit#readme",
|
|
12
|
+
"bugs": "https://github.com/mike-north/unraid-toolkit/issues",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"bin": {
|
|
17
|
+
"unraid-mcp": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
24
|
+
"express": "^5.2.1",
|
|
25
|
+
"zod": "^4.4.3",
|
|
26
|
+
"@unraid-toolkit/sdk": "0.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/express": "^5.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test": "vitest run --passWithNoTests"
|
|
33
|
+
}
|
|
34
|
+
}
|