code-engine-mcp-server 1.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.
- package/LICENSE +21 -0
- package/README.md +387 -0
- package/build/client.d.ts +3 -0
- package/build/client.d.ts.map +1 -0
- package/build/client.js +194 -0
- package/build/client.js.map +1 -0
- package/build/context-discovery.d.ts +86 -0
- package/build/context-discovery.d.ts.map +1 -0
- package/build/context-discovery.js +291 -0
- package/build/context-discovery.js.map +1 -0
- package/build/deploy-tool-enhanced.d.ts +42 -0
- package/build/deploy-tool-enhanced.d.ts.map +1 -0
- package/build/deploy-tool-enhanced.js +323 -0
- package/build/deploy-tool-enhanced.js.map +1 -0
- package/build/deploy-tool.d.ts +27 -0
- package/build/deploy-tool.d.ts.map +1 -0
- package/build/deploy-tool.js +213 -0
- package/build/deploy-tool.js.map +1 -0
- package/build/index.d.ts +11 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +1117 -0
- package/build/index.js.map +1 -0
- package/build/simple-client.d.ts +3 -0
- package/build/simple-client.d.ts.map +1 -0
- package/build/simple-client.js +275 -0
- package/build/simple-client.js.map +1 -0
- package/build/test-all-tools.d.ts +3 -0
- package/build/test-all-tools.d.ts.map +1 -0
- package/build/test-all-tools.js +254 -0
- package/build/test-all-tools.js.map +1 -0
- package/build/test-integration.d.ts +3 -0
- package/build/test-integration.d.ts.map +1 -0
- package/build/test-integration.js +484 -0
- package/build/test-integration.js.map +1 -0
- package/docs/API_CALL_SCENARIOS.md +594 -0
- package/docs/CLIENT_README.md +310 -0
- package/docs/CLINE_CONFIG_EXAMPLE.json +14 -0
- package/docs/CODE_ENGINE_API_REFERENCE.md +764 -0
- package/docs/CODE_OF_CONDUCT.md +46 -0
- package/docs/CONTRIBUTING.md +38 -0
- package/docs/MAINTAINERS.md +15 -0
- package/docs/SETUP_INSTRUCTIONS.md +218 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Code Engine MCP Server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for IBM Code Engine and Docker/Podman integration.
|
|
4
|
+
It enables AI assistants to build, run, push, and deploy containerized workloads with a single MCP server.
|
|
5
|
+
|
|
6
|
+
[](#)
|
|
7
|
+
[](#)
|
|
8
|
+
[](#prerequisites)
|
|
9
|
+
[](./LICENSE)
|
|
10
|
+
|
|
11
|
+
## 📚 Table of Contents
|
|
12
|
+
|
|
13
|
+
- [What You Get](#what-you-get)
|
|
14
|
+
- [Quick Start](#quick-start)
|
|
15
|
+
- [Documentation](#documentation)
|
|
16
|
+
- [Project Structure](#project-structure)
|
|
17
|
+
- [Features](#features)
|
|
18
|
+
- [Configuration](#configuration)
|
|
19
|
+
- [Example Prompts](#example-prompts)
|
|
20
|
+
- [Available Tools](#available-tools)
|
|
21
|
+
- [Environment Variables](#environment-variables)
|
|
22
|
+
- [Prerequisites](#prerequisites)
|
|
23
|
+
- [Development](#development)
|
|
24
|
+
- [Troubleshooting](#troubleshooting)
|
|
25
|
+
- [Security](#security)
|
|
26
|
+
- [License](#license)
|
|
27
|
+
- [Contributing](#contributing)
|
|
28
|
+
- [Author](#author)
|
|
29
|
+
- [Support](#support)
|
|
30
|
+
|
|
31
|
+
## ✨ What You Get
|
|
32
|
+
|
|
33
|
+
- Container workflow tools for Docker or Podman
|
|
34
|
+
- IBM Code Engine project and application management tools
|
|
35
|
+
- MCP-ready setup for GitHub Copilot, Cline, and Claude Desktop
|
|
36
|
+
- A simple local development and troubleshooting workflow
|
|
37
|
+
|
|
38
|
+
## 🚀 Quick Start
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 1) Install dependencies
|
|
42
|
+
npm install
|
|
43
|
+
|
|
44
|
+
# 2) Build the server
|
|
45
|
+
npm run build
|
|
46
|
+
|
|
47
|
+
# 3) Run once to verify
|
|
48
|
+
node build/index.js
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Then configure your MCP client using one of the examples in the Configuration section below.
|
|
52
|
+
|
|
53
|
+
## 📖 Documentation
|
|
54
|
+
|
|
55
|
+
- [Code Engine API Reference](./docs/CODE_ENGINE_API_REFERENCE.md)
|
|
56
|
+
- [API Call Scenarios](./docs/API_CALL_SCENARIOS.md)
|
|
57
|
+
- [Setup Instructions](./docs/SETUP_INSTRUCTIONS.md)
|
|
58
|
+
- [Client README](./docs/CLIENT_README.md)
|
|
59
|
+
- [Cline MCP Config Example](./docs/CLINE_CONFIG_EXAMPLE.json)
|
|
60
|
+
- [Code of Conduct](./docs/CODE_OF_CONDUCT.md)
|
|
61
|
+
- [Contributing Guide](./docs/CONTRIBUTING.md)
|
|
62
|
+
- [Maintainers](./docs/MAINTAINERS.md)
|
|
63
|
+
|
|
64
|
+
## 🗂️ Project Structure
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
code-engine-mcp-server/
|
|
68
|
+
├── api/
|
|
69
|
+
│ └── code-engine-openapi.yaml # OpenAPI reference used for API coverage
|
|
70
|
+
├── build/ # Compiled JavaScript output
|
|
71
|
+
├── docs/ # API references and setup guides
|
|
72
|
+
├── internal/ # Internal release/publishing notes
|
|
73
|
+
├── src/ # Main TypeScript source code
|
|
74
|
+
├── CHANGELOG.md # Release history
|
|
75
|
+
├── CODE_OF_CONDUCT.md # Community guidelines
|
|
76
|
+
├── CONTRIBUTING.md # Contribution workflow
|
|
77
|
+
├── LICENSE # Project license
|
|
78
|
+
├── MAINTAINERS.md # Maintainer list
|
|
79
|
+
├── README.md # Project overview and usage
|
|
80
|
+
├── mcp.example.json # Example MCP client configuration
|
|
81
|
+
├── package.json # npm package metadata and scripts
|
|
82
|
+
├── server.json # MCP Registry metadata
|
|
83
|
+
└── tsconfig.json # TypeScript configuration
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## 🧩 Features
|
|
87
|
+
|
|
88
|
+
### Container Runtime Tools (Docker/Podman)
|
|
89
|
+
- ✅ Detect container runtime (Docker/Podman)
|
|
90
|
+
- ✅ Build container images
|
|
91
|
+
- ✅ Push images to registries
|
|
92
|
+
- ✅ List local images
|
|
93
|
+
- ✅ Test containers locally
|
|
94
|
+
- ✅ Get container logs
|
|
95
|
+
- ✅ Stop and remove containers
|
|
96
|
+
- ✅ List all containers
|
|
97
|
+
|
|
98
|
+
### IBM Code Engine Tools
|
|
99
|
+
- ✅ List Code Engine projects
|
|
100
|
+
- ✅ Create applications
|
|
101
|
+
- ✅ List applications in a project
|
|
102
|
+
- ✅ Get application details
|
|
103
|
+
|
|
104
|
+
## ⚙️ Configuration
|
|
105
|
+
|
|
106
|
+
### 1) GitHub Copilot (VS Code) - Recommended
|
|
107
|
+
|
|
108
|
+
Copy `mcp.example.json` to `.vscode/mcp.json` in your workspace root:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
cp mcp.example.json ../.vscode/mcp.json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Then edit `.vscode/mcp.json` and replace the placeholder with your IBM Cloud API key:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"servers": {
|
|
119
|
+
"code-engine": {
|
|
120
|
+
"type": "stdio",
|
|
121
|
+
"command": "node",
|
|
122
|
+
"args": [
|
|
123
|
+
"${workspaceFolder}/code-engine-mcp-server/build/index.js"
|
|
124
|
+
],
|
|
125
|
+
"env": {
|
|
126
|
+
"IBM_CLOUD_API_KEY": "your-ibm-cloud-api-key-here",
|
|
127
|
+
"IBMCLOUD_API_KEY": "your-ibm-cloud-api-key-here"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Restart the server: **Cmd+Shift+P** -> **"MCP: Restart Server"** -> `code-engine`.
|
|
135
|
+
|
|
136
|
+
> **Security:** Add `.vscode/mcp.json` to your `.gitignore` to avoid committing your API key.
|
|
137
|
+
|
|
138
|
+
Get your API key at [IBM Cloud IAM → API keys](https://cloud.ibm.com/iam/apikeys).
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
### 2) Cline (VS Code Extension)
|
|
143
|
+
|
|
144
|
+
1. Open VSCode Settings (Cmd/Ctrl + ,)
|
|
145
|
+
2. Search for "Cline: MCP Settings"
|
|
146
|
+
3. Click "Edit in settings.json"
|
|
147
|
+
4. Add the configuration:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"cline.mcpServers": {
|
|
152
|
+
"code-engine": {
|
|
153
|
+
"command": "node",
|
|
154
|
+
"args": ["/absolute/path/to/code-engine-mcp-server/build/index.js"],
|
|
155
|
+
"env": {
|
|
156
|
+
"IBMCLOUD_API_KEY": "your-api-key-here"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 3) Claude Desktop
|
|
164
|
+
|
|
165
|
+
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcpServers": {
|
|
170
|
+
"code-engine": {
|
|
171
|
+
"command": "node",
|
|
172
|
+
"args": ["/absolute/path/to/code-engine-mcp-server/build/index.js"],
|
|
173
|
+
"env": {
|
|
174
|
+
"IBMCLOUD_API_KEY": "your-api-key-here"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## 💬 Example Prompts
|
|
182
|
+
|
|
183
|
+
### Detect Container Runtime
|
|
184
|
+
|
|
185
|
+
Ask your assistant:
|
|
186
|
+
```
|
|
187
|
+
Can you detect which container runtime I have installed?
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Build a Container Image
|
|
191
|
+
|
|
192
|
+
Ask your assistant:
|
|
193
|
+
```
|
|
194
|
+
Build a container image from ./Dockerfile with the name myapp:latest
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Test Container Locally
|
|
198
|
+
|
|
199
|
+
Ask your assistant:
|
|
200
|
+
```
|
|
201
|
+
Test the myapp:latest image locally on port 8080
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Push to Registry
|
|
205
|
+
|
|
206
|
+
Ask your assistant:
|
|
207
|
+
```
|
|
208
|
+
Push myapp:latest to icr.io/my-namespace/myapp:latest
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### List Code Engine Projects
|
|
212
|
+
|
|
213
|
+
Ask your assistant:
|
|
214
|
+
```
|
|
215
|
+
List all my Code Engine projects
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Complete Workflow
|
|
219
|
+
|
|
220
|
+
Ask your assistant:
|
|
221
|
+
```
|
|
222
|
+
I have a Node.js app in ./my-app with a Dockerfile. Can you:
|
|
223
|
+
1. Build it as myapp:v1.0.0
|
|
224
|
+
2. Test it locally on port 3000
|
|
225
|
+
3. Push it to icr.io/my-namespace/myapp:v1.0.0
|
|
226
|
+
4. Deploy it to my Code Engine project "production"
|
|
227
|
+
5. Show me the application URL
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## 🛠️ Available Tools
|
|
231
|
+
|
|
232
|
+
43 tools total: 8 container tools + 35 Code Engine tools.
|
|
233
|
+
|
|
234
|
+
### Container Tools (8)
|
|
235
|
+
|
|
236
|
+
| Tool | Description | Key Parameters |
|
|
237
|
+
|------|-------------|----------------|
|
|
238
|
+
| `detect_container_runtime` | Detect Docker or Podman | — |
|
|
239
|
+
| `list_local_images` | List local container images | `runtime` |
|
|
240
|
+
| `list_local_containers` | List local containers | `runtime`, `all` |
|
|
241
|
+
| `build_container_image` | Build a container image | `dockerfile_path`, `image_name`, `context_path` |
|
|
242
|
+
| `push_container_image` | Push image to registry | `image_name`, `runtime` |
|
|
243
|
+
| `test_container_locally` | Run container for local testing | `image_name`, `port_mapping`, `env_vars` |
|
|
244
|
+
| `get_container_logs` | Get logs from a running container | `container_id`, `runtime` |
|
|
245
|
+
| `stop_local_container` | Stop and remove a container | `container_id`, `runtime` |
|
|
246
|
+
|
|
247
|
+
### Code Engine: Projects (4)
|
|
248
|
+
|
|
249
|
+
| Tool | Description | Key Parameters |
|
|
250
|
+
|------|-------------|----------------|
|
|
251
|
+
| `ce_list_projects` | List all projects in a region | — |
|
|
252
|
+
| `ce_get_project` | Get project details | `project_id` |
|
|
253
|
+
| `ce_create_project` | Create a new project | `name`, `resource_group_id` |
|
|
254
|
+
| `ce_delete_project` | Delete a project | `project_id` |
|
|
255
|
+
|
|
256
|
+
### Code Engine: Applications (7)
|
|
257
|
+
|
|
258
|
+
| Tool | Description | Key Parameters |
|
|
259
|
+
|------|-------------|----------------|
|
|
260
|
+
| `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_*` |
|
|
264
|
+
| `ce_delete_application` | Delete an application | `project_id`, `app_name` |
|
|
265
|
+
| `ce_list_app_instances` | List running instances (pods) | `project_id`, `app_name` |
|
|
266
|
+
| `ce_get_app_logs` | Get logs for an app instance | `project_id`, `app_name`, `instance_name` |
|
|
267
|
+
|
|
268
|
+
### Code Engine: Builds (7)
|
|
269
|
+
|
|
270
|
+
| Tool | Description | Key Parameters |
|
|
271
|
+
|------|-------------|----------------|
|
|
272
|
+
| `ce_list_builds` | List build configurations | `project_id` |
|
|
273
|
+
| `ce_get_build` | Get build configuration details | `project_id`, `build_name` |
|
|
274
|
+
| `ce_create_build` | Create a build configuration | `project_id`, `name`, `output_image`, `output_secret` |
|
|
275
|
+
| `ce_delete_build` | Delete a build configuration | `project_id`, `build_name` |
|
|
276
|
+
| `ce_list_build_runs` | List build runs | `project_id` |
|
|
277
|
+
| `ce_get_build_run` | Get build run status | `project_id`, `build_run_name` |
|
|
278
|
+
| `ce_create_build_run` | Start a build run | `project_id`, `build_name` |
|
|
279
|
+
| `ce_delete_build_run` | Delete a build run | `project_id`, `build_run_name` |
|
|
280
|
+
|
|
281
|
+
### Code Engine: Jobs (8)
|
|
282
|
+
|
|
283
|
+
| Tool | Description | Key Parameters |
|
|
284
|
+
|------|-------------|----------------|
|
|
285
|
+
| `ce_list_jobs` | List job definitions | `project_id` |
|
|
286
|
+
| `ce_get_job` | Get job definition details | `project_id`, `job_name` |
|
|
287
|
+
| `ce_create_job` | Create a job definition | `project_id`, `name`, `image` |
|
|
288
|
+
| `ce_delete_job` | Delete a job definition | `project_id`, `job_name` |
|
|
289
|
+
| `ce_list_job_runs` | List job runs | `project_id`, `job_name` (optional) |
|
|
290
|
+
| `ce_get_job_run` | Get job run status | `project_id`, `job_run_name` |
|
|
291
|
+
| `ce_create_job_run` | Submit a job run | `project_id`, `job_name` |
|
|
292
|
+
| `ce_delete_job_run` | Delete a job run | `project_id`, `job_run_name` |
|
|
293
|
+
|
|
294
|
+
### Code Engine: Secrets (4)
|
|
295
|
+
|
|
296
|
+
| Tool | Description | Key Parameters |
|
|
297
|
+
|------|-------------|----------------|
|
|
298
|
+
| `ce_list_secrets` | List secrets (names + keys only) | `project_id` |
|
|
299
|
+
| `ce_get_secret` | Get secret metadata (no values) | `project_id`, `secret_name` |
|
|
300
|
+
| `ce_create_secret` | Create a secret | `project_id`, `name`, `format`, `data` |
|
|
301
|
+
| `ce_delete_secret` | Delete a secret | `project_id`, `secret_name` |
|
|
302
|
+
|
|
303
|
+
### Code Engine: ConfigMaps (4)
|
|
304
|
+
|
|
305
|
+
| Tool | Description | Key Parameters |
|
|
306
|
+
|------|-------------|----------------|
|
|
307
|
+
| `ce_list_config_maps` | List configmaps | `project_id` |
|
|
308
|
+
| `ce_get_config_map` | Get configmap details | `project_id`, `config_map_name` |
|
|
309
|
+
| `ce_create_config_map` | Create a configmap | `project_id`, `name`, `data` |
|
|
310
|
+
| `ce_delete_config_map` | Delete a configmap | `project_id`, `config_map_name` |
|
|
311
|
+
|
|
312
|
+
## 🔐 Environment Variables
|
|
313
|
+
|
|
314
|
+
- `IBMCLOUD_API_KEY`: IBM Cloud API key (required for Code Engine operations)
|
|
315
|
+
- `IBMCLOUD_REGION`: Default IBM Cloud region (optional, defaults to us-south)
|
|
316
|
+
- `CONTAINER_RUNTIME`: Force specific runtime (docker or podman)
|
|
317
|
+
- `DEBUG`: Enable debug logging
|
|
318
|
+
|
|
319
|
+
## 📋 Prerequisites
|
|
320
|
+
|
|
321
|
+
- Node.js v18 or higher
|
|
322
|
+
- Docker or Podman installed
|
|
323
|
+
- IBM Cloud CLI with Code Engine plugin (for Code Engine operations)
|
|
324
|
+
- IBM Cloud API key (for Code Engine operations)
|
|
325
|
+
|
|
326
|
+
## 👩💻 Development
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# Run in development mode
|
|
330
|
+
npm run dev
|
|
331
|
+
|
|
332
|
+
# Build
|
|
333
|
+
npm run build
|
|
334
|
+
|
|
335
|
+
# Test manually
|
|
336
|
+
node build/index.js
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## 🧪 Troubleshooting
|
|
340
|
+
|
|
341
|
+
### Server Not Connecting
|
|
342
|
+
|
|
343
|
+
1. Verify the path in configuration is absolute
|
|
344
|
+
2. Check Node.js is in PATH: `node --version`
|
|
345
|
+
3. Verify build output exists: `ls build/index.js`
|
|
346
|
+
4. Test manually: `node build/index.js`
|
|
347
|
+
|
|
348
|
+
### Docker/Podman Commands Failing
|
|
349
|
+
|
|
350
|
+
1. Verify installation: `docker --version` or `podman --version`
|
|
351
|
+
2. Check Docker daemon is running
|
|
352
|
+
3. Verify permissions (add user to docker group if needed)
|
|
353
|
+
|
|
354
|
+
### Code Engine Commands Failing
|
|
355
|
+
|
|
356
|
+
1. Verify IBM Cloud CLI: `ibmcloud --version`
|
|
357
|
+
2. Check Code Engine plugin: `ibmcloud plugin list`
|
|
358
|
+
3. Verify API key is set in environment
|
|
359
|
+
4. Test manually: `ibmcloud ce project list`
|
|
360
|
+
|
|
361
|
+
## 🛡️ Security
|
|
362
|
+
|
|
363
|
+
- Never commit API keys to version control
|
|
364
|
+
- Use environment variables for sensitive data
|
|
365
|
+
- Consider using IBM Cloud IAM for authentication
|
|
366
|
+
- Restrict MCP server permissions as needed
|
|
367
|
+
|
|
368
|
+
## 📄 License
|
|
369
|
+
|
|
370
|
+
MIT (see `LICENSE`)
|
|
371
|
+
|
|
372
|
+
## 🤝 Contributing
|
|
373
|
+
|
|
374
|
+
Contributions are welcome! Please open an issue or submit a pull request.
|
|
375
|
+
|
|
376
|
+
## 👤 Author
|
|
377
|
+
|
|
378
|
+
Markus van Kempen
|
|
379
|
+
Email: `markus.van.kempen@gmail.com` | `mvankempen@ca.ibm.com`
|
|
380
|
+
Website: [markusvankempen.github.io](https://markusvankempen.github.io/)
|
|
381
|
+
Research | Floor 7 1/2
|
|
382
|
+
|
|
383
|
+
## 🙋 Support
|
|
384
|
+
|
|
385
|
+
For issues and questions:
|
|
386
|
+
- Check [Setup Instructions](./docs/SETUP_INSTRUCTIONS.md) and [Code Engine API Reference](./docs/CODE_ENGINE_API_REFERENCE.md)
|
|
387
|
+
- Open an issue in this repository with reproduction steps and logs
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":""}
|
package/build/client.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
4
|
+
import { spawn } from 'child_process';
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
import * as dotenv from 'dotenv';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
import { dirname, join } from 'path';
|
|
9
|
+
// Load environment variables
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
dotenv.config({ path: join(__dirname, '../../.env') });
|
|
13
|
+
// Create MCP client
|
|
14
|
+
const client = new Client({
|
|
15
|
+
name: 'code-engine-cli-client',
|
|
16
|
+
version: '1.0.0',
|
|
17
|
+
}, {
|
|
18
|
+
capabilities: {},
|
|
19
|
+
});
|
|
20
|
+
// Start the MCP server as a subprocess
|
|
21
|
+
const serverPath = join(__dirname, 'index.js');
|
|
22
|
+
const serverProcess = spawn('node', [serverPath], {
|
|
23
|
+
stdio: ['pipe', 'pipe', 'inherit'],
|
|
24
|
+
env: {
|
|
25
|
+
...process.env,
|
|
26
|
+
IBMCLOUD_API_KEY: process.env['IBM+Cloud_API_Key'] || process.env.IBMCLOUD_API_KEY,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
// Connect client to server
|
|
30
|
+
const transport = new StdioClientTransport({
|
|
31
|
+
reader: serverProcess.stdout,
|
|
32
|
+
writer: serverProcess.stdin,
|
|
33
|
+
});
|
|
34
|
+
async function main() {
|
|
35
|
+
try {
|
|
36
|
+
await client.connect(transport);
|
|
37
|
+
console.log('✅ Connected to Code Engine MCP Server');
|
|
38
|
+
console.log('');
|
|
39
|
+
// List available tools
|
|
40
|
+
const tools = await client.listTools();
|
|
41
|
+
console.log('📦 Available Tools:');
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log('Docker/Podman Tools:');
|
|
44
|
+
tools.tools
|
|
45
|
+
.filter(t => !t.name.startsWith('ce_'))
|
|
46
|
+
.forEach(tool => {
|
|
47
|
+
console.log(` • ${tool.name}: ${tool.description}`);
|
|
48
|
+
});
|
|
49
|
+
console.log('');
|
|
50
|
+
console.log('Code Engine Tools:');
|
|
51
|
+
tools.tools
|
|
52
|
+
.filter(t => t.name.startsWith('ce_'))
|
|
53
|
+
.forEach(tool => {
|
|
54
|
+
console.log(` • ${tool.name}: ${tool.description}`);
|
|
55
|
+
});
|
|
56
|
+
console.log('');
|
|
57
|
+
console.log('================================================');
|
|
58
|
+
console.log('Interactive MCP Client');
|
|
59
|
+
console.log('================================================');
|
|
60
|
+
console.log('');
|
|
61
|
+
console.log('Commands:');
|
|
62
|
+
console.log(' list - List all available tools');
|
|
63
|
+
console.log(' call <tool> <args> - Call a tool with JSON arguments');
|
|
64
|
+
console.log(' detect - Detect container runtime');
|
|
65
|
+
console.log(' images - List local images');
|
|
66
|
+
console.log(' containers - List local containers');
|
|
67
|
+
console.log(' projects - List Code Engine projects');
|
|
68
|
+
console.log(' help - Show this help');
|
|
69
|
+
console.log(' exit - Exit the client');
|
|
70
|
+
console.log('');
|
|
71
|
+
// Interactive prompt
|
|
72
|
+
const rl = readline.createInterface({
|
|
73
|
+
input: process.stdin,
|
|
74
|
+
output: process.stdout,
|
|
75
|
+
prompt: 'mcp> ',
|
|
76
|
+
});
|
|
77
|
+
rl.prompt();
|
|
78
|
+
rl.on('line', async (line) => {
|
|
79
|
+
const input = line.trim();
|
|
80
|
+
if (!input) {
|
|
81
|
+
rl.prompt();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const [command, ...args] = input.split(' ');
|
|
85
|
+
try {
|
|
86
|
+
switch (command) {
|
|
87
|
+
case 'exit':
|
|
88
|
+
case 'quit':
|
|
89
|
+
console.log('Goodbye!');
|
|
90
|
+
rl.close();
|
|
91
|
+
serverProcess.kill();
|
|
92
|
+
process.exit(0);
|
|
93
|
+
break;
|
|
94
|
+
case 'help':
|
|
95
|
+
console.log('');
|
|
96
|
+
console.log('Available commands:');
|
|
97
|
+
console.log(' list - List all available tools');
|
|
98
|
+
console.log(' call <tool> <args> - Call a tool with JSON arguments');
|
|
99
|
+
console.log(' detect - Detect container runtime');
|
|
100
|
+
console.log(' images - List local images');
|
|
101
|
+
console.log(' containers - List local containers');
|
|
102
|
+
console.log(' projects - List Code Engine projects');
|
|
103
|
+
console.log(' help - Show this help');
|
|
104
|
+
console.log(' exit - Exit the client');
|
|
105
|
+
console.log('');
|
|
106
|
+
break;
|
|
107
|
+
case 'list':
|
|
108
|
+
const toolsList = await client.listTools();
|
|
109
|
+
console.log('');
|
|
110
|
+
console.log('Available tools:');
|
|
111
|
+
toolsList.tools.forEach(tool => {
|
|
112
|
+
console.log(` • ${tool.name}: ${tool.description}`);
|
|
113
|
+
});
|
|
114
|
+
console.log('');
|
|
115
|
+
break;
|
|
116
|
+
case 'detect':
|
|
117
|
+
console.log('Detecting container runtime...');
|
|
118
|
+
const detectResult = await client.callTool({
|
|
119
|
+
name: 'detect_container_runtime',
|
|
120
|
+
arguments: {},
|
|
121
|
+
});
|
|
122
|
+
console.log(detectResult.content[0].text);
|
|
123
|
+
console.log('');
|
|
124
|
+
break;
|
|
125
|
+
case 'images':
|
|
126
|
+
console.log('Listing local images...');
|
|
127
|
+
const imagesResult = await client.callTool({
|
|
128
|
+
name: 'list_local_images',
|
|
129
|
+
arguments: {},
|
|
130
|
+
});
|
|
131
|
+
console.log(imagesResult.content[0].text);
|
|
132
|
+
console.log('');
|
|
133
|
+
break;
|
|
134
|
+
case 'containers':
|
|
135
|
+
console.log('Listing local containers...');
|
|
136
|
+
const containersResult = await client.callTool({
|
|
137
|
+
name: 'list_local_containers',
|
|
138
|
+
arguments: { all: true },
|
|
139
|
+
});
|
|
140
|
+
console.log(containersResult.content[0].text);
|
|
141
|
+
console.log('');
|
|
142
|
+
break;
|
|
143
|
+
case 'projects':
|
|
144
|
+
console.log('Listing Code Engine projects...');
|
|
145
|
+
const projectsResult = await client.callTool({
|
|
146
|
+
name: 'ce_list_projects',
|
|
147
|
+
arguments: {},
|
|
148
|
+
});
|
|
149
|
+
console.log(projectsResult.content[0].text);
|
|
150
|
+
console.log('');
|
|
151
|
+
break;
|
|
152
|
+
case 'call':
|
|
153
|
+
if (args.length < 1) {
|
|
154
|
+
console.log('Usage: call <tool_name> <json_arguments>');
|
|
155
|
+
console.log('Example: call build_container_image \'{"dockerfile_path":"./Dockerfile","image_name":"myapp:latest","context_path":"."}\'');
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
const toolName = args[0];
|
|
159
|
+
const toolArgs = args.length > 1 ? JSON.parse(args.slice(1).join(' ')) : {};
|
|
160
|
+
console.log(`Calling ${toolName}...`);
|
|
161
|
+
const result = await client.callTool({
|
|
162
|
+
name: toolName,
|
|
163
|
+
arguments: toolArgs,
|
|
164
|
+
});
|
|
165
|
+
console.log(result.content[0].text);
|
|
166
|
+
console.log('');
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
console.log(`Unknown command: ${command}`);
|
|
170
|
+
console.log('Type "help" for available commands');
|
|
171
|
+
console.log('');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
console.error('Error:', error.message);
|
|
176
|
+
console.log('');
|
|
177
|
+
}
|
|
178
|
+
rl.prompt();
|
|
179
|
+
});
|
|
180
|
+
rl.on('close', () => {
|
|
181
|
+
console.log('Goodbye!');
|
|
182
|
+
serverProcess.kill();
|
|
183
|
+
process.exit(0);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
console.error('Failed to connect to MCP server:', error);
|
|
188
|
+
serverProcess.kill();
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
main();
|
|
193
|
+
// Made by MVK
|
|
194
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGrC,6BAA6B;AAC7B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,CAAC,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