@softtor/coolify-mcp-server 1.0.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/README.md +232 -0
- package/dist/config.d.ts +12 -0
- package/dist/config.js +55 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +127 -0
- package/dist/schemas/common.d.ts +51 -0
- package/dist/schemas/common.js +15 -0
- package/dist/services/coolify-client.d.ts +12 -0
- package/dist/services/coolify-client.js +48 -0
- package/dist/services/error-handler.d.ts +7 -0
- package/dist/services/error-handler.js +59 -0
- package/dist/tools/applications.d.ts +119 -0
- package/dist/tools/applications.js +80 -0
- package/dist/tools/databases.d.ts +96 -0
- package/dist/tools/databases.js +78 -0
- package/dist/tools/deployments.d.ts +100 -0
- package/dist/tools/deployments.js +50 -0
- package/dist/tools/projects.d.ts +81 -0
- package/dist/tools/projects.js +54 -0
- package/dist/tools/servers.d.ts +72 -0
- package/dist/tools/servers.js +52 -0
- package/dist/tools/services.d.ts +84 -0
- package/dist/tools/services.js +65 -0
- package/package.json +51 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListApplicationsSchema: z.ZodObject<{
|
|
3
|
+
team: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
team?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
team?: string | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const GetApplicationSchema: z.ZodObject<{
|
|
10
|
+
team: z.ZodOptional<z.ZodString>;
|
|
11
|
+
} & {
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
uuid: string;
|
|
15
|
+
team?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
uuid: string;
|
|
18
|
+
team?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const StartApplicationSchema: z.ZodObject<{
|
|
21
|
+
team: z.ZodOptional<z.ZodString>;
|
|
22
|
+
} & {
|
|
23
|
+
uuid: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
uuid: string;
|
|
26
|
+
team?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
uuid: string;
|
|
29
|
+
team?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const StopApplicationSchema: z.ZodObject<{
|
|
32
|
+
team: z.ZodOptional<z.ZodString>;
|
|
33
|
+
} & {
|
|
34
|
+
uuid: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
uuid: string;
|
|
37
|
+
team?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
uuid: string;
|
|
40
|
+
team?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const RestartApplicationSchema: z.ZodObject<{
|
|
43
|
+
team: z.ZodOptional<z.ZodString>;
|
|
44
|
+
} & {
|
|
45
|
+
uuid: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
uuid: string;
|
|
48
|
+
team?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
uuid: string;
|
|
51
|
+
team?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const GetApplicationLogsSchema: z.ZodObject<{
|
|
54
|
+
team: z.ZodOptional<z.ZodString>;
|
|
55
|
+
} & {
|
|
56
|
+
uuid: z.ZodString;
|
|
57
|
+
} & {
|
|
58
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
uuid: string;
|
|
61
|
+
team?: string | undefined;
|
|
62
|
+
since?: number | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
uuid: string;
|
|
65
|
+
team?: string | undefined;
|
|
66
|
+
since?: number | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export declare function listApplications(params: z.infer<typeof ListApplicationsSchema>): Promise<string>;
|
|
69
|
+
export declare function getApplication(params: z.infer<typeof GetApplicationSchema>): Promise<string>;
|
|
70
|
+
export declare function startApplication(params: z.infer<typeof StartApplicationSchema>): Promise<string>;
|
|
71
|
+
export declare function stopApplication(params: z.infer<typeof StopApplicationSchema>): Promise<string>;
|
|
72
|
+
export declare function restartApplication(params: z.infer<typeof RestartApplicationSchema>): Promise<string>;
|
|
73
|
+
export declare function getApplicationLogs(params: z.infer<typeof GetApplicationLogsSchema>): Promise<string>;
|
|
74
|
+
export declare const applicationTools: ({
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
inputSchema: z.ZodObject<{
|
|
78
|
+
team: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
team?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
team?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
handler: typeof listApplications;
|
|
85
|
+
} | {
|
|
86
|
+
name: string;
|
|
87
|
+
description: string;
|
|
88
|
+
inputSchema: z.ZodObject<{
|
|
89
|
+
team: z.ZodOptional<z.ZodString>;
|
|
90
|
+
} & {
|
|
91
|
+
uuid: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
uuid: string;
|
|
94
|
+
team?: string | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
uuid: string;
|
|
97
|
+
team?: string | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
handler: typeof getApplication;
|
|
100
|
+
} | {
|
|
101
|
+
name: string;
|
|
102
|
+
description: string;
|
|
103
|
+
inputSchema: z.ZodObject<{
|
|
104
|
+
team: z.ZodOptional<z.ZodString>;
|
|
105
|
+
} & {
|
|
106
|
+
uuid: z.ZodString;
|
|
107
|
+
} & {
|
|
108
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
uuid: string;
|
|
111
|
+
team?: string | undefined;
|
|
112
|
+
since?: number | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
uuid: string;
|
|
115
|
+
team?: string | undefined;
|
|
116
|
+
since?: number | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
handler: typeof getApplicationLogs;
|
|
119
|
+
})[];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { coolifyGet, coolifyPost } from "../services/coolify-client.js";
|
|
2
|
+
import { TeamParamSchema, UuidParamSchema, LogsParamSchema } from "../schemas/common.js";
|
|
3
|
+
export const ListApplicationsSchema = TeamParamSchema;
|
|
4
|
+
export const GetApplicationSchema = UuidParamSchema;
|
|
5
|
+
export const StartApplicationSchema = UuidParamSchema;
|
|
6
|
+
export const StopApplicationSchema = UuidParamSchema;
|
|
7
|
+
export const RestartApplicationSchema = UuidParamSchema;
|
|
8
|
+
export const GetApplicationLogsSchema = LogsParamSchema;
|
|
9
|
+
export async function listApplications(params) {
|
|
10
|
+
const data = await coolifyGet("/applications", { team: params.team });
|
|
11
|
+
return JSON.stringify(data, null, 2);
|
|
12
|
+
}
|
|
13
|
+
export async function getApplication(params) {
|
|
14
|
+
const data = await coolifyGet(`/applications/${params.uuid}`, { team: params.team });
|
|
15
|
+
return JSON.stringify(data, null, 2);
|
|
16
|
+
}
|
|
17
|
+
export async function startApplication(params) {
|
|
18
|
+
const data = await coolifyPost(`/applications/${params.uuid}/start`, undefined, {
|
|
19
|
+
team: params.team,
|
|
20
|
+
});
|
|
21
|
+
return JSON.stringify(data, null, 2);
|
|
22
|
+
}
|
|
23
|
+
export async function stopApplication(params) {
|
|
24
|
+
const data = await coolifyPost(`/applications/${params.uuid}/stop`, undefined, {
|
|
25
|
+
team: params.team,
|
|
26
|
+
});
|
|
27
|
+
return JSON.stringify(data, null, 2);
|
|
28
|
+
}
|
|
29
|
+
export async function restartApplication(params) {
|
|
30
|
+
const data = await coolifyPost(`/applications/${params.uuid}/restart`, undefined, {
|
|
31
|
+
team: params.team,
|
|
32
|
+
});
|
|
33
|
+
return JSON.stringify(data, null, 2);
|
|
34
|
+
}
|
|
35
|
+
export async function getApplicationLogs(params) {
|
|
36
|
+
const since = params.since ?? 3600;
|
|
37
|
+
const data = await coolifyGet(`/applications/${params.uuid}/logs`, {
|
|
38
|
+
team: params.team,
|
|
39
|
+
params: { since },
|
|
40
|
+
});
|
|
41
|
+
return JSON.stringify(data, null, 2);
|
|
42
|
+
}
|
|
43
|
+
export const applicationTools = [
|
|
44
|
+
{
|
|
45
|
+
name: "coolify_list_applications",
|
|
46
|
+
description: "List all applications in Coolify",
|
|
47
|
+
inputSchema: ListApplicationsSchema,
|
|
48
|
+
handler: listApplications,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "coolify_get_application",
|
|
52
|
+
description: "Get details of a specific application by UUID",
|
|
53
|
+
inputSchema: GetApplicationSchema,
|
|
54
|
+
handler: getApplication,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "coolify_start_application",
|
|
58
|
+
description: "Start/deploy an application",
|
|
59
|
+
inputSchema: StartApplicationSchema,
|
|
60
|
+
handler: startApplication,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "coolify_stop_application",
|
|
64
|
+
description: "Stop a running application",
|
|
65
|
+
inputSchema: StopApplicationSchema,
|
|
66
|
+
handler: stopApplication,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "coolify_restart_application",
|
|
70
|
+
description: "Restart an application",
|
|
71
|
+
inputSchema: RestartApplicationSchema,
|
|
72
|
+
handler: restartApplication,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "coolify_get_application_logs",
|
|
76
|
+
description: "Get container logs for an application",
|
|
77
|
+
inputSchema: GetApplicationLogsSchema,
|
|
78
|
+
handler: getApplicationLogs,
|
|
79
|
+
},
|
|
80
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListDatabasesSchema: z.ZodObject<{
|
|
3
|
+
team: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
team?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
team?: string | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const GetDatabaseSchema: z.ZodObject<{
|
|
10
|
+
team: z.ZodOptional<z.ZodString>;
|
|
11
|
+
} & {
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
uuid: string;
|
|
15
|
+
team?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
uuid: string;
|
|
18
|
+
team?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const StartDatabaseSchema: z.ZodObject<{
|
|
21
|
+
team: z.ZodOptional<z.ZodString>;
|
|
22
|
+
} & {
|
|
23
|
+
uuid: z.ZodString;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
uuid: string;
|
|
26
|
+
team?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
uuid: string;
|
|
29
|
+
team?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const StopDatabaseSchema: z.ZodObject<{
|
|
32
|
+
team: z.ZodOptional<z.ZodString>;
|
|
33
|
+
} & {
|
|
34
|
+
uuid: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
uuid: string;
|
|
37
|
+
team?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
uuid: string;
|
|
40
|
+
team?: string | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const RestartDatabaseSchema: z.ZodObject<{
|
|
43
|
+
team: z.ZodOptional<z.ZodString>;
|
|
44
|
+
} & {
|
|
45
|
+
uuid: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
uuid: string;
|
|
48
|
+
team?: string | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
uuid: string;
|
|
51
|
+
team?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export declare const ListDatabaseBackupsSchema: z.ZodObject<{
|
|
54
|
+
team: z.ZodOptional<z.ZodString>;
|
|
55
|
+
} & {
|
|
56
|
+
uuid: z.ZodString;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
uuid: string;
|
|
59
|
+
team?: string | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
uuid: string;
|
|
62
|
+
team?: string | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
export declare function listDatabases(params: z.infer<typeof ListDatabasesSchema>): Promise<string>;
|
|
65
|
+
export declare function getDatabase(params: z.infer<typeof GetDatabaseSchema>): Promise<string>;
|
|
66
|
+
export declare function startDatabase(params: z.infer<typeof StartDatabaseSchema>): Promise<string>;
|
|
67
|
+
export declare function stopDatabase(params: z.infer<typeof StopDatabaseSchema>): Promise<string>;
|
|
68
|
+
export declare function restartDatabase(params: z.infer<typeof RestartDatabaseSchema>): Promise<string>;
|
|
69
|
+
export declare function listDatabaseBackups(params: z.infer<typeof ListDatabaseBackupsSchema>): Promise<string>;
|
|
70
|
+
export declare const databaseTools: ({
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
inputSchema: z.ZodObject<{
|
|
74
|
+
team: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
team?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
team?: string | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
handler: typeof listDatabases;
|
|
81
|
+
} | {
|
|
82
|
+
name: string;
|
|
83
|
+
description: string;
|
|
84
|
+
inputSchema: z.ZodObject<{
|
|
85
|
+
team: z.ZodOptional<z.ZodString>;
|
|
86
|
+
} & {
|
|
87
|
+
uuid: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
uuid: string;
|
|
90
|
+
team?: string | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
uuid: string;
|
|
93
|
+
team?: string | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
handler: typeof getDatabase;
|
|
96
|
+
})[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { coolifyGet, coolifyPost } from "../services/coolify-client.js";
|
|
2
|
+
import { TeamParamSchema, UuidParamSchema } from "../schemas/common.js";
|
|
3
|
+
export const ListDatabasesSchema = TeamParamSchema;
|
|
4
|
+
export const GetDatabaseSchema = UuidParamSchema;
|
|
5
|
+
export const StartDatabaseSchema = UuidParamSchema;
|
|
6
|
+
export const StopDatabaseSchema = UuidParamSchema;
|
|
7
|
+
export const RestartDatabaseSchema = UuidParamSchema;
|
|
8
|
+
export const ListDatabaseBackupsSchema = UuidParamSchema;
|
|
9
|
+
export async function listDatabases(params) {
|
|
10
|
+
const data = await coolifyGet("/databases", { team: params.team });
|
|
11
|
+
return JSON.stringify(data, null, 2);
|
|
12
|
+
}
|
|
13
|
+
export async function getDatabase(params) {
|
|
14
|
+
const data = await coolifyGet(`/databases/${params.uuid}`, { team: params.team });
|
|
15
|
+
return JSON.stringify(data, null, 2);
|
|
16
|
+
}
|
|
17
|
+
export async function startDatabase(params) {
|
|
18
|
+
const data = await coolifyPost(`/databases/${params.uuid}/start`, undefined, {
|
|
19
|
+
team: params.team,
|
|
20
|
+
});
|
|
21
|
+
return JSON.stringify(data, null, 2);
|
|
22
|
+
}
|
|
23
|
+
export async function stopDatabase(params) {
|
|
24
|
+
const data = await coolifyPost(`/databases/${params.uuid}/stop`, undefined, {
|
|
25
|
+
team: params.team,
|
|
26
|
+
});
|
|
27
|
+
return JSON.stringify(data, null, 2);
|
|
28
|
+
}
|
|
29
|
+
export async function restartDatabase(params) {
|
|
30
|
+
const data = await coolifyPost(`/databases/${params.uuid}/restart`, undefined, {
|
|
31
|
+
team: params.team,
|
|
32
|
+
});
|
|
33
|
+
return JSON.stringify(data, null, 2);
|
|
34
|
+
}
|
|
35
|
+
export async function listDatabaseBackups(params) {
|
|
36
|
+
const data = await coolifyGet(`/databases/${params.uuid}/backups`, {
|
|
37
|
+
team: params.team,
|
|
38
|
+
});
|
|
39
|
+
return JSON.stringify(data, null, 2);
|
|
40
|
+
}
|
|
41
|
+
export const databaseTools = [
|
|
42
|
+
{
|
|
43
|
+
name: "coolify_list_databases",
|
|
44
|
+
description: "List all databases in Coolify",
|
|
45
|
+
inputSchema: ListDatabasesSchema,
|
|
46
|
+
handler: listDatabases,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "coolify_get_database",
|
|
50
|
+
description: "Get details of a specific database by UUID",
|
|
51
|
+
inputSchema: GetDatabaseSchema,
|
|
52
|
+
handler: getDatabase,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "coolify_start_database",
|
|
56
|
+
description: "Start a database",
|
|
57
|
+
inputSchema: StartDatabaseSchema,
|
|
58
|
+
handler: startDatabase,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "coolify_stop_database",
|
|
62
|
+
description: "Stop a running database",
|
|
63
|
+
inputSchema: StopDatabaseSchema,
|
|
64
|
+
handler: stopDatabase,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "coolify_restart_database",
|
|
68
|
+
description: "Restart a database",
|
|
69
|
+
inputSchema: RestartDatabaseSchema,
|
|
70
|
+
handler: restartDatabase,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "coolify_list_database_backups",
|
|
74
|
+
description: "List backups for a database",
|
|
75
|
+
inputSchema: ListDatabaseBackupsSchema,
|
|
76
|
+
handler: listDatabaseBackups,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DeploySchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
team: z.ZodOptional<z.ZodString>;
|
|
4
|
+
} & {
|
|
5
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
6
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
7
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
team?: string | undefined;
|
|
10
|
+
uuid?: string | undefined;
|
|
11
|
+
tag?: string | undefined;
|
|
12
|
+
force?: boolean | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
team?: string | undefined;
|
|
15
|
+
uuid?: string | undefined;
|
|
16
|
+
tag?: string | undefined;
|
|
17
|
+
force?: boolean | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
team?: string | undefined;
|
|
20
|
+
uuid?: string | undefined;
|
|
21
|
+
tag?: string | undefined;
|
|
22
|
+
force?: boolean | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
team?: string | undefined;
|
|
25
|
+
uuid?: string | undefined;
|
|
26
|
+
tag?: string | undefined;
|
|
27
|
+
force?: boolean | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const ListDeploymentsSchema: z.ZodObject<{
|
|
30
|
+
team: z.ZodOptional<z.ZodString>;
|
|
31
|
+
} & {
|
|
32
|
+
uuid: z.ZodString;
|
|
33
|
+
skip: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
take: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
uuid: string;
|
|
37
|
+
team?: string | undefined;
|
|
38
|
+
skip?: number | undefined;
|
|
39
|
+
take?: number | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
uuid: string;
|
|
42
|
+
team?: string | undefined;
|
|
43
|
+
skip?: number | undefined;
|
|
44
|
+
take?: number | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
export declare function deploy(params: z.infer<typeof DeploySchema>): Promise<string>;
|
|
47
|
+
export declare function listDeployments(params: z.infer<typeof ListDeploymentsSchema>): Promise<string>;
|
|
48
|
+
export declare const deploymentTools: ({
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
inputSchema: z.ZodEffects<z.ZodObject<{
|
|
52
|
+
team: z.ZodOptional<z.ZodString>;
|
|
53
|
+
} & {
|
|
54
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
55
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
56
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
team?: string | undefined;
|
|
59
|
+
uuid?: string | undefined;
|
|
60
|
+
tag?: string | undefined;
|
|
61
|
+
force?: boolean | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
team?: string | undefined;
|
|
64
|
+
uuid?: string | undefined;
|
|
65
|
+
tag?: string | undefined;
|
|
66
|
+
force?: boolean | undefined;
|
|
67
|
+
}>, {
|
|
68
|
+
team?: string | undefined;
|
|
69
|
+
uuid?: string | undefined;
|
|
70
|
+
tag?: string | undefined;
|
|
71
|
+
force?: boolean | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
team?: string | undefined;
|
|
74
|
+
uuid?: string | undefined;
|
|
75
|
+
tag?: string | undefined;
|
|
76
|
+
force?: boolean | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
handler: typeof deploy;
|
|
79
|
+
} | {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
inputSchema: z.ZodObject<{
|
|
83
|
+
team: z.ZodOptional<z.ZodString>;
|
|
84
|
+
} & {
|
|
85
|
+
uuid: z.ZodString;
|
|
86
|
+
skip: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
take: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
uuid: string;
|
|
90
|
+
team?: string | undefined;
|
|
91
|
+
skip?: number | undefined;
|
|
92
|
+
take?: number | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
uuid: string;
|
|
95
|
+
team?: string | undefined;
|
|
96
|
+
skip?: number | undefined;
|
|
97
|
+
take?: number | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
handler: typeof listDeployments;
|
|
100
|
+
})[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { coolifyGet, coolifyPost } from "../services/coolify-client.js";
|
|
3
|
+
import { DeployParamSchema, TeamParamSchema } from "../schemas/common.js";
|
|
4
|
+
export const DeploySchema = DeployParamSchema.refine((data) => data.uuid || data.tag, { message: "Either uuid or tag must be provided" });
|
|
5
|
+
export const ListDeploymentsSchema = TeamParamSchema.extend({
|
|
6
|
+
uuid: z.string().describe("Application UUID to list deployments for"),
|
|
7
|
+
skip: z.number().optional().describe("Number of deployments to skip (pagination)"),
|
|
8
|
+
take: z.number().optional().describe("Number of deployments to take (pagination)"),
|
|
9
|
+
});
|
|
10
|
+
export async function deploy(params) {
|
|
11
|
+
const queryParams = {};
|
|
12
|
+
if (params.uuid) {
|
|
13
|
+
queryParams.uuid = params.uuid;
|
|
14
|
+
}
|
|
15
|
+
if (params.tag) {
|
|
16
|
+
queryParams.tag = params.tag;
|
|
17
|
+
}
|
|
18
|
+
if (params.force) {
|
|
19
|
+
queryParams.force = params.force;
|
|
20
|
+
}
|
|
21
|
+
const data = await coolifyPost("/deploy", undefined, {
|
|
22
|
+
team: params.team,
|
|
23
|
+
params: queryParams,
|
|
24
|
+
});
|
|
25
|
+
return JSON.stringify(data, null, 2);
|
|
26
|
+
}
|
|
27
|
+
export async function listDeployments(params) {
|
|
28
|
+
const data = await coolifyGet(`/applications/${params.uuid}/deployments`, {
|
|
29
|
+
team: params.team,
|
|
30
|
+
params: {
|
|
31
|
+
skip: params.skip,
|
|
32
|
+
take: params.take,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
return JSON.stringify(data, null, 2);
|
|
36
|
+
}
|
|
37
|
+
export const deploymentTools = [
|
|
38
|
+
{
|
|
39
|
+
name: "coolify_deploy",
|
|
40
|
+
description: "Deploy an application by UUID or deploy all resources with a specific tag",
|
|
41
|
+
inputSchema: DeploySchema,
|
|
42
|
+
handler: deploy,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "coolify_list_deployments",
|
|
46
|
+
description: "List deployment history for an application",
|
|
47
|
+
inputSchema: ListDeploymentsSchema,
|
|
48
|
+
handler: listDeployments,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListProjectsSchema: z.ZodObject<{
|
|
3
|
+
team: z.ZodOptional<z.ZodString>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
team?: string | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
team?: string | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const GetProjectSchema: z.ZodObject<{
|
|
10
|
+
team: z.ZodOptional<z.ZodString>;
|
|
11
|
+
} & {
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
uuid: string;
|
|
15
|
+
team?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
uuid: string;
|
|
18
|
+
team?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const ListTeamsSchema: z.ZodObject<{
|
|
21
|
+
team: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
team?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
team?: string | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const GetTeamSchema: z.ZodObject<{
|
|
28
|
+
team: z.ZodOptional<z.ZodString>;
|
|
29
|
+
id: z.ZodNumber;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
id: number;
|
|
32
|
+
team?: string | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
id: number;
|
|
35
|
+
team?: string | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function listProjects(params: z.infer<typeof ListProjectsSchema>): Promise<string>;
|
|
38
|
+
export declare function getProject(params: z.infer<typeof GetProjectSchema>): Promise<string>;
|
|
39
|
+
export declare function listTeams(params: z.infer<typeof ListTeamsSchema>): Promise<string>;
|
|
40
|
+
export declare function getTeam(params: z.infer<typeof GetTeamSchema>): Promise<string>;
|
|
41
|
+
export declare const projectTools: ({
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
inputSchema: z.ZodObject<{
|
|
45
|
+
team: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
team?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
team?: string | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
handler: typeof listProjects;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
inputSchema: z.ZodObject<{
|
|
56
|
+
team: z.ZodOptional<z.ZodString>;
|
|
57
|
+
} & {
|
|
58
|
+
uuid: z.ZodString;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
uuid: string;
|
|
61
|
+
team?: string | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
uuid: string;
|
|
64
|
+
team?: string | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
handler: typeof getProject;
|
|
67
|
+
} | {
|
|
68
|
+
name: string;
|
|
69
|
+
description: string;
|
|
70
|
+
inputSchema: z.ZodObject<{
|
|
71
|
+
team: z.ZodOptional<z.ZodString>;
|
|
72
|
+
id: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
id: number;
|
|
75
|
+
team?: string | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
id: number;
|
|
78
|
+
team?: string | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
handler: typeof getTeam;
|
|
81
|
+
})[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { coolifyGet } from "../services/coolify-client.js";
|
|
3
|
+
import { TeamParamSchema, UuidParamSchema } from "../schemas/common.js";
|
|
4
|
+
export const ListProjectsSchema = TeamParamSchema;
|
|
5
|
+
export const GetProjectSchema = UuidParamSchema;
|
|
6
|
+
export const ListTeamsSchema = z.object({
|
|
7
|
+
team: z.string().optional().describe("Team name to use for authentication"),
|
|
8
|
+
});
|
|
9
|
+
export const GetTeamSchema = z.object({
|
|
10
|
+
team: z.string().optional().describe("Team name to use for authentication"),
|
|
11
|
+
id: z.number().describe("Team ID"),
|
|
12
|
+
});
|
|
13
|
+
export async function listProjects(params) {
|
|
14
|
+
const data = await coolifyGet("/projects", { team: params.team });
|
|
15
|
+
return JSON.stringify(data, null, 2);
|
|
16
|
+
}
|
|
17
|
+
export async function getProject(params) {
|
|
18
|
+
const data = await coolifyGet(`/projects/${params.uuid}`, { team: params.team });
|
|
19
|
+
return JSON.stringify(data, null, 2);
|
|
20
|
+
}
|
|
21
|
+
export async function listTeams(params) {
|
|
22
|
+
const data = await coolifyGet("/teams", { team: params.team });
|
|
23
|
+
return JSON.stringify(data, null, 2);
|
|
24
|
+
}
|
|
25
|
+
export async function getTeam(params) {
|
|
26
|
+
const data = await coolifyGet(`/teams/${params.id}`, { team: params.team });
|
|
27
|
+
return JSON.stringify(data, null, 2);
|
|
28
|
+
}
|
|
29
|
+
export const projectTools = [
|
|
30
|
+
{
|
|
31
|
+
name: "coolify_list_projects",
|
|
32
|
+
description: "List all projects in Coolify",
|
|
33
|
+
inputSchema: ListProjectsSchema,
|
|
34
|
+
handler: listProjects,
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "coolify_get_project",
|
|
38
|
+
description: "Get details of a specific project by UUID",
|
|
39
|
+
inputSchema: GetProjectSchema,
|
|
40
|
+
handler: getProject,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "coolify_list_teams",
|
|
44
|
+
description: "List all teams accessible with current API key",
|
|
45
|
+
inputSchema: ListTeamsSchema,
|
|
46
|
+
handler: listTeams,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "coolify_get_team",
|
|
50
|
+
description: "Get details of a specific team by ID",
|
|
51
|
+
inputSchema: GetTeamSchema,
|
|
52
|
+
handler: getTeam,
|
|
53
|
+
},
|
|
54
|
+
];
|