@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,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListServersSchema: 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 GetServerSchema: 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 GetServerResourcesSchema: 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 GetServerDomainsSchema: 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 function listServers(params: z.infer<typeof ListServersSchema>): Promise<string>;
|
|
43
|
+
export declare function getServer(params: z.infer<typeof GetServerSchema>): Promise<string>;
|
|
44
|
+
export declare function getServerResources(params: z.infer<typeof GetServerResourcesSchema>): Promise<string>;
|
|
45
|
+
export declare function getServerDomains(params: z.infer<typeof GetServerDomainsSchema>): Promise<string>;
|
|
46
|
+
export declare const serverTools: ({
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: z.ZodObject<{
|
|
50
|
+
team: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
team?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
team?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
handler: typeof listServers;
|
|
57
|
+
} | {
|
|
58
|
+
name: string;
|
|
59
|
+
description: string;
|
|
60
|
+
inputSchema: z.ZodObject<{
|
|
61
|
+
team: z.ZodOptional<z.ZodString>;
|
|
62
|
+
} & {
|
|
63
|
+
uuid: z.ZodString;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
uuid: string;
|
|
66
|
+
team?: string | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
uuid: string;
|
|
69
|
+
team?: string | undefined;
|
|
70
|
+
}>;
|
|
71
|
+
handler: typeof getServer;
|
|
72
|
+
})[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { coolifyGet } from "../services/coolify-client.js";
|
|
2
|
+
import { TeamParamSchema, UuidParamSchema } from "../schemas/common.js";
|
|
3
|
+
export const ListServersSchema = TeamParamSchema;
|
|
4
|
+
export const GetServerSchema = UuidParamSchema;
|
|
5
|
+
export const GetServerResourcesSchema = UuidParamSchema;
|
|
6
|
+
export const GetServerDomainsSchema = UuidParamSchema;
|
|
7
|
+
export async function listServers(params) {
|
|
8
|
+
const data = await coolifyGet("/servers", { team: params.team });
|
|
9
|
+
return JSON.stringify(data, null, 2);
|
|
10
|
+
}
|
|
11
|
+
export async function getServer(params) {
|
|
12
|
+
const data = await coolifyGet(`/servers/${params.uuid}`, { team: params.team });
|
|
13
|
+
return JSON.stringify(data, null, 2);
|
|
14
|
+
}
|
|
15
|
+
export async function getServerResources(params) {
|
|
16
|
+
const data = await coolifyGet(`/servers/${params.uuid}/resources`, {
|
|
17
|
+
team: params.team,
|
|
18
|
+
});
|
|
19
|
+
return JSON.stringify(data, null, 2);
|
|
20
|
+
}
|
|
21
|
+
export async function getServerDomains(params) {
|
|
22
|
+
const data = await coolifyGet(`/servers/${params.uuid}/domains`, {
|
|
23
|
+
team: params.team,
|
|
24
|
+
});
|
|
25
|
+
return JSON.stringify(data, null, 2);
|
|
26
|
+
}
|
|
27
|
+
export const serverTools = [
|
|
28
|
+
{
|
|
29
|
+
name: "coolify_list_servers",
|
|
30
|
+
description: "List all servers in Coolify",
|
|
31
|
+
inputSchema: ListServersSchema,
|
|
32
|
+
handler: listServers,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "coolify_get_server",
|
|
36
|
+
description: "Get details of a specific server by UUID",
|
|
37
|
+
inputSchema: GetServerSchema,
|
|
38
|
+
handler: getServer,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "coolify_get_server_resources",
|
|
42
|
+
description: "Get all resources (apps, databases, services) on a server",
|
|
43
|
+
inputSchema: GetServerResourcesSchema,
|
|
44
|
+
handler: getServerResources,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "coolify_get_server_domains",
|
|
48
|
+
description: "Get all domains mapped on a server",
|
|
49
|
+
inputSchema: GetServerDomainsSchema,
|
|
50
|
+
handler: getServerDomains,
|
|
51
|
+
},
|
|
52
|
+
];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ListServicesSchema: 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 GetServiceSchema: 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 StartServiceSchema: 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 StopServiceSchema: 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 RestartServiceSchema: 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 function listServices(params: z.infer<typeof ListServicesSchema>): Promise<string>;
|
|
54
|
+
export declare function getService(params: z.infer<typeof GetServiceSchema>): Promise<string>;
|
|
55
|
+
export declare function startService(params: z.infer<typeof StartServiceSchema>): Promise<string>;
|
|
56
|
+
export declare function stopService(params: z.infer<typeof StopServiceSchema>): Promise<string>;
|
|
57
|
+
export declare function restartService(params: z.infer<typeof RestartServiceSchema>): Promise<string>;
|
|
58
|
+
export declare const serviceTools: ({
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
inputSchema: z.ZodObject<{
|
|
62
|
+
team: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
team?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
team?: string | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
handler: typeof listServices;
|
|
69
|
+
} | {
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
inputSchema: z.ZodObject<{
|
|
73
|
+
team: z.ZodOptional<z.ZodString>;
|
|
74
|
+
} & {
|
|
75
|
+
uuid: z.ZodString;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
uuid: string;
|
|
78
|
+
team?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
uuid: string;
|
|
81
|
+
team?: string | undefined;
|
|
82
|
+
}>;
|
|
83
|
+
handler: typeof getService;
|
|
84
|
+
})[];
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { coolifyGet, coolifyPost } from "../services/coolify-client.js";
|
|
2
|
+
import { TeamParamSchema, UuidParamSchema } from "../schemas/common.js";
|
|
3
|
+
export const ListServicesSchema = TeamParamSchema;
|
|
4
|
+
export const GetServiceSchema = UuidParamSchema;
|
|
5
|
+
export const StartServiceSchema = UuidParamSchema;
|
|
6
|
+
export const StopServiceSchema = UuidParamSchema;
|
|
7
|
+
export const RestartServiceSchema = UuidParamSchema;
|
|
8
|
+
export async function listServices(params) {
|
|
9
|
+
const data = await coolifyGet("/services", { team: params.team });
|
|
10
|
+
return JSON.stringify(data, null, 2);
|
|
11
|
+
}
|
|
12
|
+
export async function getService(params) {
|
|
13
|
+
const data = await coolifyGet(`/services/${params.uuid}`, { team: params.team });
|
|
14
|
+
return JSON.stringify(data, null, 2);
|
|
15
|
+
}
|
|
16
|
+
export async function startService(params) {
|
|
17
|
+
const data = await coolifyPost(`/services/${params.uuid}/start`, undefined, {
|
|
18
|
+
team: params.team,
|
|
19
|
+
});
|
|
20
|
+
return JSON.stringify(data, null, 2);
|
|
21
|
+
}
|
|
22
|
+
export async function stopService(params) {
|
|
23
|
+
const data = await coolifyPost(`/services/${params.uuid}/stop`, undefined, {
|
|
24
|
+
team: params.team,
|
|
25
|
+
});
|
|
26
|
+
return JSON.stringify(data, null, 2);
|
|
27
|
+
}
|
|
28
|
+
export async function restartService(params) {
|
|
29
|
+
const data = await coolifyPost(`/services/${params.uuid}/restart`, undefined, {
|
|
30
|
+
team: params.team,
|
|
31
|
+
});
|
|
32
|
+
return JSON.stringify(data, null, 2);
|
|
33
|
+
}
|
|
34
|
+
export const serviceTools = [
|
|
35
|
+
{
|
|
36
|
+
name: "coolify_list_services",
|
|
37
|
+
description: "List all services in Coolify",
|
|
38
|
+
inputSchema: ListServicesSchema,
|
|
39
|
+
handler: listServices,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "coolify_get_service",
|
|
43
|
+
description: "Get details of a specific service by UUID",
|
|
44
|
+
inputSchema: GetServiceSchema,
|
|
45
|
+
handler: getService,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "coolify_start_service",
|
|
49
|
+
description: "Start a service",
|
|
50
|
+
inputSchema: StartServiceSchema,
|
|
51
|
+
handler: startService,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "coolify_stop_service",
|
|
55
|
+
description: "Stop a running service",
|
|
56
|
+
inputSchema: StopServiceSchema,
|
|
57
|
+
handler: stopService,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "coolify_restart_service",
|
|
61
|
+
description: "Restart a service",
|
|
62
|
+
inputSchema: RestartServiceSchema,
|
|
63
|
+
handler: restartService,
|
|
64
|
+
},
|
|
65
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@softtor/coolify-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for Coolify API integration with multi-team support",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"coolify-mcp-server": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch",
|
|
17
|
+
"start": "node dist/index.js",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"model-context-protocol",
|
|
23
|
+
"coolify",
|
|
24
|
+
"claude",
|
|
25
|
+
"ai",
|
|
26
|
+
"devops",
|
|
27
|
+
"deployment"
|
|
28
|
+
],
|
|
29
|
+
"author": "Softtor",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/Softtor/coolify-mcp-server.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/Softtor/coolify-mcp-server/issues"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/Softtor/coolify-mcp-server#readme",
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18.0.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
44
|
+
"axios": "^1.7.0",
|
|
45
|
+
"zod": "^3.23.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^22.0.0",
|
|
49
|
+
"typescript": "^5.7.0"
|
|
50
|
+
}
|
|
51
|
+
}
|