@masonator/coolify-mcp 0.2.18 → 0.3.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 +148 -171
- package/dist/__tests__/coolify-client.test.d.ts +1 -0
- package/dist/__tests__/coolify-client.test.js +286 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -139
- package/dist/lib/coolify-client.d.ts +97 -0
- package/dist/lib/coolify-client.js +502 -0
- package/dist/lib/mcp-server.d.ts +29 -0
- package/dist/lib/mcp-server.js +211 -0
- package/dist/types/coolify.d.ts +640 -0
- package/dist/types/coolify.js +5 -0
- package/package.json +36 -5
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coolify MCP Server Type Definitions
|
|
3
|
+
* Complete type definitions for the Coolify API v1
|
|
4
|
+
*/
|
|
5
|
+
export interface CoolifyConfig {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
accessToken: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ErrorResponse {
|
|
10
|
+
error?: string;
|
|
11
|
+
message: string;
|
|
12
|
+
status?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface DeleteOptions {
|
|
15
|
+
deleteConfigurations?: boolean;
|
|
16
|
+
deleteVolumes?: boolean;
|
|
17
|
+
dockerCleanup?: boolean;
|
|
18
|
+
deleteConnectedNetworks?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface MessageResponse {
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UuidResponse {
|
|
24
|
+
uuid: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Server {
|
|
27
|
+
id: number;
|
|
28
|
+
uuid: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
ip: string;
|
|
32
|
+
user: string;
|
|
33
|
+
port: number;
|
|
34
|
+
status?: 'running' | 'stopped' | 'error' | 'unknown';
|
|
35
|
+
is_reachable?: boolean;
|
|
36
|
+
is_usable?: boolean;
|
|
37
|
+
is_swarm_manager?: boolean;
|
|
38
|
+
is_swarm_worker?: boolean;
|
|
39
|
+
is_build_server?: boolean;
|
|
40
|
+
validation_logs?: string;
|
|
41
|
+
log_drain_notification_sent?: boolean;
|
|
42
|
+
high_disk_usage_notification_sent?: boolean;
|
|
43
|
+
unreachable_notification_sent?: boolean;
|
|
44
|
+
unreachable_count?: number;
|
|
45
|
+
proxy_type?: 'traefik' | 'caddy' | 'none';
|
|
46
|
+
proxy_status?: string;
|
|
47
|
+
settings?: ServerSettings;
|
|
48
|
+
team_id?: number;
|
|
49
|
+
created_at: string;
|
|
50
|
+
updated_at: string;
|
|
51
|
+
}
|
|
52
|
+
export interface ServerSettings {
|
|
53
|
+
id: number;
|
|
54
|
+
server_id: number;
|
|
55
|
+
concurrent_builds: number;
|
|
56
|
+
dynamic_timeout: number;
|
|
57
|
+
force_disabled: boolean;
|
|
58
|
+
force_docker_cleanup: boolean;
|
|
59
|
+
docker_cleanup_frequency: string;
|
|
60
|
+
docker_cleanup_threshold: number;
|
|
61
|
+
is_cloudflare_tunnel: boolean;
|
|
62
|
+
is_jump_server: boolean;
|
|
63
|
+
is_logdrain_axiom_enabled: boolean;
|
|
64
|
+
is_logdrain_highlight_enabled: boolean;
|
|
65
|
+
is_logdrain_custom_enabled: boolean;
|
|
66
|
+
is_logdrain_newrelic_enabled: boolean;
|
|
67
|
+
is_metrics_enabled: boolean;
|
|
68
|
+
is_reachable: boolean;
|
|
69
|
+
is_sentinel_enabled: boolean;
|
|
70
|
+
is_swarm_manager: boolean;
|
|
71
|
+
is_swarm_worker: boolean;
|
|
72
|
+
is_usable: boolean;
|
|
73
|
+
wildcard_domain?: string;
|
|
74
|
+
created_at: string;
|
|
75
|
+
updated_at: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ServerResource {
|
|
78
|
+
id: number;
|
|
79
|
+
uuid: string;
|
|
80
|
+
name: string;
|
|
81
|
+
type: 'application' | 'database' | 'service';
|
|
82
|
+
status: string;
|
|
83
|
+
created_at: string;
|
|
84
|
+
updated_at: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ServerDomain {
|
|
87
|
+
ip: string;
|
|
88
|
+
domains: string[];
|
|
89
|
+
}
|
|
90
|
+
export interface ServerValidation {
|
|
91
|
+
message: string;
|
|
92
|
+
validation_logs?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface CreateServerRequest {
|
|
95
|
+
name: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
ip: string;
|
|
98
|
+
port?: number;
|
|
99
|
+
user?: string;
|
|
100
|
+
private_key_uuid: string;
|
|
101
|
+
is_build_server?: boolean;
|
|
102
|
+
instant_validate?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface UpdateServerRequest {
|
|
105
|
+
name?: string;
|
|
106
|
+
description?: string;
|
|
107
|
+
ip?: string;
|
|
108
|
+
port?: number;
|
|
109
|
+
user?: string;
|
|
110
|
+
private_key_uuid?: string;
|
|
111
|
+
is_build_server?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface Project {
|
|
114
|
+
id: number;
|
|
115
|
+
uuid: string;
|
|
116
|
+
name: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
team_id?: number;
|
|
119
|
+
environments?: Environment[];
|
|
120
|
+
created_at?: string;
|
|
121
|
+
updated_at?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface CreateProjectRequest {
|
|
124
|
+
name: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface UpdateProjectRequest {
|
|
128
|
+
name?: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface Environment {
|
|
132
|
+
id: number;
|
|
133
|
+
uuid: string;
|
|
134
|
+
name: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
project_id?: number;
|
|
137
|
+
project_uuid?: string;
|
|
138
|
+
created_at: string;
|
|
139
|
+
updated_at: string;
|
|
140
|
+
}
|
|
141
|
+
export interface CreateEnvironmentRequest {
|
|
142
|
+
name: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
}
|
|
145
|
+
export type BuildPack = 'nixpacks' | 'static' | 'dockerfile' | 'dockercompose' | 'dockerimage';
|
|
146
|
+
export interface Application {
|
|
147
|
+
id: number;
|
|
148
|
+
uuid: string;
|
|
149
|
+
name: string;
|
|
150
|
+
description?: string;
|
|
151
|
+
fqdn?: string;
|
|
152
|
+
git_repository?: string;
|
|
153
|
+
git_branch?: string;
|
|
154
|
+
git_commit_sha?: string;
|
|
155
|
+
build_pack?: BuildPack;
|
|
156
|
+
ports_exposes?: string;
|
|
157
|
+
ports_mappings?: string;
|
|
158
|
+
dockerfile?: string;
|
|
159
|
+
dockerfile_location?: string;
|
|
160
|
+
docker_registry_image_name?: string;
|
|
161
|
+
docker_registry_image_tag?: string;
|
|
162
|
+
docker_compose_location?: string;
|
|
163
|
+
docker_compose_raw?: string;
|
|
164
|
+
docker_compose_custom_start_command?: string;
|
|
165
|
+
docker_compose_custom_build_command?: string;
|
|
166
|
+
base_directory?: string;
|
|
167
|
+
publish_directory?: string;
|
|
168
|
+
install_command?: string;
|
|
169
|
+
build_command?: string;
|
|
170
|
+
start_command?: string;
|
|
171
|
+
health_check_enabled?: boolean;
|
|
172
|
+
health_check_path?: string;
|
|
173
|
+
health_check_port?: number;
|
|
174
|
+
health_check_host?: string;
|
|
175
|
+
health_check_method?: string;
|
|
176
|
+
health_check_return_code?: number;
|
|
177
|
+
health_check_scheme?: string;
|
|
178
|
+
health_check_response_text?: string;
|
|
179
|
+
health_check_interval?: number;
|
|
180
|
+
health_check_timeout?: number;
|
|
181
|
+
health_check_retries?: number;
|
|
182
|
+
health_check_start_period?: number;
|
|
183
|
+
limits_memory?: string;
|
|
184
|
+
limits_memory_swap?: string;
|
|
185
|
+
limits_memory_swappiness?: number;
|
|
186
|
+
limits_memory_reservation?: string;
|
|
187
|
+
limits_cpus?: string;
|
|
188
|
+
limits_cpuset?: string;
|
|
189
|
+
limits_cpu_shares?: number;
|
|
190
|
+
status?: 'running' | 'stopped' | 'error' | 'building' | 'deploying';
|
|
191
|
+
preview_url_template?: string;
|
|
192
|
+
destination_type?: string;
|
|
193
|
+
destination_id?: number;
|
|
194
|
+
source_type?: string;
|
|
195
|
+
source_id?: number;
|
|
196
|
+
private_key_id?: number;
|
|
197
|
+
environment_id?: number;
|
|
198
|
+
project_uuid?: string;
|
|
199
|
+
environment_uuid?: string;
|
|
200
|
+
server_uuid?: string;
|
|
201
|
+
created_at: string;
|
|
202
|
+
updated_at: string;
|
|
203
|
+
}
|
|
204
|
+
export interface CreateApplicationPublicRequest {
|
|
205
|
+
project_uuid: string;
|
|
206
|
+
server_uuid: string;
|
|
207
|
+
environment_name?: string;
|
|
208
|
+
environment_uuid?: string;
|
|
209
|
+
destination_uuid?: string;
|
|
210
|
+
name?: string;
|
|
211
|
+
description?: string;
|
|
212
|
+
fqdn?: string;
|
|
213
|
+
git_repository: string;
|
|
214
|
+
git_branch: string;
|
|
215
|
+
git_commit_sha?: string;
|
|
216
|
+
build_pack: BuildPack;
|
|
217
|
+
ports_exposes: string;
|
|
218
|
+
ports_mappings?: string;
|
|
219
|
+
base_directory?: string;
|
|
220
|
+
publish_directory?: string;
|
|
221
|
+
install_command?: string;
|
|
222
|
+
build_command?: string;
|
|
223
|
+
start_command?: string;
|
|
224
|
+
instant_deploy?: boolean;
|
|
225
|
+
}
|
|
226
|
+
export interface CreateApplicationPrivateGHRequest extends CreateApplicationPublicRequest {
|
|
227
|
+
github_app_uuid: string;
|
|
228
|
+
}
|
|
229
|
+
export interface CreateApplicationPrivateKeyRequest extends CreateApplicationPublicRequest {
|
|
230
|
+
private_key_uuid: string;
|
|
231
|
+
}
|
|
232
|
+
export interface CreateApplicationDockerfileRequest {
|
|
233
|
+
project_uuid: string;
|
|
234
|
+
server_uuid: string;
|
|
235
|
+
environment_name?: string;
|
|
236
|
+
environment_uuid?: string;
|
|
237
|
+
destination_uuid?: string;
|
|
238
|
+
name?: string;
|
|
239
|
+
description?: string;
|
|
240
|
+
fqdn?: string;
|
|
241
|
+
dockerfile: string;
|
|
242
|
+
dockerfile_location?: string;
|
|
243
|
+
ports_exposes?: string;
|
|
244
|
+
ports_mappings?: string;
|
|
245
|
+
base_directory?: string;
|
|
246
|
+
instant_deploy?: boolean;
|
|
247
|
+
}
|
|
248
|
+
export interface CreateApplicationDockerImageRequest {
|
|
249
|
+
project_uuid: string;
|
|
250
|
+
server_uuid: string;
|
|
251
|
+
environment_name?: string;
|
|
252
|
+
environment_uuid?: string;
|
|
253
|
+
destination_uuid?: string;
|
|
254
|
+
name?: string;
|
|
255
|
+
description?: string;
|
|
256
|
+
fqdn?: string;
|
|
257
|
+
docker_registry_image_name: string;
|
|
258
|
+
docker_registry_image_tag?: string;
|
|
259
|
+
ports_exposes: string;
|
|
260
|
+
ports_mappings?: string;
|
|
261
|
+
instant_deploy?: boolean;
|
|
262
|
+
}
|
|
263
|
+
export interface CreateApplicationDockerComposeRequest {
|
|
264
|
+
project_uuid: string;
|
|
265
|
+
server_uuid: string;
|
|
266
|
+
environment_name?: string;
|
|
267
|
+
environment_uuid?: string;
|
|
268
|
+
destination_uuid?: string;
|
|
269
|
+
name?: string;
|
|
270
|
+
description?: string;
|
|
271
|
+
docker_compose_raw: string;
|
|
272
|
+
docker_compose_location?: string;
|
|
273
|
+
docker_compose_custom_start_command?: string;
|
|
274
|
+
docker_compose_custom_build_command?: string;
|
|
275
|
+
instant_deploy?: boolean;
|
|
276
|
+
}
|
|
277
|
+
export interface UpdateApplicationRequest {
|
|
278
|
+
name?: string;
|
|
279
|
+
description?: string;
|
|
280
|
+
fqdn?: string;
|
|
281
|
+
git_repository?: string;
|
|
282
|
+
git_branch?: string;
|
|
283
|
+
git_commit_sha?: string;
|
|
284
|
+
ports_exposes?: string;
|
|
285
|
+
ports_mappings?: string;
|
|
286
|
+
dockerfile?: string;
|
|
287
|
+
dockerfile_location?: string;
|
|
288
|
+
docker_registry_image_name?: string;
|
|
289
|
+
docker_registry_image_tag?: string;
|
|
290
|
+
docker_compose_raw?: string;
|
|
291
|
+
docker_compose_location?: string;
|
|
292
|
+
base_directory?: string;
|
|
293
|
+
publish_directory?: string;
|
|
294
|
+
install_command?: string;
|
|
295
|
+
build_command?: string;
|
|
296
|
+
start_command?: string;
|
|
297
|
+
health_check_enabled?: boolean;
|
|
298
|
+
health_check_path?: string;
|
|
299
|
+
health_check_port?: number;
|
|
300
|
+
limits_memory?: string;
|
|
301
|
+
limits_memory_swap?: string;
|
|
302
|
+
limits_cpus?: string;
|
|
303
|
+
}
|
|
304
|
+
export interface ApplicationActionResponse {
|
|
305
|
+
message: string;
|
|
306
|
+
deployment_uuid?: string;
|
|
307
|
+
}
|
|
308
|
+
export interface EnvironmentVariable {
|
|
309
|
+
id: number;
|
|
310
|
+
uuid: string;
|
|
311
|
+
key: string;
|
|
312
|
+
value: string;
|
|
313
|
+
is_build_time: boolean;
|
|
314
|
+
is_literal: boolean;
|
|
315
|
+
is_multiline: boolean;
|
|
316
|
+
is_preview: boolean;
|
|
317
|
+
is_shared: boolean;
|
|
318
|
+
is_shown_once: boolean;
|
|
319
|
+
real_value?: string;
|
|
320
|
+
version?: string;
|
|
321
|
+
application_id?: number;
|
|
322
|
+
service_id?: number;
|
|
323
|
+
database_id?: number;
|
|
324
|
+
created_at: string;
|
|
325
|
+
updated_at: string;
|
|
326
|
+
}
|
|
327
|
+
export interface CreateEnvVarRequest {
|
|
328
|
+
key: string;
|
|
329
|
+
value: string;
|
|
330
|
+
is_preview?: boolean;
|
|
331
|
+
is_literal?: boolean;
|
|
332
|
+
is_multiline?: boolean;
|
|
333
|
+
is_shown_once?: boolean;
|
|
334
|
+
is_build_time?: boolean;
|
|
335
|
+
}
|
|
336
|
+
export interface UpdateEnvVarRequest {
|
|
337
|
+
key: string;
|
|
338
|
+
value: string;
|
|
339
|
+
is_preview?: boolean;
|
|
340
|
+
is_literal?: boolean;
|
|
341
|
+
is_multiline?: boolean;
|
|
342
|
+
is_shown_once?: boolean;
|
|
343
|
+
is_build_time?: boolean;
|
|
344
|
+
}
|
|
345
|
+
export interface BulkUpdateEnvVarsRequest {
|
|
346
|
+
data: CreateEnvVarRequest[];
|
|
347
|
+
}
|
|
348
|
+
export type DatabaseType = 'postgresql' | 'mysql' | 'mariadb' | 'mongodb' | 'redis' | 'keydb' | 'clickhouse' | 'dragonfly';
|
|
349
|
+
export interface DatabaseLimits {
|
|
350
|
+
memory?: string;
|
|
351
|
+
memory_swap?: string;
|
|
352
|
+
memory_swappiness?: number;
|
|
353
|
+
memory_reservation?: string;
|
|
354
|
+
cpus?: string;
|
|
355
|
+
cpuset?: string;
|
|
356
|
+
cpu_shares?: number;
|
|
357
|
+
}
|
|
358
|
+
export interface Database {
|
|
359
|
+
id: number;
|
|
360
|
+
uuid: string;
|
|
361
|
+
name: string;
|
|
362
|
+
description?: string;
|
|
363
|
+
type: DatabaseType;
|
|
364
|
+
status: 'running' | 'stopped' | 'error' | 'restarting';
|
|
365
|
+
is_public: boolean;
|
|
366
|
+
public_port?: number;
|
|
367
|
+
image: string;
|
|
368
|
+
started_at?: string;
|
|
369
|
+
internal_db_url?: string;
|
|
370
|
+
external_db_url?: string;
|
|
371
|
+
project_uuid?: string;
|
|
372
|
+
environment_uuid?: string;
|
|
373
|
+
environment_name?: string;
|
|
374
|
+
server_uuid?: string;
|
|
375
|
+
limits?: DatabaseLimits;
|
|
376
|
+
created_at: string;
|
|
377
|
+
updated_at: string;
|
|
378
|
+
postgres_user?: string;
|
|
379
|
+
postgres_password?: string;
|
|
380
|
+
postgres_db?: string;
|
|
381
|
+
postgres_initdb_args?: string;
|
|
382
|
+
postgres_host_auth_method?: string;
|
|
383
|
+
postgres_conf?: string;
|
|
384
|
+
mysql_root_password?: string;
|
|
385
|
+
mysql_user?: string;
|
|
386
|
+
mysql_password?: string;
|
|
387
|
+
mysql_database?: string;
|
|
388
|
+
mariadb_root_password?: string;
|
|
389
|
+
mariadb_user?: string;
|
|
390
|
+
mariadb_password?: string;
|
|
391
|
+
mariadb_database?: string;
|
|
392
|
+
mariadb_conf?: string;
|
|
393
|
+
mongo_initdb_root_username?: string;
|
|
394
|
+
mongo_initdb_root_password?: string;
|
|
395
|
+
mongo_initdb_database?: string;
|
|
396
|
+
mongo_conf?: string;
|
|
397
|
+
redis_password?: string;
|
|
398
|
+
redis_conf?: string;
|
|
399
|
+
keydb_password?: string;
|
|
400
|
+
keydb_conf?: string;
|
|
401
|
+
clickhouse_admin_user?: string;
|
|
402
|
+
clickhouse_admin_password?: string;
|
|
403
|
+
dragonfly_password?: string;
|
|
404
|
+
}
|
|
405
|
+
export interface UpdateDatabaseRequest {
|
|
406
|
+
name?: string;
|
|
407
|
+
description?: string;
|
|
408
|
+
image?: string;
|
|
409
|
+
is_public?: boolean;
|
|
410
|
+
public_port?: number;
|
|
411
|
+
limits_memory?: string;
|
|
412
|
+
limits_memory_swap?: string;
|
|
413
|
+
limits_memory_swappiness?: number;
|
|
414
|
+
limits_memory_reservation?: string;
|
|
415
|
+
limits_cpus?: string;
|
|
416
|
+
limits_cpuset?: string;
|
|
417
|
+
limits_cpu_shares?: number;
|
|
418
|
+
postgres_user?: string;
|
|
419
|
+
postgres_password?: string;
|
|
420
|
+
postgres_db?: string;
|
|
421
|
+
postgres_initdb_args?: string;
|
|
422
|
+
postgres_host_auth_method?: string;
|
|
423
|
+
postgres_conf?: string;
|
|
424
|
+
mysql_root_password?: string;
|
|
425
|
+
mysql_user?: string;
|
|
426
|
+
mysql_password?: string;
|
|
427
|
+
mysql_database?: string;
|
|
428
|
+
mariadb_root_password?: string;
|
|
429
|
+
mariadb_user?: string;
|
|
430
|
+
mariadb_password?: string;
|
|
431
|
+
mariadb_database?: string;
|
|
432
|
+
mariadb_conf?: string;
|
|
433
|
+
mongo_initdb_root_username?: string;
|
|
434
|
+
mongo_initdb_root_password?: string;
|
|
435
|
+
mongo_initdb_database?: string;
|
|
436
|
+
mongo_conf?: string;
|
|
437
|
+
redis_password?: string;
|
|
438
|
+
redis_conf?: string;
|
|
439
|
+
keydb_password?: string;
|
|
440
|
+
keydb_conf?: string;
|
|
441
|
+
clickhouse_admin_user?: string;
|
|
442
|
+
clickhouse_admin_password?: string;
|
|
443
|
+
dragonfly_password?: string;
|
|
444
|
+
}
|
|
445
|
+
export interface DatabaseBackup {
|
|
446
|
+
id: number;
|
|
447
|
+
uuid: string;
|
|
448
|
+
database_id: number;
|
|
449
|
+
database_type: DatabaseType;
|
|
450
|
+
status: 'pending' | 'running' | 'success' | 'failed';
|
|
451
|
+
filename?: string;
|
|
452
|
+
size?: number;
|
|
453
|
+
frequency: string;
|
|
454
|
+
enabled: boolean;
|
|
455
|
+
save_s3: boolean;
|
|
456
|
+
s3_storage_id?: number;
|
|
457
|
+
databases_to_backup?: string;
|
|
458
|
+
dump_all: boolean;
|
|
459
|
+
created_at: string;
|
|
460
|
+
updated_at: string;
|
|
461
|
+
}
|
|
462
|
+
export interface CreateDatabaseBackupRequest {
|
|
463
|
+
frequency: string;
|
|
464
|
+
enabled?: boolean;
|
|
465
|
+
save_s3?: boolean;
|
|
466
|
+
s3_storage_uuid?: string;
|
|
467
|
+
databases_to_backup?: string;
|
|
468
|
+
dump_all?: boolean;
|
|
469
|
+
backup_now?: boolean;
|
|
470
|
+
backup_retention?: number;
|
|
471
|
+
backup_retention_days?: number;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Available one-click service types in Coolify.
|
|
475
|
+
* This is a string type to avoid TypeScript memory issues with large const arrays.
|
|
476
|
+
* Common types include: activepieces, appsmith, appwrite, authentik, ghost, gitea,
|
|
477
|
+
* grafana, jellyfin, minio, n8n, nextcloud, pocketbase, supabase, uptime-kuma,
|
|
478
|
+
* vaultwarden, wordpress-with-mariadb, wordpress-with-mysql, etc.
|
|
479
|
+
*/
|
|
480
|
+
export type ServiceType = string;
|
|
481
|
+
export interface Service {
|
|
482
|
+
id: number;
|
|
483
|
+
uuid: string;
|
|
484
|
+
name: string;
|
|
485
|
+
description?: string;
|
|
486
|
+
type: ServiceType;
|
|
487
|
+
status: 'running' | 'stopped' | 'error' | 'restarting';
|
|
488
|
+
project_uuid?: string;
|
|
489
|
+
environment_name?: string;
|
|
490
|
+
environment_uuid?: string;
|
|
491
|
+
server_uuid?: string;
|
|
492
|
+
destination_uuid?: string;
|
|
493
|
+
domains?: string[];
|
|
494
|
+
config_hash?: string;
|
|
495
|
+
connect_to_docker_network?: boolean;
|
|
496
|
+
created_at: string;
|
|
497
|
+
updated_at: string;
|
|
498
|
+
}
|
|
499
|
+
export interface CreateServiceRequest {
|
|
500
|
+
type: ServiceType;
|
|
501
|
+
name?: string;
|
|
502
|
+
description?: string;
|
|
503
|
+
project_uuid: string;
|
|
504
|
+
environment_name?: string;
|
|
505
|
+
environment_uuid?: string;
|
|
506
|
+
server_uuid: string;
|
|
507
|
+
destination_uuid?: string;
|
|
508
|
+
instant_deploy?: boolean;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* CRITICAL: When updating services with Traefik basic auth labels
|
|
512
|
+
*
|
|
513
|
+
* 1. MANUAL STEP REQUIRED: You MUST disable "Escape characters in labels" in Coolify UI
|
|
514
|
+
* - Navigate to: Service Settings > Advanced > Container Label Character Escaping
|
|
515
|
+
* - This setting CANNOT be changed via API
|
|
516
|
+
* - Without this, Coolify will double-escape $ signs, breaking htpasswd
|
|
517
|
+
*
|
|
518
|
+
* 2. Even with escaping disabled, Traefik still requires $$ in htpasswd hashes
|
|
519
|
+
* - Correct: "user:$$apr1$$hash$$here"
|
|
520
|
+
* - Wrong: "user:$apr1$hash$here"
|
|
521
|
+
* - Docker Compose processes $$ → $ for Traefik
|
|
522
|
+
*
|
|
523
|
+
* 3. docker_compose_raw must be base64 encoded when sent to API
|
|
524
|
+
* - Example: Buffer.from(yamlString).toString('base64')
|
|
525
|
+
*
|
|
526
|
+
* Summary for htpasswd with basic auth:
|
|
527
|
+
* - Generate hash: htpasswd -nb username password
|
|
528
|
+
* - Replace $ with $$ in the hash
|
|
529
|
+
* - Disable label escaping in Coolify UI (manual step!)
|
|
530
|
+
* - Base64 encode the entire docker-compose YAML
|
|
531
|
+
*/
|
|
532
|
+
export interface UpdateServiceRequest {
|
|
533
|
+
name?: string;
|
|
534
|
+
description?: string;
|
|
535
|
+
docker_compose_raw?: string;
|
|
536
|
+
}
|
|
537
|
+
export interface ServiceCreateResponse {
|
|
538
|
+
uuid: string;
|
|
539
|
+
domains: string[];
|
|
540
|
+
}
|
|
541
|
+
export interface Deployment {
|
|
542
|
+
id: number;
|
|
543
|
+
uuid: string;
|
|
544
|
+
application_id?: number;
|
|
545
|
+
application_uuid?: string;
|
|
546
|
+
application_name?: string;
|
|
547
|
+
deployment_uuid: string;
|
|
548
|
+
pull_request_id?: number;
|
|
549
|
+
force_rebuild: boolean;
|
|
550
|
+
commit?: string;
|
|
551
|
+
status: 'queued' | 'in_progress' | 'finished' | 'failed' | 'cancelled';
|
|
552
|
+
is_webhook: boolean;
|
|
553
|
+
is_api: boolean;
|
|
554
|
+
logs?: string;
|
|
555
|
+
current_process_id?: string;
|
|
556
|
+
restart_only: boolean;
|
|
557
|
+
git_type?: string;
|
|
558
|
+
server_id?: number;
|
|
559
|
+
server_name?: string;
|
|
560
|
+
created_at: string;
|
|
561
|
+
updated_at: string;
|
|
562
|
+
}
|
|
563
|
+
export interface DeployByTagRequest {
|
|
564
|
+
tag?: string;
|
|
565
|
+
uuid?: string;
|
|
566
|
+
force?: boolean;
|
|
567
|
+
}
|
|
568
|
+
export interface Team {
|
|
569
|
+
id: number;
|
|
570
|
+
uuid?: string;
|
|
571
|
+
name: string;
|
|
572
|
+
description?: string;
|
|
573
|
+
personal_team: boolean;
|
|
574
|
+
show_boarding?: boolean;
|
|
575
|
+
custom_server_limit?: number;
|
|
576
|
+
members?: TeamMember[];
|
|
577
|
+
created_at: string;
|
|
578
|
+
updated_at: string;
|
|
579
|
+
}
|
|
580
|
+
export interface TeamMember {
|
|
581
|
+
id: number;
|
|
582
|
+
name: string;
|
|
583
|
+
email: string;
|
|
584
|
+
role?: 'owner' | 'admin' | 'member' | 'readonly';
|
|
585
|
+
created_at: string;
|
|
586
|
+
updated_at: string;
|
|
587
|
+
}
|
|
588
|
+
export interface PrivateKey {
|
|
589
|
+
id: number;
|
|
590
|
+
uuid: string;
|
|
591
|
+
name: string;
|
|
592
|
+
description?: string;
|
|
593
|
+
private_key: string;
|
|
594
|
+
public_key?: string;
|
|
595
|
+
fingerprint?: string;
|
|
596
|
+
is_git_related: boolean;
|
|
597
|
+
team_id: number;
|
|
598
|
+
created_at: string;
|
|
599
|
+
updated_at: string;
|
|
600
|
+
}
|
|
601
|
+
export interface CreatePrivateKeyRequest {
|
|
602
|
+
name: string;
|
|
603
|
+
description?: string;
|
|
604
|
+
private_key: string;
|
|
605
|
+
}
|
|
606
|
+
export interface UpdatePrivateKeyRequest {
|
|
607
|
+
name?: string;
|
|
608
|
+
description?: string;
|
|
609
|
+
private_key?: string;
|
|
610
|
+
}
|
|
611
|
+
export type CloudProvider = 'hetzner' | 'digitalocean';
|
|
612
|
+
export interface CloudToken {
|
|
613
|
+
id: number;
|
|
614
|
+
uuid: string;
|
|
615
|
+
name: string;
|
|
616
|
+
provider: CloudProvider;
|
|
617
|
+
team_id: number;
|
|
618
|
+
servers_count?: number;
|
|
619
|
+
created_at: string;
|
|
620
|
+
updated_at: string;
|
|
621
|
+
}
|
|
622
|
+
export interface CreateCloudTokenRequest {
|
|
623
|
+
provider: CloudProvider;
|
|
624
|
+
token: string;
|
|
625
|
+
name: string;
|
|
626
|
+
}
|
|
627
|
+
export interface UpdateCloudTokenRequest {
|
|
628
|
+
name?: string;
|
|
629
|
+
}
|
|
630
|
+
export interface CloudTokenValidation {
|
|
631
|
+
valid: boolean;
|
|
632
|
+
message: string;
|
|
633
|
+
}
|
|
634
|
+
export interface Version {
|
|
635
|
+
version: string;
|
|
636
|
+
}
|
|
637
|
+
export interface HealthCheck {
|
|
638
|
+
status: 'healthy' | 'unhealthy';
|
|
639
|
+
version?: string;
|
|
640
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masonator/coolify-mcp",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"scope": "@masonator",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"description": "MCP server implementation for Coolify",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
7
16
|
"bin": {
|
|
8
|
-
"coolify-mcp": "
|
|
17
|
+
"coolify-mcp": "dist/index.js"
|
|
9
18
|
},
|
|
10
19
|
"files": [
|
|
11
20
|
"dist"
|
|
12
21
|
],
|
|
13
22
|
"scripts": {
|
|
14
|
-
"build": "tsc && chmod +x dist
|
|
15
|
-
"
|
|
23
|
+
"build": "tsc && shx chmod +x dist/*.js",
|
|
24
|
+
"dev": "tsc --watch",
|
|
25
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
26
|
+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
27
|
+
"test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
28
|
+
"lint": "eslint . --ext .ts",
|
|
29
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
30
|
+
"format": "prettier --write .",
|
|
31
|
+
"format:check": "prettier --check .",
|
|
32
|
+
"prepare": "husky",
|
|
33
|
+
"prepublishOnly": "npm test && npm run lint",
|
|
34
|
+
"start": "node dist/index.js"
|
|
16
35
|
},
|
|
17
36
|
"keywords": [
|
|
18
37
|
"coolify",
|
|
@@ -26,7 +45,19 @@
|
|
|
26
45
|
"zod": "^3.24.2"
|
|
27
46
|
},
|
|
28
47
|
"devDependencies": {
|
|
48
|
+
"@types/jest": "^29.5.14",
|
|
29
49
|
"@types/node": "^20.17.23",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
51
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
52
|
+
"eslint": "^8.56.0",
|
|
53
|
+
"eslint-config-prettier": "^9.1.0",
|
|
54
|
+
"husky": "^9.0.11",
|
|
55
|
+
"jest": "^29.7.0",
|
|
56
|
+
"lint-staged": "^15.2.2",
|
|
57
|
+
"markdownlint-cli2": "^0.20.0",
|
|
58
|
+
"prettier": "^3.5.3",
|
|
59
|
+
"shx": "^0.3.4",
|
|
60
|
+
"ts-jest": "^29.2.6",
|
|
30
61
|
"typescript": "^5.8.2"
|
|
31
62
|
},
|
|
32
63
|
"engines": {
|