@masonator/coolify-mcp 0.1.3 → 0.1.7
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/dist/__tests__/coolify-client.test.js +137 -398
- package/dist/__tests__/mcp-server.test.js +24 -26
- package/dist/__tests__/resources/application-resources.test.js +6 -9
- package/dist/__tests__/resources/database-resources.test.js +30 -34
- package/dist/__tests__/resources/deployment-resources.test.js +19 -20
- package/dist/__tests__/resources/service-resources.test.js +36 -41
- package/dist/index.js +4 -6
- package/dist/lib/coolify-client.js +1 -5
- package/dist/lib/mcp-server.d.ts +2 -2
- package/dist/lib/mcp-server.js +542 -509
- package/dist/lib/resource.js +3 -7
- package/dist/resources/application-resources.js +6 -10
- package/dist/resources/database-resources.js +6 -10
- package/dist/resources/deployment-resources.js +5 -9
- package/dist/resources/index.js +4 -20
- package/dist/resources/service-resources.js +6 -10
- package/dist/types/coolify.js +1 -2
- package/package.json +17 -8
package/dist/lib/resource.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Resource = Resource;
|
|
4
|
-
exports.getResourceUri = getResourceUri;
|
|
5
|
-
require("reflect-metadata");
|
|
1
|
+
import 'reflect-metadata';
|
|
6
2
|
/**
|
|
7
3
|
* Metadata key for storing the resource URI
|
|
8
4
|
*/
|
|
@@ -11,7 +7,7 @@ const RESOURCE_URI_KEY = Symbol('resourceUri');
|
|
|
11
7
|
* Decorator for marking methods as MCP resources.
|
|
12
8
|
* @param uri The URI pattern for the resource
|
|
13
9
|
*/
|
|
14
|
-
function Resource(uri) {
|
|
10
|
+
export function Resource(uri) {
|
|
15
11
|
return function (target, propertyKey, descriptor) {
|
|
16
12
|
// Store the URI pattern in the method's metadata
|
|
17
13
|
Reflect.defineMetadata(RESOURCE_URI_KEY, uri, target, propertyKey);
|
|
@@ -24,6 +20,6 @@ function Resource(uri) {
|
|
|
24
20
|
* @param propertyKey The method name
|
|
25
21
|
* @returns The resource URI or undefined if not a resource
|
|
26
22
|
*/
|
|
27
|
-
function getResourceUri(target, propertyKey) {
|
|
23
|
+
export function getResourceUri(target, propertyKey) {
|
|
28
24
|
return Reflect.getMetadata(RESOURCE_URI_KEY, target, propertyKey);
|
|
29
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const resource_js_1 = require("../lib/resource.js");
|
|
14
|
-
class ApplicationResources {
|
|
10
|
+
import { Resource } from '../lib/resource.js';
|
|
11
|
+
export class ApplicationResources {
|
|
15
12
|
constructor(client) {
|
|
16
13
|
this.client = client;
|
|
17
14
|
}
|
|
@@ -32,27 +29,26 @@ class ApplicationResources {
|
|
|
32
29
|
throw new Error('Not implemented');
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
|
-
exports.ApplicationResources = ApplicationResources;
|
|
36
32
|
__decorate([
|
|
37
|
-
|
|
33
|
+
Resource('coolify/applications/list'),
|
|
38
34
|
__metadata("design:type", Function),
|
|
39
35
|
__metadata("design:paramtypes", []),
|
|
40
36
|
__metadata("design:returntype", Promise)
|
|
41
37
|
], ApplicationResources.prototype, "listApplications", null);
|
|
42
38
|
__decorate([
|
|
43
|
-
|
|
39
|
+
Resource('coolify/applications/{id}'),
|
|
44
40
|
__metadata("design:type", Function),
|
|
45
41
|
__metadata("design:paramtypes", [String]),
|
|
46
42
|
__metadata("design:returntype", Promise)
|
|
47
43
|
], ApplicationResources.prototype, "getApplication", null);
|
|
48
44
|
__decorate([
|
|
49
|
-
|
|
45
|
+
Resource('coolify/applications/create'),
|
|
50
46
|
__metadata("design:type", Function),
|
|
51
47
|
__metadata("design:paramtypes", [Object]),
|
|
52
48
|
__metadata("design:returntype", Promise)
|
|
53
49
|
], ApplicationResources.prototype, "createApplication", null);
|
|
54
50
|
__decorate([
|
|
55
|
-
|
|
51
|
+
Resource('coolify/applications/{id}/delete'),
|
|
56
52
|
__metadata("design:type", Function),
|
|
57
53
|
__metadata("design:paramtypes", [String]),
|
|
58
54
|
__metadata("design:returntype", Promise)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const resource_js_1 = require("../lib/resource.js");
|
|
14
|
-
class DatabaseResources {
|
|
10
|
+
import { Resource } from '../lib/resource.js';
|
|
11
|
+
export class DatabaseResources {
|
|
15
12
|
constructor(client) {
|
|
16
13
|
this.client = client;
|
|
17
14
|
}
|
|
@@ -28,27 +25,26 @@ class DatabaseResources {
|
|
|
28
25
|
return this.client.deleteDatabase(id, options);
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
|
-
exports.DatabaseResources = DatabaseResources;
|
|
32
28
|
__decorate([
|
|
33
|
-
|
|
29
|
+
Resource('coolify/databases/list'),
|
|
34
30
|
__metadata("design:type", Function),
|
|
35
31
|
__metadata("design:paramtypes", []),
|
|
36
32
|
__metadata("design:returntype", Promise)
|
|
37
33
|
], DatabaseResources.prototype, "listDatabases", null);
|
|
38
34
|
__decorate([
|
|
39
|
-
|
|
35
|
+
Resource('coolify/databases/{id}'),
|
|
40
36
|
__metadata("design:type", Function),
|
|
41
37
|
__metadata("design:paramtypes", [String]),
|
|
42
38
|
__metadata("design:returntype", Promise)
|
|
43
39
|
], DatabaseResources.prototype, "getDatabase", null);
|
|
44
40
|
__decorate([
|
|
45
|
-
|
|
41
|
+
Resource('coolify/databases/{id}/update'),
|
|
46
42
|
__metadata("design:type", Function),
|
|
47
43
|
__metadata("design:paramtypes", [String, Object]),
|
|
48
44
|
__metadata("design:returntype", Promise)
|
|
49
45
|
], DatabaseResources.prototype, "updateDatabase", null);
|
|
50
46
|
__decorate([
|
|
51
|
-
|
|
47
|
+
Resource('coolify/databases/{id}/delete'),
|
|
52
48
|
__metadata("design:type", Function),
|
|
53
49
|
__metadata("design:paramtypes", [String, Object]),
|
|
54
50
|
__metadata("design:returntype", Promise)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const resource_js_1 = require("../lib/resource.js");
|
|
14
|
-
class DeploymentResources {
|
|
10
|
+
import { Resource } from '../lib/resource.js';
|
|
11
|
+
export class DeploymentResources {
|
|
15
12
|
constructor(client) {
|
|
16
13
|
this.client = client;
|
|
17
14
|
}
|
|
@@ -27,21 +24,20 @@ class DeploymentResources {
|
|
|
27
24
|
return this.client.deployApplication(params.uuid);
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
exports.DeploymentResources = DeploymentResources;
|
|
31
27
|
__decorate([
|
|
32
|
-
|
|
28
|
+
Resource('coolify/deployments/list'),
|
|
33
29
|
__metadata("design:type", Function),
|
|
34
30
|
__metadata("design:paramtypes", []),
|
|
35
31
|
__metadata("design:returntype", Promise)
|
|
36
32
|
], DeploymentResources.prototype, "listDeployments", null);
|
|
37
33
|
__decorate([
|
|
38
|
-
|
|
34
|
+
Resource('coolify/deployments/{id}'),
|
|
39
35
|
__metadata("design:type", Function),
|
|
40
36
|
__metadata("design:paramtypes", [String]),
|
|
41
37
|
__metadata("design:returntype", Promise)
|
|
42
38
|
], DeploymentResources.prototype, "getDeployment", null);
|
|
43
39
|
__decorate([
|
|
44
|
-
|
|
40
|
+
Resource('coolify/deploy'),
|
|
45
41
|
__metadata("design:type", Function),
|
|
46
42
|
__metadata("design:paramtypes", [Object]),
|
|
47
43
|
__metadata("design:returntype", Promise)
|
package/dist/resources/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./database-resources.js"), exports);
|
|
18
|
-
__exportStar(require("./deployment-resources.js"), exports);
|
|
19
|
-
__exportStar(require("./application-resources.js"), exports);
|
|
20
|
-
__exportStar(require("./service-resources.js"), exports);
|
|
1
|
+
export * from './database-resources.js';
|
|
2
|
+
export * from './deployment-resources.js';
|
|
3
|
+
export * from './application-resources.js';
|
|
4
|
+
export * from './service-resources.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const resource_js_1 = require("../lib/resource.js");
|
|
14
|
-
class ServiceResources {
|
|
10
|
+
import { Resource } from '../lib/resource.js';
|
|
11
|
+
export class ServiceResources {
|
|
15
12
|
constructor(client) {
|
|
16
13
|
this.client = client;
|
|
17
14
|
}
|
|
@@ -28,27 +25,26 @@ class ServiceResources {
|
|
|
28
25
|
return this.client.deleteService(id, options);
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
|
-
exports.ServiceResources = ServiceResources;
|
|
32
28
|
__decorate([
|
|
33
|
-
|
|
29
|
+
Resource('coolify/services/list'),
|
|
34
30
|
__metadata("design:type", Function),
|
|
35
31
|
__metadata("design:paramtypes", []),
|
|
36
32
|
__metadata("design:returntype", Promise)
|
|
37
33
|
], ServiceResources.prototype, "listServices", null);
|
|
38
34
|
__decorate([
|
|
39
|
-
|
|
35
|
+
Resource('coolify/services/{id}'),
|
|
40
36
|
__metadata("design:type", Function),
|
|
41
37
|
__metadata("design:paramtypes", [String]),
|
|
42
38
|
__metadata("design:returntype", Promise)
|
|
43
39
|
], ServiceResources.prototype, "getService", null);
|
|
44
40
|
__decorate([
|
|
45
|
-
|
|
41
|
+
Resource('coolify/services/create'),
|
|
46
42
|
__metadata("design:type", Function),
|
|
47
43
|
__metadata("design:paramtypes", [Object]),
|
|
48
44
|
__metadata("design:returntype", Promise)
|
|
49
45
|
], ServiceResources.prototype, "createService", null);
|
|
50
46
|
__decorate([
|
|
51
|
-
|
|
47
|
+
Resource('coolify/services/{id}/delete'),
|
|
52
48
|
__metadata("design:type", Function),
|
|
53
49
|
__metadata("design:paramtypes", [String, Object]),
|
|
54
50
|
__metadata("design:returntype", Promise)
|
package/dist/types/coolify.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masonator/coolify-mcp",
|
|
3
3
|
"scope": "@masonator",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"description": "MCP server implementation for Coolify",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
8
15
|
"bin": {
|
|
9
16
|
"coolify-mcp": "dist/index.js"
|
|
10
17
|
},
|
|
@@ -12,11 +19,11 @@
|
|
|
12
19
|
"dist"
|
|
13
20
|
],
|
|
14
21
|
"scripts": {
|
|
15
|
-
"build": "tsc",
|
|
22
|
+
"build": "tsc && shx chmod +x dist/*.js",
|
|
16
23
|
"dev": "tsc --watch",
|
|
17
|
-
"test": "jest",
|
|
18
|
-
"test:watch": "jest --watch",
|
|
19
|
-
"test:coverage": "jest --coverage",
|
|
24
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
25
|
+
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
26
|
+
"test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
20
27
|
"lint": "eslint . --ext .ts",
|
|
21
28
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
22
29
|
"format": "prettier --write .",
|
|
@@ -33,7 +40,8 @@
|
|
|
33
40
|
"author": "Stuart Mason",
|
|
34
41
|
"license": "MIT",
|
|
35
42
|
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/sdk": "
|
|
43
|
+
"@modelcontextprotocol/sdk": "1.0.1",
|
|
44
|
+
"@modelcontextprotocol/server-github": "^2025.1.23",
|
|
37
45
|
"reflect-metadata": "^0.2.2",
|
|
38
46
|
"zod": "^3.24.2"
|
|
39
47
|
},
|
|
@@ -49,6 +57,7 @@
|
|
|
49
57
|
"lint-staged": "^15.2.2",
|
|
50
58
|
"markdownlint-cli2": "^0.12.1",
|
|
51
59
|
"prettier": "^3.5.3",
|
|
60
|
+
"shx": "^0.3.4",
|
|
52
61
|
"ts-jest": "^29.2.6",
|
|
53
62
|
"typescript": "^5.8.2"
|
|
54
63
|
},
|