@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,133 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── helpers ──────────────────────────────────────────────────────────
4
- const backupId = z.string().min(1).describe('Unique backup ID');
5
- // ── tools ────────────────────────────────────────────────────────────
6
- const one = getTool({
7
- name: 'dokploy_backup_one',
8
- title: 'Get Backup Configuration',
9
- description: 'Retrieve the full details of a specific backup configuration by its unique ID. Requires the backupId parameter. Returns the backup object including its schedule, prefix, destination, database type, and enabled status.',
10
- schema: z.object({ backupId }).strict(),
11
- endpoint: '/backup.one',
12
- });
13
- const create = postTool({
14
- name: 'dokploy_backup_create',
15
- title: 'Create Backup Schedule',
16
- description: 'Create a new scheduled backup configuration for a database service in Dokploy. Requires a cron schedule expression, file name prefix, destination ID, database name, and database type (postgres, mysql, mariadb, or mongo). Optionally accepts the specific database service ID and an enabled flag. Returns the created backup configuration.',
17
- schema: z
18
- .object({
19
- schedule: z.string().min(1).describe('Cron schedule expression for the backup'),
20
- prefix: z.string().min(1).describe('Prefix for backup file names'),
21
- destinationId: z.string().min(1).describe('Destination ID where backups will be stored'),
22
- database: z.string().min(1).describe('Name of the database to back up'),
23
- databaseType: z
24
- .enum(['postgres', 'mariadb', 'mysql', 'mongo'])
25
- .describe('Type of the database'),
26
- enabled: z.boolean().optional().describe('Whether the backup is enabled'),
27
- postgresId: z
28
- .string()
29
- .optional()
30
- .describe('Postgres database ID (when databaseType is postgres)'),
31
- mysqlId: z.string().optional().describe('MySQL database ID (when databaseType is mysql)'),
32
- mariadbId: z
33
- .string()
34
- .optional()
35
- .describe('MariaDB database ID (when databaseType is mariadb)'),
36
- mongoId: z.string().optional().describe('MongoDB database ID (when databaseType is mongo)'),
37
- })
38
- .strict(),
39
- endpoint: '/backup.create',
40
- });
41
- const update = postTool({
42
- name: 'dokploy_backup_update',
43
- title: 'Update Backup Schedule',
44
- description: 'Update an existing backup schedule configuration. Requires the backupId along with the updated cron schedule, file name prefix, destination ID, and database name. Optionally accepts an enabled flag to activate or deactivate the schedule. Returns the updated backup configuration.',
45
- schema: z
46
- .object({
47
- backupId,
48
- schedule: z.string().min(1).describe('Cron schedule expression for the backup'),
49
- prefix: z.string().min(1).describe('Prefix for backup file names'),
50
- destinationId: z.string().min(1).describe('Destination ID where backups will be stored'),
51
- database: z.string().min(1).describe('Name of the database to back up'),
52
- enabled: z.boolean().optional().describe('Whether the backup is enabled'),
53
- })
54
- .strict(),
55
- endpoint: '/backup.update',
56
- });
57
- const remove = postTool({
58
- name: 'dokploy_backup_remove',
59
- title: 'Remove Backup Schedule',
60
- description: 'Permanently remove a backup schedule configuration from Dokploy. This action is irreversible and stops all future scheduled backups for this configuration. Requires the backupId parameter. Previously created backup files at the destination are not deleted.',
61
- schema: z.object({ backupId }).strict(),
62
- endpoint: '/backup.remove',
63
- annotations: { destructiveHint: true },
64
- });
65
- const manualBackupPostgres = postTool({
66
- name: 'dokploy_backup_manual_postgres',
67
- title: 'Manual Postgres Backup',
68
- description: 'Trigger an immediate manual backup of a PostgreSQL database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
69
- schema: z.object({ backupId }).strict(),
70
- endpoint: '/backup.manualBackupPostgres',
71
- });
72
- const manualBackupMySql = postTool({
73
- name: 'dokploy_backup_manual_mysql',
74
- title: 'Manual MySQL Backup',
75
- description: 'Trigger an immediate manual backup of a MySQL database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
76
- schema: z.object({ backupId }).strict(),
77
- endpoint: '/backup.manualBackupMySql',
78
- });
79
- const manualBackupMariadb = postTool({
80
- name: 'dokploy_backup_manual_mariadb',
81
- title: 'Manual MariaDB Backup',
82
- description: 'Trigger an immediate manual backup of a MariaDB database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
83
- schema: z.object({ backupId }).strict(),
84
- endpoint: '/backup.manualBackupMariadb',
85
- });
86
- const manualBackupMongo = postTool({
87
- name: 'dokploy_backup_manual_mongo',
88
- title: 'Manual MongoDB Backup',
89
- description: 'Trigger an immediate manual backup of a MongoDB database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
90
- schema: z.object({ backupId }).strict(),
91
- endpoint: '/backup.manualBackupMongo',
92
- });
93
- const manualBackupCompose = postTool({
94
- name: 'dokploy_backup_manual_compose',
95
- title: 'Manual Compose Backup',
96
- description: 'Trigger an immediate manual backup for a compose service backup configuration. Requires the backup ID.',
97
- schema: z.object({ backupId }).strict(),
98
- endpoint: '/backup.manualBackupCompose',
99
- });
100
- const manualBackupWebServer = postTool({
101
- name: 'dokploy_backup_manual_web_server',
102
- title: 'Manual Web Server Backup',
103
- description: 'Trigger an immediate manual backup for the Dokploy web server backup configuration. Requires the backup ID.',
104
- schema: z.object({ backupId }).strict(),
105
- endpoint: '/backup.manualBackupWebServer',
106
- });
107
- const listBackupFiles = getTool({
108
- name: 'dokploy_backup_list_backup_files',
109
- title: 'List Backup Files',
110
- description: 'List backup files available at a destination. Requires the destination ID and a search prefix. Optionally filter by server ID.',
111
- schema: z
112
- .object({
113
- destinationId: z.string().describe('Destination ID'),
114
- search: z.string().describe('Search prefix'),
115
- serverId: z.string().optional().describe('Optional server ID'),
116
- })
117
- .strict(),
118
- endpoint: '/backup.listBackupFiles',
119
- });
120
- // ── export ───────────────────────────────────────────────────────────
121
- export const backupTools = [
122
- one,
123
- create,
124
- update,
125
- remove,
126
- manualBackupPostgres,
127
- manualBackupMySql,
128
- manualBackupMariadb,
129
- manualBackupMongo,
130
- manualBackupCompose,
131
- manualBackupWebServer,
132
- listBackupFiles,
133
- ];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const certificatesTools: ToolDefinition[];
@@ -1,54 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── tools ────────────────────────────────────────────────────────────
4
- const all = getTool({
5
- name: 'dokploy_certificate_all',
6
- title: 'List Certificates',
7
- description: 'List all SSL/TLS certificates managed by Dokploy. Returns an array of certificate objects including their names, expiration dates, associated domains, and auto-renewal status. Takes no parameters. Useful for auditing certificate coverage across your deployments.',
8
- schema: z.object({}).strict(),
9
- endpoint: '/certificates.all',
10
- });
11
- const one = getTool({
12
- name: 'dokploy_certificate_one',
13
- title: 'Get Certificate Details',
14
- description: 'Get the full details of a specific SSL/TLS certificate by its unique ID. Returns the certificate name, PEM data, private key reference, associated domain, expiration date, and auto-renewal configuration. Requires the certificate ID.',
15
- schema: z
16
- .object({
17
- certificateId: z.string().min(1).describe('Unique certificate ID'),
18
- })
19
- .strict(),
20
- endpoint: '/certificates.one',
21
- });
22
- const create = postTool({
23
- name: 'dokploy_certificate_create',
24
- title: 'Create Certificate',
25
- description: 'Create a new SSL/TLS certificate in Dokploy. Requires the certificate name, PEM-encoded certificate data, and private key. Optionally accepts a certificate ID, filesystem path, and auto-renewal flag. Returns the newly created certificate object.',
26
- schema: z
27
- .object({
28
- name: z.string().min(1).describe('Display name for the certificate'),
29
- certificateData: z.string().min(1).describe('The certificate data (PEM format)'),
30
- privateKey: z.string().min(1).describe('The private key for the certificate'),
31
- certificateId: z.string().min(1).optional().describe('Optional certificate ID to assign'),
32
- certificatePath: z
33
- .string()
34
- .optional()
35
- .describe('Optional filesystem path for the certificate'),
36
- autoRenew: z.boolean().optional().describe('Whether to automatically renew the certificate'),
37
- })
38
- .strict(),
39
- endpoint: '/certificates.create',
40
- });
41
- const remove = postTool({
42
- name: 'dokploy_certificate_remove',
43
- title: 'Remove Certificate',
44
- description: 'Permanently remove an SSL/TLS certificate from Dokploy. This action is irreversible and will delete the certificate data and private key. Requires the certificate ID. Any domains using this certificate will lose their TLS configuration.',
45
- schema: z
46
- .object({
47
- certificateId: z.string().min(1).describe('Unique certificate ID to remove'),
48
- })
49
- .strict(),
50
- endpoint: '/certificates.remove',
51
- annotations: { destructiveHint: true },
52
- });
53
- // ── export ───────────────────────────────────────────────────────────
54
- export const certificatesTools = [all, one, create, remove];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const clusterTools: ToolDefinition[];
@@ -1,38 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── tools ────────────────────────────────────────────────────────────
4
- const getNodes = getTool({
5
- name: 'dokploy_cluster_get_nodes',
6
- title: 'List Cluster Nodes',
7
- description: 'List all nodes in the Docker Swarm cluster. No parameters required. Returns an array of node objects including each node ID, hostname, role (manager or worker), availability status, and resource information.',
8
- schema: z.object({}).strict(),
9
- endpoint: '/cluster.getNodes',
10
- });
11
- const addWorker = getTool({
12
- name: 'dokploy_cluster_add_worker',
13
- title: 'Get Add Worker Command',
14
- description: 'Get the Docker Swarm join command to add a new worker node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate token and manager address that should be executed on the new worker machine.',
15
- schema: z.object({}).strict(),
16
- endpoint: '/cluster.addWorker',
17
- });
18
- const addManager = getTool({
19
- name: 'dokploy_cluster_add_manager',
20
- title: 'Get Add Manager Command',
21
- description: 'Get the Docker Swarm join command to add a new manager node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate manager token and address that should be executed on the new manager machine.',
22
- schema: z.object({}).strict(),
23
- endpoint: '/cluster.addManager',
24
- });
25
- const removeWorker = postTool({
26
- name: 'dokploy_cluster_remove_worker',
27
- title: 'Remove Worker Node',
28
- description: 'Remove a worker node from the Docker Swarm cluster. This action is irreversible and any services running on the node will be rescheduled to other available nodes. Requires the nodeId parameter identifying the worker to remove. Returns a confirmation of the removal.',
29
- schema: z
30
- .object({
31
- nodeId: z.string().min(1).describe('ID of the worker node to remove from the cluster'),
32
- })
33
- .strict(),
34
- endpoint: '/cluster.removeWorker',
35
- annotations: { destructiveHint: true },
36
- });
37
- // ── export ───────────────────────────────────────────────────────────
38
- export const clusterTools = [getNodes, addWorker, addManager, removeWorker];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const composeTools: ToolDefinition[];