@vibetools/dokploy-mcp 0.5.0 → 1.2.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 +39 -13
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.js +51 -16
- package/dist/config/resolver.js +33 -50
- package/dist/server.js +1 -1
- package/dist/tools/_database.d.ts +12 -0
- package/dist/tools/_database.js +115 -0
- package/dist/tools/_factory.d.ts +3 -1
- package/dist/tools/_factory.js +36 -17
- package/dist/tools/application.js +219 -82
- package/dist/tools/backup.js +30 -0
- package/dist/tools/compose.js +273 -35
- package/dist/tools/deployment.js +82 -2
- package/dist/tools/docker.js +62 -2
- package/dist/tools/domain.js +15 -2
- package/dist/tools/environment.d.ts +2 -0
- package/dist/tools/environment.js +104 -0
- package/dist/tools/git-provider.d.ts +2 -0
- package/dist/tools/git-provider.js +22 -0
- package/dist/tools/github.d.ts +2 -0
- package/dist/tools/github.js +66 -0
- package/dist/tools/gitlab.d.ts +2 -0
- package/dist/tools/gitlab.js +98 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/mariadb.d.ts +1 -2
- package/dist/tools/mariadb.js +9 -165
- package/dist/tools/mongo.d.ts +1 -2
- package/dist/tools/mongo.js +9 -164
- package/dist/tools/mounts.js +53 -9
- package/dist/tools/mysql.d.ts +1 -2
- package/dist/tools/mysql.js +9 -165
- package/dist/tools/notification.d.ts +2 -0
- package/dist/tools/notification.js +559 -0
- package/dist/tools/patch.d.ts +2 -0
- package/dist/tools/patch.js +179 -0
- package/dist/tools/postgres.d.ts +1 -2
- package/dist/tools/postgres.js +8 -164
- package/dist/tools/preview-deployment.d.ts +2 -0
- package/dist/tools/preview-deployment.js +50 -0
- package/dist/tools/project.js +32 -1
- package/dist/tools/redis.d.ts +1 -2
- package/dist/tools/redis.js +8 -164
- package/dist/tools/rollback.d.ts +2 -0
- package/dist/tools/rollback.js +28 -0
- package/dist/tools/schedule.d.ts +2 -0
- package/dist/tools/schedule.js +92 -0
- package/dist/tools/server.d.ts +2 -0
- package/dist/tools/server.js +192 -0
- package/dist/tools/settings.js +251 -0
- package/dist/tools/ssh-key.d.ts +2 -0
- package/dist/tools/ssh-key.js +74 -0
- package/dist/tools/user.js +75 -2
- package/dist/tools/volume-backups.d.ts +2 -0
- package/dist/tools/volume-backups.js +96 -0
- package/package.json +7 -2
package/dist/tools/user.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { getTool } from './_factory.js';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
3
|
// ── tools ────────────────────────────────────────────────────────────
|
|
4
4
|
const all = getTool({
|
|
5
5
|
name: 'dokploy_user_all',
|
|
@@ -8,5 +8,78 @@ const all = getTool({
|
|
|
8
8
|
schema: z.object({}).strict(),
|
|
9
9
|
endpoint: '/user.all',
|
|
10
10
|
});
|
|
11
|
+
const session = getTool({
|
|
12
|
+
name: 'dokploy_user_session',
|
|
13
|
+
title: 'Get User Session',
|
|
14
|
+
description: 'Get the current authenticated user session from Dokploy, including session and identity metadata.',
|
|
15
|
+
schema: z.object({}).strict(),
|
|
16
|
+
endpoint: '/user.session',
|
|
17
|
+
});
|
|
18
|
+
const get = getTool({
|
|
19
|
+
name: 'dokploy_user_get',
|
|
20
|
+
title: 'Get Current User',
|
|
21
|
+
description: 'Get the current authenticated Dokploy user profile.',
|
|
22
|
+
schema: z.object({}).strict(),
|
|
23
|
+
endpoint: '/user.get',
|
|
24
|
+
});
|
|
25
|
+
const getPermissions = getTool({
|
|
26
|
+
name: 'dokploy_user_get_permissions',
|
|
27
|
+
title: 'Get Current User Permissions',
|
|
28
|
+
description: 'Get the current authenticated Dokploy user permissions.',
|
|
29
|
+
schema: z.object({}).strict(),
|
|
30
|
+
endpoint: '/user.getPermissions',
|
|
31
|
+
});
|
|
32
|
+
const haveRootAccess = getTool({
|
|
33
|
+
name: 'dokploy_user_have_root_access',
|
|
34
|
+
title: 'Check Root Access',
|
|
35
|
+
description: 'Check whether the current authenticated Dokploy user has root access.',
|
|
36
|
+
schema: z.object({}).strict(),
|
|
37
|
+
endpoint: '/user.haveRootAccess',
|
|
38
|
+
});
|
|
39
|
+
const createApiKey = postTool({
|
|
40
|
+
name: 'dokploy_user_create_api_key',
|
|
41
|
+
title: 'Create API Key',
|
|
42
|
+
description: 'Create a new Dokploy API key. Requires a name and organization metadata. Optionally configure expiration and rate limiting.',
|
|
43
|
+
schema: z
|
|
44
|
+
.object({
|
|
45
|
+
name: z.string().min(1).describe('API key name'),
|
|
46
|
+
prefix: z.string().optional().describe('API key prefix'),
|
|
47
|
+
expiresIn: z.number().optional().describe('Expiration interval'),
|
|
48
|
+
metadata: z
|
|
49
|
+
.object({
|
|
50
|
+
organizationId: z.string().describe('Organization ID'),
|
|
51
|
+
})
|
|
52
|
+
.strict()
|
|
53
|
+
.describe('API key metadata'),
|
|
54
|
+
rateLimitEnabled: z.boolean().optional().describe('Whether rate limiting is enabled'),
|
|
55
|
+
rateLimitTimeWindow: z.number().optional().describe('Rate limit time window'),
|
|
56
|
+
rateLimitMax: z.number().optional().describe('Rate limit max requests'),
|
|
57
|
+
remaining: z.number().optional().describe('Remaining requests'),
|
|
58
|
+
refillAmount: z.number().optional().describe('Rate limit refill amount'),
|
|
59
|
+
refillInterval: z.number().optional().describe('Rate limit refill interval'),
|
|
60
|
+
})
|
|
61
|
+
.strict(),
|
|
62
|
+
endpoint: '/user.createApiKey',
|
|
63
|
+
});
|
|
64
|
+
const deleteApiKey = postTool({
|
|
65
|
+
name: 'dokploy_user_delete_api_key',
|
|
66
|
+
title: 'Delete API Key',
|
|
67
|
+
description: 'Delete a Dokploy API key by its ID. This is a destructive action.',
|
|
68
|
+
schema: z
|
|
69
|
+
.object({
|
|
70
|
+
apiKeyId: z.string().describe('API key ID'),
|
|
71
|
+
})
|
|
72
|
+
.strict(),
|
|
73
|
+
endpoint: '/user.deleteApiKey',
|
|
74
|
+
annotations: { destructiveHint: true },
|
|
75
|
+
});
|
|
11
76
|
// ── export ───────────────────────────────────────────────────────────
|
|
12
|
-
export const userTools = [
|
|
77
|
+
export const userTools = [
|
|
78
|
+
all,
|
|
79
|
+
session,
|
|
80
|
+
get,
|
|
81
|
+
getPermissions,
|
|
82
|
+
haveRootAccess,
|
|
83
|
+
createApiKey,
|
|
84
|
+
deleteApiKey,
|
|
85
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const serviceTypeSchema = z
|
|
4
|
+
.enum(['application', 'postgres', 'mysql', 'mariadb', 'mongo', 'redis', 'compose'])
|
|
5
|
+
.describe('Service type');
|
|
6
|
+
const nullableString = z.string().nullable().optional();
|
|
7
|
+
const nullableBoolean = z.boolean().nullable().optional();
|
|
8
|
+
const nullableNumber = z.number().nullable().optional();
|
|
9
|
+
const volumeBackupPayload = z
|
|
10
|
+
.object({
|
|
11
|
+
name: z.string().describe('Volume backup name'),
|
|
12
|
+
volumeName: z.string().describe('Docker volume name'),
|
|
13
|
+
prefix: z.string().describe('Backup file prefix'),
|
|
14
|
+
serviceType: serviceTypeSchema.optional(),
|
|
15
|
+
appName: z.string().optional().describe('App name'),
|
|
16
|
+
serviceName: nullableString.describe('Compose service name'),
|
|
17
|
+
turnOff: z.boolean().optional().describe('Whether to turn off the service during backup'),
|
|
18
|
+
cronExpression: z.string().describe('Cron expression'),
|
|
19
|
+
keepLatestCount: nullableNumber.describe('Number of backups to keep'),
|
|
20
|
+
enabled: nullableBoolean.describe('Whether the backup is enabled'),
|
|
21
|
+
applicationId: nullableString.describe('Application ID'),
|
|
22
|
+
postgresId: nullableString.describe('Postgres ID'),
|
|
23
|
+
mariadbId: nullableString.describe('MariaDB ID'),
|
|
24
|
+
mongoId: nullableString.describe('MongoDB ID'),
|
|
25
|
+
mysqlId: nullableString.describe('MySQL ID'),
|
|
26
|
+
redisId: nullableString.describe('Redis ID'),
|
|
27
|
+
composeId: nullableString.describe('Compose ID'),
|
|
28
|
+
createdAt: z.string().optional().describe('Creation timestamp'),
|
|
29
|
+
destinationId: z.string().describe('Destination ID'),
|
|
30
|
+
})
|
|
31
|
+
.strict();
|
|
32
|
+
const list = getTool({
|
|
33
|
+
name: 'dokploy_volume_backups_list',
|
|
34
|
+
title: 'List Volume Backups',
|
|
35
|
+
description: 'List volume backup configurations for a Dokploy service type. Requires the entity ID and volume backup type.',
|
|
36
|
+
schema: z
|
|
37
|
+
.object({
|
|
38
|
+
id: z.string().min(1).describe('Entity ID'),
|
|
39
|
+
volumeBackupType: serviceTypeSchema.describe('Volume backup type'),
|
|
40
|
+
})
|
|
41
|
+
.strict(),
|
|
42
|
+
endpoint: '/volumeBackups.list',
|
|
43
|
+
});
|
|
44
|
+
const one = getTool({
|
|
45
|
+
name: 'dokploy_volume_backups_one',
|
|
46
|
+
title: 'Get Volume Backup',
|
|
47
|
+
description: 'Retrieve a volume backup configuration by its ID.',
|
|
48
|
+
schema: z
|
|
49
|
+
.object({
|
|
50
|
+
volumeBackupId: z.string().min(1).describe('Volume backup ID'),
|
|
51
|
+
})
|
|
52
|
+
.strict(),
|
|
53
|
+
endpoint: '/volumeBackups.one',
|
|
54
|
+
});
|
|
55
|
+
const create = postTool({
|
|
56
|
+
name: 'dokploy_volume_backups_create',
|
|
57
|
+
title: 'Create Volume Backup',
|
|
58
|
+
description: 'Create a volume backup configuration in Dokploy. Requires the backup name, volume name, prefix, cron expression, and destination ID.',
|
|
59
|
+
schema: volumeBackupPayload,
|
|
60
|
+
endpoint: '/volumeBackups.create',
|
|
61
|
+
});
|
|
62
|
+
const update = postTool({
|
|
63
|
+
name: 'dokploy_volume_backups_update',
|
|
64
|
+
title: 'Update Volume Backup',
|
|
65
|
+
description: 'Update a volume backup configuration in Dokploy. Requires the volume backup ID together with the updated backup payload.',
|
|
66
|
+
schema: volumeBackupPayload
|
|
67
|
+
.extend({
|
|
68
|
+
volumeBackupId: z.string().min(1).describe('Volume backup ID'),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
endpoint: '/volumeBackups.update',
|
|
72
|
+
});
|
|
73
|
+
const remove = postTool({
|
|
74
|
+
name: 'dokploy_volume_backups_delete',
|
|
75
|
+
title: 'Delete Volume Backup',
|
|
76
|
+
description: 'Delete a volume backup configuration from Dokploy. Requires the volume backup ID. This is a destructive action.',
|
|
77
|
+
schema: z
|
|
78
|
+
.object({
|
|
79
|
+
volumeBackupId: z.string().min(1).describe('Volume backup ID'),
|
|
80
|
+
})
|
|
81
|
+
.strict(),
|
|
82
|
+
endpoint: '/volumeBackups.delete',
|
|
83
|
+
annotations: { destructiveHint: true },
|
|
84
|
+
});
|
|
85
|
+
const runManually = postTool({
|
|
86
|
+
name: 'dokploy_volume_backups_run_manually',
|
|
87
|
+
title: 'Run Volume Backup Manually',
|
|
88
|
+
description: 'Trigger a volume backup immediately in Dokploy. Requires the volume backup ID.',
|
|
89
|
+
schema: z
|
|
90
|
+
.object({
|
|
91
|
+
volumeBackupId: z.string().min(1).describe('Volume backup ID'),
|
|
92
|
+
})
|
|
93
|
+
.strict(),
|
|
94
|
+
endpoint: '/volumeBackups.runManually',
|
|
95
|
+
});
|
|
96
|
+
export const volumeBackupsTools = [list, one, create, update, remove, runManually];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibetools/dokploy-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MCP Server for the Dokploy API - complete coverage of all endpoints",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
"build": "tsc",
|
|
20
20
|
"dev": "tsc --watch",
|
|
21
21
|
"start": "node dist/index.js",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
24
|
+
"test:coverage": "vitest run --coverage",
|
|
22
25
|
"typecheck": "tsc --noEmit",
|
|
23
26
|
"lint": "biome check .",
|
|
24
27
|
"lint:fix": "biome check --write .",
|
|
@@ -34,7 +37,9 @@
|
|
|
34
37
|
"devDependencies": {
|
|
35
38
|
"@biomejs/biome": "^2.4.4",
|
|
36
39
|
"@types/node": "^22.19.11",
|
|
37
|
-
"
|
|
40
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
41
|
+
"typescript": "^5.9.3",
|
|
42
|
+
"vitest": "^4.0.18"
|
|
38
43
|
},
|
|
39
44
|
"engines": {
|
|
40
45
|
"node": ">=22.0.0"
|