@masonator/coolify-mcp 0.9.0 → 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/README.md CHANGED
@@ -6,7 +6,7 @@ A Model Context Protocol (MCP) server for [Coolify](https://coolify.io/), enabli
6
6
 
7
7
  ## Features
8
8
 
9
- This MCP server provides **65 tools** focused on **debugging, management, and deployment**:
9
+ This MCP server provides **65 tools** and **7 workflow prompts** for **debugging, management, and deployment**:
10
10
 
11
11
  | Category | Tools |
12
12
  | -------------------- | -------------------------------------------------------------------------------------------------------- |
@@ -22,6 +22,20 @@ This MCP server provides **65 tools** focused on **debugging, management, and de
22
22
  | **Deployments** | list, get, deploy, cancel, list by application |
23
23
  | **Private Keys** | list, get, create, update, delete |
24
24
 
25
+ ### Workflow Prompts
26
+
27
+ Pre-built guided workflows that walk you through common tasks:
28
+
29
+ | Prompt | Description |
30
+ | ------------------ | ----------------------------------------------------------- |
31
+ | `debug-app` | Debug an application - gathers logs, status, env vars |
32
+ | `health-check` | Full infrastructure health analysis |
33
+ | `deploy-app` | Step-by-step deployment wizard from Git repository |
34
+ | `troubleshoot-ssl` | SSL/TLS certificate diagnosis workflow |
35
+ | `restart-project` | Safely restart all apps in a project with status monitoring |
36
+ | `env-audit` | Audit and compare environment variables across applications |
37
+ | `backup-status` | Check database backup status and history |
38
+
25
39
  ## Installation
26
40
 
27
41
  ### Prerequisites
@@ -26,4 +26,5 @@ export declare class CoolifyMcpServer extends McpServer {
26
26
  constructor(config: CoolifyConfig);
27
27
  connect(transport: Transport): Promise<void>;
28
28
  private registerTools;
29
+ private registerPrompts;
29
30
  }
@@ -20,7 +20,7 @@
20
20
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
21
21
  import { z } from 'zod';
22
22
  import { CoolifyClient, } from './coolify-client.js';
23
- const VERSION = '0.9.0';
23
+ const VERSION = '1.0.0';
24
24
  /** Wrap tool handler with consistent error handling */
25
25
  function wrapHandler(fn) {
26
26
  return fn()
@@ -44,10 +44,11 @@ export class CoolifyMcpServer extends McpServer {
44
44
  super({
45
45
  name: 'coolify',
46
46
  version: VERSION,
47
- capabilities: { tools: {} },
47
+ capabilities: { tools: {}, prompts: {} },
48
48
  });
49
49
  this.client = new CoolifyClient(config);
50
50
  this.registerTools();
51
+ this.registerPrompts();
51
52
  }
52
53
  async connect(transport) {
53
54
  await super.connect(transport);
@@ -374,4 +375,239 @@ export class CoolifyMcpServer extends McpServer {
374
375
  force: z.boolean().optional().describe('Force rebuild (default: true)'),
375
376
  }, async ({ project_uuid, force }) => wrapHandler(() => this.client.redeployProjectApps(project_uuid, force ?? true)));
376
377
  }
378
+ // ===========================================================================
379
+ // Prompt Templates - Guided Workflows
380
+ // ===========================================================================
381
+ registerPrompts() {
382
+ // -------------------------------------------------------------------------
383
+ // debug-app: Comprehensive application debugging workflow
384
+ // -------------------------------------------------------------------------
385
+ this.prompt('debug-app', 'Debug an application - gathers status, logs, env vars, and recent deployments to diagnose issues', {
386
+ query: z
387
+ .string()
388
+ .describe('Application identifier: UUID, name, or domain (e.g., "my-app" or "example.com")'),
389
+ }, async ({ query }) => {
390
+ return {
391
+ messages: [
392
+ {
393
+ role: 'user',
394
+ content: {
395
+ type: 'text',
396
+ text: `I need help debugging my Coolify application "${query}". Please:
397
+
398
+ 1. First, use the diagnose_app tool with query="${query}" to get comprehensive diagnostics
399
+ 2. Analyze the results and identify:
400
+ - Current health status and any issues
401
+ - Recent deployment failures or errors in logs
402
+ - Missing or misconfigured environment variables
403
+ - Any patterns suggesting the root cause
404
+ 3. Provide a clear diagnosis with:
405
+ - What's wrong (if anything)
406
+ - Likely root cause
407
+ - Recommended fix steps
408
+ 4. If the app seems healthy, confirm this and suggest any optimizations
409
+
410
+ Start by running diagnose_app now.`,
411
+ },
412
+ },
413
+ ],
414
+ };
415
+ });
416
+ // -------------------------------------------------------------------------
417
+ // health-check: Full infrastructure health analysis
418
+ // -------------------------------------------------------------------------
419
+ this.prompt('health-check', 'Perform a comprehensive health check of your entire Coolify infrastructure', {}, async () => {
420
+ return {
421
+ messages: [
422
+ {
423
+ role: 'user',
424
+ content: {
425
+ type: 'text',
426
+ text: `Please perform a comprehensive health check of my Coolify infrastructure:
427
+
428
+ 1. Run find_issues to scan for problems across all servers, apps, databases, and services
429
+ 2. Run get_infrastructure_overview to get the full picture
430
+ 3. For any issues found, provide:
431
+ - Severity (critical/warning/info)
432
+ - Affected resource and current status
433
+ - Recommended remediation steps
434
+ 4. Summarize the overall health:
435
+ - Total resources and their states
436
+ - Any immediate actions needed
437
+ - Preventive recommendations
438
+
439
+ Start by running find_issues now.`,
440
+ },
441
+ },
442
+ ],
443
+ };
444
+ });
445
+ // -------------------------------------------------------------------------
446
+ // deploy-app: Step-by-step deployment wizard
447
+ // -------------------------------------------------------------------------
448
+ this.prompt('deploy-app', 'Step-by-step wizard to deploy a new application from a Git repository', {
449
+ repo: z.string().describe('Git repository URL or org/repo format'),
450
+ branch: z.string().optional().describe('Branch to deploy (default: main)'),
451
+ }, async ({ repo, branch }) => {
452
+ const branchName = branch || 'main';
453
+ return {
454
+ messages: [
455
+ {
456
+ role: 'user',
457
+ content: {
458
+ type: 'text',
459
+ text: `I want to deploy a new application from ${repo} (branch: ${branchName}). Please guide me through the process:
460
+
461
+ 1. First, run list_projects to show available projects
462
+ 2. Ask me which project to deploy to (or help create a new one)
463
+ 3. Run list_servers to show available servers
464
+ 4. Ask me which server to deploy on
465
+ 5. Run list_private_keys to check available deploy keys
466
+ 6. Based on the repository type:
467
+ - If GitHub and we have a GitHub App configured, use create_application_private_gh
468
+ - Otherwise, help set up a deploy key and use create_application_private_key
469
+ 7. After creation, ask about:
470
+ - Environment variables needed
471
+ - Domain/FQDN configuration
472
+ - Whether to deploy immediately
473
+
474
+ Start by showing me the available projects.`,
475
+ },
476
+ },
477
+ ],
478
+ };
479
+ });
480
+ // -------------------------------------------------------------------------
481
+ // troubleshoot-ssl: SSL certificate diagnosis workflow
482
+ // -------------------------------------------------------------------------
483
+ this.prompt('troubleshoot-ssl', 'Diagnose SSL/TLS certificate issues for a domain', {
484
+ domain: z.string().describe('Domain having SSL issues (e.g., "example.com")'),
485
+ }, async ({ domain }) => {
486
+ return {
487
+ messages: [
488
+ {
489
+ role: 'user',
490
+ content: {
491
+ type: 'text',
492
+ text: `I'm having SSL/TLS certificate issues with the domain "${domain}". Please help me diagnose:
493
+
494
+ 1. First, use diagnose_app with query="${domain}" to find the application
495
+ 2. Check the application's FQDN configuration
496
+ 3. Look for common SSL issues:
497
+ - Is the domain correctly configured in the FQDN field?
498
+ - Are there any proxy/redirect issues in the logs?
499
+ - Is Let's Encrypt renewal working (check for ACME errors)?
500
+ 4. Check the server's domain configuration using get_server_domains
501
+ 5. Provide remediation steps:
502
+ - If domain misconfiguration: show how to fix with update_application
503
+ - If SSL renewal issue: suggest checking DNS and Traefik config
504
+ - If proxy issue: suggest checking Traefik labels
505
+
506
+ Start by finding the application for this domain.`,
507
+ },
508
+ },
509
+ ],
510
+ };
511
+ });
512
+ // -------------------------------------------------------------------------
513
+ // restart-project: Safely restart all apps in a project
514
+ // -------------------------------------------------------------------------
515
+ this.prompt('restart-project', 'Safely restart all applications in a project with status monitoring', {
516
+ project: z.string().describe('Project UUID or name'),
517
+ }, async ({ project }) => {
518
+ return {
519
+ messages: [
520
+ {
521
+ role: 'user',
522
+ content: {
523
+ type: 'text',
524
+ text: `I need to restart all applications in the project "${project}". Please handle this safely:
525
+
526
+ 1. First, run list_projects to find the project UUID (if a name was given)
527
+ 2. Run get_project to confirm the project details and list its environments
528
+ 3. Run list_applications to find all apps in this project
529
+ 4. Show me a summary of what will be restarted:
530
+ - List each application with current status
531
+ - Warn about any that are already unhealthy
532
+ 5. Ask for my confirmation before proceeding
533
+ 6. If confirmed, run restart_project_apps with the project UUID
534
+ 7. After restart, check the results and report:
535
+ - Which apps restarted successfully
536
+ - Any failures and why
537
+ - Current status of each app
538
+
539
+ Start by finding the project.`,
540
+ },
541
+ },
542
+ ],
543
+ };
544
+ });
545
+ // -------------------------------------------------------------------------
546
+ // env-audit: Audit environment variables across apps
547
+ // -------------------------------------------------------------------------
548
+ this.prompt('env-audit', 'Audit and compare environment variables across applications', {
549
+ apps: z
550
+ .string()
551
+ .optional()
552
+ .describe('Comma-separated app names/UUIDs to audit (optional, defaults to all)'),
553
+ key: z.string().optional().describe('Specific env var key to check across apps'),
554
+ }, async ({ apps, key }) => {
555
+ return {
556
+ messages: [
557
+ {
558
+ role: 'user',
559
+ content: {
560
+ type: 'text',
561
+ text: `Please audit environment variables across my applications${apps ? ` (${apps})` : ''}${key ? ` focusing on the "${key}" variable` : ''}:
562
+
563
+ 1. Run list_applications to get the list of apps
564
+ 2. For ${apps ? 'the specified apps' : 'each application'}, run list_application_envs
565
+ 3. Analyze the environment variables:
566
+ ${key ? `- Check if "${key}" is set consistently across all apps` : '- Identify common variables that differ between apps'}
567
+ - Flag any sensitive-looking values that might be exposed
568
+ - Identify missing variables that exist in some apps but not others
569
+ - Check for any empty or placeholder values
570
+ 4. Provide a summary:
571
+ - Table showing variable presence across apps
572
+ - Recommendations for standardization
573
+ - Any security concerns
574
+
575
+ Start by listing the applications.`,
576
+ },
577
+ },
578
+ ],
579
+ };
580
+ });
581
+ // -------------------------------------------------------------------------
582
+ // backup-status: Check database backup status
583
+ // -------------------------------------------------------------------------
584
+ this.prompt('backup-status', 'Check backup status and history for all databases', {}, async () => {
585
+ return {
586
+ messages: [
587
+ {
588
+ role: 'user',
589
+ content: {
590
+ type: 'text',
591
+ text: `Please check the backup status of all my databases:
592
+
593
+ 1. Run list_databases to get all databases
594
+ 2. For each database, run list_database_backups to check scheduled backups
595
+ 3. For databases with backups configured, run list_backup_executions to check recent history
596
+ 4. Report:
597
+ - Databases WITHOUT any backup schedules (critical!)
598
+ - Last successful backup for each database
599
+ - Any failed backups in the last 7 days
600
+ - Backup frequency and retention settings
601
+ 5. Provide recommendations:
602
+ - Which databases need backup configuration
603
+ - Any backup schedules that seem too infrequent
604
+ - Storage concerns if backups are piling up
605
+
606
+ Start by listing all databases.`,
607
+ },
608
+ },
609
+ ],
610
+ };
611
+ });
612
+ }
377
613
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@masonator/coolify-mcp",
3
3
  "scope": "@masonator",
4
- "version": "0.9.0",
4
+ "version": "1.0.0",
5
5
  "description": "MCP server implementation for Coolify",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",