@vibetools/dokploy-mcp 2.1.1 → 2.2.1
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 +102 -12
- package/dist/codemode/context/execute-context.d.ts +77 -572
- package/dist/codemode/context/execute-context.js +28 -1
- package/dist/codemode/context/search-context.d.ts +9 -13831
- package/dist/codemode/context/search-context.js +45 -9
- package/dist/codemode/gateway/api-gateway.js +96 -6
- package/dist/codemode/overrides/catalog-overrides.d.ts +10 -0
- package/dist/codemode/overrides/catalog-overrides.js +79 -0
- package/dist/codemode/overrides/procedure-overrides.d.ts +22166 -0
- package/dist/codemode/overrides/procedure-overrides.js +308 -0
- package/dist/codemode/overrides/virtual-procedures.d.ts +29 -0
- package/dist/codemode/overrides/virtual-procedures.js +336 -0
- package/dist/codemode/sandbox/worker-entry.js +23 -6
- package/dist/codemode/tools/execute.d.ts +1 -572
- package/dist/codemode/tools/execute.js +1 -0
- package/dist/codemode/tools/search.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
|
|
7
|
-
MCP server for [Dokploy](https://dokploy.com). Two tools. 463 API procedures. Your AI agent can now deploy, configure, and manage your entire infrastructure without memorizing
|
|
7
|
+
MCP server for [Dokploy](https://dokploy.com). Two tools. 463 API procedures. Your AI agent can now deploy, configure, and manage your entire infrastructure without memorizing hundreds of endpoint definitions first.
|
|
8
8
|
|
|
9
9
|
Most MCP servers dump hundreds of tool schemas into your context window and call it a day. This one doesn't. **Code Mode** gives your agent `search` and `execute` -- it finds what it needs from a compact API catalog, writes a workflow, and the sandbox runs the whole thing in one call. Create an app, set env vars, mount volumes, configure domains, deploy -- all in a single round-trip.
|
|
10
10
|
|
|
11
|
-
The result: **99.
|
|
11
|
+
The result: **99.4% fewer tokens** on tool definitions. Your context window can go back to doing its actual job.
|
|
12
12
|
|
|
13
|
-
> Previously: 377 tools = ~92,354 tokens just to list them. Now: 2 tools = ~
|
|
13
|
+
> Previously: 377 tools = ~92,354 tokens just to list them. Now: 2 tools = ~595 tokens. The math is still embarrassing for everyone else.
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
@@ -42,21 +42,113 @@ Want a wizard? `npx @vibetools/dokploy-mcp setup` -- validates credentials, save
|
|
|
42
42
|
Your agent gets two tools:
|
|
43
43
|
|
|
44
44
|
```
|
|
45
|
-
search →
|
|
46
|
-
execute →
|
|
45
|
+
search → discover API procedures and their parameters
|
|
46
|
+
execute → run a multi-step workflow in one sandboxed call
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
`dokploy` and `helpers` are sandbox globals -- your agent writes bare code, no wrapper functions:
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
```js
|
|
52
|
+
// search
|
|
53
|
+
catalog.searchText("deploy")
|
|
54
|
+
catalog.get("application.one")
|
|
55
|
+
|
|
56
|
+
// execute -- just write code
|
|
57
|
+
await dokploy.settings.health()
|
|
58
|
+
|
|
59
|
+
// multi-step workflows
|
|
60
|
+
const app = await dokploy.application.one({ applicationId: "id", select: ["name", "status"] })
|
|
61
|
+
return app.name
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
One `execute` call can spin up an app, configure resource limits, set env vars, create file mounts, attach a domain with HTTPS, deploy, wait for it to come up, verify, and clean up. Eight API calls. One context window round-trip.
|
|
65
|
+
|
|
66
|
+
**Token comparison:**
|
|
52
67
|
|
|
53
68
|
| | Old way (endpoint-per-tool) | Code Mode |
|
|
54
69
|
|---|---|---|
|
|
55
|
-
| Tool definitions sent | ~92,354 tokens (377 tools) | ~
|
|
70
|
+
| Tool definitions sent | ~92,354 tokens (377 tools) | ~595 tokens (2 tools) |
|
|
56
71
|
| Deploy workflow (8 API calls) | 8 round-trips through the model | 1 execute call, done |
|
|
57
|
-
| Context window tax | ~738k tokens on tool schemas alone | ~
|
|
72
|
+
| Context window tax | ~738k tokens on tool schemas alone | ~595 tokens total |
|
|
73
|
+
|
|
74
|
+
Every token spent on tool definitions is a token your agent can't use for reasoning. We just gave you 738k of them back.
|
|
75
|
+
|
|
76
|
+
## Response shaping
|
|
77
|
+
|
|
78
|
+
Heavy endpoints like `application.one` return 25KB+ of data when you need 3 fields. Code Mode adds optional shaping parameters that trim responses **before** the sandbox counts bytes:
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
// Select only the fields you need (96% reduction)
|
|
82
|
+
await dokploy.application.one({
|
|
83
|
+
applicationId: "id",
|
|
84
|
+
select: ["name", "applicationStatus", "mounts", "watchPaths"],
|
|
85
|
+
includeDeployments: false
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
// Or limit deployment history instead of excluding it entirely
|
|
89
|
+
await dokploy.application.one({
|
|
90
|
+
applicationId: "id",
|
|
91
|
+
deploymentLimit: 1 // only the latest deployment
|
|
92
|
+
})
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Without shaping params, behavior is identical to the raw Dokploy API -- fully backward compatible.
|
|
96
|
+
|
|
97
|
+
## Secret redaction
|
|
98
|
+
|
|
99
|
+
Git provider credentials (GitHub App private keys, client secrets, webhook secrets, Gitea/GitLab/Bitbucket tokens) are **automatically redacted** from all responses. Your AI agent sees `[REDACTED]` instead of the real values -- because leaking your private key into a context window is the kind of mistake you only make once.
|
|
100
|
+
|
|
101
|
+
Affected procedures: `application.one`, `application.many`, `github.one`, `gitea.one`, `gitlab.one`, `bitbucket.one`, `github.githubProviders`, `gitProvider.getAll`.
|
|
102
|
+
|
|
103
|
+
If you actually need the raw secrets (rotation scripts, migration, etc.), opt in explicitly:
|
|
58
104
|
|
|
59
|
-
|
|
105
|
+
```js
|
|
106
|
+
await dokploy.application.one({
|
|
107
|
+
applicationId: "id",
|
|
108
|
+
includeSecrets: true // you asked for it
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
await dokploy.github.one({
|
|
112
|
+
githubId: "id",
|
|
113
|
+
includeSecrets: true
|
|
114
|
+
})
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Virtual helpers
|
|
118
|
+
|
|
119
|
+
Code Mode includes MCP-side helpers for common multi-call patterns. They run inside `execute`, fan out to real Dokploy API calls, and charge every underlying call against the sandbox budget honestly.
|
|
120
|
+
|
|
121
|
+
**Batch reads** -- inspect N apps without N separate tool calls:
|
|
122
|
+
|
|
123
|
+
```js
|
|
124
|
+
await dokploy.application.many({
|
|
125
|
+
applicationIds: ["app-1", "app-2", "app-3"],
|
|
126
|
+
select: ["name", "applicationStatus", "watchPaths"],
|
|
127
|
+
includeDeployments: false
|
|
128
|
+
})
|
|
129
|
+
// Returns: { items: [...], total: 3 }
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Project overview** -- the entire project state in one call:
|
|
133
|
+
|
|
134
|
+
```js
|
|
135
|
+
await dokploy.project.overview({ projectId: "id" })
|
|
136
|
+
// Returns: { name, environments: [{ name, applications: [{ name, status, domains, mounts, watchPaths, lastDeployment }] }] }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
These are discoverable via `search` (`catalog.get("application.many")`, `catalog.get("project.overview")`). They are MCP-side virtual procedures, not Dokploy HTTP endpoints.
|
|
140
|
+
|
|
141
|
+
## Sandbox helpers
|
|
142
|
+
|
|
143
|
+
Available as globals inside `execute`:
|
|
144
|
+
|
|
145
|
+
| Helper | Description |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `helpers.sleep(ms)` | Async delay, max 15s. Use after deploy to wait for containers. |
|
|
148
|
+
| `helpers.assert(condition, msg)` | Quick validation. Throws on falsy. |
|
|
149
|
+
| `helpers.pick(obj, keys)` | Object projection. |
|
|
150
|
+
| `helpers.limit(arr, n)` | Array slicing. |
|
|
151
|
+
| `helpers.selectOne(arr, pred?)` | Find first match. |
|
|
60
152
|
|
|
61
153
|
## Configuration
|
|
62
154
|
|
|
@@ -87,8 +179,6 @@ The Code Mode catalog covers the full Dokploy OpenAPI surface -- 463 procedures
|
|
|
87
179
|
|
|
88
180
|
Your agent doesn't need to know any of this upfront. That's the point. It searches when it needs something, executes when it knows what to do.
|
|
89
181
|
|
|
90
|
-
Coverage details: **[docs/coverage.md](docs/coverage.md)**
|
|
91
|
-
|
|
92
182
|
## CLI
|
|
93
183
|
|
|
94
184
|
```bash
|