@vibetools/dokploy-mcp 1.2.0 → 2.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.
Files changed (126) hide show
  1. package/README.md +61 -168
  2. package/dist/api/client.d.ts +2 -1
  3. package/dist/api/client.js +3 -11
  4. package/dist/cli/index.js +1 -0
  5. package/dist/codemode/context/execute-context.d.ts +590 -0
  6. package/dist/codemode/context/execute-context.js +64 -0
  7. package/dist/codemode/context/search-context.d.ts +13851 -0
  8. package/dist/codemode/context/search-context.js +42 -0
  9. package/dist/codemode/gateway/api-gateway.d.ts +12 -0
  10. package/dist/codemode/gateway/api-gateway.js +160 -0
  11. package/dist/codemode/gateway/error-format.d.ts +13 -0
  12. package/dist/codemode/gateway/error-format.js +9 -0
  13. package/dist/codemode/gateway/request-normalizer.d.ts +3 -0
  14. package/dist/codemode/gateway/request-normalizer.js +21 -0
  15. package/dist/codemode/gateway/trace.d.ts +13 -0
  16. package/dist/codemode/gateway/trace.js +11 -0
  17. package/dist/codemode/sandbox/host.d.ts +11 -0
  18. package/dist/codemode/sandbox/host.js +28 -0
  19. package/dist/codemode/sandbox/limits.d.ts +2 -0
  20. package/dist/codemode/sandbox/limits.js +20 -0
  21. package/dist/codemode/sandbox/runner.d.ts +8 -0
  22. package/dist/codemode/sandbox/runner.js +113 -0
  23. package/dist/codemode/sandbox/runtime.d.ts +2 -0
  24. package/dist/codemode/sandbox/runtime.js +3 -0
  25. package/dist/codemode/sandbox/serialize.d.ts +1 -0
  26. package/dist/codemode/sandbox/serialize.js +45 -0
  27. package/dist/codemode/sandbox/subprocess-runner.d.ts +10 -0
  28. package/dist/codemode/sandbox/subprocess-runner.js +91 -0
  29. package/dist/codemode/sandbox/types.d.ts +12 -0
  30. package/dist/codemode/sandbox/types.js +1 -0
  31. package/dist/codemode/sandbox/worker-entry.d.ts +1 -0
  32. package/dist/codemode/sandbox/worker-entry.js +70 -0
  33. package/dist/codemode/server-codemode.d.ts +2 -0
  34. package/dist/codemode/server-codemode.js +17 -0
  35. package/dist/codemode/tools/execute.d.ts +583 -0
  36. package/dist/codemode/tools/execute.js +52 -0
  37. package/dist/codemode/tools/index.d.ts +2 -0
  38. package/dist/codemode/tools/index.js +3 -0
  39. package/dist/codemode/tools/search.d.ts +2 -0
  40. package/dist/codemode/tools/search.js +62 -0
  41. package/dist/generated/dokploy-catalog.d.ts +27 -0
  42. package/dist/generated/dokploy-catalog.js +16 -0
  43. package/dist/generated/dokploy-schemas.d.ts +17533 -0
  44. package/dist/generated/dokploy-schemas.js +20639 -0
  45. package/dist/generated/dokploy-sdk.d.ts +558 -0
  46. package/dist/generated/dokploy-sdk.js +561 -0
  47. package/dist/generated/openapi-index.json +10591 -0
  48. package/dist/{tools/_factory.js → mcp/tool-factory.js} +7 -5
  49. package/dist/server.d.ts +1 -1
  50. package/dist/server.js +2 -15
  51. package/package.json +22 -11
  52. package/dist/tools/_database.d.ts +0 -12
  53. package/dist/tools/_database.js +0 -115
  54. package/dist/tools/admin.d.ts +0 -2
  55. package/dist/tools/admin.js +0 -61
  56. package/dist/tools/application.d.ts +0 -2
  57. package/dist/tools/application.js +0 -601
  58. package/dist/tools/backup.d.ts +0 -2
  59. package/dist/tools/backup.js +0 -133
  60. package/dist/tools/certificates.d.ts +0 -2
  61. package/dist/tools/certificates.js +0 -54
  62. package/dist/tools/cluster.d.ts +0 -2
  63. package/dist/tools/cluster.js +0 -38
  64. package/dist/tools/compose.d.ts +0 -2
  65. package/dist/tools/compose.js +0 -451
  66. package/dist/tools/deployment.d.ts +0 -2
  67. package/dist/tools/deployment.js +0 -107
  68. package/dist/tools/destination.d.ts +0 -2
  69. package/dist/tools/destination.js +0 -78
  70. package/dist/tools/docker.d.ts +0 -2
  71. package/dist/tools/docker.js +0 -110
  72. package/dist/tools/domain.d.ts +0 -2
  73. package/dist/tools/domain.js +0 -147
  74. package/dist/tools/environment.d.ts +0 -2
  75. package/dist/tools/environment.js +0 -104
  76. package/dist/tools/git-provider.d.ts +0 -2
  77. package/dist/tools/git-provider.js +0 -22
  78. package/dist/tools/github.d.ts +0 -2
  79. package/dist/tools/github.js +0 -66
  80. package/dist/tools/gitlab.d.ts +0 -2
  81. package/dist/tools/gitlab.js +0 -98
  82. package/dist/tools/index.d.ts +0 -2
  83. package/dist/tools/index.js +0 -72
  84. package/dist/tools/mariadb.d.ts +0 -1
  85. package/dist/tools/mariadb.js +0 -14
  86. package/dist/tools/mongo.d.ts +0 -1
  87. package/dist/tools/mongo.js +0 -13
  88. package/dist/tools/mounts.d.ts +0 -2
  89. package/dist/tools/mounts.js +0 -109
  90. package/dist/tools/mysql.d.ts +0 -1
  91. package/dist/tools/mysql.js +0 -14
  92. package/dist/tools/notification.d.ts +0 -2
  93. package/dist/tools/notification.js +0 -559
  94. package/dist/tools/patch.d.ts +0 -2
  95. package/dist/tools/patch.js +0 -179
  96. package/dist/tools/port.d.ts +0 -2
  97. package/dist/tools/port.js +0 -54
  98. package/dist/tools/postgres.d.ts +0 -1
  99. package/dist/tools/postgres.js +0 -13
  100. package/dist/tools/preview-deployment.d.ts +0 -2
  101. package/dist/tools/preview-deployment.js +0 -50
  102. package/dist/tools/project.d.ts +0 -2
  103. package/dist/tools/project.js +0 -125
  104. package/dist/tools/redirects.d.ts +0 -2
  105. package/dist/tools/redirects.js +0 -53
  106. package/dist/tools/redis.d.ts +0 -1
  107. package/dist/tools/redis.js +0 -11
  108. package/dist/tools/registry.d.ts +0 -2
  109. package/dist/tools/registry.js +0 -81
  110. package/dist/tools/rollback.d.ts +0 -2
  111. package/dist/tools/rollback.js +0 -28
  112. package/dist/tools/schedule.d.ts +0 -2
  113. package/dist/tools/schedule.js +0 -92
  114. package/dist/tools/security.d.ts +0 -2
  115. package/dist/tools/security.js +0 -48
  116. package/dist/tools/server.d.ts +0 -2
  117. package/dist/tools/server.js +0 -192
  118. package/dist/tools/settings.d.ts +0 -2
  119. package/dist/tools/settings.js +0 -509
  120. package/dist/tools/ssh-key.d.ts +0 -2
  121. package/dist/tools/ssh-key.js +0 -74
  122. package/dist/tools/user.d.ts +0 -2
  123. package/dist/tools/user.js +0 -85
  124. package/dist/tools/volume-backups.d.ts +0 -2
  125. package/dist/tools/volume-backups.js +0 -96
  126. /package/dist/{tools/_factory.d.ts → mcp/tool-factory.d.ts} +0 -0
