@vibetools/dokploy-mcp 0.4.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 +692 -0
- package/dist/api/client.d.ts +11 -0
- package/dist/api/client.js +103 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +48 -0
- package/dist/cli/setup.d.ts +1 -0
- package/dist/cli/setup.js +112 -0
- package/dist/config/resolver.d.ts +38 -0
- package/dist/config/resolver.js +290 -0
- package/dist/config/types.d.ts +25 -0
- package/dist/config/types.js +33 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +25 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +17 -0
- package/dist/tools/_factory.d.ts +53 -0
- package/dist/tools/_factory.js +86 -0
- package/dist/tools/admin.d.ts +2 -0
- package/dist/tools/admin.js +61 -0
- package/dist/tools/application.d.ts +2 -0
- package/dist/tools/application.js +464 -0
- package/dist/tools/auth.d.ts +2 -0
- package/dist/tools/auth.js +150 -0
- package/dist/tools/backup.d.ts +2 -0
- package/dist/tools/backup.js +103 -0
- package/dist/tools/certificates.d.ts +2 -0
- package/dist/tools/certificates.js +54 -0
- package/dist/tools/cluster.d.ts +2 -0
- package/dist/tools/cluster.js +38 -0
- package/dist/tools/compose.d.ts +2 -0
- package/dist/tools/compose.js +213 -0
- package/dist/tools/deployment.d.ts +2 -0
- package/dist/tools/deployment.js +27 -0
- package/dist/tools/destination.d.ts +2 -0
- package/dist/tools/destination.js +78 -0
- package/dist/tools/docker.d.ts +2 -0
- package/dist/tools/docker.js +50 -0
- package/dist/tools/domain.d.ts +2 -0
- package/dist/tools/domain.js +134 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +48 -0
- package/dist/tools/mariadb.d.ts +2 -0
- package/dist/tools/mariadb.js +170 -0
- package/dist/tools/mongo.d.ts +2 -0
- package/dist/tools/mongo.js +168 -0
- package/dist/tools/mounts.d.ts +2 -0
- package/dist/tools/mounts.js +65 -0
- package/dist/tools/mysql.d.ts +2 -0
- package/dist/tools/mysql.js +170 -0
- package/dist/tools/port.d.ts +2 -0
- package/dist/tools/port.js +54 -0
- package/dist/tools/postgres.d.ts +2 -0
- package/dist/tools/postgres.js +169 -0
- package/dist/tools/project.d.ts +2 -0
- package/dist/tools/project.js +94 -0
- package/dist/tools/redirects.d.ts +2 -0
- package/dist/tools/redirects.js +53 -0
- package/dist/tools/redis.d.ts +2 -0
- package/dist/tools/redis.js +167 -0
- package/dist/tools/registry.d.ts +2 -0
- package/dist/tools/registry.js +81 -0
- package/dist/tools/security.d.ts +2 -0
- package/dist/tools/security.js +48 -0
- package/dist/tools/settings.d.ts +2 -0
- package/dist/tools/settings.js +258 -0
- package/dist/tools/user.d.ts +2 -0
- package/dist/tools/user.js +12 -0
- package/package.json +64 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
// ── helpers ──────────────────────────────────────────────────────────
|
|
4
|
+
const rdId = z.string().min(1).describe('Unique Redis database ID');
|
|
5
|
+
const DB = 'redis';
|
|
6
|
+
// ── tools ────────────────────────────────────────────────────────────
|
|
7
|
+
const one = getTool({
|
|
8
|
+
name: `dokploy_${DB}_one`,
|
|
9
|
+
title: 'Get Redis Details',
|
|
10
|
+
description: 'Retrieve the full configuration and status details of a Redis database managed by Dokploy. Requires the unique Redis database ID. Returns all metadata including name, image, resource limits, environment variables, and current application status.',
|
|
11
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
12
|
+
endpoint: `${DB}.one`,
|
|
13
|
+
});
|
|
14
|
+
const create = postTool({
|
|
15
|
+
name: `dokploy_${DB}_create`,
|
|
16
|
+
title: 'Create Redis Database',
|
|
17
|
+
description: 'Create a new Redis database instance inside a Dokploy project. Requires a display name, app-level identifier, database password, and the target project ID. Optionally specify a Docker image, description, or remote server. Returns the newly created database record.',
|
|
18
|
+
schema: z
|
|
19
|
+
.object({
|
|
20
|
+
name: z.string().min(1).describe('Display name for the database'),
|
|
21
|
+
appName: z.string().min(1).describe('Unique app-level identifier'),
|
|
22
|
+
databasePassword: z.string().min(1).describe('Database password'),
|
|
23
|
+
projectId: z.string().min(1).describe('Project ID to create the database in'),
|
|
24
|
+
dockerImage: z.string().optional().describe('Docker image (default: redis:7)'),
|
|
25
|
+
description: z.string().nullable().optional().describe('Optional description'),
|
|
26
|
+
serverId: z.string().nullable().optional().describe('Target server ID (null for local)'),
|
|
27
|
+
})
|
|
28
|
+
.strict(),
|
|
29
|
+
endpoint: `${DB}.create`,
|
|
30
|
+
});
|
|
31
|
+
const update = postTool({
|
|
32
|
+
name: `dokploy_${DB}_update`,
|
|
33
|
+
title: 'Update Redis Database',
|
|
34
|
+
description: 'Update the configuration of an existing Redis database in Dokploy. Requires the Redis database ID and accepts optional fields such as name, Docker image, resource limits (memory and CPU), custom start command, environment variables, and external port. Returns the updated database configuration.',
|
|
35
|
+
schema: z
|
|
36
|
+
.object({
|
|
37
|
+
redisId: rdId,
|
|
38
|
+
name: z.string().min(1).optional().describe('Display name'),
|
|
39
|
+
appName: z.string().min(1).optional().describe('App-level identifier'),
|
|
40
|
+
description: z.string().nullable().optional().describe('Description'),
|
|
41
|
+
dockerImage: z.string().optional().describe('Docker image'),
|
|
42
|
+
memoryReservation: z.number().nullable().optional().describe('Memory reservation in MB'),
|
|
43
|
+
memoryLimit: z.number().nullable().optional().describe('Memory limit in MB'),
|
|
44
|
+
cpuReservation: z.number().nullable().optional().describe('CPU reservation'),
|
|
45
|
+
cpuLimit: z.number().nullable().optional().describe('CPU limit'),
|
|
46
|
+
command: z.string().nullable().optional().describe('Custom start command'),
|
|
47
|
+
env: z.string().nullable().optional().describe('Environment variables'),
|
|
48
|
+
externalPort: z.number().nullable().optional().describe('External port'),
|
|
49
|
+
})
|
|
50
|
+
.strict(),
|
|
51
|
+
endpoint: `${DB}.update`,
|
|
52
|
+
});
|
|
53
|
+
const remove = postTool({
|
|
54
|
+
name: `dokploy_${DB}_remove`,
|
|
55
|
+
title: 'Remove Redis Database',
|
|
56
|
+
description: 'Permanently delete a Redis database from Dokploy. Requires the Redis database ID. This is a destructive operation that removes the container, all associated data, and configuration. Returns the operation status confirming deletion.',
|
|
57
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
58
|
+
endpoint: `${DB}.remove`,
|
|
59
|
+
annotations: { destructiveHint: true },
|
|
60
|
+
});
|
|
61
|
+
const move = postTool({
|
|
62
|
+
name: `dokploy_${DB}_move`,
|
|
63
|
+
title: 'Move Redis Database',
|
|
64
|
+
description: 'Move a Redis database from its current project to a different project within Dokploy. Requires the Redis database ID and the destination project ID. The database configuration and data remain intact during the move. Returns the operation status.',
|
|
65
|
+
schema: z
|
|
66
|
+
.object({
|
|
67
|
+
redisId: rdId,
|
|
68
|
+
targetProjectId: z.string().min(1).describe('Destination project ID'),
|
|
69
|
+
})
|
|
70
|
+
.strict(),
|
|
71
|
+
endpoint: `${DB}.move`,
|
|
72
|
+
});
|
|
73
|
+
const deploy = postTool({
|
|
74
|
+
name: `dokploy_${DB}_deploy`,
|
|
75
|
+
title: 'Deploy Redis Database',
|
|
76
|
+
description: 'Deploy a Redis database in Dokploy, pulling the configured Docker image and starting the container. Requires the Redis database ID. This triggers a full deployment lifecycle including image pull, container creation, and startup. Returns the deployment operation status.',
|
|
77
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
78
|
+
endpoint: `${DB}.deploy`,
|
|
79
|
+
});
|
|
80
|
+
const start = postTool({
|
|
81
|
+
name: `dokploy_${DB}_start`,
|
|
82
|
+
title: 'Start Redis Database',
|
|
83
|
+
description: 'Start a previously stopped Redis database container in Dokploy. Requires the Redis database ID. The container will resume with its existing data and configuration. Returns the operation status.',
|
|
84
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
85
|
+
endpoint: `${DB}.start`,
|
|
86
|
+
});
|
|
87
|
+
const stop = postTool({
|
|
88
|
+
name: `dokploy_${DB}_stop`,
|
|
89
|
+
title: 'Stop Redis Database',
|
|
90
|
+
description: 'Stop a currently running Redis database container in Dokploy. Requires the Redis database ID. The container will be gracefully stopped but its data and configuration are preserved for future restarts. Returns the operation status.',
|
|
91
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
92
|
+
endpoint: `${DB}.stop`,
|
|
93
|
+
annotations: { destructiveHint: true },
|
|
94
|
+
});
|
|
95
|
+
const reload = postTool({
|
|
96
|
+
name: `dokploy_${DB}_reload`,
|
|
97
|
+
title: 'Reload Redis Database',
|
|
98
|
+
description: 'Reload the Redis database container in Dokploy without performing a full rebuild. Requires the Redis database ID and the app-level identifier. This restarts the container with its current configuration. Returns the operation status.',
|
|
99
|
+
schema: z
|
|
100
|
+
.object({
|
|
101
|
+
redisId: rdId,
|
|
102
|
+
appName: z.string().min(1).describe('App-level identifier'),
|
|
103
|
+
})
|
|
104
|
+
.strict(),
|
|
105
|
+
endpoint: `${DB}.reload`,
|
|
106
|
+
});
|
|
107
|
+
const rebuild = postTool({
|
|
108
|
+
name: `dokploy_${DB}_rebuild`,
|
|
109
|
+
title: 'Rebuild Redis Database',
|
|
110
|
+
description: 'Rebuild the Redis database container from scratch in Dokploy. Requires the Redis database ID. This tears down the existing container and recreates it using the current configuration, which is useful when the container state has become inconsistent. Returns the operation status.',
|
|
111
|
+
schema: z.object({ redisId: rdId }).strict(),
|
|
112
|
+
endpoint: `${DB}.rebuild`,
|
|
113
|
+
});
|
|
114
|
+
const changeStatus = postTool({
|
|
115
|
+
name: `dokploy_${DB}_change_status`,
|
|
116
|
+
title: 'Change Redis Status',
|
|
117
|
+
description: 'Manually set the application status of a Redis database in Dokploy. Requires the Redis database ID and the desired status (idle, running, done, or error). This is typically used for administrative overrides when the reported status does not match reality. Returns the updated status.',
|
|
118
|
+
schema: z
|
|
119
|
+
.object({
|
|
120
|
+
redisId: rdId,
|
|
121
|
+
applicationStatus: z
|
|
122
|
+
.enum(['idle', 'running', 'done', 'error'])
|
|
123
|
+
.describe('New application status'),
|
|
124
|
+
})
|
|
125
|
+
.strict(),
|
|
126
|
+
endpoint: `${DB}.changeStatus`,
|
|
127
|
+
});
|
|
128
|
+
const saveExternalPort = postTool({
|
|
129
|
+
name: `dokploy_${DB}_save_external_port`,
|
|
130
|
+
title: 'Save Redis External Port',
|
|
131
|
+
description: 'Set or clear the external port mapping for a Redis database in Dokploy. Requires the Redis database ID and the desired external port number, or null to remove the external port mapping. This controls whether the database is accessible from outside the Docker network. Returns the operation status.',
|
|
132
|
+
schema: z
|
|
133
|
+
.object({
|
|
134
|
+
redisId: rdId,
|
|
135
|
+
externalPort: z.number().nullable().describe('External port number (null to remove)'),
|
|
136
|
+
})
|
|
137
|
+
.strict(),
|
|
138
|
+
endpoint: `${DB}.saveExternalPort`,
|
|
139
|
+
});
|
|
140
|
+
const saveEnvironment = postTool({
|
|
141
|
+
name: `dokploy_${DB}_save_environment`,
|
|
142
|
+
title: 'Save Redis Environment',
|
|
143
|
+
description: 'Overwrite the environment variables for a Redis database in Dokploy. Requires the Redis database ID and the environment variables as a string. This replaces all existing environment variables with the provided values. Returns the operation status.',
|
|
144
|
+
schema: z
|
|
145
|
+
.object({
|
|
146
|
+
redisId: rdId,
|
|
147
|
+
env: z.string().nullable().optional().describe('Environment variables as a string'),
|
|
148
|
+
})
|
|
149
|
+
.strict(),
|
|
150
|
+
endpoint: `${DB}.saveEnvironment`,
|
|
151
|
+
});
|
|
152
|
+
// ── export ───────────────────────────────────────────────────────────
|
|
153
|
+
export const redisTools = [
|
|
154
|
+
one,
|
|
155
|
+
create,
|
|
156
|
+
update,
|
|
157
|
+
remove,
|
|
158
|
+
move,
|
|
159
|
+
deploy,
|
|
160
|
+
start,
|
|
161
|
+
stop,
|
|
162
|
+
reload,
|
|
163
|
+
rebuild,
|
|
164
|
+
changeStatus,
|
|
165
|
+
saveExternalPort,
|
|
166
|
+
saveEnvironment,
|
|
167
|
+
];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
// ── helpers ──────────────────────────────────────────────────────────
|
|
4
|
+
const registryTypeEnum = z
|
|
5
|
+
.enum(['selfHosted', 'cloud'])
|
|
6
|
+
.describe('Registry type: selfHosted or cloud');
|
|
7
|
+
const registryBaseSchema = {
|
|
8
|
+
registryName: z.string().min(1).describe('Name of the registry'),
|
|
9
|
+
username: z.string().min(1).describe('Registry username'),
|
|
10
|
+
password: z.string().min(1).describe('Registry password'),
|
|
11
|
+
registryUrl: z.string().min(1).describe('Registry URL'),
|
|
12
|
+
registryType: registryTypeEnum,
|
|
13
|
+
imagePrefix: z.string().nullable().optional().describe('Optional image prefix for the registry'),
|
|
14
|
+
};
|
|
15
|
+
// ── tools ────────────────────────────────────────────────────────────
|
|
16
|
+
const all = getTool({
|
|
17
|
+
name: 'dokploy_registry_all',
|
|
18
|
+
title: 'List Registries',
|
|
19
|
+
description: 'List all container registries configured in Dokploy. Returns an array of registry objects including their names, URLs, types (selfHosted or cloud), and authentication details. Takes no parameters. Useful for reviewing which registries are available for deploying container images.',
|
|
20
|
+
schema: z.object({}).strict(),
|
|
21
|
+
endpoint: '/registry.all',
|
|
22
|
+
});
|
|
23
|
+
const one = getTool({
|
|
24
|
+
name: 'dokploy_registry_one',
|
|
25
|
+
title: 'Get Registry Details',
|
|
26
|
+
description: 'Get the full details of a specific container registry by its unique ID. Returns the registry name, URL, type, credentials, and image prefix configuration. Requires the registry ID. Useful for inspecting or verifying a registry setup before deploying.',
|
|
27
|
+
schema: z
|
|
28
|
+
.object({
|
|
29
|
+
registryId: z.string().min(1).describe('Unique registry ID'),
|
|
30
|
+
})
|
|
31
|
+
.strict(),
|
|
32
|
+
endpoint: '/registry.one',
|
|
33
|
+
});
|
|
34
|
+
const create = postTool({
|
|
35
|
+
name: 'dokploy_registry_create',
|
|
36
|
+
title: 'Create Registry',
|
|
37
|
+
description: 'Create a new container registry configuration in Dokploy. Requires the registry name, URL, username, password, and type (selfHosted or cloud). Optionally accepts an image prefix. Returns the newly created registry object.',
|
|
38
|
+
schema: z
|
|
39
|
+
.object({
|
|
40
|
+
...registryBaseSchema,
|
|
41
|
+
})
|
|
42
|
+
.strict(),
|
|
43
|
+
endpoint: '/registry.create',
|
|
44
|
+
});
|
|
45
|
+
const update = postTool({
|
|
46
|
+
name: 'dokploy_registry_update',
|
|
47
|
+
title: 'Update Registry',
|
|
48
|
+
description: 'Update an existing container registry configuration in Dokploy. Requires the registry ID along with the updated name, URL, username, password, and type. Optionally accepts an image prefix. Returns the updated registry object.',
|
|
49
|
+
schema: z
|
|
50
|
+
.object({
|
|
51
|
+
registryId: z.string().min(1).describe('Unique registry ID to update'),
|
|
52
|
+
...registryBaseSchema,
|
|
53
|
+
})
|
|
54
|
+
.strict(),
|
|
55
|
+
endpoint: '/registry.update',
|
|
56
|
+
});
|
|
57
|
+
const remove = postTool({
|
|
58
|
+
name: 'dokploy_registry_remove',
|
|
59
|
+
title: 'Remove Registry',
|
|
60
|
+
description: 'Permanently remove a container registry configuration from Dokploy. This action is irreversible and will delete all stored credentials for the registry. Requires the registry ID. Applications referencing this registry will need to be reconfigured.',
|
|
61
|
+
schema: z
|
|
62
|
+
.object({
|
|
63
|
+
registryId: z.string().min(1).describe('Unique registry ID to remove'),
|
|
64
|
+
})
|
|
65
|
+
.strict(),
|
|
66
|
+
endpoint: '/registry.remove',
|
|
67
|
+
annotations: { destructiveHint: true },
|
|
68
|
+
});
|
|
69
|
+
const testRegistry = postTool({
|
|
70
|
+
name: 'dokploy_registry_test',
|
|
71
|
+
title: 'Test Registry Connection',
|
|
72
|
+
description: 'Test the connection to a container registry using the provided credentials. Validates that Dokploy can authenticate and communicate with the registry. Requires the registry name, URL, username, password, and type. Returns a success or failure status.',
|
|
73
|
+
schema: z
|
|
74
|
+
.object({
|
|
75
|
+
...registryBaseSchema,
|
|
76
|
+
})
|
|
77
|
+
.strict(),
|
|
78
|
+
endpoint: '/registry.testRegistry',
|
|
79
|
+
});
|
|
80
|
+
// ── export ───────────────────────────────────────────────────────────
|
|
81
|
+
export const registryTools = [all, one, create, update, remove, testRegistry];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
// ── helpers ──────────────────────────────────────────────────────────
|
|
4
|
+
const securityId = z.string().min(1).describe('Unique security entry ID');
|
|
5
|
+
// ── tools ────────────────────────────────────────────────────────────
|
|
6
|
+
const one = getTool({
|
|
7
|
+
name: 'dokploy_security_one',
|
|
8
|
+
title: 'Get Security Entry',
|
|
9
|
+
description: 'Get details of a specific HTTP basic-auth security entry by its unique ID. Requires the securityId parameter. Returns the full security configuration including the associated application, username, and authentication settings.',
|
|
10
|
+
schema: z.object({ securityId }).strict(),
|
|
11
|
+
endpoint: '/security.one',
|
|
12
|
+
});
|
|
13
|
+
const create = postTool({
|
|
14
|
+
name: 'dokploy_security_create',
|
|
15
|
+
title: 'Create Security Entry',
|
|
16
|
+
description: 'Create a new HTTP basic-auth security entry to protect an application with username and password authentication. Requires the applicationId, username, and password parameters. Returns the newly created security entry with its assigned ID.',
|
|
17
|
+
schema: z
|
|
18
|
+
.object({
|
|
19
|
+
applicationId: z.string().min(1).describe('ID of the application to protect'),
|
|
20
|
+
username: z.string().min(1).describe('Username for basic-auth access'),
|
|
21
|
+
password: z.string().min(1).describe('Password for basic-auth access'),
|
|
22
|
+
})
|
|
23
|
+
.strict(),
|
|
24
|
+
endpoint: '/security.create',
|
|
25
|
+
});
|
|
26
|
+
const update = postTool({
|
|
27
|
+
name: 'dokploy_security_update',
|
|
28
|
+
title: 'Update Security Entry',
|
|
29
|
+
description: 'Update an existing HTTP basic-auth security entry by its ID. Requires the securityId and accepts optional username and password fields. Only provided fields will be updated; omitted fields remain unchanged. Returns the updated security entry.',
|
|
30
|
+
schema: z
|
|
31
|
+
.object({
|
|
32
|
+
securityId,
|
|
33
|
+
username: z.string().optional().describe('New username for basic-auth access'),
|
|
34
|
+
password: z.string().optional().describe('New password for basic-auth access'),
|
|
35
|
+
})
|
|
36
|
+
.strict(),
|
|
37
|
+
endpoint: '/security.update',
|
|
38
|
+
});
|
|
39
|
+
const deleteTool = postTool({
|
|
40
|
+
name: 'dokploy_security_delete',
|
|
41
|
+
title: 'Delete Security Entry',
|
|
42
|
+
description: 'Delete an HTTP basic-auth security entry permanently by its ID. This action is irreversible and will immediately remove authentication protection from the associated application. Requires the securityId parameter. Returns a confirmation of the deletion.',
|
|
43
|
+
schema: z.object({ securityId }).strict(),
|
|
44
|
+
endpoint: '/security.delete',
|
|
45
|
+
annotations: { destructiveHint: true },
|
|
46
|
+
});
|
|
47
|
+
// ── export ───────────────────────────────────────────────────────────
|
|
48
|
+
export const securityTools = [one, create, update, deleteTool];
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
+
const reloadServer = postTool({
|
|
5
|
+
name: 'dokploy_settings_reload_server',
|
|
6
|
+
title: 'Reload Server',
|
|
7
|
+
description: 'Reload the Dokploy server process to apply configuration changes. No parameters required. Returns the reload status. Use after making changes to server settings that require a restart.',
|
|
8
|
+
schema: z.object({}).strict(),
|
|
9
|
+
endpoint: '/settings.reloadServer',
|
|
10
|
+
});
|
|
11
|
+
const reloadTraefik = postTool({
|
|
12
|
+
name: 'dokploy_settings_reload_traefik',
|
|
13
|
+
title: 'Reload Traefik',
|
|
14
|
+
description: 'Reload the Traefik reverse proxy to apply routing and configuration changes. No parameters required. Returns the reload status. Use after updating Traefik configuration, domains, or SSL certificates.',
|
|
15
|
+
schema: z.object({}).strict(),
|
|
16
|
+
endpoint: '/settings.reloadTraefik',
|
|
17
|
+
});
|
|
18
|
+
const cleanUnusedImages = postTool({
|
|
19
|
+
name: 'dokploy_settings_clean_unused_images',
|
|
20
|
+
title: 'Clean Unused Images',
|
|
21
|
+
description: 'Remove unused Docker images to free disk space on the server. No parameters required. Returns the amount of space reclaimed and the list of removed images. Only removes images not referenced by any container.',
|
|
22
|
+
schema: z.object({}).strict(),
|
|
23
|
+
endpoint: '/settings.cleanUnusedImages',
|
|
24
|
+
annotations: { destructiveHint: true },
|
|
25
|
+
});
|
|
26
|
+
const cleanUnusedVolumes = postTool({
|
|
27
|
+
name: 'dokploy_settings_clean_unused_volumes',
|
|
28
|
+
title: 'Clean Unused Volumes',
|
|
29
|
+
description: 'Remove unused Docker volumes to free disk space. This action is irreversible and may delete persistent data stored in volumes not attached to any container. No parameters required. Returns the amount of space reclaimed and the list of removed volumes.',
|
|
30
|
+
schema: z.object({}).strict(),
|
|
31
|
+
endpoint: '/settings.cleanUnusedVolumes',
|
|
32
|
+
annotations: { destructiveHint: true },
|
|
33
|
+
});
|
|
34
|
+
const cleanStoppedContainers = postTool({
|
|
35
|
+
name: 'dokploy_settings_clean_stopped_containers',
|
|
36
|
+
title: 'Clean Stopped Containers',
|
|
37
|
+
description: 'Remove all stopped Docker containers from the server. This action is irreversible and removes containers in exited or dead state. No parameters required. Returns the list of removed containers and space reclaimed.',
|
|
38
|
+
schema: z.object({}).strict(),
|
|
39
|
+
endpoint: '/settings.cleanStoppedContainers',
|
|
40
|
+
annotations: { destructiveHint: true },
|
|
41
|
+
});
|
|
42
|
+
const cleanDockerBuilder = postTool({
|
|
43
|
+
name: 'dokploy_settings_clean_docker_builder',
|
|
44
|
+
title: 'Clean Docker Builder',
|
|
45
|
+
description: 'Clean the Docker builder cache to free disk space used by intermediate build layers. No parameters required. Returns the amount of space reclaimed. Safe to run without affecting running containers or images.',
|
|
46
|
+
schema: z.object({}).strict(),
|
|
47
|
+
endpoint: '/settings.cleanDockerBuilder',
|
|
48
|
+
annotations: { destructiveHint: true },
|
|
49
|
+
});
|
|
50
|
+
const cleanDockerPrune = postTool({
|
|
51
|
+
name: 'dokploy_settings_clean_docker_prune',
|
|
52
|
+
title: 'Docker System Prune',
|
|
53
|
+
description: 'Run a full Docker system prune to remove all unused resources including stopped containers, dangling images, unused networks, and build cache. This action is irreversible. No parameters required. Returns the total space reclaimed.',
|
|
54
|
+
schema: z.object({}).strict(),
|
|
55
|
+
endpoint: '/settings.cleanDockerPrune',
|
|
56
|
+
annotations: { destructiveHint: true },
|
|
57
|
+
});
|
|
58
|
+
const cleanAll = postTool({
|
|
59
|
+
name: 'dokploy_settings_clean_all',
|
|
60
|
+
title: 'Clean All Docker Resources',
|
|
61
|
+
description: 'Clean all unused Docker resources at once: images, volumes, stopped containers, and builder cache. This action is irreversible and is the most aggressive cleanup option. No parameters required. Returns a summary of all removed resources and total space reclaimed.',
|
|
62
|
+
schema: z.object({}).strict(),
|
|
63
|
+
endpoint: '/settings.cleanAll',
|
|
64
|
+
annotations: { destructiveHint: true },
|
|
65
|
+
});
|
|
66
|
+
const cleanMonitoring = postTool({
|
|
67
|
+
name: 'dokploy_settings_clean_monitoring',
|
|
68
|
+
title: 'Clean Monitoring Data',
|
|
69
|
+
description: 'Clear all stored monitoring data including metrics and historical performance information. This action is irreversible and resets monitoring history to a clean state. No parameters required. Returns a confirmation of the cleanup.',
|
|
70
|
+
schema: z.object({}).strict(),
|
|
71
|
+
endpoint: '/settings.cleanMonitoring',
|
|
72
|
+
annotations: { destructiveHint: true },
|
|
73
|
+
});
|
|
74
|
+
const saveSSHPrivateKey = postTool({
|
|
75
|
+
name: 'dokploy_settings_save_ssh_private_key',
|
|
76
|
+
title: 'Save SSH Private Key',
|
|
77
|
+
description: 'Save an SSH private key for server access and remote operations. Accepts the sshPrivateKey parameter containing the key content, or null to clear the stored key. Returns a confirmation that the key was saved successfully.',
|
|
78
|
+
schema: z
|
|
79
|
+
.object({
|
|
80
|
+
sshPrivateKey: z
|
|
81
|
+
.string()
|
|
82
|
+
.nullable()
|
|
83
|
+
.describe('The SSH private key content, or null to clear'),
|
|
84
|
+
})
|
|
85
|
+
.strict(),
|
|
86
|
+
endpoint: '/settings.saveSSHPrivateKey',
|
|
87
|
+
});
|
|
88
|
+
const cleanSSHPrivateKey = postTool({
|
|
89
|
+
name: 'dokploy_settings_clean_ssh_private_key',
|
|
90
|
+
title: 'Clean SSH Private Key',
|
|
91
|
+
description: 'Remove the stored SSH private key from the server. This action is irreversible and will prevent SSH-based remote operations until a new key is saved. No parameters required. Returns a confirmation of the removal.',
|
|
92
|
+
schema: z.object({}).strict(),
|
|
93
|
+
endpoint: '/settings.cleanSSHPrivateKey',
|
|
94
|
+
annotations: { destructiveHint: true },
|
|
95
|
+
});
|
|
96
|
+
const assignDomainServer = postTool({
|
|
97
|
+
name: 'dokploy_settings_assign_domain_server',
|
|
98
|
+
title: 'Assign Domain to Server',
|
|
99
|
+
description: "Assign a domain to the Dokploy server with optional SSL certificate configuration. Accepts an optional letsEncryptEmail for Let's Encrypt certificate registration and an optional certificateType ('letsencrypt' or 'none'). Returns the updated domain assignment configuration.",
|
|
100
|
+
schema: z
|
|
101
|
+
.object({
|
|
102
|
+
letsEncryptEmail: z
|
|
103
|
+
.string()
|
|
104
|
+
.optional()
|
|
105
|
+
.describe("Email for Let's Encrypt certificate registration"),
|
|
106
|
+
certificateType: z
|
|
107
|
+
.enum(['letsencrypt', 'none'])
|
|
108
|
+
.optional()
|
|
109
|
+
.describe('Type of SSL certificate: letsencrypt or none'),
|
|
110
|
+
})
|
|
111
|
+
.strict(),
|
|
112
|
+
endpoint: '/settings.assignDomainServer',
|
|
113
|
+
});
|
|
114
|
+
const updateDockerCleanup = postTool({
|
|
115
|
+
name: 'dokploy_settings_update_docker_cleanup',
|
|
116
|
+
title: 'Update Docker Cleanup Schedule',
|
|
117
|
+
description: 'Configure automatic Docker cleanup scheduling to periodically remove unused resources. Requires the enabled boolean parameter and accepts an optional cron schedule expression. Returns the updated cleanup configuration.',
|
|
118
|
+
schema: z
|
|
119
|
+
.object({
|
|
120
|
+
enabled: z.boolean().describe('Whether automatic cleanup is enabled'),
|
|
121
|
+
schedule: z.string().optional().describe('Cron schedule expression for the cleanup job'),
|
|
122
|
+
})
|
|
123
|
+
.strict(),
|
|
124
|
+
endpoint: '/settings.updateDockerCleanup',
|
|
125
|
+
});
|
|
126
|
+
const readTraefikConfig = getTool({
|
|
127
|
+
name: 'dokploy_settings_read_traefik_config',
|
|
128
|
+
title: 'Read Traefik Config',
|
|
129
|
+
description: 'Read the current main Traefik configuration file content. No parameters required. Returns the raw Traefik configuration as a string, which defines the core routing, entrypoints, and provider settings.',
|
|
130
|
+
schema: z.object({}).strict(),
|
|
131
|
+
endpoint: '/settings.readTraefikConfig',
|
|
132
|
+
});
|
|
133
|
+
const updateTraefikConfig = postTool({
|
|
134
|
+
name: 'dokploy_settings_update_traefik_config',
|
|
135
|
+
title: 'Update Traefik Config',
|
|
136
|
+
description: 'Update the main Traefik configuration file with new content. Requires the traefikConfig parameter containing the full configuration. Returns a confirmation of the update. A Traefik reload may be needed to apply changes.',
|
|
137
|
+
schema: z
|
|
138
|
+
.object({
|
|
139
|
+
traefikConfig: z.string().min(1).describe('The new Traefik configuration content'),
|
|
140
|
+
})
|
|
141
|
+
.strict(),
|
|
142
|
+
endpoint: '/settings.updateTraefikConfig',
|
|
143
|
+
});
|
|
144
|
+
const readWebServerTraefikConfig = getTool({
|
|
145
|
+
name: 'dokploy_settings_read_web_server_traefik_config',
|
|
146
|
+
title: 'Read Web Server Traefik Config',
|
|
147
|
+
description: 'Read the Traefik configuration specific to the Dokploy web server. No parameters required. Returns the raw web server Traefik configuration as a string, which controls how the Dokploy dashboard and API are exposed.',
|
|
148
|
+
schema: z.object({}).strict(),
|
|
149
|
+
endpoint: '/settings.readWebServerTraefikConfig',
|
|
150
|
+
});
|
|
151
|
+
const updateWebServerTraefikConfig = postTool({
|
|
152
|
+
name: 'dokploy_settings_update_web_server_traefik_config',
|
|
153
|
+
title: 'Update Web Server Traefik Config',
|
|
154
|
+
description: 'Update the Traefik configuration for the Dokploy web server. Requires the traefikConfig parameter containing the full web server configuration. Returns a confirmation of the update. A Traefik reload may be needed to apply changes.',
|
|
155
|
+
schema: z
|
|
156
|
+
.object({
|
|
157
|
+
traefikConfig: z.string().min(1).describe('The new web server Traefik configuration content'),
|
|
158
|
+
})
|
|
159
|
+
.strict(),
|
|
160
|
+
endpoint: '/settings.updateWebServerTraefikConfig',
|
|
161
|
+
});
|
|
162
|
+
const readMiddlewareTraefikConfig = getTool({
|
|
163
|
+
name: 'dokploy_settings_read_middleware_traefik_config',
|
|
164
|
+
title: 'Read Middleware Traefik Config',
|
|
165
|
+
description: 'Read the Traefik middleware configuration that defines request processing rules such as rate limiting, authentication, and header manipulation. No parameters required. Returns the raw middleware configuration as a string.',
|
|
166
|
+
schema: z.object({}).strict(),
|
|
167
|
+
endpoint: '/settings.readMiddlewareTraefikConfig',
|
|
168
|
+
});
|
|
169
|
+
const updateMiddlewareTraefikConfig = postTool({
|
|
170
|
+
name: 'dokploy_settings_update_middleware_traefik_config',
|
|
171
|
+
title: 'Update Middleware Traefik Config',
|
|
172
|
+
description: 'Update the Traefik middleware configuration that controls request processing rules. Requires the traefikConfig parameter containing the full middleware configuration. Returns a confirmation of the update. A Traefik reload may be needed to apply changes.',
|
|
173
|
+
schema: z
|
|
174
|
+
.object({
|
|
175
|
+
traefikConfig: z.string().min(1).describe('The new middleware Traefik configuration content'),
|
|
176
|
+
})
|
|
177
|
+
.strict(),
|
|
178
|
+
endpoint: '/settings.updateMiddlewareTraefikConfig',
|
|
179
|
+
});
|
|
180
|
+
const updateServer = postTool({
|
|
181
|
+
name: 'dokploy_settings_update_server',
|
|
182
|
+
title: 'Update Server',
|
|
183
|
+
description: 'Update the Dokploy server to the latest available version. No parameters required. Returns the update status and new version information. This will restart the server process and may cause brief downtime.',
|
|
184
|
+
schema: z.object({}).strict(),
|
|
185
|
+
endpoint: '/settings.updateServer',
|
|
186
|
+
});
|
|
187
|
+
const getDokployVersion = getTool({
|
|
188
|
+
name: 'dokploy_settings_get_version',
|
|
189
|
+
title: 'Get Dokploy Version',
|
|
190
|
+
description: 'Get the currently running Dokploy server version. No parameters required. Returns the version string of the installed Dokploy instance. Useful for checking if updates are available.',
|
|
191
|
+
schema: z.object({}).strict(),
|
|
192
|
+
endpoint: '/settings.getDokployVersion',
|
|
193
|
+
});
|
|
194
|
+
const readDirectories = getTool({
|
|
195
|
+
name: 'dokploy_settings_read_directories',
|
|
196
|
+
title: 'Read Server Directories',
|
|
197
|
+
description: 'Read the server directory listing to inspect the file system structure used by Dokploy. No parameters required. Returns a list of directories and their contents on the server where Dokploy stores its data and configurations.',
|
|
198
|
+
schema: z.object({}).strict(),
|
|
199
|
+
endpoint: '/settings.readDirectories',
|
|
200
|
+
});
|
|
201
|
+
const getOpenApiDocument = getTool({
|
|
202
|
+
name: 'dokploy_settings_get_openapi_document',
|
|
203
|
+
title: 'Get OpenAPI Document',
|
|
204
|
+
description: 'Get the Dokploy OpenAPI specification document describing all available API endpoints. No parameters required. Returns the full OpenAPI JSON document including paths, schemas, and authentication requirements.',
|
|
205
|
+
schema: z.object({}).strict(),
|
|
206
|
+
endpoint: '/settings.getOpenApiDocument',
|
|
207
|
+
});
|
|
208
|
+
const readTraefikFile = getTool({
|
|
209
|
+
name: 'dokploy_settings_read_traefik_file',
|
|
210
|
+
title: 'Read Traefik File',
|
|
211
|
+
description: 'Read a specific Traefik configuration file from the server file system. Accepts a path parameter to specify which Traefik file to read. Returns the raw file content as a string. Useful for inspecting individual Traefik configuration files beyond the main config.',
|
|
212
|
+
schema: z
|
|
213
|
+
.object({
|
|
214
|
+
path: z.string().min(1).describe('Path to the Traefik configuration file to read'),
|
|
215
|
+
})
|
|
216
|
+
.strict(),
|
|
217
|
+
endpoint: '/settings.readTraefikFile',
|
|
218
|
+
});
|
|
219
|
+
const updateTraefikFile = postTool({
|
|
220
|
+
name: 'dokploy_settings_update_traefik_file',
|
|
221
|
+
title: 'Update Traefik File',
|
|
222
|
+
description: 'Update a specific Traefik configuration file on the server. Requires the file path and new content. Returns a confirmation. A Traefik reload may be needed to apply changes.',
|
|
223
|
+
schema: z
|
|
224
|
+
.object({
|
|
225
|
+
path: z.string().min(1).describe('Path to the Traefik configuration file to update'),
|
|
226
|
+
traefikConfig: z.string().min(1).describe('The new file content'),
|
|
227
|
+
})
|
|
228
|
+
.strict(),
|
|
229
|
+
endpoint: '/settings.updateTraefikFile',
|
|
230
|
+
});
|
|
231
|
+
// ── export ───────────────────────────────────────────────────────────
|
|
232
|
+
export const settingsTools = [
|
|
233
|
+
reloadServer,
|
|
234
|
+
reloadTraefik,
|
|
235
|
+
cleanUnusedImages,
|
|
236
|
+
cleanUnusedVolumes,
|
|
237
|
+
cleanStoppedContainers,
|
|
238
|
+
cleanDockerBuilder,
|
|
239
|
+
cleanDockerPrune,
|
|
240
|
+
cleanAll,
|
|
241
|
+
cleanMonitoring,
|
|
242
|
+
saveSSHPrivateKey,
|
|
243
|
+
cleanSSHPrivateKey,
|
|
244
|
+
assignDomainServer,
|
|
245
|
+
updateDockerCleanup,
|
|
246
|
+
readTraefikConfig,
|
|
247
|
+
updateTraefikConfig,
|
|
248
|
+
readWebServerTraefikConfig,
|
|
249
|
+
updateWebServerTraefikConfig,
|
|
250
|
+
readMiddlewareTraefikConfig,
|
|
251
|
+
updateMiddlewareTraefikConfig,
|
|
252
|
+
updateServer,
|
|
253
|
+
getDokployVersion,
|
|
254
|
+
readDirectories,
|
|
255
|
+
getOpenApiDocument,
|
|
256
|
+
readTraefikFile,
|
|
257
|
+
updateTraefikFile,
|
|
258
|
+
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool } from './_factory.js';
|
|
3
|
+
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
+
const all = getTool({
|
|
5
|
+
name: 'dokploy_user_all',
|
|
6
|
+
title: 'List All Users',
|
|
7
|
+
description: 'List all users registered in the Dokploy instance. No parameters required. Returns an array of user objects including their IDs, emails, roles, and permission details.',
|
|
8
|
+
schema: z.object({}).strict(),
|
|
9
|
+
endpoint: '/user.all',
|
|
10
|
+
});
|
|
11
|
+
// ── export ───────────────────────────────────────────────────────────
|
|
12
|
+
export const userTools = [all];
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vibetools/dokploy-mcp",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "MCP Server for the Dokploy API - complete coverage of all endpoints",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"dokploy-mcp": "dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"dev": "tsc --watch",
|
|
21
|
+
"start": "node dist/index.js",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"lint": "biome check .",
|
|
24
|
+
"lint:fix": "biome check --write .",
|
|
25
|
+
"format": "biome format --write .",
|
|
26
|
+
"docs:api": "node scripts/openapi-to-markdown.mjs",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@clack/prompts": "^1.0.1",
|
|
31
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
32
|
+
"zod": "^4.3.6"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@biomejs/biome": "^2.4.4",
|
|
36
|
+
"@types/node": "^22.19.11",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=22.0.0"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"author": "Vibe Code <hello@vcode.sh>",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/vcode-sh/dokploy-mcp.git"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/vcode-sh/dokploy-mcp#readme",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/vcode-sh/dokploy-mcp/issues"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"mcp",
|
|
55
|
+
"dokploy",
|
|
56
|
+
"model-context-protocol",
|
|
57
|
+
"devops",
|
|
58
|
+
"deployment",
|
|
59
|
+
"docker"
|
|
60
|
+
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"access": "public"
|
|
63
|
+
}
|
|
64
|
+
}
|