@masonator/coolify-mcp 2.10.0 → 2.11.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/README.md +25 -22
- package/dist/__tests__/coolify-client.test.js +531 -0
- package/dist/__tests__/mcp-server.test.js +55 -0
- package/dist/lib/coolify-client.d.ts +42 -1
- package/dist/lib/coolify-client.js +225 -0
- package/dist/lib/mcp-server.js +365 -20
- package/dist/types/coolify.d.ts +144 -0
- package/package.json +2 -2
package/dist/lib/mcp-server.js
CHANGED
|
@@ -294,7 +294,7 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
294
294
|
// =========================================================================
|
|
295
295
|
this.tool('list_applications', 'List apps (summary)', { page: z.number().optional(), per_page: z.number().optional() }, async ({ page, per_page }) => wrapWithActions(() => this.client.listApplications({ page, per_page, summary: true }), undefined, (result) => getPagination('list_applications', page, per_page, result.length)));
|
|
296
296
|
this.tool('get_application', 'App details', { uuid: z.string() }, async ({ uuid }) => wrapWithActions(() => this.client.getApplication(uuid), (app) => getApplicationActions(app.uuid, app.status)));
|
|
297
|
-
this.tool('application', 'Manage app: create/update/delete', {
|
|
297
|
+
this.tool('application', 'Manage app: create/update/delete/delete_preview', {
|
|
298
298
|
action: z.enum([
|
|
299
299
|
'create_public',
|
|
300
300
|
'create_github',
|
|
@@ -302,6 +302,7 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
302
302
|
'create_dockerimage',
|
|
303
303
|
'update',
|
|
304
304
|
'delete',
|
|
305
|
+
'delete_preview',
|
|
305
306
|
]),
|
|
306
307
|
uuid: z.string().optional(),
|
|
307
308
|
// Create fields
|
|
@@ -354,6 +355,8 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
354
355
|
dockerfile_target_build: z.string().optional(),
|
|
355
356
|
// Delete fields
|
|
356
357
|
delete_volumes: z.boolean().optional(),
|
|
358
|
+
// Preview fields
|
|
359
|
+
pull_request_id: z.number().optional(),
|
|
357
360
|
}, async (args) => {
|
|
358
361
|
const { action, uuid, delete_volumes } = args;
|
|
359
362
|
switch (action) {
|
|
@@ -573,6 +576,12 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
573
576
|
if (!uuid)
|
|
574
577
|
return { content: [{ type: 'text', text: 'Error: uuid required' }] };
|
|
575
578
|
return wrap(() => this.client.deleteApplication(uuid, { deleteVolumes: delete_volumes }));
|
|
579
|
+
case 'delete_preview':
|
|
580
|
+
if (!uuid || !args.pull_request_id)
|
|
581
|
+
return {
|
|
582
|
+
content: [{ type: 'text', text: 'Error: uuid, pull_request_id required' }],
|
|
583
|
+
};
|
|
584
|
+
return wrap(() => this.client.deleteApplicationPreview(uuid, args.pull_request_id));
|
|
576
585
|
}
|
|
577
586
|
});
|
|
578
587
|
this.tool('application_logs', 'Get app logs', { uuid: z.string(), lines: z.number().optional() }, async ({ uuid, lines }) => wrap(() => this.client.getApplicationLogs(uuid, lines)));
|
|
@@ -766,9 +775,9 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
766
775
|
// =========================================================================
|
|
767
776
|
// Environment Variables (1 tool - consolidated)
|
|
768
777
|
// =========================================================================
|
|
769
|
-
this.tool('env_vars', "Manage env vars for app or
|
|
770
|
-
resource: z.enum(['application', 'service']),
|
|
771
|
-
action: z.enum(['list', 'create', 'update', 'delete']),
|
|
778
|
+
this.tool('env_vars', "Manage env vars for app, service, or database. Values are masked by default (returned as '***') to avoid leaking secrets to MCP clients; pass reveal=true on the list action when the caller explicitly needs the plaintext (e.g. 'what is FOO set to?'). Set is_buildtime=false (and/or is_runtime=true) for runtime-only vars to avoid Dockerfile ARG issues with multiline values like PEM keys.", {
|
|
779
|
+
resource: z.enum(['application', 'service', 'database']),
|
|
780
|
+
action: z.enum(['list', 'create', 'update', 'delete', 'bulk_update']),
|
|
772
781
|
uuid: z.string(),
|
|
773
782
|
key: z.string().optional(),
|
|
774
783
|
value: z.string().optional(),
|
|
@@ -776,7 +785,19 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
776
785
|
is_buildtime: z.boolean().optional(),
|
|
777
786
|
is_runtime: z.boolean().optional(),
|
|
778
787
|
reveal: z.boolean().optional(),
|
|
779
|
-
|
|
788
|
+
data: z
|
|
789
|
+
.array(z.object({
|
|
790
|
+
key: z.string(),
|
|
791
|
+
value: z.string(),
|
|
792
|
+
is_preview: z.boolean().optional(),
|
|
793
|
+
is_buildtime: z.boolean().optional(),
|
|
794
|
+
is_runtime: z.boolean().optional(),
|
|
795
|
+
is_literal: z.boolean().optional(),
|
|
796
|
+
is_multiline: z.boolean().optional(),
|
|
797
|
+
is_shown_once: z.boolean().optional(),
|
|
798
|
+
}))
|
|
799
|
+
.optional(),
|
|
800
|
+
}, async ({ resource, action, uuid, key, value, env_uuid, is_buildtime, is_runtime, reveal, data, }) => {
|
|
780
801
|
if (resource === 'application') {
|
|
781
802
|
switch (action) {
|
|
782
803
|
case 'list':
|
|
@@ -803,31 +824,54 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
803
824
|
if (!env_uuid)
|
|
804
825
|
return { content: [{ type: 'text', text: 'Error: env_uuid required' }] };
|
|
805
826
|
return wrap(() => this.client.deleteApplicationEnvVar(uuid, env_uuid));
|
|
827
|
+
case 'bulk_update':
|
|
828
|
+
if (!data)
|
|
829
|
+
return { content: [{ type: 'text', text: 'Error: data array required' }] };
|
|
830
|
+
return wrap(() => this.client.bulkUpdateApplicationEnvVars(uuid, { data }));
|
|
806
831
|
}
|
|
807
832
|
}
|
|
808
|
-
else {
|
|
833
|
+
else if (resource === 'service') {
|
|
809
834
|
switch (action) {
|
|
810
835
|
case 'list':
|
|
811
836
|
return wrap(() => this.client.listServiceEnvVars(uuid, { reveal }));
|
|
812
837
|
case 'create':
|
|
813
838
|
if (!key || !value)
|
|
814
839
|
return { content: [{ type: 'text', text: 'Error: key, value required' }] };
|
|
815
|
-
return wrap(() => this.client.createServiceEnvVar(uuid, {
|
|
816
|
-
key,
|
|
817
|
-
value,
|
|
818
|
-
is_buildtime,
|
|
819
|
-
is_runtime,
|
|
820
|
-
}));
|
|
840
|
+
return wrap(() => this.client.createServiceEnvVar(uuid, { key, value, is_buildtime, is_runtime }));
|
|
821
841
|
case 'update':
|
|
822
|
-
|
|
823
|
-
content: [
|
|
824
|
-
|
|
825
|
-
],
|
|
826
|
-
};
|
|
842
|
+
if (!key || !value)
|
|
843
|
+
return { content: [{ type: 'text', text: 'Error: key, value required' }] };
|
|
844
|
+
return wrap(() => this.client.updateServiceEnvVar(uuid, { key, value, is_buildtime, is_runtime }));
|
|
827
845
|
case 'delete':
|
|
828
846
|
if (!env_uuid)
|
|
829
847
|
return { content: [{ type: 'text', text: 'Error: env_uuid required' }] };
|
|
830
848
|
return wrap(() => this.client.deleteServiceEnvVar(uuid, env_uuid));
|
|
849
|
+
case 'bulk_update':
|
|
850
|
+
if (!data)
|
|
851
|
+
return { content: [{ type: 'text', text: 'Error: data array required' }] };
|
|
852
|
+
return wrap(() => this.client.bulkUpdateServiceEnvVars(uuid, { data }));
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
switch (action) {
|
|
857
|
+
case 'list':
|
|
858
|
+
return wrap(() => this.client.listDatabaseEnvVars(uuid));
|
|
859
|
+
case 'create':
|
|
860
|
+
if (!key || !value)
|
|
861
|
+
return { content: [{ type: 'text', text: 'Error: key, value required' }] };
|
|
862
|
+
return wrap(() => this.client.createDatabaseEnvVar(uuid, { key, value, is_buildtime, is_runtime }));
|
|
863
|
+
case 'update':
|
|
864
|
+
if (!key || !value)
|
|
865
|
+
return { content: [{ type: 'text', text: 'Error: key, value required' }] };
|
|
866
|
+
return wrap(() => this.client.updateDatabaseEnvVar(uuid, { key, value, is_buildtime, is_runtime }));
|
|
867
|
+
case 'delete':
|
|
868
|
+
if (!env_uuid)
|
|
869
|
+
return { content: [{ type: 'text', text: 'Error: env_uuid required' }] };
|
|
870
|
+
return wrap(() => this.client.deleteDatabaseEnvVar(uuid, env_uuid));
|
|
871
|
+
case 'bulk_update':
|
|
872
|
+
if (!data)
|
|
873
|
+
return { content: [{ type: 'text', text: 'Error: data array required' }] };
|
|
874
|
+
return wrap(() => this.client.bulkUpdateDatabaseEnvVars(uuid, { data }));
|
|
831
875
|
}
|
|
832
876
|
}
|
|
833
877
|
});
|
|
@@ -929,10 +973,21 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
929
973
|
// =========================================================================
|
|
930
974
|
// GitHub Apps (1 tool - consolidated)
|
|
931
975
|
// =========================================================================
|
|
932
|
-
this.tool('github_apps', 'Manage GitHub Apps: list/get/create/update/delete', {
|
|
933
|
-
action: z.enum([
|
|
976
|
+
this.tool('github_apps', 'Manage GitHub Apps: list/get/create/update/delete/list_repos/list_branches', {
|
|
977
|
+
action: z.enum([
|
|
978
|
+
'list',
|
|
979
|
+
'get',
|
|
980
|
+
'create',
|
|
981
|
+
'update',
|
|
982
|
+
'delete',
|
|
983
|
+
'list_repos',
|
|
984
|
+
'list_branches',
|
|
985
|
+
]),
|
|
934
986
|
// GitHub apps use integer id, not uuid
|
|
935
987
|
id: z.number().optional(),
|
|
988
|
+
// Repo/branch browsing
|
|
989
|
+
owner: z.string().optional(),
|
|
990
|
+
repo: z.string().optional(),
|
|
936
991
|
// Create/Update fields
|
|
937
992
|
name: z.string().optional(),
|
|
938
993
|
organization: z.string().optional(),
|
|
@@ -1008,12 +1063,22 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
1008
1063
|
if (!id)
|
|
1009
1064
|
return { content: [{ type: 'text', text: 'Error: id required' }] };
|
|
1010
1065
|
return wrap(() => this.client.deleteGitHubApp(id));
|
|
1066
|
+
case 'list_repos':
|
|
1067
|
+
if (!id)
|
|
1068
|
+
return { content: [{ type: 'text', text: 'Error: id required' }] };
|
|
1069
|
+
return wrap(() => this.client.listGitHubAppRepositories(id));
|
|
1070
|
+
case 'list_branches':
|
|
1071
|
+
if (!id || !args.owner || !args.repo)
|
|
1072
|
+
return {
|
|
1073
|
+
content: [{ type: 'text', text: 'Error: id, owner, repo required' }],
|
|
1074
|
+
};
|
|
1075
|
+
return wrap(() => this.client.listGitHubAppBranches(id, args.owner, args.repo));
|
|
1011
1076
|
}
|
|
1012
1077
|
});
|
|
1013
1078
|
// =========================================================================
|
|
1014
1079
|
// Database Backups (1 tool - consolidated)
|
|
1015
1080
|
// =========================================================================
|
|
1016
|
-
this.tool('database_backups', 'Manage backups: list_schedules/get_schedule/list_executions/get_execution/create/update/delete', {
|
|
1081
|
+
this.tool('database_backups', 'Manage backups: list_schedules/get_schedule/list_executions/get_execution/create/update/delete/delete_execution', {
|
|
1017
1082
|
action: z.enum([
|
|
1018
1083
|
'list_schedules',
|
|
1019
1084
|
'get_schedule',
|
|
@@ -1022,6 +1087,7 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
1022
1087
|
'create',
|
|
1023
1088
|
'update',
|
|
1024
1089
|
'delete',
|
|
1090
|
+
'delete_execution',
|
|
1025
1091
|
]),
|
|
1026
1092
|
database_uuid: z.string(),
|
|
1027
1093
|
backup_uuid: z.string().optional(),
|
|
@@ -1073,6 +1139,14 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
1073
1139
|
if (!backup_uuid)
|
|
1074
1140
|
return { content: [{ type: 'text', text: 'Error: backup_uuid required' }] };
|
|
1075
1141
|
return wrap(() => this.client.deleteDatabaseBackup(database_uuid, backup_uuid));
|
|
1142
|
+
case 'delete_execution':
|
|
1143
|
+
if (!backup_uuid || !execution_uuid)
|
|
1144
|
+
return {
|
|
1145
|
+
content: [
|
|
1146
|
+
{ type: 'text', text: 'Error: backup_uuid, execution_uuid required' },
|
|
1147
|
+
],
|
|
1148
|
+
};
|
|
1149
|
+
return wrap(() => this.client.deleteBackupExecution(database_uuid, backup_uuid, execution_uuid));
|
|
1076
1150
|
}
|
|
1077
1151
|
});
|
|
1078
1152
|
// =========================================================================
|
|
@@ -1137,6 +1211,277 @@ export class CoolifyMcpServer extends McpServer {
|
|
|
1137
1211
|
}
|
|
1138
1212
|
});
|
|
1139
1213
|
// =========================================================================
|
|
1214
|
+
// Storages (1 tool - consolidated for app/db/service)
|
|
1215
|
+
// =========================================================================
|
|
1216
|
+
this.tool('storages', 'Manage persistent/file storages for app, database, or service: list/create/update/delete', {
|
|
1217
|
+
resource: z.enum(['application', 'database', 'service']),
|
|
1218
|
+
action: z.enum(['list', 'create', 'update', 'delete']),
|
|
1219
|
+
uuid: z.string(),
|
|
1220
|
+
storage_uuid: z.string().optional(),
|
|
1221
|
+
type: z.enum(['persistent', 'file']).optional(),
|
|
1222
|
+
mount_path: z.string().optional(),
|
|
1223
|
+
name: z.string().optional(),
|
|
1224
|
+
host_path: z.string().optional(),
|
|
1225
|
+
content: z.string().optional(),
|
|
1226
|
+
is_directory: z.boolean().optional(),
|
|
1227
|
+
fs_path: z.string().optional(),
|
|
1228
|
+
is_preview_suffix_enabled: z.boolean().optional(),
|
|
1229
|
+
}, async (args) => {
|
|
1230
|
+
const { resource, action, uuid, storage_uuid } = args;
|
|
1231
|
+
if (action === 'create' && (!args.type || !args.mount_path))
|
|
1232
|
+
return { content: [{ type: 'text', text: 'Error: type, mount_path required' }] };
|
|
1233
|
+
if (action === 'update' && (!args.type || !storage_uuid))
|
|
1234
|
+
return {
|
|
1235
|
+
content: [{ type: 'text', text: 'Error: type, storage_uuid required' }],
|
|
1236
|
+
};
|
|
1237
|
+
if (action === 'delete' && !storage_uuid)
|
|
1238
|
+
return { content: [{ type: 'text', text: 'Error: storage_uuid required' }] };
|
|
1239
|
+
const methods = {
|
|
1240
|
+
application: {
|
|
1241
|
+
list: () => this.client.listApplicationStorages(uuid),
|
|
1242
|
+
create: () => this.client.createApplicationStorage(uuid, {
|
|
1243
|
+
type: args.type,
|
|
1244
|
+
mount_path: args.mount_path,
|
|
1245
|
+
name: args.name,
|
|
1246
|
+
host_path: args.host_path,
|
|
1247
|
+
content: args.content,
|
|
1248
|
+
is_directory: args.is_directory,
|
|
1249
|
+
fs_path: args.fs_path,
|
|
1250
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1251
|
+
}),
|
|
1252
|
+
update: () => this.client.updateApplicationStorage(uuid, {
|
|
1253
|
+
uuid: storage_uuid,
|
|
1254
|
+
type: args.type,
|
|
1255
|
+
mount_path: args.mount_path,
|
|
1256
|
+
name: args.name,
|
|
1257
|
+
host_path: args.host_path,
|
|
1258
|
+
content: args.content,
|
|
1259
|
+
is_directory: args.is_directory,
|
|
1260
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1261
|
+
}),
|
|
1262
|
+
delete: () => this.client.deleteApplicationStorage(uuid, storage_uuid),
|
|
1263
|
+
},
|
|
1264
|
+
database: {
|
|
1265
|
+
list: () => this.client.listDatabaseStorages(uuid),
|
|
1266
|
+
create: () => this.client.createDatabaseStorage(uuid, {
|
|
1267
|
+
type: args.type,
|
|
1268
|
+
mount_path: args.mount_path,
|
|
1269
|
+
name: args.name,
|
|
1270
|
+
host_path: args.host_path,
|
|
1271
|
+
content: args.content,
|
|
1272
|
+
is_directory: args.is_directory,
|
|
1273
|
+
fs_path: args.fs_path,
|
|
1274
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1275
|
+
}),
|
|
1276
|
+
update: () => this.client.updateDatabaseStorage(uuid, {
|
|
1277
|
+
uuid: storage_uuid,
|
|
1278
|
+
type: args.type,
|
|
1279
|
+
mount_path: args.mount_path,
|
|
1280
|
+
name: args.name,
|
|
1281
|
+
host_path: args.host_path,
|
|
1282
|
+
content: args.content,
|
|
1283
|
+
is_directory: args.is_directory,
|
|
1284
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1285
|
+
}),
|
|
1286
|
+
delete: () => this.client.deleteDatabaseStorage(uuid, storage_uuid),
|
|
1287
|
+
},
|
|
1288
|
+
service: {
|
|
1289
|
+
list: () => this.client.listServiceStorages(uuid),
|
|
1290
|
+
create: () => this.client.createServiceStorage(uuid, {
|
|
1291
|
+
type: args.type,
|
|
1292
|
+
mount_path: args.mount_path,
|
|
1293
|
+
name: args.name,
|
|
1294
|
+
host_path: args.host_path,
|
|
1295
|
+
content: args.content,
|
|
1296
|
+
is_directory: args.is_directory,
|
|
1297
|
+
fs_path: args.fs_path,
|
|
1298
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1299
|
+
}),
|
|
1300
|
+
update: () => this.client.updateServiceStorage(uuid, {
|
|
1301
|
+
uuid: storage_uuid,
|
|
1302
|
+
type: args.type,
|
|
1303
|
+
mount_path: args.mount_path,
|
|
1304
|
+
name: args.name,
|
|
1305
|
+
host_path: args.host_path,
|
|
1306
|
+
content: args.content,
|
|
1307
|
+
is_directory: args.is_directory,
|
|
1308
|
+
is_preview_suffix_enabled: args.is_preview_suffix_enabled,
|
|
1309
|
+
}),
|
|
1310
|
+
delete: () => this.client.deleteServiceStorage(uuid, storage_uuid),
|
|
1311
|
+
},
|
|
1312
|
+
};
|
|
1313
|
+
return wrap(() => methods[resource][action]());
|
|
1314
|
+
});
|
|
1315
|
+
// =========================================================================
|
|
1316
|
+
// Scheduled Tasks (1 tool - consolidated for app/service)
|
|
1317
|
+
// =========================================================================
|
|
1318
|
+
this.tool('scheduled_tasks', 'Manage scheduled tasks for app or service: list/create/update/delete/list_executions', {
|
|
1319
|
+
resource: z.enum(['application', 'service']),
|
|
1320
|
+
action: z.enum(['list', 'create', 'update', 'delete', 'list_executions']),
|
|
1321
|
+
uuid: z.string(),
|
|
1322
|
+
task_uuid: z.string().optional(),
|
|
1323
|
+
name: z.string().optional(),
|
|
1324
|
+
command: z.string().optional(),
|
|
1325
|
+
frequency: z.string().optional(),
|
|
1326
|
+
container: z.string().optional(),
|
|
1327
|
+
timeout: z.number().optional(),
|
|
1328
|
+
enabled: z.boolean().optional(),
|
|
1329
|
+
}, async (args) => {
|
|
1330
|
+
const { resource, action, uuid, task_uuid } = args;
|
|
1331
|
+
const isApp = resource === 'application';
|
|
1332
|
+
switch (action) {
|
|
1333
|
+
case 'list':
|
|
1334
|
+
return wrap(() => isApp
|
|
1335
|
+
? this.client.listApplicationScheduledTasks(uuid)
|
|
1336
|
+
: this.client.listServiceScheduledTasks(uuid));
|
|
1337
|
+
case 'create':
|
|
1338
|
+
if (!args.name || !args.command || !args.frequency)
|
|
1339
|
+
return {
|
|
1340
|
+
content: [
|
|
1341
|
+
{ type: 'text', text: 'Error: name, command, frequency required' },
|
|
1342
|
+
],
|
|
1343
|
+
};
|
|
1344
|
+
return wrap(() => {
|
|
1345
|
+
const data = {
|
|
1346
|
+
name: args.name,
|
|
1347
|
+
command: args.command,
|
|
1348
|
+
frequency: args.frequency,
|
|
1349
|
+
container: args.container,
|
|
1350
|
+
timeout: args.timeout,
|
|
1351
|
+
enabled: args.enabled,
|
|
1352
|
+
};
|
|
1353
|
+
return isApp
|
|
1354
|
+
? this.client.createApplicationScheduledTask(uuid, data)
|
|
1355
|
+
: this.client.createServiceScheduledTask(uuid, data);
|
|
1356
|
+
});
|
|
1357
|
+
case 'update':
|
|
1358
|
+
if (!task_uuid)
|
|
1359
|
+
return { content: [{ type: 'text', text: 'Error: task_uuid required' }] };
|
|
1360
|
+
return wrap(() => {
|
|
1361
|
+
const data = {
|
|
1362
|
+
name: args.name,
|
|
1363
|
+
command: args.command,
|
|
1364
|
+
frequency: args.frequency,
|
|
1365
|
+
container: args.container,
|
|
1366
|
+
timeout: args.timeout,
|
|
1367
|
+
enabled: args.enabled,
|
|
1368
|
+
};
|
|
1369
|
+
return isApp
|
|
1370
|
+
? this.client.updateApplicationScheduledTask(uuid, task_uuid, data)
|
|
1371
|
+
: this.client.updateServiceScheduledTask(uuid, task_uuid, data);
|
|
1372
|
+
});
|
|
1373
|
+
case 'delete':
|
|
1374
|
+
if (!task_uuid)
|
|
1375
|
+
return { content: [{ type: 'text', text: 'Error: task_uuid required' }] };
|
|
1376
|
+
return wrap(() => isApp
|
|
1377
|
+
? this.client.deleteApplicationScheduledTask(uuid, task_uuid)
|
|
1378
|
+
: this.client.deleteServiceScheduledTask(uuid, task_uuid));
|
|
1379
|
+
case 'list_executions':
|
|
1380
|
+
if (!task_uuid)
|
|
1381
|
+
return { content: [{ type: 'text', text: 'Error: task_uuid required' }] };
|
|
1382
|
+
return wrap(() => isApp
|
|
1383
|
+
? this.client.listApplicationScheduledTaskExecutions(uuid, task_uuid)
|
|
1384
|
+
: this.client.listServiceScheduledTaskExecutions(uuid, task_uuid));
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
// =========================================================================
|
|
1388
|
+
// Hetzner Cloud (1 tool - consolidated)
|
|
1389
|
+
// =========================================================================
|
|
1390
|
+
this.tool('hetzner', 'Hetzner cloud: list_locations/list_server_types/list_images/list_ssh_keys/create_server', {
|
|
1391
|
+
action: z.enum([
|
|
1392
|
+
'list_locations',
|
|
1393
|
+
'list_server_types',
|
|
1394
|
+
'list_images',
|
|
1395
|
+
'list_ssh_keys',
|
|
1396
|
+
'create_server',
|
|
1397
|
+
]),
|
|
1398
|
+
cloud_provider_token_uuid: z.string().optional(),
|
|
1399
|
+
location: z.string().optional(),
|
|
1400
|
+
server_type: z.string().optional(),
|
|
1401
|
+
image: z.number().optional(),
|
|
1402
|
+
name: z.string().optional(),
|
|
1403
|
+
private_key_uuid: z.string().optional(),
|
|
1404
|
+
enable_ipv4: z.boolean().optional(),
|
|
1405
|
+
enable_ipv6: z.boolean().optional(),
|
|
1406
|
+
hetzner_ssh_key_ids: z.array(z.number()).optional(),
|
|
1407
|
+
cloud_init_script: z.string().optional(),
|
|
1408
|
+
instant_validate: z.boolean().optional(),
|
|
1409
|
+
}, async (args) => {
|
|
1410
|
+
const { action, cloud_provider_token_uuid: tokenUuid } = args;
|
|
1411
|
+
switch (action) {
|
|
1412
|
+
case 'list_locations':
|
|
1413
|
+
if (!tokenUuid)
|
|
1414
|
+
return {
|
|
1415
|
+
content: [
|
|
1416
|
+
{ type: 'text', text: 'Error: cloud_provider_token_uuid required' },
|
|
1417
|
+
],
|
|
1418
|
+
};
|
|
1419
|
+
return wrap(() => this.client.listHetznerLocations(tokenUuid));
|
|
1420
|
+
case 'list_server_types':
|
|
1421
|
+
if (!tokenUuid)
|
|
1422
|
+
return {
|
|
1423
|
+
content: [
|
|
1424
|
+
{ type: 'text', text: 'Error: cloud_provider_token_uuid required' },
|
|
1425
|
+
],
|
|
1426
|
+
};
|
|
1427
|
+
return wrap(() => this.client.listHetznerServerTypes(tokenUuid));
|
|
1428
|
+
case 'list_images':
|
|
1429
|
+
if (!tokenUuid)
|
|
1430
|
+
return {
|
|
1431
|
+
content: [
|
|
1432
|
+
{ type: 'text', text: 'Error: cloud_provider_token_uuid required' },
|
|
1433
|
+
],
|
|
1434
|
+
};
|
|
1435
|
+
return wrap(() => this.client.listHetznerImages(tokenUuid));
|
|
1436
|
+
case 'list_ssh_keys':
|
|
1437
|
+
if (!tokenUuid)
|
|
1438
|
+
return {
|
|
1439
|
+
content: [
|
|
1440
|
+
{ type: 'text', text: 'Error: cloud_provider_token_uuid required' },
|
|
1441
|
+
],
|
|
1442
|
+
};
|
|
1443
|
+
return wrap(() => this.client.listHetznerSSHKeys(tokenUuid));
|
|
1444
|
+
case 'create_server':
|
|
1445
|
+
if (!args.location || !args.server_type || !args.image || !args.private_key_uuid)
|
|
1446
|
+
return {
|
|
1447
|
+
content: [
|
|
1448
|
+
{
|
|
1449
|
+
type: 'text',
|
|
1450
|
+
text: 'Error: location, server_type, image, private_key_uuid required',
|
|
1451
|
+
},
|
|
1452
|
+
],
|
|
1453
|
+
};
|
|
1454
|
+
return wrap(() => this.client.createHetznerServer({
|
|
1455
|
+
cloud_provider_token_uuid: tokenUuid,
|
|
1456
|
+
location: args.location,
|
|
1457
|
+
server_type: args.server_type,
|
|
1458
|
+
image: args.image,
|
|
1459
|
+
name: args.name,
|
|
1460
|
+
private_key_uuid: args.private_key_uuid,
|
|
1461
|
+
enable_ipv4: args.enable_ipv4,
|
|
1462
|
+
enable_ipv6: args.enable_ipv6,
|
|
1463
|
+
hetzner_ssh_key_ids: args.hetzner_ssh_key_ids,
|
|
1464
|
+
cloud_init_script: args.cloud_init_script,
|
|
1465
|
+
instant_validate: args.instant_validate,
|
|
1466
|
+
}));
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
// =========================================================================
|
|
1470
|
+
// System (1 tool - health/list_resources/api_control consolidated)
|
|
1471
|
+
// =========================================================================
|
|
1472
|
+
this.tool('system', 'System operations: health/list_resources/enable_api/disable_api', { action: z.enum(['health', 'list_resources', 'enable_api', 'disable_api']) }, async ({ action }) => {
|
|
1473
|
+
switch (action) {
|
|
1474
|
+
case 'health':
|
|
1475
|
+
return wrap(() => this.client.getHealth());
|
|
1476
|
+
case 'list_resources':
|
|
1477
|
+
return wrap(() => this.client.listResources());
|
|
1478
|
+
case 'enable_api':
|
|
1479
|
+
return wrap(() => this.client.enableApi());
|
|
1480
|
+
case 'disable_api':
|
|
1481
|
+
return wrap(() => this.client.disableApi());
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
// =========================================================================
|
|
1140
1485
|
// Documentation Search (1 tool)
|
|
1141
1486
|
// =========================================================================
|
|
1142
1487
|
this.tool('search_docs', 'Search Coolify documentation for how-to guides, configuration, troubleshooting', {
|
package/dist/types/coolify.d.ts
CHANGED
|
@@ -949,6 +949,150 @@ export interface BatchOperationResult {
|
|
|
949
949
|
error: string;
|
|
950
950
|
}>;
|
|
951
951
|
}
|
|
952
|
+
export interface Storage {
|
|
953
|
+
id: number;
|
|
954
|
+
uuid: string;
|
|
955
|
+
name?: string;
|
|
956
|
+
mount_path: string;
|
|
957
|
+
host_path?: string;
|
|
958
|
+
content?: string;
|
|
959
|
+
is_directory?: boolean;
|
|
960
|
+
fs_path?: string;
|
|
961
|
+
type: 'persistent' | 'file';
|
|
962
|
+
is_preview_suffix_enabled?: boolean;
|
|
963
|
+
created_at: string;
|
|
964
|
+
updated_at: string;
|
|
965
|
+
}
|
|
966
|
+
export interface StorageListResponse {
|
|
967
|
+
persistent_storages: Storage[];
|
|
968
|
+
file_storages: Storage[];
|
|
969
|
+
}
|
|
970
|
+
export interface CreateStorageRequest {
|
|
971
|
+
type: 'persistent' | 'file';
|
|
972
|
+
mount_path: string;
|
|
973
|
+
name?: string;
|
|
974
|
+
host_path?: string;
|
|
975
|
+
content?: string;
|
|
976
|
+
is_directory?: boolean;
|
|
977
|
+
fs_path?: string;
|
|
978
|
+
is_preview_suffix_enabled?: boolean;
|
|
979
|
+
}
|
|
980
|
+
export interface UpdateStorageRequest {
|
|
981
|
+
uuid?: string;
|
|
982
|
+
id?: number;
|
|
983
|
+
type: 'persistent' | 'file';
|
|
984
|
+
is_preview_suffix_enabled?: boolean;
|
|
985
|
+
name?: string;
|
|
986
|
+
mount_path?: string;
|
|
987
|
+
host_path?: string;
|
|
988
|
+
content?: string;
|
|
989
|
+
is_directory?: boolean;
|
|
990
|
+
}
|
|
991
|
+
export interface ScheduledTask {
|
|
992
|
+
id: number;
|
|
993
|
+
uuid: string;
|
|
994
|
+
enabled: boolean;
|
|
995
|
+
name: string;
|
|
996
|
+
command: string;
|
|
997
|
+
frequency: string;
|
|
998
|
+
container?: string;
|
|
999
|
+
timeout: number;
|
|
1000
|
+
created_at: string;
|
|
1001
|
+
updated_at: string;
|
|
1002
|
+
}
|
|
1003
|
+
export interface ScheduledTaskExecution {
|
|
1004
|
+
uuid: string;
|
|
1005
|
+
status: 'success' | 'failed' | 'running';
|
|
1006
|
+
message?: string;
|
|
1007
|
+
retry_count: number;
|
|
1008
|
+
duration?: number;
|
|
1009
|
+
created_at: string;
|
|
1010
|
+
updated_at: string;
|
|
1011
|
+
}
|
|
1012
|
+
export interface CreateScheduledTaskRequest {
|
|
1013
|
+
name: string;
|
|
1014
|
+
command: string;
|
|
1015
|
+
frequency: string;
|
|
1016
|
+
container?: string;
|
|
1017
|
+
timeout?: number;
|
|
1018
|
+
enabled?: boolean;
|
|
1019
|
+
}
|
|
1020
|
+
export interface UpdateScheduledTaskRequest {
|
|
1021
|
+
name?: string;
|
|
1022
|
+
command?: string;
|
|
1023
|
+
frequency?: string;
|
|
1024
|
+
container?: string;
|
|
1025
|
+
timeout?: number;
|
|
1026
|
+
enabled?: boolean;
|
|
1027
|
+
}
|
|
1028
|
+
export interface HetznerLocation {
|
|
1029
|
+
id: number;
|
|
1030
|
+
name: string;
|
|
1031
|
+
description: string;
|
|
1032
|
+
country: string;
|
|
1033
|
+
city: string;
|
|
1034
|
+
latitude: number;
|
|
1035
|
+
longitude: number;
|
|
1036
|
+
}
|
|
1037
|
+
export interface HetznerServerType {
|
|
1038
|
+
id: number;
|
|
1039
|
+
name: string;
|
|
1040
|
+
description: string;
|
|
1041
|
+
cores: number;
|
|
1042
|
+
memory: number;
|
|
1043
|
+
disk: number;
|
|
1044
|
+
architecture: string;
|
|
1045
|
+
}
|
|
1046
|
+
export interface HetznerImage {
|
|
1047
|
+
id: number;
|
|
1048
|
+
name: string;
|
|
1049
|
+
description: string;
|
|
1050
|
+
type: string;
|
|
1051
|
+
os_flavor: string;
|
|
1052
|
+
os_version: string;
|
|
1053
|
+
architecture: string;
|
|
1054
|
+
}
|
|
1055
|
+
export interface HetznerSSHKey {
|
|
1056
|
+
id: number;
|
|
1057
|
+
name: string;
|
|
1058
|
+
fingerprint: string;
|
|
1059
|
+
public_key: string;
|
|
1060
|
+
}
|
|
1061
|
+
export interface CreateHetznerServerRequest {
|
|
1062
|
+
cloud_provider_token_uuid?: string;
|
|
1063
|
+
location: string;
|
|
1064
|
+
server_type: string;
|
|
1065
|
+
image: number;
|
|
1066
|
+
name?: string;
|
|
1067
|
+
private_key_uuid: string;
|
|
1068
|
+
enable_ipv4?: boolean;
|
|
1069
|
+
enable_ipv6?: boolean;
|
|
1070
|
+
hetzner_ssh_key_ids?: number[];
|
|
1071
|
+
cloud_init_script?: string;
|
|
1072
|
+
instant_validate?: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
export interface CreateHetznerServerResponse {
|
|
1075
|
+
uuid: string;
|
|
1076
|
+
hetzner_server_id: number;
|
|
1077
|
+
ip: string;
|
|
1078
|
+
}
|
|
1079
|
+
export interface GitHubRepository {
|
|
1080
|
+
id: number;
|
|
1081
|
+
name: string;
|
|
1082
|
+
full_name: string;
|
|
1083
|
+
private: boolean;
|
|
1084
|
+
html_url: string;
|
|
1085
|
+
default_branch: string;
|
|
1086
|
+
}
|
|
1087
|
+
export interface GitHubBranch {
|
|
1088
|
+
name: string;
|
|
1089
|
+
}
|
|
1090
|
+
export interface ResourceListItem {
|
|
1091
|
+
uuid: string;
|
|
1092
|
+
name: string;
|
|
1093
|
+
type: 'server' | 'application' | 'database' | 'service' | string;
|
|
1094
|
+
status?: string;
|
|
1095
|
+
}
|
|
952
1096
|
export interface ResponseAction {
|
|
953
1097
|
tool: string;
|
|
954
1098
|
args: Record<string, string | number | boolean>;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masonator/coolify-mcp",
|
|
3
3
|
"scope": "@masonator",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.0",
|
|
5
5
|
"mcpName": "io.github.StuMason/coolify",
|
|
6
|
-
"description": "MCP server for Coolify —
|
|
6
|
+
"description": "MCP server for Coolify — 42 optimized tools for infrastructure management, diagnostics, and documentation search",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|