@@ -1,92 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- const nullableString = z.string().nullable().optional();
4
- const scheduleTypeSchema = z
5
- .enum(['application', 'compose', 'server', 'dokploy-server'])
6
- .describe('Schedule type');
7
- const shellTypeSchema = z.enum(['bash', 'sh']).describe('Shell type');
8
- const schedulePayload = z
9
- .object({
10
- scheduleId: z.string().optional().describe('Schedule ID'),
11
- name: z.string().describe('Schedule name'),
12
- cronExpression: z.string().describe('Cron expression'),
13
- appName: z.string().optional().describe('App name'),
14
- serviceName: nullableString.describe('Service name'),
15
- shellType: shellTypeSchema.optional(),
16
- scheduleType: scheduleTypeSchema.optional(),
17
- command: z.string().describe('Command to execute'),
18
- script: nullableString.describe('Inline script'),
19
- applicationId: nullableString.describe('Application ID'),
20
- composeId: nullableString.describe('Compose ID'),
21
- serverId: nullableString.describe('Server ID'),
22
- userId: nullableString.describe('User ID'),
23
- enabled: z.boolean().optional().describe('Whether the schedule is enabled'),
24
- timezone: nullableString.describe('Timezone'),
25
- createdAt: z.string().optional().describe('Creation timestamp'),
26
- })
27
- .strict();
28
- const list = getTool({
29
- name: 'dokploy_schedule_list',
30
- title: 'List Schedules',
31
- description: 'List schedules in Dokploy for a specific entity ID and schedule type.',
32
- schema: z
33
- .object({
34
- id: z.string().describe('Entity ID'),
35
- scheduleType: scheduleTypeSchema,
36
- })
37
- .strict(),
38
- endpoint: '/schedule.list',
39
- });
40
- const one = getTool({
41
- name: 'dokploy_schedule_one',
42
- title: 'Get Schedule',
43
- description: 'Retrieve a Dokploy schedule by its ID.',
44
- schema: z
45
- .object({
46
- scheduleId: z.string().describe('Schedule ID'),
47
- })
48
- .strict(),
49
- endpoint: '/schedule.one',
50
- });
51
- const create = postTool({
52
- name: 'dokploy_schedule_create',
53
- title: 'Create Schedule',
54
- description: 'Create a new schedule in Dokploy. Requires the schedule name, cron expression, and command.',
55
- schema: schedulePayload,
56
- endpoint: '/schedule.create',
57
- });
58
- const update = postTool({
59
- name: 'dokploy_schedule_update',
60
- title: 'Update Schedule',
61
- description: 'Update an existing schedule in Dokploy. Requires the schedule ID together with the updated schedule payload.',
62
- schema: schedulePayload
63
- .extend({
64
- scheduleId: z.string().min(1).describe('Schedule ID'),
65
- })
66
- .strict(),
67
- endpoint: '/schedule.update',
68
- });
69
- const remove = postTool({
70
- name: 'dokploy_schedule_delete',
71
- title: 'Delete Schedule',
72
- description: 'Delete a schedule from Dokploy. Requires the schedule ID. This is a destructive action.',
73
- schema: z
74
- .object({
75
- scheduleId: z.string().describe('Schedule ID'),
76
- })
77
- .strict(),
78
- endpoint: '/schedule.delete',
79
- annotations: { destructiveHint: true },
80
- });
81
- const runManually = postTool({
82
- name: 'dokploy_schedule_run_manually',
83
- title: 'Run Schedule Manually',
84
- description: 'Run a Dokploy schedule immediately. Requires the schedule ID.',
85
- schema: z
86
- .object({
87
- scheduleId: z.string().min(1).describe('Schedule ID'),
88
- })
89
- .strict(),
90
- endpoint: '/schedule.runManually',
91
- });
92
- export const scheduleTools = [list, one, create, update, remove, runManually];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const securityTools: ToolDefinition[];
@@ -1,48 +0,0 @@
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];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const serverTools: ToolDefinition[];
@@ -1,192 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- const serverIdSchema = z.string().min(1).describe('The server ID');
4
- const metricsConfigSchema = z
5
- .object({
6
- server: z
7
- .object({
8
- refreshRate: z.number().min(2).describe('Refresh rate in seconds'),
9
- port: z.number().min(1).describe('Monitoring port'),
10
- token: z.string().describe('Monitoring token'),
11
- urlCallback: z.string().url().describe('Callback URL'),
12
- retentionDays: z.number().min(1).describe('Retention period in days'),
13
- cronJob: z.string().min(1).describe('Cron expression'),
14
- thresholds: z
15
- .object({
16
- cpu: z.number().min(0).describe('CPU threshold'),
17
- memory: z.number().min(0).describe('Memory threshold'),
18
- })
19
- .strict(),
20
- })
21
- .strict(),
22
- containers: z
23
- .object({
24
- refreshRate: z.number().min(2).describe('Container refresh rate in seconds'),
25
- services: z
26
- .object({
27
- include: z.array(z.string()).optional().describe('Services to include'),
28
- exclude: z.array(z.string()).optional().describe('Services to exclude'),
29
- })
30
- .strict(),
31
- })
32
- .strict(),
33
- })
34
- .strict();
35
- const serverPayload = z
36
- .object({
37
- name: z.string().min(1).describe('Server name'),
38
- description: z.string().nullable().describe('Server description'),
39
- ipAddress: z.string().describe('Server IP address'),
40
- port: z.number().describe('SSH port'),
41
- username: z.string().describe('SSH username'),
42
- sshKeyId: z.string().nullable().describe('SSH key ID'),
43
- serverType: z.enum(['deploy', 'build']).describe('Server role'),
44
- })
45
- .strict();
46
- const all = getTool({
47
- name: 'dokploy_server_all',
48
- title: 'List Servers',
49
- description: 'List all Dokploy servers available to the current account. Returns deploy and build servers with their metadata.',
50
- schema: z.object({}).strict(),
51
- endpoint: '/server.all',
52
- });
53
- const one = getTool({
54
- name: 'dokploy_server_one',
55
- title: 'Get Server',
56
- description: 'Retrieve detailed information about a Dokploy server by its ID. Returns connection settings, monitoring state, and security details.',
57
- schema: z.object({ serverId: serverIdSchema }).strict(),
58
- endpoint: '/server.one',
59
- });
60
- const count = getTool({
61
- name: 'dokploy_server_count',
62
- title: 'Count Servers',
63
- description: 'Return the number of servers configured in Dokploy.',
64
- schema: z.object({}).strict(),
65
- endpoint: '/server.count',
66
- });
67
- const withSshKey = getTool({
68
- name: 'dokploy_server_with_ssh_key',
69
- title: 'List Servers with SSH Keys',
70
- description: 'List Dokploy servers together with their linked SSH key information. Useful when selecting a server-key pair for operations.',
71
- schema: z.object({}).strict(),
72
- endpoint: '/server.withSSHKey',
73
- });
74
- const buildServers = getTool({
75
- name: 'dokploy_server_build_servers',
76
- title: 'List Build Servers',
77
- description: 'List Dokploy servers configured specifically for build workloads.',
78
- schema: z.object({}).strict(),
79
- endpoint: '/server.buildServers',
80
- });
81
- const validate = getTool({
82
- name: 'dokploy_server_validate',
83
- title: 'Validate Server',
84
- description: 'Validate the SSH connectivity and server configuration for a Dokploy server. Requires the server ID.',
85
- schema: z.object({ serverId: serverIdSchema }).strict(),
86
- endpoint: '/server.validate',
87
- });
88
- const security = getTool({
89
- name: 'dokploy_server_security',
90
- title: 'Get Server Security',
91
- description: 'Retrieve the server security posture and checks for a Dokploy server. Requires the server ID.',
92
- schema: z.object({ serverId: serverIdSchema }).strict(),
93
- endpoint: '/server.security',
94
- });
95
- const publicIp = getTool({
96
- name: 'dokploy_server_public_ip',
97
- title: 'Get Public IP',
98
- description: 'Get the public IP address detected by Dokploy for the current installation.',
99
- schema: z.object({}).strict(),
100
- endpoint: '/server.publicIp',
101
- });
102
- const getServerTime = getTool({
103
- name: 'dokploy_server_get_server_time',
104
- title: 'Get Server Time',
105
- description: 'Get the current server time reported by Dokploy.',
106
- schema: z.object({}).strict(),
107
- endpoint: '/server.getServerTime',
108
- });
109
- const getServerMetrics = getTool({
110
- name: 'dokploy_server_get_server_metrics',
111
- title: 'Get Server Metrics',
112
- description: 'Retrieve server monitoring metrics from Dokploy. Requires the monitoring URL, token, and number of data points.',
113
- schema: z
114
- .object({
115
- url: z.string().describe('Monitoring URL'),
116
- token: z.string().describe('Monitoring token'),
117
- dataPoints: z.string().describe('Number of data points'),
118
- })
119
- .strict(),
120
- endpoint: '/server.getServerMetrics',
121
- });
122
- const getDefaultCommand = getTool({
123
- name: 'dokploy_server_get_default_command',
124
- title: 'Get Default Server Command',
125
- description: 'Get the default provisioning command for a Dokploy server. Requires the server ID.',
126
- schema: z.object({ serverId: serverIdSchema }).strict(),
127
- endpoint: '/server.getDefaultCommand',
128
- });
129
- const create = postTool({
130
- name: 'dokploy_server_create',
131
- title: 'Create Server',
132
- description: 'Create a new Dokploy server. Requires connection details, server type, and the linked SSH key ID or null for an unmanaged key.',
133
- schema: serverPayload,
134
- endpoint: '/server.create',
135
- });
136
- const update = postTool({
137
- name: 'dokploy_server_update',
138
- title: 'Update Server',
139
- description: 'Update an existing Dokploy server. Requires the server ID together with the current server connection details and role. Optionally provide a command override.',
140
- schema: serverPayload
141
- .extend({
142
- serverId: serverIdSchema,
143
- command: z.string().optional().describe('Optional command override'),
144
- })
145
- .strict(),
146
- endpoint: '/server.update',
147
- });
148
- const remove = postTool({
149
- name: 'dokploy_server_remove',
150
- title: 'Remove Server',
151
- description: 'Permanently remove a Dokploy server from the installation. Requires the server ID. This operation is destructive.',
152
- schema: z.object({ serverId: serverIdSchema }).strict(),
153
- endpoint: '/server.remove',
154
- annotations: { destructiveHint: true },
155
- });
156
- const setup = postTool({
157
- name: 'dokploy_server_setup',
158
- title: 'Setup Server',
159
- description: 'Run the Dokploy setup workflow on an existing server. Requires the server ID.',
160
- schema: z.object({ serverId: serverIdSchema }).strict(),
161
- endpoint: '/server.setup',
162
- });
163
- const setupMonitoring = postTool({
164
- name: 'dokploy_server_setup_monitoring',
165
- title: 'Setup Server Monitoring',
166
- description: 'Configure monitoring for a Dokploy server. Requires the server ID and a complete monitoring configuration.',
167
- schema: z
168
- .object({
169
- serverId: serverIdSchema,
170
- metricsConfig: metricsConfigSchema.describe('Monitoring configuration'),
171
- })
172
- .strict(),
173
- endpoint: '/server.setupMonitoring',
174
- });
175
- export const serverTools = [
176
- all,
177
- one,
178
- count,
179
- withSshKey,
180
- buildServers,
181
- validate,
182
- security,
183
- publicIp,
184
- getServerTime,
185
- getServerMetrics,
186
- getDefaultCommand,
187
- create,
188
- update,
189
- remove,
190
- setup,
191
- setupMonitoring,
192
- ];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const settingsTools: ToolDefinition[];