@wyattjoh/dokploy-mcp 0.1.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 (3) hide show
  1. package/README.md +244 -0
  2. package/dist/index.js +53891 -0
  3. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,244 @@
1
+ # @wyattjoh/dokploy-mcp
2
+
3
+ MCP server that wraps the [Dokploy](https://dokploy.com) REST API. Exposes
4
+ Dokploy operations as [Model Context Protocol](https://modelcontextprotocol.io)
5
+ tools for Claude Code, Claude Desktop, and other MCP clients.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @wyattjoh/dokploy-mcp
11
+ ```
12
+
13
+ Or with Bun:
14
+
15
+ ```bash
16
+ bun install -g @wyattjoh/dokploy-mcp
17
+ ```
18
+
19
+ ## Configuration
20
+
21
+ The server supports two modes: **single-instance** and **multi-instance**. The
22
+ two modes are mutually exclusive.
23
+
24
+ ### Single instance
25
+
26
+ Set a single Dokploy API token. All tools operate against one Dokploy server.
27
+
28
+ | Variable | Required | Description |
29
+ | --- | --- | --- |
30
+ | `DOKPLOY_API_TOKEN` | Yes | API token for your Dokploy instance |
31
+ | `DOKPLOY_URL` | No | Base URL (defaults to `https://dokploy.wyattjoh.dev`) |
32
+
33
+ ### Multi-instance
34
+
35
+ Set per-instance tokens and URLs. Tools gain a required `instance` parameter so
36
+ you can target different Dokploy servers from a single MCP session.
37
+
38
+ For each instance, define a pair of environment variables:
39
+
40
+ - `DOKPLOY_<NAME>_API_TOKEN` - API token for the instance
41
+ - `DOKPLOY_<NAME>_URL` - Base URL for the instance
42
+
43
+ Instance names are derived by lowercasing the `<NAME>` segment. Names must match
44
+ `[a-z0-9]([a-z0-9_]*[a-z0-9])?`.
45
+
46
+ Example for two instances named `prod` and `staging`:
47
+
48
+ ```
49
+ DOKPLOY_PROD_API_TOKEN=dkp_abc123
50
+ DOKPLOY_PROD_URL=https://dokploy.example.com
51
+ DOKPLOY_STAGING_API_TOKEN=dkp_def456
52
+ DOKPLOY_STAGING_URL=https://staging-dokploy.example.com
53
+ ```
54
+
55
+ ### HTTP transport
56
+
57
+ By default the server uses stdio transport (for Claude Code and similar
58
+ clients). Pass `--http` to start an HTTP server instead.
59
+
60
+ | Variable | Required | Description |
61
+ | --- | --- | --- |
62
+ | `DOKPLOY_MCP_TOKEN` | Yes (HTTP only) | Bearer token for authenticating MCP clients |
63
+
64
+ ```bash
65
+ dokploy-mcp --http --port 3000
66
+ ```
67
+
68
+ The MCP endpoint is `POST /mcp`. A health check is available at `GET /health`.
69
+
70
+ ## MCP client configuration
71
+
72
+ ### Claude Code (`.mcp.json`)
73
+
74
+ Add to your project's `.mcp.json` or `~/.claude/.mcp.json`:
75
+
76
+ **Single instance:**
77
+
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "dokploy": {
82
+ "command": "dokploy-mcp",
83
+ "env": {
84
+ "DOKPLOY_API_TOKEN": "dkp_your_token_here",
85
+ "DOKPLOY_URL": "https://dokploy.example.com"
86
+ }
87
+ }
88
+ }
89
+ }
90
+ ```
91
+
92
+ **Multi-instance:**
93
+
94
+ ```json
95
+ {
96
+ "mcpServers": {
97
+ "dokploy": {
98
+ "command": "dokploy-mcp",
99
+ "env": {
100
+ "DOKPLOY_PROD_API_TOKEN": "dkp_prod_token",
101
+ "DOKPLOY_PROD_URL": "https://dokploy.example.com",
102
+ "DOKPLOY_STAGING_API_TOKEN": "dkp_staging_token",
103
+ "DOKPLOY_STAGING_URL": "https://staging-dokploy.example.com"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### Using 1Password CLI (recommended)
111
+
112
+ Store your Dokploy API tokens in 1Password and use `op run` to inject them at
113
+ runtime. This keeps secrets out of config files entirely.
114
+
115
+ 1. Store each API token in 1Password (e.g., in a vault called `Development`)
116
+ 2. Reference them with `op://` URIs in your `.mcp.json`
117
+ 3. Use `op` as the command so secrets are resolved in-memory
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "dokploy": {
123
+ "command": "op",
124
+ "args": ["run", "--", "dokploy-mcp"],
125
+ "env": {
126
+ "DOKPLOY_PROD_API_TOKEN": "op://Development/dokploy-prod/credential",
127
+ "DOKPLOY_PROD_URL": "https://dokploy.example.com",
128
+ "DOKPLOY_STAGING_API_TOKEN": "op://Development/dokploy-staging/credential",
129
+ "DOKPLOY_STAGING_URL": "https://staging-dokploy.example.com"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ With this setup, `op run` resolves the `op://` references and injects the real
137
+ tokens into the subprocess environment. No plaintext secrets touch disk.
138
+
139
+ For HTTP transport with 1Password:
140
+
141
+ ```json
142
+ {
143
+ "mcpServers": {
144
+ "dokploy": {
145
+ "command": "op",
146
+ "args": ["run", "--", "dokploy-mcp", "--http"],
147
+ "env": {
148
+ "DOKPLOY_MCP_TOKEN": "op://Development/dokploy-mcp-token/credential",
149
+ "DOKPLOY_PROD_API_TOKEN": "op://Development/dokploy-prod/credential",
150
+ "DOKPLOY_PROD_URL": "https://dokploy.example.com"
151
+ }
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ ## Tools
158
+
159
+ ### Projects
160
+
161
+ | Tool | Description |
162
+ | --- | --- |
163
+ | `dokploy_list_instances` | List all configured Dokploy instances |
164
+ | `dokploy_list_projects` | List all projects |
165
+
166
+ ### Applications
167
+
168
+ | Tool | Description |
169
+ | --- | --- |
170
+ | `dokploy_list_applications` | List all applications (filtered from projects) |
171
+ | `dokploy_get_application` | Get full application config by ID |
172
+ | `dokploy_update_application` | Update application config fields |
173
+ | `dokploy_deploy` | Trigger a deployment |
174
+ | `dokploy_start_application` | Start an application |
175
+ | `dokploy_stop_application` | Stop an application |
176
+
177
+ ### Compose
178
+
179
+ | Tool | Description |
180
+ | --- | --- |
181
+ | `dokploy_get_compose` | Get compose stack config by ID |
182
+ | `dokploy_deploy_compose` | Deploy a compose stack |
183
+ | `dokploy_redeploy_compose` | Redeploy a compose stack |
184
+ | `dokploy_start_compose` | Start a compose stack |
185
+ | `dokploy_stop_compose` | Stop a compose stack |
186
+ | `dokploy_update_compose` | Update compose stack config |
187
+ | `dokploy_list_compose_services` | List services in a compose stack |
188
+ | `dokploy_list_compose_deployments` | List deployments for a compose stack |
189
+ | `dokploy_list_compose_domains` | List domains for a compose stack |
190
+
191
+ ### Deployments
192
+
193
+ | Tool | Description |
194
+ | --- | --- |
195
+ | `dokploy_list_deployments` | List deployments for an application |
196
+
197
+ ### Domains
198
+
199
+ | Tool | Description |
200
+ | --- | --- |
201
+ | `dokploy_list_domains` | List domains for an application |
202
+ | `dokploy_create_domain` | Add a domain to an application |
203
+
204
+ ### Environment
205
+
206
+ | Tool | Description |
207
+ | --- | --- |
208
+ | `dokploy_list_environment` | List environment variables for an application |
209
+ | `dokploy_update_environment` | Set environment variables (merge with existing) |
210
+ | `dokploy_delete_environment` | Remove environment variables by key |
211
+
212
+ ### Build
213
+
214
+ | Tool | Description |
215
+ | --- | --- |
216
+ | `dokploy_save_build_type` | Update build configuration |
217
+ | `dokploy_save_github_provider` | Update GitHub source configuration |
218
+
219
+ ### Operational
220
+
221
+ | Tool | Description |
222
+ | --- | --- |
223
+ | `dokploy_get_containers` | List Docker containers |
224
+ | `dokploy_get_app_monitoring` | Get application monitoring data |
225
+ | `dokploy_redeploy_application` | Redeploy an application |
226
+ | `dokploy_cancel_deployment` | Cancel a running deployment |
227
+ | `dokploy_kill_build` | Kill a running build |
228
+ | `dokploy_get_version` | Get the Dokploy server version |
229
+ | `dokploy_list_servers` | List all configured servers |
230
+
231
+ ## Development
232
+
233
+ ```bash
234
+ bun install
235
+ bun run start # stdio transport
236
+ bun run start:http # HTTP transport on port 3000
237
+ bun run build # transpile to dist/ (Node.js target)
238
+ bun run lint # oxlint
239
+ bun run typecheck # tsc --noEmit
240
+ ```
241
+
242
+ ## License
243
+
244
+ MIT