code-engine-mcp-server 1.0.1 → 1.0.3
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/LICENSE +1 -1
- package/README.md +375 -25
- package/build/context-discovery.js +2 -2
- package/build/context-discovery.js.map +1 -1
- package/build/deploy-tool-enhanced.js +2 -2
- package/build/deploy-tool-enhanced.js.map +1 -1
- package/build/index.js +866 -6
- package/build/index.js.map +1 -1
- package/build/simple-client.js +1 -1
- package/build/simple-client.js.map +1 -1
- package/build/test-all-tools.js +3 -3
- package/build/test-all-tools.js.map +1 -1
- package/docs/API_CALL_SCENARIOS.md +4 -4
- package/docs/CLIENT_README.md +0 -1
- package/docs/CLINE_CONFIG_EXAMPLE.json +1 -1
- package/docs/CODE_ENGINE_API_REFERENCE.md +2 -2
- package/docs/SETUP_INSTRUCTIONS.md +4 -2
- package/package.json +13 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Code Engine MCP Server
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
Model Context Protocol (MCP) server for IBM Code Engine and Docker/Podman integration.
|
|
4
6
|
It enables AI assistants to build, run, push, and deploy containerized workloads with a single MCP server.
|
|
5
7
|
|
|
@@ -12,10 +14,12 @@ It enables AI assistants to build, run, push, and deploy containerized workloads
|
|
|
12
14
|
|
|
13
15
|
- [What You Get](#what-you-get)
|
|
14
16
|
- [Quick Start](#quick-start)
|
|
17
|
+
- [Deploy Your First App](#deploy-your-first-app)
|
|
15
18
|
- [Documentation](#documentation)
|
|
16
19
|
- [Project Structure](#project-structure)
|
|
17
20
|
- [Features](#features)
|
|
18
21
|
- [Configuration](#configuration)
|
|
22
|
+
- [npm and MCP Registry](#npm-and-mcp-registry)
|
|
19
23
|
- [Example Prompts](#example-prompts)
|
|
20
24
|
- [Available Tools](#available-tools)
|
|
21
25
|
- [Environment Variables](#environment-variables)
|
|
@@ -31,8 +35,9 @@ It enables AI assistants to build, run, push, and deploy containerized workloads
|
|
|
31
35
|
## ✨ What You Get
|
|
32
36
|
|
|
33
37
|
- Container workflow tools for Docker or Podman
|
|
38
|
+
- IBM Container Registry (ICR) tools — list namespaces, list images, delete images
|
|
34
39
|
- IBM Code Engine project and application management tools
|
|
35
|
-
- MCP-ready setup for GitHub Copilot, Cline, and
|
|
40
|
+
- MCP-ready setup for GitHub Copilot, Cline, Claude Desktop, and the optional VS Code extension in `vscode-extension/`
|
|
36
41
|
- A simple local development and troubleshooting workflow
|
|
37
42
|
|
|
38
43
|
## 🚀 Quick Start
|
|
@@ -50,13 +55,260 @@ node build/index.js
|
|
|
50
55
|
|
|
51
56
|
Then configure your MCP client using one of the examples in the Configuration section below.
|
|
52
57
|
|
|
53
|
-
##
|
|
58
|
+
## � Deploy Your First App
|
|
59
|
+
|
|
60
|
+
This walks through deploying the included [Star Wars splash page example](./examples/starwars-splash/) — a static nginx container — entirely through the MCP server.
|
|
61
|
+
|
|
62
|
+
> **Apple Silicon users:** always build with `--platform linux/amd64`. Code Engine runs amd64 only.
|
|
63
|
+
|
|
64
|
+
### Step 1 — Build and push the image
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cd examples/starwars-splash
|
|
68
|
+
podman build --platform linux/amd64 -t us.icr.io/<your-namespace>/starwars-splash:v1.0.0 .
|
|
69
|
+
podman push us.icr.io/<your-namespace>/starwars-splash:v1.0.0
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or ask your assistant:
|
|
73
|
+
```
|
|
74
|
+
Build examples/starwars-splash as us.icr.io/my-namespace/starwars-splash:v1.0.0 for linux/amd64 and push it
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**MCP response — `build_container_image`:**
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"success": true,
|
|
81
|
+
"command": "podman build --platform linux/amd64 -t us.icr.io/my-namespace/starwars-splash:v1.0.0 ...",
|
|
82
|
+
"build_output": "STEP 1/5: FROM nginx:alpine\nSTEP 2/5: COPY index.html /usr/share/nginx/html/index.html\nSTEP 3/5: RUN sed -i 's/listen 80;/listen 8080;/g' /etc/nginx/conf.d/default.conf\nSTEP 4/5: EXPOSE 8080\nSTEP 5/5: CMD [\"nginx\", \"-g\", \"daemon off;\"]\nSuccessfully tagged us.icr.io/my-namespace/starwars-splash:v1.0.0"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> **Note:** Container runtimes (Podman/Docker) write build progress to stderr. The `build_output` field combines stdout and stderr so you see the full build log.
|
|
87
|
+
|
|
88
|
+
**MCP response — `push_container_image`:**
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"success": true,
|
|
92
|
+
"command": "podman push us.icr.io/my-namespace/starwars-splash:v1.0.0",
|
|
93
|
+
"output": "Getting image source signatures\nCopying blobs...\nWriting manifest to image destination"
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Step 2 — Create a registry pull secret
|
|
98
|
+
|
|
99
|
+
Ask your assistant (once per project):
|
|
100
|
+
```
|
|
101
|
+
Create a registry secret called icr-pull-secret in project <project-id> for us.icr.io using my IBM Cloud API key
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Or use the `ce_create_secret` tool directly:
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"project_id": "<your-project-id>",
|
|
108
|
+
"name": "icr-pull-secret",
|
|
109
|
+
"format": "registry",
|
|
110
|
+
"data": {
|
|
111
|
+
"username": "iamapikey",
|
|
112
|
+
"password": "<your-ibm-cloud-api-key>",
|
|
113
|
+
"server": "us.icr.io",
|
|
114
|
+
"email": "user@example.com"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**MCP response — `ce_create_secret`:**
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"name": "icr-pull-secret",
|
|
123
|
+
"format": "registry",
|
|
124
|
+
"resource_type": "secret_registry_v2",
|
|
125
|
+
"created_at": "2026-05-08T22:10:00Z",
|
|
126
|
+
"project_id": "<your-project-id>"
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Step 3 — Deploy the application
|
|
131
|
+
|
|
132
|
+
Ask your assistant:
|
|
133
|
+
```
|
|
134
|
+
Deploy us.icr.io/my-namespace/starwars-splash:v1.0.0 to Code Engine project <project-id>
|
|
135
|
+
as app "starwars-splash" using pull secret icr-pull-secret, min 1 instance
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Or use the `ce_create_application` tool:
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"project_id": "<your-project-id>",
|
|
142
|
+
"name": "starwars-splash",
|
|
143
|
+
"image": "us.icr.io/<your-namespace>/starwars-splash:v1.0.0",
|
|
144
|
+
"image_secret": "icr-pull-secret",
|
|
145
|
+
"scale_min_instances": 1,
|
|
146
|
+
"scale_max_instances": 3
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**MCP response — `ce_create_application`:**
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"name": "starwars-splash",
|
|
154
|
+
"resource_type": "app_v2",
|
|
155
|
+
"status": "deploying",
|
|
156
|
+
"image_reference": "us.icr.io/my-namespace/starwars-splash:v1.0.0",
|
|
157
|
+
"image_secret": "icr-pull-secret",
|
|
158
|
+
"image_port": 8080,
|
|
159
|
+
"scale_min_instances": 1,
|
|
160
|
+
"scale_max_instances": 3,
|
|
161
|
+
"scale_cpu_limit": "1",
|
|
162
|
+
"scale_memory_limit": "4G",
|
|
163
|
+
"endpoint": "https://starwars-splash.<subdomain>.us-south.codeengine.appdomain.cloud",
|
|
164
|
+
"status_details": {
|
|
165
|
+
"latest_created_revision": "starwars-splash-00001",
|
|
166
|
+
"latest_ready_revision": null
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Step 4 — Check deployment status
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
Get details for the starwars-splash app in project <project-id>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
This calls `ce_get_application` and returns the public URL once the app reaches `ready` status.
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
List the running instances of starwars-splash in project <project-id>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This calls `ce_list_app_instances` (or `ce_get_app_instance` for a specific instance) and shows:
|
|
184
|
+
- Instance name and revision
|
|
185
|
+
- Container status (`running` / `pending` / `failed`)
|
|
186
|
+
- Restart count
|
|
187
|
+
- Started-at timestamp
|
|
188
|
+
- CPU and memory allocation
|
|
189
|
+
|
|
190
|
+
**MCP response — `ce_get_application` (once ready):**
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"name": "starwars-splash",
|
|
194
|
+
"status": "ready",
|
|
195
|
+
"image_reference": "us.icr.io/my-namespace/starwars-splash:v1.0.0",
|
|
196
|
+
"image_port": 8080,
|
|
197
|
+
"scale_min_instances": 1,
|
|
198
|
+
"scale_max_instances": 3,
|
|
199
|
+
"scale_cpu_limit": "0.5",
|
|
200
|
+
"scale_memory_limit": "1G",
|
|
201
|
+
"region": "us-south",
|
|
202
|
+
"endpoint": "https://starwars-splash.<subdomain>.us-south.codeengine.appdomain.cloud",
|
|
203
|
+
"status_details": {
|
|
204
|
+
"latest_created_revision": "starwars-splash-00001",
|
|
205
|
+
"latest_ready_revision": "starwars-splash-00001"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Step 5 — Map a custom domain (optional)
|
|
211
|
+
|
|
212
|
+
To serve the app at your own domain (e.g. `myapp.example.com`) you need a TLS certificate. The IBM Code Engine REST API always requires a real certificate — IBM's Console "Platform managed" option is not available via the API.
|
|
213
|
+
|
|
214
|
+
**5a — Get a Let's Encrypt certificate (certbot)**
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Install once
|
|
218
|
+
brew install certbot
|
|
219
|
+
|
|
220
|
+
# Request cert — certbot will print a DNS TXT challenge value
|
|
221
|
+
mkdir -p ~/certbot/{config,work,logs}
|
|
222
|
+
/opt/homebrew/bin/certbot certonly --manual --preferred-challenges dns \
|
|
223
|
+
-d <your-domain> --agree-tos --no-eff-email --email you@example.com \
|
|
224
|
+
--config-dir ~/certbot/config --work-dir ~/certbot/work --logs-dir ~/certbot/logs
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Certbot will pause and ask you to add a TXT record:
|
|
228
|
+
```
|
|
229
|
+
Add TXT record: _acme-challenge.<your-domain> = <challenge-value>
|
|
230
|
+
```
|
|
231
|
+
Verify propagation, then press Enter. Certbot writes:
|
|
232
|
+
- `~/certbot/config/live/<your-domain>/fullchain.pem`
|
|
233
|
+
- `~/certbot/config/live/<your-domain>/privkey.pem`
|
|
234
|
+
|
|
235
|
+
**5b — Create the TLS secret in Code Engine**
|
|
236
|
+
|
|
237
|
+
Ask your assistant:
|
|
238
|
+
```
|
|
239
|
+
Create a TLS secret called starwars-tls in project <project-id>
|
|
240
|
+
using cert ~/certbot/config/live/myapp.example.com/fullchain.pem
|
|
241
|
+
and key ~/certbot/config/live/myapp.example.com/privkey.pem
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
This calls `ce_create_tls_secret_from_pem` — reads the PEM files from disk and stores them as a Code Engine `tls` secret.
|
|
245
|
+
|
|
246
|
+
**MCP response — `ce_create_tls_secret_from_pem`:**
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"name": "my-tls",
|
|
250
|
+
"format": "tls",
|
|
251
|
+
"resource_type": "secret_tls_v2",
|
|
252
|
+
"created_at": "2026-05-08T22:30:00Z",
|
|
253
|
+
"project_id": "<your-project-id>"
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**5c — Create the domain mapping**
|
|
258
|
+
|
|
259
|
+
Ask your assistant:
|
|
260
|
+
```
|
|
261
|
+
Map domain myapp.example.com to app my-app
|
|
262
|
+
in project <project-id> using TLS secret my-tls
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
This calls `ce_create_domain_mapping` and returns the `cname_target`.
|
|
266
|
+
|
|
267
|
+
**MCP response — `ce_create_domain_mapping`:**
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"name": "myapp.example.com",
|
|
271
|
+
"status": "ready",
|
|
272
|
+
"cname_target": "custom.<subdomain>.us-south.codeengine.appdomain.cloud",
|
|
273
|
+
"component": {
|
|
274
|
+
"resource_type": "app_v2",
|
|
275
|
+
"name": "my-app"
|
|
276
|
+
},
|
|
277
|
+
"tls_secret": "my-tls",
|
|
278
|
+
"region": "us-south"
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**5d — Update your CNAME**
|
|
283
|
+
|
|
284
|
+
In your DNS provider, set:
|
|
285
|
+
```
|
|
286
|
+
myapp.example.com CNAME custom.<subdomain>.us-south.codeengine.appdomain.cloud
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
Use the `cname_target` value returned in 5c (it uses the `custom.` prefix, not the app name).
|
|
290
|
+
|
|
291
|
+
Once DNS propagates, `https://<your-domain>` serves the app with a valid TLS certificate.
|
|
292
|
+
|
|
293
|
+
> **Certificate renewal:** Let's Encrypt certs expire after 90 days. Re-run certbot to get updated PEM files, then ask Copilot to run `ce_renew_tls_secret_from_pem` — it patches the existing secret in-place so your domain mapping continues working without any changes.
|
|
294
|
+
|
|
295
|
+
### Full one-shot prompt
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
I have a Star Wars splash page in examples/starwars-splash.
|
|
299
|
+
Build it for linux/amd64 as us.icr.io/my-namespace/starwars-splash:v1.0.0,
|
|
300
|
+
push it, then deploy it to Code Engine project <project-id> with pull secret icr-pull-secret.
|
|
301
|
+
Tell me the public URL and confirm the instance is running.
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## �📖 Documentation
|
|
54
305
|
|
|
55
306
|
- [Code Engine API Reference](./docs/CODE_ENGINE_API_REFERENCE.md)
|
|
56
307
|
- [API Call Scenarios](./docs/API_CALL_SCENARIOS.md)
|
|
57
308
|
- [Setup Instructions](./docs/SETUP_INSTRUCTIONS.md)
|
|
58
309
|
- [Client README](./docs/CLIENT_README.md)
|
|
59
310
|
- [Cline MCP Config Example](./docs/CLINE_CONFIG_EXAMPLE.json)
|
|
311
|
+
- [VS Code MCP extension](./vscode-extension/README.md) (registers this server via settings; no `mcp.json` required for the default `npx` flow)
|
|
60
312
|
- [Code of Conduct](./docs/CODE_OF_CONDUCT.md)
|
|
61
313
|
- [Contributing Guide](./docs/CONTRIBUTING.md)
|
|
62
314
|
- [Maintainers](./docs/MAINTAINERS.md)
|
|
@@ -78,6 +330,7 @@ code-engine-mcp-server/
|
|
|
78
330
|
├── MAINTAINERS.md # Maintainer list
|
|
79
331
|
├── README.md # Project overview and usage
|
|
80
332
|
├── mcp.example.json # Example MCP client configuration
|
|
333
|
+
├── vscode-extension/ # Optional VS Code extension (MCP definition provider)
|
|
81
334
|
├── package.json # npm package metadata and scripts
|
|
82
335
|
├── server.json # MCP Registry metadata
|
|
83
336
|
└── tsconfig.json # TypeScript configuration
|
|
@@ -87,23 +340,61 @@ code-engine-mcp-server/
|
|
|
87
340
|
|
|
88
341
|
### Container Runtime Tools (Docker/Podman)
|
|
89
342
|
- ✅ Detect container runtime (Docker/Podman)
|
|
90
|
-
- ✅ Build container images
|
|
343
|
+
- ✅ Build container images (with platform targeting for amd64)
|
|
91
344
|
- ✅ Push images to registries
|
|
92
345
|
- ✅ List local images
|
|
93
346
|
- ✅ Test containers locally
|
|
94
347
|
- ✅ Get container logs
|
|
95
348
|
- ✅ Stop and remove containers
|
|
96
349
|
- ✅ List all containers
|
|
350
|
+
- ✅ Validate Dockerfile for Code Engine compatibility (`ce_validate_dockerfile`) — checks architecture, port, nginx sed patterns, USER, CMD
|
|
351
|
+
|
|
352
|
+
### IBM Container Registry (ICR)
|
|
353
|
+
- ✅ List ICR namespaces
|
|
354
|
+
- ✅ List images with optional namespace filter
|
|
355
|
+
- ✅ Delete images by tag
|
|
97
356
|
|
|
98
357
|
### IBM Code Engine Tools
|
|
99
|
-
- ✅ List
|
|
100
|
-
- ✅
|
|
101
|
-
- ✅
|
|
102
|
-
- ✅
|
|
358
|
+
- ✅ List, create, and delete projects
|
|
359
|
+
- ✅ Deploy applications with image pull secrets
|
|
360
|
+
- ✅ Update applications (image, scaling, env)
|
|
361
|
+
- ✅ List applications and get public URLs
|
|
362
|
+
- ✅ Get per-instance status (running, restarts, started-at)
|
|
363
|
+
- ✅ Get application logs per instance
|
|
364
|
+
- ✅ Build and job management
|
|
365
|
+
- ✅ Secrets and ConfigMaps
|
|
366
|
+
- ✅ Custom domain mappings (create, list, get, delete)
|
|
367
|
+
- ✅ TLS secrets from Let's Encrypt / certbot PEM files (`ce_create_tls_secret_from_pem`)
|
|
368
|
+
- ✅ TLS cert renewal in-place without disrupting domain mappings (`ce_renew_tls_secret_from_pem`)
|
|
369
|
+
- ✅ Update any secret in-place (`ce_update_secret`)
|
|
370
|
+
- ✅ Wait for app deployment or build run to complete (`ce_wait_for_app_ready`, `ce_wait_for_build_run`)
|
|
371
|
+
- ✅ IAM token info and diagnostics (`iam_get_token_info`)
|
|
372
|
+
- ✅ Create ICR namespaces via REST API (`icr_create_namespace`)
|
|
373
|
+
|
|
374
|
+
### Procedures
|
|
375
|
+
- ✅ `proc_build_push_deploy` — full container pipeline in one prompt (build → push → deploy → wait)
|
|
376
|
+
- ✅ `proc_setup_custom_domain` — TLS cert + domain mapping in one step, returns CNAME target
|
|
377
|
+
- ✅ `proc_build_run_and_deploy` — CE source build → wait → deploy app → wait → return URL
|
|
103
378
|
|
|
104
379
|
## ⚙️ Configuration
|
|
105
380
|
|
|
106
|
-
###
|
|
381
|
+
### VS Code — IBM Code Engine MCP extension (optional)
|
|
382
|
+
|
|
383
|
+
The extension in `vscode-extension/` registers this MCP server with VS Code using the **MCP server definition provider** API (VS Code **1.101+**). You do **not** need a workspace `.vscode/mcp.json` entry for the default flow: the server is started with `npx -y code-engine-mcp-server` and your API key from settings.
|
|
384
|
+
|
|
385
|
+
1. Install the extension (from a `.vsix` built with `npm run package` inside `vscode-extension/`, or from the Marketplace when published).
|
|
386
|
+
2. Ensure **Node.js** is installed and `npx` is on your `PATH`.
|
|
387
|
+
3. Open **Settings** and search for **IBM Code Engine MCP**, or edit `settings.json` directly:
|
|
388
|
+
- `codeEngineMcp.apiKey` — your IBM Cloud API key (**required**; until this is set, the extension contributes no MCP server).
|
|
389
|
+
- `codeEngineMcp.region` — IBM Cloud region (optional, default `us-south`). Passed as `IBMCLOUD_REGION` to the server.
|
|
390
|
+
|
|
391
|
+
The extension sets `IBMCLOUD_API_KEY` and `IBMCLOUD_REGION` for the spawned process. Use GitHub Copilot and MCP in VS Code as described in the [Copilot documentation](https://code.visualstudio.com/docs/copilot/copilot-chat).
|
|
392
|
+
|
|
393
|
+
More detail: [vscode-extension/README.md](./vscode-extension/README.md).
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
### 1) GitHub Copilot (VS Code) — `mcp.json` (workspace)
|
|
107
398
|
|
|
108
399
|
Copy `mcp.example.json` to `.vscode/mcp.json` in your workspace root:
|
|
109
400
|
|
|
@@ -123,7 +414,6 @@ Then edit `.vscode/mcp.json` and replace the placeholder with your IBM Cloud API
|
|
|
123
414
|
"${workspaceFolder}/code-engine-mcp-server/build/index.js"
|
|
124
415
|
],
|
|
125
416
|
"env": {
|
|
126
|
-
"IBM_CLOUD_API_KEY": "your-ibm-cloud-api-key-here",
|
|
127
417
|
"IBMCLOUD_API_KEY": "your-ibm-cloud-api-key-here"
|
|
128
418
|
}
|
|
129
419
|
}
|
|
@@ -178,6 +468,13 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
178
468
|
}
|
|
179
469
|
```
|
|
180
470
|
|
|
471
|
+
## npm and MCP Registry
|
|
472
|
+
|
|
473
|
+
Use the published package from npm or browse the MCP Registry listing:
|
|
474
|
+
|
|
475
|
+
- [npm package: code-engine-mcp-server](https://www.npmjs.com/package/code-engine-mcp-server)
|
|
476
|
+
- [MCP Registry entry: io.github.markusvankempen/code-engine-mcp-server](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.markusvankempen%2Fcode-engine-mcp-server)
|
|
477
|
+
|
|
181
478
|
## 💬 Example Prompts
|
|
182
479
|
|
|
183
480
|
### Detect Container Runtime
|
|
@@ -227,9 +524,22 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
227
524
|
5. Show me the application URL
|
|
228
525
|
```
|
|
229
526
|
|
|
527
|
+
### Custom Domain
|
|
528
|
+
|
|
529
|
+
Ask your assistant:
|
|
530
|
+
```
|
|
531
|
+
Create a TLS secret called my-tls in project <project-id>
|
|
532
|
+
using cert ~/certbot/config/live/example.com/fullchain.pem
|
|
533
|
+
and key ~/certbot/config/live/example.com/privkey.pem.
|
|
534
|
+
Then map domain example.com to app my-app using that secret.
|
|
535
|
+
Tell me what CNAME value to set in DNS.
|
|
536
|
+
```
|
|
537
|
+
|
|
230
538
|
## 🛠️ Available Tools
|
|
231
539
|
|
|
232
|
-
|
|
540
|
+
62 tools total: 9 container tools + 4 ICR tools + 45 Code Engine tools + 1 IAM tool + 3 procedures.
|
|
541
|
+
|
|
542
|
+
> **Procedures** bundle multiple tools into a single call. Use them for common end-to-end workflows.
|
|
233
543
|
|
|
234
544
|
### Container Tools (8)
|
|
235
545
|
|
|
@@ -243,6 +553,16 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
243
553
|
| `test_container_locally` | Run container for local testing | `image_name`, `port_mapping`, `env_vars` |
|
|
244
554
|
| `get_container_logs` | Get logs from a running container | `container_id`, `runtime` |
|
|
245
555
|
| `stop_local_container` | Stop and remove a container | `container_id`, `runtime` |
|
|
556
|
+
| `ce_validate_dockerfile` | Validate a Dockerfile for Code Engine compatibility (architecture, port, nginx sed patterns, USER, CMD) | `dockerfile_path`, `context_path`, `expected_port` |
|
|
557
|
+
|
|
558
|
+
### IBM Container Registry Tools (4)
|
|
559
|
+
|
|
560
|
+
| Tool | Description | Key Parameters |
|
|
561
|
+
|------|-------------|----------------|
|
|
562
|
+
| `icr_list_namespaces` | List ICR namespaces in your account | `region` |
|
|
563
|
+
| `icr_list_images` | List images in ICR (optionally filtered by namespace) | `namespace`, `region` |
|
|
564
|
+
| `icr_delete_image` | Delete an image by full tag | `image`, `region` |
|
|
565
|
+
| `icr_create_namespace` | Create a new ICR namespace | `namespace`, `region` |
|
|
246
566
|
|
|
247
567
|
### Code Engine: Projects (4)
|
|
248
568
|
|
|
@@ -253,19 +573,21 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
253
573
|
| `ce_create_project` | Create a new project | `name`, `resource_group_id` |
|
|
254
574
|
| `ce_delete_project` | Delete a project | `project_id` |
|
|
255
575
|
|
|
256
|
-
### Code Engine: Applications (
|
|
576
|
+
### Code Engine: Applications (9)
|
|
257
577
|
|
|
258
578
|
| Tool | Description | Key Parameters |
|
|
259
579
|
|------|-------------|----------------|
|
|
260
580
|
| `ce_list_applications` | List applications in a project | `project_id` |
|
|
261
|
-
| `ce_get_application` | Get application details | `project_id`, `app_name` |
|
|
262
|
-
| `ce_create_application` | Deploy a new application | `project_id`, `name`, `image`, `port`, `env_vars` |
|
|
263
|
-
| `ce_update_application` | Update image, scaling, env | `project_id`, `app_name`, `image`, `scale_*` |
|
|
581
|
+
| `ce_get_application` | Get application details and public URL | `project_id`, `app_name` |
|
|
582
|
+
| `ce_create_application` | Deploy a new application | `project_id`, `name`, `image`, `image_secret`, `port`, `env_vars` |
|
|
583
|
+
| `ce_update_application` | Update image, scaling, env, pull secret | `project_id`, `app_name`, `image`, `image_secret`, `scale_*` |
|
|
264
584
|
| `ce_delete_application` | Delete an application | `project_id`, `app_name` |
|
|
265
|
-
| `ce_list_app_instances` | List running instances
|
|
585
|
+
| `ce_list_app_instances` | List all running instances with status | `project_id`, `app_name` |
|
|
586
|
+
| `ce_get_app_instance` | Get status details for a specific instance | `project_id`, `app_name`, `instance_name` |
|
|
266
587
|
| `ce_get_app_logs` | Get logs for an app instance | `project_id`, `app_name`, `instance_name` |
|
|
588
|
+
| `ce_wait_for_app_ready` | Poll until app status is ready or timeout; returns `poll_history` | `project_id`, `app_name`, `timeout_seconds` |
|
|
267
589
|
|
|
268
|
-
### Code Engine: Builds (
|
|
590
|
+
### Code Engine: Builds (9)
|
|
269
591
|
|
|
270
592
|
| Tool | Description | Key Parameters |
|
|
271
593
|
|------|-------------|----------------|
|
|
@@ -277,6 +599,7 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
277
599
|
| `ce_get_build_run` | Get build run status | `project_id`, `build_run_name` |
|
|
278
600
|
| `ce_create_build_run` | Start a build run | `project_id`, `build_name` |
|
|
279
601
|
| `ce_delete_build_run` | Delete a build run | `project_id`, `build_run_name` |
|
|
602
|
+
| `ce_wait_for_build_run` | Poll until build run succeeds or fails; returns `poll_history` | `project_id`, `build_run_name`, `timeout_seconds` |
|
|
280
603
|
|
|
281
604
|
### Code Engine: Jobs (8)
|
|
282
605
|
|
|
@@ -291,14 +614,17 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
291
614
|
| `ce_create_job_run` | Submit a job run | `project_id`, `job_name` |
|
|
292
615
|
| `ce_delete_job_run` | Delete a job run | `project_id`, `job_run_name` |
|
|
293
616
|
|
|
294
|
-
### Code Engine: Secrets (
|
|
617
|
+
### Code Engine: Secrets (7)
|
|
295
618
|
|
|
296
619
|
| Tool | Description | Key Parameters |
|
|
297
620
|
|------|-------------|----------------|
|
|
298
621
|
| `ce_list_secrets` | List secrets (names + keys only) | `project_id` |
|
|
299
622
|
| `ce_get_secret` | Get secret metadata (no values) | `project_id`, `secret_name` |
|
|
300
623
|
| `ce_create_secret` | Create a secret | `project_id`, `name`, `format`, `data` |
|
|
624
|
+
| `ce_update_secret` | Update an existing secret in-place (PATCH) | `project_id`, `secret_name`, `data` |
|
|
301
625
|
| `ce_delete_secret` | Delete a secret | `project_id`, `secret_name` |
|
|
626
|
+
| `ce_create_tls_secret_from_pem` | Create a TLS secret from PEM files | `project_id`, `secret_name`, `cert_pem_path`, `key_pem_path` |
|
|
627
|
+
| `ce_renew_tls_secret_from_pem` | Renew an existing TLS secret from updated PEM files | `project_id`, `secret_name`, `cert_pem_path`, `key_pem_path` |
|
|
302
628
|
|
|
303
629
|
### Code Engine: ConfigMaps (4)
|
|
304
630
|
|
|
@@ -309,6 +635,29 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
309
635
|
| `ce_create_config_map` | Create a configmap | `project_id`, `name`, `data` |
|
|
310
636
|
| `ce_delete_config_map` | Delete a configmap | `project_id`, `config_map_name` |
|
|
311
637
|
|
|
638
|
+
### Code Engine: Domain Mappings (4)
|
|
639
|
+
|
|
640
|
+
| Tool | Description | Key Parameters |
|
|
641
|
+
|------|-------------|----------------|
|
|
642
|
+
| `ce_list_domain_mappings` | List all custom domain mappings | `project_id` |
|
|
643
|
+
| `ce_get_domain_mapping` | Get status and CNAME target for a mapping | `project_id`, `domain_name` |
|
|
644
|
+
| `ce_create_domain_mapping` | Map a custom domain to an app | `project_id`, `domain_name`, `app_name`, `tls_secret` |
|
|
645
|
+
| `ce_delete_domain_mapping` | Delete a custom domain mapping | `project_id`, `domain_name` |
|
|
646
|
+
|
|
647
|
+
### IBM Cloud IAM (1)
|
|
648
|
+
|
|
649
|
+
| Tool | Description | Key Parameters |
|
|
650
|
+
|------|-------------|----------------|
|
|
651
|
+
| `iam_get_token_info` | Inspect the current IAM token — account, expiry, validity | — |
|
|
652
|
+
|
|
653
|
+
### Procedures — Multi-Step Workflows (3)
|
|
654
|
+
|
|
655
|
+
| Tool | What it does | Key Parameters |
|
|
656
|
+
|------|-------------|----------------|
|
|
657
|
+
| `proc_build_push_deploy` | Build container for linux/amd64 → push → create/update CE app → wait for ready → return URL + `poll_history` | `context_path`, `project_id_or_name`, `app_name`, `image_secret`, `icr_namespace`, `image_tag` (default `latest`), `icr_host` (default `us.icr.io`), `port`, `timeout_seconds` |
|
|
658
|
+
| `proc_setup_custom_domain` | Read PEM files → create TLS secret → create domain mapping → return CNAME target | `project_id_or_name`, `app_name`, `domain_name`, `tls_secret_name`, `cert_pem_path`, `key_pem_path` |
|
|
659
|
+
| `proc_build_run_and_deploy` | Start CE build run → wait for success → create/update app → wait for ready → return URL + `build_poll_history` + `app_poll_history` | `project_id_or_name`, `build_name`, `app_name`, `image_secret`, `port`, `build_timeout_seconds`, `deploy_timeout_seconds` |
|
|
660
|
+
|
|
312
661
|
## 🔐 Environment Variables
|
|
313
662
|
|
|
314
663
|
- `IBMCLOUD_API_KEY`: IBM Cloud API key (required for Code Engine operations)
|
|
@@ -319,9 +668,10 @@ I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
|
319
668
|
## 📋 Prerequisites
|
|
320
669
|
|
|
321
670
|
- Node.js v18 or higher
|
|
322
|
-
- Docker or Podman installed
|
|
323
|
-
- IBM Cloud
|
|
324
|
-
|
|
671
|
+
- Docker or Podman installed (for container build/push tools)
|
|
672
|
+
- IBM Cloud API key (for all Code Engine and ICR operations)
|
|
673
|
+
|
|
674
|
+
> The MCP server communicates directly with the IBM Cloud REST API and ICR API. No IBM Cloud CLI or Code Engine plugin is required.
|
|
325
675
|
|
|
326
676
|
## 👩💻 Development
|
|
327
677
|
|
|
@@ -353,10 +703,10 @@ node build/index.js
|
|
|
353
703
|
|
|
354
704
|
### Code Engine Commands Failing
|
|
355
705
|
|
|
356
|
-
1. Verify
|
|
357
|
-
2.
|
|
358
|
-
3. Verify
|
|
359
|
-
4.
|
|
706
|
+
1. Verify your API key is set: check `IBMCLOUD_API_KEY` in your MCP client config
|
|
707
|
+
2. Confirm the region is correct (default `us-south`); set `IBMCLOUD_REGION` if needed
|
|
708
|
+
3. Verify the project ID is valid: use `ce_list_projects` to find it
|
|
709
|
+
4. Check for expired tokens — the server re-fetches IAM tokens automatically; if errors persist, regenerate your API key at [IBM Cloud IAM → API keys](https://cloud.ibm.com/iam/apikeys)
|
|
360
710
|
|
|
361
711
|
## 🛡️ Security
|
|
362
712
|
|
|
@@ -371,7 +721,7 @@ MIT (see `LICENSE`)
|
|
|
371
721
|
|
|
372
722
|
## 🤝 Contributing
|
|
373
723
|
|
|
374
|
-
Contributions are welcome! Please open an issue or submit a pull request.
|
|
724
|
+
Contributions are welcome! Please open an issue or submit a pull request (see [Contributing Guide](./docs/CONTRIBUTING.md)).
|
|
375
725
|
|
|
376
726
|
## 👤 Author
|
|
377
727
|
|
|
@@ -269,10 +269,10 @@ import { writeFileSync } from 'fs';
|
|
|
269
269
|
const __filename = fileURLToPath(import.meta.url);
|
|
270
270
|
const isMainModule = process.argv[1] === __filename;
|
|
271
271
|
if (isMainModule) {
|
|
272
|
-
const apiKey = process.env.
|
|
272
|
+
const apiKey = process.env.IBMCLOUD_API_KEY;
|
|
273
273
|
const region = process.env.IBM_CLOUD_REGION || 'us-south';
|
|
274
274
|
if (!apiKey) {
|
|
275
|
-
console.error('❌ Error:
|
|
275
|
+
console.error('❌ Error: IBMCLOUD_API_KEY environment variable not set');
|
|
276
276
|
process.exit(1);
|
|
277
277
|
}
|
|
278
278
|
discoverContext(apiKey, region)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-discovery.js","sourceRoot":"","sources":["../src/context-discovery.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkC/B;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAc;IAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,QAAQ,GAAG,4DAA4D,MAAM,EAAE,CAAC;QAEtF,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,mBAAmB;YA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AE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC;AAEpD,IAAI,YAAY,EAAE,CAAC;IACjB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,UAAU,CAAC;IAE1D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;SAC5B,IAAI,CAAC,OAAO,CAAC,EAAE;QACd,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QAEpC,eAAe;QACf,aAAa,CACX,yBAAyB,EACzB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CACjC,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;IAC7D,CAAC,CAAC;SACD,KAAK,CAAC,KAAK,CAAC,EAAE;QACb,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,cAAc"}
|
|
@@ -166,7 +166,7 @@ async function deployApplication(token, region, projectId, appName, imageName, p
|
|
|
166
166
|
*/
|
|
167
167
|
export async function deployWithContext(spec) {
|
|
168
168
|
const steps = [];
|
|
169
|
-
const apiKey = process.env.IBMCLOUD_API_KEY
|
|
169
|
+
const apiKey = process.env.IBMCLOUD_API_KEY;
|
|
170
170
|
const region = spec.region || 'us-south';
|
|
171
171
|
if (!apiKey) {
|
|
172
172
|
return {
|
|
@@ -174,7 +174,7 @@ export async function deployWithContext(spec) {
|
|
|
174
174
|
appName: spec.appName,
|
|
175
175
|
projectName: '',
|
|
176
176
|
projectId: '',
|
|
177
|
-
error: '
|
|
177
|
+
error: 'IBMCLOUD_API_KEY environment variable not set',
|
|
178
178
|
steps
|
|
179
179
|
};
|
|
180
180
|
}
|