@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
package/README.md
ADDED
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
# @vibetools/dokploy-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for the Dokploy API.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@vibetools/dokploy-mcp)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
A [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that provides complete coverage of the Dokploy API. With 224 tools across 24 modules, it enables LLMs to manage Dokploy infrastructure through natural language -- deploying applications, managing databases, configuring domains, handling backups, and more.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Complete API coverage** across all 24 Dokploy modules (224 tools)
|
|
16
|
+
- **Interactive setup wizard** -- run `npx @vibetools/dokploy-mcp setup` and start using it in seconds
|
|
17
|
+
- **Auto-config detection** -- picks up credentials from env vars, config file, or Dokploy CLI
|
|
18
|
+
- **Type-safe schemas** with Zod v4 validation on every parameter
|
|
19
|
+
- **Tool annotations** (`readOnlyHint`, `destructiveHint`, `idempotentHint`) so clients can warn before destructive operations
|
|
20
|
+
- **Lazy configuration loading** -- environment variables are validated on first API call, not at startup
|
|
21
|
+
- **Comprehensive error handling** with actionable messages mapped from HTTP status codes
|
|
22
|
+
- **Minimal dependencies** -- only `@modelcontextprotocol/sdk`, `zod`, and `@clack/prompts`
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @vibetools/dokploy-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or run directly:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @vibetools/dokploy-mcp
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx @vibetools/dokploy-mcp setup
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The setup wizard will:
|
|
43
|
+
1. Prompt for your Dokploy server URL and API key
|
|
44
|
+
2. Validate the credentials
|
|
45
|
+
3. Save configuration to `~/.config/dokploy-mcp/config.json`
|
|
46
|
+
4. Show the MCP client config to add
|
|
47
|
+
|
|
48
|
+
After setup, add this minimal config to your MCP client:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"dokploy": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["@vibetools/dokploy-mcp"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
No environment variables needed -- credentials are loaded from the saved config file.
|
|
62
|
+
|
|
63
|
+
## Configuration Resolution
|
|
64
|
+
|
|
65
|
+
Credentials are resolved in this order (first match wins):
|
|
66
|
+
|
|
67
|
+
1. **Environment variables** -- `DOKPLOY_URL` and `DOKPLOY_API_KEY`
|
|
68
|
+
2. **Config file** -- `~/.config/dokploy-mcp/config.json` (created by `setup`)
|
|
69
|
+
3. **Dokploy CLI** -- Auto-detected from globally installed `@dokploy/cli`
|
|
70
|
+
|
|
71
|
+
If you have the [Dokploy CLI](https://github.com/Dokploy/cli) installed and authenticated, the MCP server will automatically use those credentials with zero configuration.
|
|
72
|
+
|
|
73
|
+
## Alternative: Manual Configuration
|
|
74
|
+
|
|
75
|
+
For CI/CD pipelines or when you prefer environment variables over the config file, you can set credentials directly. Environment variables always take priority over the config file.
|
|
76
|
+
|
|
77
|
+
| Variable | Required | Description | Default |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
| `DOKPLOY_URL` | Yes | Dokploy panel URL (e.g., `https://panel.example.com`) — automatically normalized | -- |
|
|
80
|
+
| `DOKPLOY_API_KEY` | Yes | API key from Dokploy Settings > API | -- |
|
|
81
|
+
| `DOKPLOY_TIMEOUT` | No | Request timeout in milliseconds | `30000` |
|
|
82
|
+
|
|
83
|
+
## CLI Commands
|
|
84
|
+
|
|
85
|
+
| Command | Description |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `npx @vibetools/dokploy-mcp` | Start MCP server (stdio transport) |
|
|
88
|
+
| `npx @vibetools/dokploy-mcp setup` | Interactive setup wizard |
|
|
89
|
+
| `npx @vibetools/dokploy-mcp version` | Show version |
|
|
90
|
+
|
|
91
|
+
Aliases: `init` and `auth` are aliases for `setup`.
|
|
92
|
+
|
|
93
|
+
## Usage with MCP Clients
|
|
94
|
+
|
|
95
|
+
### Claude Desktop
|
|
96
|
+
|
|
97
|
+
Add the following to your Claude Desktop configuration file (`claude_desktop_config.json`):
|
|
98
|
+
|
|
99
|
+
**With setup (recommended):**
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"dokploy": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["@vibetools/dokploy-mcp"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**With environment variables:**
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"mcpServers": {
|
|
117
|
+
"dokploy": {
|
|
118
|
+
"command": "npx",
|
|
119
|
+
"args": ["@vibetools/dokploy-mcp"],
|
|
120
|
+
"env": {
|
|
121
|
+
"DOKPLOY_URL": "https://panel.example.com",
|
|
122
|
+
"DOKPLOY_API_KEY": "your-api-key"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Claude Code
|
|
130
|
+
|
|
131
|
+
Add the following to your `.mcp.json` configuration file:
|
|
132
|
+
|
|
133
|
+
**With setup (recommended):**
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"mcpServers": {
|
|
138
|
+
"dokploy": {
|
|
139
|
+
"command": "npx",
|
|
140
|
+
"args": ["@vibetools/dokploy-mcp"]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**With environment variables:**
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"mcpServers": {
|
|
151
|
+
"dokploy": {
|
|
152
|
+
"command": "npx",
|
|
153
|
+
"args": ["@vibetools/dokploy-mcp"],
|
|
154
|
+
"env": {
|
|
155
|
+
"DOKPLOY_URL": "https://panel.example.com",
|
|
156
|
+
"DOKPLOY_API_KEY": "your-api-key"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Cursor
|
|
164
|
+
|
|
165
|
+
Add to `~/.cursor/mcp.json` or `.cursor/mcp.json` in your project:
|
|
166
|
+
|
|
167
|
+
**With setup (recommended):**
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"mcpServers": {
|
|
172
|
+
"dokploy": {
|
|
173
|
+
"command": "npx",
|
|
174
|
+
"args": ["@vibetools/dokploy-mcp"]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**With environment variables:**
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"mcpServers": {
|
|
185
|
+
"dokploy": {
|
|
186
|
+
"command": "npx",
|
|
187
|
+
"args": ["@vibetools/dokploy-mcp"],
|
|
188
|
+
"env": {
|
|
189
|
+
"DOKPLOY_URL": "https://panel.example.com",
|
|
190
|
+
"DOKPLOY_API_KEY": "your-api-key"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### VS Code
|
|
198
|
+
|
|
199
|
+
Add to `.vscode/mcp.json`:
|
|
200
|
+
|
|
201
|
+
**With setup (recommended):**
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{
|
|
205
|
+
"servers": {
|
|
206
|
+
"dokploy": {
|
|
207
|
+
"command": "npx",
|
|
208
|
+
"args": ["@vibetools/dokploy-mcp"]
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**With environment variables:**
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"servers": {
|
|
219
|
+
"dokploy": {
|
|
220
|
+
"command": "npx",
|
|
221
|
+
"args": ["@vibetools/dokploy-mcp"],
|
|
222
|
+
"env": {
|
|
223
|
+
"DOKPLOY_URL": "https://panel.example.com",
|
|
224
|
+
"DOKPLOY_API_KEY": "your-api-key"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Local Development
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
git clone <this-repo>
|
|
235
|
+
npm install
|
|
236
|
+
npm run build
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Then point your MCP client at the local build:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"mcpServers": {
|
|
244
|
+
"dokploy": {
|
|
245
|
+
"command": "node",
|
|
246
|
+
"args": ["/path/to/dokploy-mcp/dist/index.js"],
|
|
247
|
+
"env": {
|
|
248
|
+
"DOKPLOY_URL": "https://panel.example.com",
|
|
249
|
+
"DOKPLOY_API_KEY": "your-api-key"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Getting Your API Key
|
|
257
|
+
|
|
258
|
+
1. Open your Dokploy dashboard
|
|
259
|
+
2. Go to Settings > Profile > API/CLI section
|
|
260
|
+
3. Generate a token
|
|
261
|
+
4. Use it as the `DOKPLOY_API_KEY` environment variable
|
|
262
|
+
|
|
263
|
+
## Tool Reference
|
|
264
|
+
|
|
265
|
+
All 224 tools are organized into 24 modules. Each table below shows the tool name, a brief description, and whether the tool is read-only or mutating/destructive.
|
|
266
|
+
|
|
267
|
+
For the complete reference with full descriptions and parameter details, see [docs/TOOLS.md](docs/TOOLS.md).
|
|
268
|
+
|
|
269
|
+
### Project (6 tools)
|
|
270
|
+
|
|
271
|
+
| Tool | Description | Type |
|
|
272
|
+
|---|---|---|
|
|
273
|
+
| `dokploy_project_all` | List all projects | Read-only |
|
|
274
|
+
| `dokploy_project_one` | Get project details by ID | Read-only |
|
|
275
|
+
| `dokploy_project_create` | Create a new project | Mutating |
|
|
276
|
+
| `dokploy_project_update` | Update an existing project | Mutating |
|
|
277
|
+
| `dokploy_project_duplicate` | Duplicate a project with its services | Mutating |
|
|
278
|
+
| `dokploy_project_remove` | Remove a project and all its resources | Destructive |
|
|
279
|
+
|
|
280
|
+
### Application (25 tools)
|
|
281
|
+
|
|
282
|
+
| Tool | Description | Type |
|
|
283
|
+
|---|---|---|
|
|
284
|
+
| `dokploy_application_create` | Create a new application in a project | Mutating |
|
|
285
|
+
| `dokploy_application_one` | Get application details by ID | Read-only |
|
|
286
|
+
| `dokploy_application_update` | Update application configuration | Mutating |
|
|
287
|
+
| `dokploy_application_delete` | Delete an application permanently | Destructive |
|
|
288
|
+
| `dokploy_application_move` | Move application to another project | Mutating |
|
|
289
|
+
| `dokploy_application_deploy` | Trigger a new deployment | Mutating |
|
|
290
|
+
| `dokploy_application_redeploy` | Force a full redeploy from source | Mutating |
|
|
291
|
+
| `dokploy_application_start` | Start a stopped application | Mutating |
|
|
292
|
+
| `dokploy_application_stop` | Stop a running application | Destructive |
|
|
293
|
+
| `dokploy_application_cancel_deployment` | Cancel an in-progress deployment | Mutating |
|
|
294
|
+
| `dokploy_application_reload` | Reload application containers | Mutating |
|
|
295
|
+
| `dokploy_application_mark_running` | Manually mark application as running | Mutating |
|
|
296
|
+
| `dokploy_application_clean_queues` | Clean pending deployment queues | Mutating |
|
|
297
|
+
| `dokploy_application_refresh_token` | Refresh the webhook token | Mutating |
|
|
298
|
+
| `dokploy_application_save_build_type` | Set build type and settings | Mutating |
|
|
299
|
+
| `dokploy_application_save_environment` | Save environment variables and build args | Mutating |
|
|
300
|
+
| `dokploy_application_save_github_provider` | Configure GitHub as source | Mutating |
|
|
301
|
+
| `dokploy_application_save_gitlab_provider` | Configure GitLab as source | Mutating |
|
|
302
|
+
| `dokploy_application_save_bitbucket_provider` | Configure Bitbucket as source | Mutating |
|
|
303
|
+
| `dokploy_application_save_gitea_provider` | Configure Gitea as source | Mutating |
|
|
304
|
+
| `dokploy_application_save_git_provider` | Configure custom Git repo as source | Mutating |
|
|
305
|
+
| `dokploy_application_save_docker_provider` | Configure Docker image as source | Mutating |
|
|
306
|
+
| `dokploy_application_disconnect_git_provider` | Disconnect the current Git provider | Mutating |
|
|
307
|
+
| `dokploy_application_read_app_monitoring` | Read application monitoring metrics | Read-only |
|
|
308
|
+
| `dokploy_application_read_traefik_config` | Read Traefik config for an application | Read-only |
|
|
309
|
+
| `dokploy_application_update_traefik_config` | Update Traefik config for an application | Mutating |
|
|
310
|
+
|
|
311
|
+
### Compose (17 tools)
|
|
312
|
+
|
|
313
|
+
| Tool | Description | Type |
|
|
314
|
+
|---|---|---|
|
|
315
|
+
| `dokploy_compose_create` | Create a new Docker Compose service | Mutating |
|
|
316
|
+
| `dokploy_compose_one` | Get compose service details by ID | Read-only |
|
|
317
|
+
| `dokploy_compose_update` | Update compose service configuration | Mutating |
|
|
318
|
+
| `dokploy_compose_delete` | Delete a compose service permanently | Destructive |
|
|
319
|
+
| `dokploy_compose_deploy` | Deploy a compose service | Mutating |
|
|
320
|
+
| `dokploy_compose_redeploy` | Redeploy a compose service | Mutating |
|
|
321
|
+
| `dokploy_compose_stop` | Stop all containers in a compose service | Destructive |
|
|
322
|
+
| `dokploy_compose_clean_queues` | Clean pending deployment queues | Mutating |
|
|
323
|
+
| `dokploy_compose_all_services` | List individual services in a compose stack | Read-only |
|
|
324
|
+
| `dokploy_compose_randomize` | Randomize service names to avoid conflicts | Mutating |
|
|
325
|
+
| `dokploy_compose_get_default_command` | Get the default deployment command | Read-only |
|
|
326
|
+
| `dokploy_compose_generate_ssh_key` | Generate SSH key pair for Git access | Mutating |
|
|
327
|
+
| `dokploy_compose_refresh_token` | Refresh the webhook token | Mutating |
|
|
328
|
+
| `dokploy_compose_remove_ssh_key` | Remove the SSH key | Mutating |
|
|
329
|
+
| `dokploy_compose_deploy_template` | Deploy from a predefined template | Mutating |
|
|
330
|
+
| `dokploy_compose_templates` | List available compose templates | Read-only |
|
|
331
|
+
| `dokploy_compose_save_environment` | Save environment variables and build args | Mutating |
|
|
332
|
+
|
|
333
|
+
### Domain (9 tools)
|
|
334
|
+
|
|
335
|
+
| Tool | Description | Type |
|
|
336
|
+
|---|---|---|
|
|
337
|
+
| `dokploy_domain_create` | Create a new domain configuration | Mutating |
|
|
338
|
+
| `dokploy_domain_one` | Get domain details by ID | Read-only |
|
|
339
|
+
| `dokploy_domain_by_application_id` | List domains for an application | Read-only |
|
|
340
|
+
| `dokploy_domain_by_compose_id` | List domains for a compose service | Read-only |
|
|
341
|
+
| `dokploy_domain_update` | Update a domain configuration | Mutating |
|
|
342
|
+
| `dokploy_domain_delete` | Delete a domain permanently | Destructive |
|
|
343
|
+
| `dokploy_domain_validate` | Validate domain DNS records | Mutating |
|
|
344
|
+
| `dokploy_domain_generate` | Generate a default domain for an app | Mutating |
|
|
345
|
+
| `dokploy_domain_generate_wildcard` | Generate a wildcard domain for an app | Mutating |
|
|
346
|
+
|
|
347
|
+
### PostgreSQL (13 tools)
|
|
348
|
+
|
|
349
|
+
| Tool | Description | Type |
|
|
350
|
+
|---|---|---|
|
|
351
|
+
| `dokploy_postgres_one` | Get Postgres database details | Read-only |
|
|
352
|
+
| `dokploy_postgres_create` | Create a new Postgres database | Mutating |
|
|
353
|
+
| `dokploy_postgres_update` | Update Postgres configuration | Mutating |
|
|
354
|
+
| `dokploy_postgres_remove` | Remove a Postgres database | Destructive |
|
|
355
|
+
| `dokploy_postgres_move` | Move database to another project | Mutating |
|
|
356
|
+
| `dokploy_postgres_deploy` | Deploy the database container | Mutating |
|
|
357
|
+
| `dokploy_postgres_start` | Start a stopped database | Mutating |
|
|
358
|
+
| `dokploy_postgres_stop` | Stop a running database | Destructive |
|
|
359
|
+
| `dokploy_postgres_reload` | Reload the database container | Mutating |
|
|
360
|
+
| `dokploy_postgres_rebuild` | Rebuild the database from scratch | Mutating |
|
|
361
|
+
| `dokploy_postgres_change_status` | Manually set application status | Mutating |
|
|
362
|
+
| `dokploy_postgres_save_external_port` | Set or clear the external port | Mutating |
|
|
363
|
+
| `dokploy_postgres_save_environment` | Save environment variables | Mutating |
|
|
364
|
+
|
|
365
|
+
### MySQL (13 tools)
|
|
366
|
+
|
|
367
|
+
| Tool | Description | Type |
|
|
368
|
+
|---|---|---|
|
|
369
|
+
| `dokploy_mysql_one` | Get MySQL database details | Read-only |
|
|
370
|
+
| `dokploy_mysql_create` | Create a new MySQL database | Mutating |
|
|
371
|
+
| `dokploy_mysql_update` | Update MySQL configuration | Mutating |
|
|
372
|
+
| `dokploy_mysql_remove` | Remove a MySQL database | Destructive |
|
|
373
|
+
| `dokploy_mysql_move` | Move database to another project | Mutating |
|
|
374
|
+
| `dokploy_mysql_deploy` | Deploy the database container | Mutating |
|
|
375
|
+
| `dokploy_mysql_start` | Start a stopped database | Mutating |
|
|
376
|
+
| `dokploy_mysql_stop` | Stop a running database | Destructive |
|
|
377
|
+
| `dokploy_mysql_reload` | Reload the database container | Mutating |
|
|
378
|
+
| `dokploy_mysql_rebuild` | Rebuild the database from scratch | Mutating |
|
|
379
|
+
| `dokploy_mysql_change_status` | Manually set application status | Mutating |
|
|
380
|
+
| `dokploy_mysql_save_external_port` | Set or clear the external port | Mutating |
|
|
381
|
+
| `dokploy_mysql_save_environment` | Save environment variables | Mutating |
|
|
382
|
+
|
|
383
|
+
### MariaDB (13 tools)
|
|
384
|
+
|
|
385
|
+
| Tool | Description | Type |
|
|
386
|
+
|---|---|---|
|
|
387
|
+
| `dokploy_mariadb_one` | Get MariaDB database details | Read-only |
|
|
388
|
+
| `dokploy_mariadb_create` | Create a new MariaDB database | Mutating |
|
|
389
|
+
| `dokploy_mariadb_update` | Update MariaDB configuration | Mutating |
|
|
390
|
+
| `dokploy_mariadb_remove` | Remove a MariaDB database | Destructive |
|
|
391
|
+
| `dokploy_mariadb_move` | Move database to another project | Mutating |
|
|
392
|
+
| `dokploy_mariadb_deploy` | Deploy the database container | Mutating |
|
|
393
|
+
| `dokploy_mariadb_start` | Start a stopped database | Mutating |
|
|
394
|
+
| `dokploy_mariadb_stop` | Stop a running database | Destructive |
|
|
395
|
+
| `dokploy_mariadb_reload` | Reload the database container | Mutating |
|
|
396
|
+
| `dokploy_mariadb_rebuild` | Rebuild the database from scratch | Mutating |
|
|
397
|
+
| `dokploy_mariadb_change_status` | Manually set application status | Mutating |
|
|
398
|
+
| `dokploy_mariadb_save_external_port` | Set or clear the external port | Mutating |
|
|
399
|
+
| `dokploy_mariadb_save_environment` | Save environment variables | Mutating |
|
|
400
|
+
|
|
401
|
+
### MongoDB (13 tools)
|
|
402
|
+
|
|
403
|
+
| Tool | Description | Type |
|
|
404
|
+
|---|---|---|
|
|
405
|
+
| `dokploy_mongo_one` | Get MongoDB database details | Read-only |
|
|
406
|
+
| `dokploy_mongo_create` | Create a new MongoDB database | Mutating |
|
|
407
|
+
| `dokploy_mongo_update` | Update MongoDB configuration | Mutating |
|
|
408
|
+
| `dokploy_mongo_remove` | Remove a MongoDB database | Destructive |
|
|
409
|
+
| `dokploy_mongo_move` | Move database to another project | Mutating |
|
|
410
|
+
| `dokploy_mongo_deploy` | Deploy the database container | Mutating |
|
|
411
|
+
| `dokploy_mongo_start` | Start a stopped database | Mutating |
|
|
412
|
+
| `dokploy_mongo_stop` | Stop a running database | Destructive |
|
|
413
|
+
| `dokploy_mongo_reload` | Reload the database container | Mutating |
|
|
414
|
+
| `dokploy_mongo_rebuild` | Rebuild the database from scratch | Mutating |
|
|
415
|
+
| `dokploy_mongo_change_status` | Manually set application status | Mutating |
|
|
416
|
+
| `dokploy_mongo_save_external_port` | Set or clear the external port | Mutating |
|
|
417
|
+
| `dokploy_mongo_save_environment` | Save environment variables | Mutating |
|
|
418
|
+
|
|
419
|
+
### Redis (13 tools)
|
|
420
|
+
|
|
421
|
+
| Tool | Description | Type |
|
|
422
|
+
|---|---|---|
|
|
423
|
+
| `dokploy_redis_one` | Get Redis database details | Read-only |
|
|
424
|
+
| `dokploy_redis_create` | Create a new Redis database | Mutating |
|
|
425
|
+
| `dokploy_redis_update` | Update Redis configuration | Mutating |
|
|
426
|
+
| `dokploy_redis_remove` | Remove a Redis database | Destructive |
|
|
427
|
+
| `dokploy_redis_move` | Move database to another project | Mutating |
|
|
428
|
+
| `dokploy_redis_deploy` | Deploy the database container | Mutating |
|
|
429
|
+
| `dokploy_redis_start` | Start a stopped database | Mutating |
|
|
430
|
+
| `dokploy_redis_stop` | Stop a running database | Destructive |
|
|
431
|
+
| `dokploy_redis_reload` | Reload the database container | Mutating |
|
|
432
|
+
| `dokploy_redis_rebuild` | Rebuild the database from scratch | Mutating |
|
|
433
|
+
| `dokploy_redis_change_status` | Manually set application status | Mutating |
|
|
434
|
+
| `dokploy_redis_save_external_port` | Set or clear the external port | Mutating |
|
|
435
|
+
| `dokploy_redis_save_environment` | Save environment variables | Mutating |
|
|
436
|
+
|
|
437
|
+
### Deployment (2 tools)
|
|
438
|
+
|
|
439
|
+
| Tool | Description | Type |
|
|
440
|
+
|---|---|---|
|
|
441
|
+
| `dokploy_deployment_all` | List all deployments for an application | Read-only |
|
|
442
|
+
| `dokploy_deployment_all_by_compose` | List all deployments for a compose service | Read-only |
|
|
443
|
+
|
|
444
|
+
### Docker (4 tools)
|
|
445
|
+
|
|
446
|
+
| Tool | Description | Type |
|
|
447
|
+
|---|---|---|
|
|
448
|
+
| `dokploy_docker_get_containers` | List all Docker containers on the server | Read-only |
|
|
449
|
+
| `dokploy_docker_get_config` | Get full config of a container by ID | Read-only |
|
|
450
|
+
| `dokploy_docker_get_containers_by_app_name_match` | Find containers by app name substring | Read-only |
|
|
451
|
+
| `dokploy_docker_get_containers_by_app_label` | Find containers by app label | Read-only |
|
|
452
|
+
|
|
453
|
+
### Certificates (4 tools)
|
|
454
|
+
|
|
455
|
+
| Tool | Description | Type |
|
|
456
|
+
|---|---|---|
|
|
457
|
+
| `dokploy_certificate_all` | List all SSL/TLS certificates | Read-only |
|
|
458
|
+
| `dokploy_certificate_one` | Get certificate details by ID | Read-only |
|
|
459
|
+
| `dokploy_certificate_create` | Create a new certificate | Mutating |
|
|
460
|
+
| `dokploy_certificate_remove` | Remove a certificate | Destructive |
|
|
461
|
+
|
|
462
|
+
### Registry (7 tools)
|
|
463
|
+
|
|
464
|
+
| Tool | Description | Type |
|
|
465
|
+
|---|---|---|
|
|
466
|
+
| `dokploy_registry_all` | List all container registries | Read-only |
|
|
467
|
+
| `dokploy_registry_one` | Get registry details by ID | Read-only |
|
|
468
|
+
| `dokploy_registry_create` | Create a new registry configuration | Mutating |
|
|
469
|
+
| `dokploy_registry_update` | Update a registry configuration | Mutating |
|
|
470
|
+
| `dokploy_registry_remove` | Remove a registry configuration | Destructive |
|
|
471
|
+
| `dokploy_registry_test` | Test registry connection | Mutating |
|
|
472
|
+
| `dokploy_registry_enable_self_hosted` | Enable the built-in self-hosted registry | Mutating |
|
|
473
|
+
|
|
474
|
+
### Destination (6 tools)
|
|
475
|
+
|
|
476
|
+
| Tool | Description | Type |
|
|
477
|
+
|---|---|---|
|
|
478
|
+
| `dokploy_destination_all` | List all S3 backup destinations | Read-only |
|
|
479
|
+
| `dokploy_destination_one` | Get destination details by ID | Read-only |
|
|
480
|
+
| `dokploy_destination_create` | Create a new S3 backup destination | Mutating |
|
|
481
|
+
| `dokploy_destination_update` | Update a backup destination | Mutating |
|
|
482
|
+
| `dokploy_destination_remove` | Remove a backup destination | Destructive |
|
|
483
|
+
| `dokploy_destination_test_connection` | Test S3 destination connection | Mutating |
|
|
484
|
+
|
|
485
|
+
### Backup (8 tools)
|
|
486
|
+
|
|
487
|
+
| Tool | Description | Type |
|
|
488
|
+
|---|---|---|
|
|
489
|
+
| `dokploy_backup_one` | Get backup configuration details | Read-only |
|
|
490
|
+
| `dokploy_backup_create` | Create a scheduled backup | Mutating |
|
|
491
|
+
| `dokploy_backup_update` | Update a backup schedule | Mutating |
|
|
492
|
+
| `dokploy_backup_remove` | Remove a backup schedule | Destructive |
|
|
493
|
+
| `dokploy_backup_manual_postgres` | Trigger manual Postgres backup | Mutating |
|
|
494
|
+
| `dokploy_backup_manual_mysql` | Trigger manual MySQL backup | Mutating |
|
|
495
|
+
| `dokploy_backup_manual_mariadb` | Trigger manual MariaDB backup | Mutating |
|
|
496
|
+
| `dokploy_backup_manual_mongo` | Trigger manual MongoDB backup | Mutating |
|
|
497
|
+
|
|
498
|
+
### Mounts (4 tools)
|
|
499
|
+
|
|
500
|
+
| Tool | Description | Type |
|
|
501
|
+
|---|---|---|
|
|
502
|
+
| `dokploy_mount_one` | Get mount configuration details | Read-only |
|
|
503
|
+
| `dokploy_mount_create` | Create a new mount (bind, volume, or file) | Mutating |
|
|
504
|
+
| `dokploy_mount_update` | Update a mount configuration | Mutating |
|
|
505
|
+
| `dokploy_mount_remove` | Remove a mount | Destructive |
|
|
506
|
+
|
|
507
|
+
### Port (4 tools)
|
|
508
|
+
|
|
509
|
+
| Tool | Description | Type |
|
|
510
|
+
|---|---|---|
|
|
511
|
+
| `dokploy_port_one` | Get port mapping details | Read-only |
|
|
512
|
+
| `dokploy_port_create` | Create a new port mapping | Mutating |
|
|
513
|
+
| `dokploy_port_update` | Update a port mapping | Mutating |
|
|
514
|
+
| `dokploy_port_delete` | Delete a port mapping | Destructive |
|
|
515
|
+
|
|
516
|
+
### Redirects (4 tools)
|
|
517
|
+
|
|
518
|
+
| Tool | Description | Type |
|
|
519
|
+
|---|---|---|
|
|
520
|
+
| `dokploy_redirect_one` | Get redirect rule details | Read-only |
|
|
521
|
+
| `dokploy_redirect_create` | Create a new redirect rule | Mutating |
|
|
522
|
+
| `dokploy_redirect_update` | Update a redirect rule | Mutating |
|
|
523
|
+
| `dokploy_redirect_delete` | Delete a redirect rule | Destructive |
|
|
524
|
+
|
|
525
|
+
### Security (4 tools)
|
|
526
|
+
|
|
527
|
+
| Tool | Description | Type |
|
|
528
|
+
|---|---|---|
|
|
529
|
+
| `dokploy_security_one` | Get HTTP basic-auth entry details | Read-only |
|
|
530
|
+
| `dokploy_security_create` | Create HTTP basic-auth protection | Mutating |
|
|
531
|
+
| `dokploy_security_update` | Update basic-auth credentials | Mutating |
|
|
532
|
+
| `dokploy_security_delete` | Delete basic-auth protection | Destructive |
|
|
533
|
+
|
|
534
|
+
### Cluster (4 tools)
|
|
535
|
+
|
|
536
|
+
| Tool | Description | Type |
|
|
537
|
+
|---|---|---|
|
|
538
|
+
| `dokploy_cluster_get_nodes` | List all Docker Swarm cluster nodes | Read-only |
|
|
539
|
+
| `dokploy_cluster_add_worker` | Get the command to add a worker node | Read-only |
|
|
540
|
+
| `dokploy_cluster_add_manager` | Get the command to add a manager node | Read-only |
|
|
541
|
+
| `dokploy_cluster_remove_worker` | Remove a worker node from the cluster | Destructive |
|
|
542
|
+
|
|
543
|
+
### Settings (23 tools)
|
|
544
|
+
|
|
545
|
+
| Tool | Description | Type |
|
|
546
|
+
|---|---|---|
|
|
547
|
+
| `dokploy_settings_reload_server` | Reload the Dokploy server process | Mutating |
|
|
548
|
+
| `dokploy_settings_reload_traefik` | Reload the Traefik reverse proxy | Mutating |
|
|
549
|
+
| `dokploy_settings_clean_unused_images` | Remove unused Docker images | Mutating |
|
|
550
|
+
| `dokploy_settings_clean_unused_volumes` | Remove unused Docker volumes | Destructive |
|
|
551
|
+
| `dokploy_settings_clean_stopped_containers` | Remove all stopped containers | Destructive |
|
|
552
|
+
| `dokploy_settings_clean_docker_builder` | Clean Docker builder cache | Mutating |
|
|
553
|
+
| `dokploy_settings_clean_docker_prune` | Full Docker system prune | Destructive |
|
|
554
|
+
| `dokploy_settings_clean_all` | Clean all unused Docker resources | Destructive |
|
|
555
|
+
| `dokploy_settings_clean_monitoring` | Clear all monitoring data | Destructive |
|
|
556
|
+
| `dokploy_settings_save_ssh_private_key` | Save SSH private key for remote access | Mutating |
|
|
557
|
+
| `dokploy_settings_clean_ssh_private_key` | Remove stored SSH private key | Destructive |
|
|
558
|
+
| `dokploy_settings_assign_domain_server` | Assign domain to the server with SSL | Mutating |
|
|
559
|
+
| `dokploy_settings_update_docker_cleanup` | Configure automatic Docker cleanup | Mutating |
|
|
560
|
+
| `dokploy_settings_read_traefik_config` | Read the main Traefik config | Read-only |
|
|
561
|
+
| `dokploy_settings_update_traefik_config` | Update the main Traefik config | Mutating |
|
|
562
|
+
| `dokploy_settings_read_web_server_traefik_config` | Read web server Traefik config | Read-only |
|
|
563
|
+
| `dokploy_settings_update_web_server_traefik_config` | Update web server Traefik config | Mutating |
|
|
564
|
+
| `dokploy_settings_read_middleware_traefik_config` | Read Traefik middleware config | Read-only |
|
|
565
|
+
| `dokploy_settings_update_middleware_traefik_config` | Update Traefik middleware config | Mutating |
|
|
566
|
+
| `dokploy_settings_check_and_update_image` | Check for and apply image updates | Mutating |
|
|
567
|
+
| `dokploy_settings_update_server` | Update Dokploy to latest version | Mutating |
|
|
568
|
+
| `dokploy_settings_get_version` | Get current Dokploy version | Read-only |
|
|
569
|
+
| `dokploy_settings_read_directories` | Read server directory listing | Read-only |
|
|
570
|
+
| `dokploy_settings_get_openapi_document` | Get the OpenAPI specification | Read-only |
|
|
571
|
+
|
|
572
|
+
### Auth (14 tools)
|
|
573
|
+
|
|
574
|
+
| Tool | Description | Type |
|
|
575
|
+
|---|---|---|
|
|
576
|
+
| `dokploy_auth_create_admin` | Create the initial admin account | Mutating |
|
|
577
|
+
| `dokploy_auth_create_user` | Create a user from invitation token | Mutating |
|
|
578
|
+
| `dokploy_auth_login` | Log in with email and password | Mutating |
|
|
579
|
+
| `dokploy_auth_get` | Get current authenticated user profile | Read-only |
|
|
580
|
+
| `dokploy_auth_logout` | Log out and invalidate session | Mutating |
|
|
581
|
+
| `dokploy_auth_update` | Update current user profile | Mutating |
|
|
582
|
+
| `dokploy_auth_generate_token` | Generate a new API token | Mutating |
|
|
583
|
+
| `dokploy_auth_one` | Get user auth info by ID | Read-only |
|
|
584
|
+
| `dokploy_auth_update_by_admin` | Update any user with admin privileges | Mutating |
|
|
585
|
+
| `dokploy_auth_generate_2fa_secret` | Generate 2FA secret and QR code | Read-only |
|
|
586
|
+
| `dokploy_auth_verify_2fa_setup` | Verify and enable 2FA | Mutating |
|
|
587
|
+
| `dokploy_auth_verify_login_2fa` | Verify 2FA PIN during login | Mutating |
|
|
588
|
+
| `dokploy_auth_disable_2fa` | Disable two-factor authentication | Mutating |
|
|
589
|
+
| `dokploy_auth_verify_token` | Verify auth token validity | Mutating |
|
|
590
|
+
|
|
591
|
+
### Admin (9 tools)
|
|
592
|
+
|
|
593
|
+
| Tool | Description | Type |
|
|
594
|
+
|---|---|---|
|
|
595
|
+
| `dokploy_admin_one` | Get admin profile and configuration | Read-only |
|
|
596
|
+
| `dokploy_admin_create_user_invitation` | Send user invitation email | Mutating |
|
|
597
|
+
| `dokploy_admin_remove_user` | Remove a user permanently | Destructive |
|
|
598
|
+
| `dokploy_admin_get_user_by_token` | Look up user by invitation token | Read-only |
|
|
599
|
+
| `dokploy_admin_assign_permissions` | Assign granular permissions to a user | Mutating |
|
|
600
|
+
| `dokploy_admin_clean_github_app` | Remove GitHub App integration | Mutating |
|
|
601
|
+
| `dokploy_admin_get_repositories` | List GitHub App repositories | Read-only |
|
|
602
|
+
| `dokploy_admin_get_branches` | List branches for a GitHub repo | Read-only |
|
|
603
|
+
| `dokploy_admin_have_github_configured` | Check if GitHub App is configured | Read-only |
|
|
604
|
+
|
|
605
|
+
### User (3 tools)
|
|
606
|
+
|
|
607
|
+
| Tool | Description | Type |
|
|
608
|
+
|---|---|---|
|
|
609
|
+
| `dokploy_user_all` | List all registered users | Read-only |
|
|
610
|
+
| `dokploy_user_by_auth_id` | Get user by authentication ID | Read-only |
|
|
611
|
+
| `dokploy_user_by_user_id` | Get user by user ID | Read-only |
|
|
612
|
+
|
|
613
|
+
## Architecture
|
|
614
|
+
|
|
615
|
+
```
|
|
616
|
+
src/
|
|
617
|
+
index.ts - Entry point, routes CLI vs MCP server
|
|
618
|
+
server.ts - MCP server creation, tool registration
|
|
619
|
+
api/client.ts - Fetch-based API client with config resolver
|
|
620
|
+
config/types.ts - Config types and platform paths
|
|
621
|
+
config/resolver.ts - Config resolution chain (env -> file -> CLI)
|
|
622
|
+
cli/index.ts - CLI command router
|
|
623
|
+
cli/setup.ts - Interactive setup wizard (@clack/prompts TUI)
|
|
624
|
+
tools/_factory.ts - Tool creation helpers (createTool, postTool, getTool)
|
|
625
|
+
tools/index.ts - Aggregates all tool module exports
|
|
626
|
+
tools/{module}.ts - 24 domain modules (224 tools total)
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
**Key patterns:**
|
|
630
|
+
|
|
631
|
+
- `postTool()` creates tools that call POST endpoints (mutations)
|
|
632
|
+
- `getTool()` creates tools that call GET endpoints (reads), automatically annotated with `readOnlyHint` and `idempotentHint`
|
|
633
|
+
- `createTool()` is the low-level factory for tools with custom handler logic
|
|
634
|
+
- The API client uses native `fetch` with config resolution: env vars -> config file -> Dokploy CLI
|
|
635
|
+
- Authentication is via `x-api-key` header on every request
|
|
636
|
+
- All tool schemas use Zod v4 with `.describe()` on all parameters
|
|
637
|
+
- Error handling maps HTTP status codes (401, 403, 404, 422) to user-friendly messages
|
|
638
|
+
- CLI setup uses `@clack/prompts` for a modern terminal UI
|
|
639
|
+
|
|
640
|
+
## Development
|
|
641
|
+
|
|
642
|
+
```bash
|
|
643
|
+
npm run build # Compile TypeScript to dist/
|
|
644
|
+
npm run dev # Watch mode with auto-recompile
|
|
645
|
+
npm run typecheck # Type-check without emitting files
|
|
646
|
+
npm run lint # Lint with Biome
|
|
647
|
+
npm run lint:fix # Auto-fix lint issues
|
|
648
|
+
npm run format # Format with Biome
|
|
649
|
+
npm start # Run the built server
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Testing
|
|
653
|
+
|
|
654
|
+
Use the MCP Inspector to test tools interactively:
|
|
655
|
+
|
|
656
|
+
```bash
|
|
657
|
+
npx @modelcontextprotocol/inspector node dist/index.js
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
Pass environment variables via the inspector UI or prefix the command:
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
DOKPLOY_URL=https://panel.example.com DOKPLOY_API_KEY=your-key npx @modelcontextprotocol/inspector node dist/index.js
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
## Adding a New Tool
|
|
667
|
+
|
|
668
|
+
1. Find the module file in `src/tools/` (e.g., `application.ts`)
|
|
669
|
+
2. Add a `postTool()` or `getTool()` call with `name`, `title`, `description`, `schema`, and `endpoint`
|
|
670
|
+
3. Use `.describe()` on all Zod schema parameters
|
|
671
|
+
4. Set `annotations: { destructiveHint: true }` for destructive operations
|
|
672
|
+
5. Add the tool to the module's exported array
|
|
673
|
+
6. Run `npm run build`
|
|
674
|
+
|
|
675
|
+
Example:
|
|
676
|
+
|
|
677
|
+
```typescript
|
|
678
|
+
const myTool = postTool({
|
|
679
|
+
name: 'dokploy_application_my_action',
|
|
680
|
+
title: 'My Action',
|
|
681
|
+
description: 'Description of what this tool does.',
|
|
682
|
+
schema: z.object({
|
|
683
|
+
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
684
|
+
}),
|
|
685
|
+
endpoint: '/application.myAction',
|
|
686
|
+
annotations: { destructiveHint: true }, // if applicable
|
|
687
|
+
})
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
## License
|
|
691
|
+
|
|
692
|
+
MIT
|