@masonator/coolify-mcp 1.6.0 → 2.1.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 +22 -30
- package/dist/__tests__/coolify-client.test.js +31 -0
- package/dist/__tests__/mcp-server.test.js +119 -398
- package/dist/lib/coolify-client.d.ts +4 -1
- package/dist/lib/coolify-client.js +17 -0
- package/dist/lib/mcp-server.d.ts +2 -19
- package/dist/lib/mcp-server.js +471 -613
- package/dist/types/coolify.d.ts +16 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,41 +9,33 @@
|
|
|
9
9
|
[](https://codecov.io/gh/StuMason/coolify-mcp)
|
|
10
10
|
[](https://mseep.ai/app/stumason-coolify-mcp)
|
|
11
11
|
|
|
12
|
-
> **The most comprehensive MCP server for Coolify** -
|
|
12
|
+
> **The most comprehensive MCP server for Coolify** - 34 optimized tools, smart diagnostics, and batch operations for managing your self-hosted PaaS through AI assistants.
|
|
13
13
|
|
|
14
14
|
A Model Context Protocol (MCP) server for [Coolify](https://coolify.io/), enabling AI assistants to manage and debug your Coolify instances through natural language.
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
This MCP server provides **
|
|
19
|
-
|
|
20
|
-
| Category | Tools
|
|
21
|
-
| -------------------- |
|
|
22
|
-
| **Infrastructure** |
|
|
23
|
-
| **Diagnostics** | diagnose_app
|
|
24
|
-
| **Batch Operations** | restart_project_apps
|
|
25
|
-
| **Servers** |
|
|
26
|
-
| **Projects** | list, get, create, update, delete
|
|
27
|
-
| **Environments** | list, get, create, delete
|
|
28
|
-
| **Applications** |
|
|
29
|
-
| **Databases** |
|
|
30
|
-
| **Services** |
|
|
31
|
-
| **
|
|
32
|
-
| **
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| ------------------ | ----------------------------------------------------------- |
|
|
40
|
-
| `debug-app` | Debug an application - gathers logs, status, env vars |
|
|
41
|
-
| `health-check` | Full infrastructure health analysis |
|
|
42
|
-
| `deploy-app` | Step-by-step deployment wizard from Git repository |
|
|
43
|
-
| `troubleshoot-ssl` | SSL/TLS certificate diagnosis workflow |
|
|
44
|
-
| `restart-project` | Safely restart all apps in a project with status monitoring |
|
|
45
|
-
| `env-audit` | Audit and compare environment variables across applications |
|
|
46
|
-
| `backup-status` | Check database backup status and history |
|
|
18
|
+
This MCP server provides **34 token-optimized tools** for **debugging, management, and deployment**:
|
|
19
|
+
|
|
20
|
+
| Category | Tools |
|
|
21
|
+
| -------------------- | ----------------------------------------------------------------------------------------- |
|
|
22
|
+
| **Infrastructure** | `get_infrastructure_overview`, `get_mcp_version`, `get_version` |
|
|
23
|
+
| **Diagnostics** | `diagnose_app`, `diagnose_server`, `find_issues` |
|
|
24
|
+
| **Batch Operations** | `restart_project_apps`, `bulk_env_update`, `stop_all_apps`, `redeploy_project` |
|
|
25
|
+
| **Servers** | `list_servers`, `get_server`, `validate_server`, `server_resources`, `server_domains` |
|
|
26
|
+
| **Projects** | `projects` (list, get, create, update, delete via action param) |
|
|
27
|
+
| **Environments** | `environments` (list, get, create, delete via action param) |
|
|
28
|
+
| **Applications** | `list_applications`, `get_application`, `application` (CRUD), `application_logs` |
|
|
29
|
+
| **Databases** | `list_databases`, `get_database`, `database` (create 8 types, delete), `database_backups` |
|
|
30
|
+
| **Services** | `list_services`, `get_service`, `service` (create, update, delete) |
|
|
31
|
+
| **Control** | `control` (start/stop/restart for apps, databases, services) |
|
|
32
|
+
| **Env Vars** | `env_vars` (CRUD for application and service env vars) |
|
|
33
|
+
| **Deployments** | `list_deployments`, `deploy`, `deployment` (get, cancel, list_for_app) |
|
|
34
|
+
| **Private Keys** | `private_keys` (list, get, create, update, delete via action param) |
|
|
35
|
+
|
|
36
|
+
### v2.0.0 Token Diet
|
|
37
|
+
|
|
38
|
+
v2.0.0 reduced token usage by **85%** (from ~43,000 to ~6,600 tokens) by consolidating related operations into single tools with action parameters. This prevents context window exhaustion in AI assistants.
|
|
47
39
|
|
|
48
40
|
## Installation
|
|
49
41
|
|
|
@@ -780,6 +780,37 @@ describe('CoolifyClient', () => {
|
|
|
780
780
|
expect(result).toEqual(mockBackup);
|
|
781
781
|
expect(mockFetch).toHaveBeenCalledWith('http://localhost:3000/api/v1/databases/db-uuid/backups/backup-uuid', expect.any(Object));
|
|
782
782
|
});
|
|
783
|
+
it('should create a database backup', async () => {
|
|
784
|
+
const mockBackup = { uuid: 'backup-uuid', frequency: '0 0 * * *', enabled: true };
|
|
785
|
+
mockFetch.mockResolvedValueOnce(mockResponse(mockBackup));
|
|
786
|
+
const result = await client.createDatabaseBackup('db-uuid', {
|
|
787
|
+
frequency: '0 0 * * *',
|
|
788
|
+
enabled: true,
|
|
789
|
+
save_s3: true,
|
|
790
|
+
s3_storage_uuid: 'storage-uuid',
|
|
791
|
+
database_backup_retention_days_locally: 7,
|
|
792
|
+
database_backup_retention_days_s3: 7,
|
|
793
|
+
});
|
|
794
|
+
expect(result).toEqual(mockBackup);
|
|
795
|
+
expect(mockFetch).toHaveBeenCalledWith('http://localhost:3000/api/v1/databases/db-uuid/backups', expect.objectContaining({ method: 'POST' }));
|
|
796
|
+
});
|
|
797
|
+
it('should update a database backup', async () => {
|
|
798
|
+
const mockData = { message: 'Backup updated' };
|
|
799
|
+
mockFetch.mockResolvedValueOnce(mockResponse(mockData));
|
|
800
|
+
const result = await client.updateDatabaseBackup('db-uuid', 'backup-uuid', {
|
|
801
|
+
enabled: false,
|
|
802
|
+
frequency: '0 2 * * *',
|
|
803
|
+
});
|
|
804
|
+
expect(result).toEqual(mockData);
|
|
805
|
+
expect(mockFetch).toHaveBeenCalledWith('http://localhost:3000/api/v1/databases/db-uuid/backups/backup-uuid', expect.objectContaining({ method: 'PATCH' }));
|
|
806
|
+
});
|
|
807
|
+
it('should delete a database backup', async () => {
|
|
808
|
+
const mockData = { message: 'Backup deleted' };
|
|
809
|
+
mockFetch.mockResolvedValueOnce(mockResponse(mockData));
|
|
810
|
+
const result = await client.deleteDatabaseBackup('db-uuid', 'backup-uuid');
|
|
811
|
+
expect(result).toEqual(mockData);
|
|
812
|
+
expect(mockFetch).toHaveBeenCalledWith('http://localhost:3000/api/v1/databases/db-uuid/backups/backup-uuid', expect.objectContaining({ method: 'DELETE' }));
|
|
813
|
+
});
|
|
783
814
|
it('should list backup executions', async () => {
|
|
784
815
|
const mockExecutions = [{ uuid: 'exec-uuid', status: 'success' }];
|
|
785
816
|
mockFetch.mockResolvedValueOnce(mockResponse(mockExecutions));
|