code-engine-mcp-server 1.0.6 → 1.0.7
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 +165 -44
- package/build/index.js +1216 -66
- package/build/index.js.map +1 -1
- package/docs/MCP_INSPECTOR_TROUBLESHOOTING.md +70 -1
- package/docs/SETUP_INSTRUCTIONS.md +279 -87
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,9 @@ It enables AI assistants to build, run, push, and deploy containerized workloads
|
|
|
9
9
|
[](https://cloud.ibm.com/codeengine/overview)
|
|
10
10
|
[](#prerequisites)
|
|
11
11
|
[](./LICENSE)
|
|
12
|
+
[](https://marketplace.visualstudio.com/items?itemName=MarkusvanKempen.code-engine-mcp)
|
|
13
|
+
[](https://open-vsx.org/extension/markusvankempen/code-engine-mcp)
|
|
14
|
+
[](https://www.npmjs.com/package/code-engine-mcp-server)
|
|
12
15
|
|
|
13
16
|
## How It Works
|
|
14
17
|
|
|
@@ -606,6 +609,7 @@ code-engine-mcp-server/
|
|
|
606
609
|
- ✅ TLS secrets from Let's Encrypt / certbot PEM files (`ce_create_tls_secret_from_pem`)
|
|
607
610
|
- ✅ TLS cert renewal in-place without disrupting domain mappings (`ce_renew_tls_secret_from_pem`)
|
|
608
611
|
- ✅ Update any secret in-place (`ce_update_secret`)
|
|
612
|
+
- ✅ Refresh ICR pull secret with current API key credentials (`ce_refresh_icr_pull_secret`) — fixes `no_revision_ready` failures caused by stale registry credentials without needing the CLI
|
|
609
613
|
- ✅ Wait for app deployment or build run to complete (`ce_wait_for_app_ready`, `ce_wait_for_build_run`)
|
|
610
614
|
- ✅ IAM token info and diagnostics (`iam_get_token_info`)
|
|
611
615
|
- ✅ Create ICR namespaces via REST API (`icr_create_namespace`)
|
|
@@ -617,79 +621,188 @@ code-engine-mcp-server/
|
|
|
617
621
|
|
|
618
622
|
## ⚙️ Configuration
|
|
619
623
|
|
|
620
|
-
###
|
|
624
|
+
### Getting an IBM Cloud API key
|
|
621
625
|
|
|
622
|
-
|
|
626
|
+
All Code Engine and ICR operations require an IBM Cloud API key. Get one at:
|
|
627
|
+
**[IBM Cloud IAM → API keys](https://cloud.ibm.com/iam/apikeys)** → **Create an IBM Cloud API key**.
|
|
623
628
|
|
|
624
|
-
|
|
625
|
-
2. Ensure **Node.js** is installed and `npx` is on your `PATH`.
|
|
626
|
-
3. Open **Settings** and search for **IBM Code Engine MCP**, or edit `settings.json` directly:
|
|
627
|
-
- `codeEngineMcp.apiKey` — your IBM Cloud API key (**required**; until this is set, the extension contributes no MCP server).
|
|
628
|
-
- `codeEngineMcp.region` — IBM Cloud region (optional, default `us-south`). Passed as `IBMCLOUD_REGION` to the server.
|
|
629
|
+
Store the key somewhere safe (password manager). You will paste it into one of the configuration paths below.
|
|
629
630
|
|
|
630
|
-
|
|
631
|
+
---
|
|
632
|
+
|
|
633
|
+
### Path A — VS Code extension (recommended)
|
|
634
|
+
|
|
635
|
+
The [IBM Code Engine MCP extension](https://marketplace.visualstudio.com/items?itemName=MarkusvanKempen.code-engine-mcp) handles everything: server startup, API key storage, and MCP registration — no manual `mcp.json` editing required.
|
|
636
|
+
|
|
637
|
+
**Install from the Marketplace:**
|
|
638
|
+
|
|
639
|
+
| IDE / Platform | Install link |
|
|
640
|
+
|---|---|
|
|
641
|
+
| VS Code | [marketplace.visualstudio.com](https://marketplace.visualstudio.com/items?itemName=MarkusvanKempen.code-engine-mcp) |
|
|
642
|
+
| Cursor / Theia / Gitpod / Codium | [open-vsx.org](https://open-vsx.org/extension/markusvankempen/code-engine-mcp) |
|
|
643
|
+
| From a local `.vsix` | **Command Palette** → **Extensions: Install from VSIX…** |
|
|
644
|
+
|
|
645
|
+
**Set your API key (required before any tool works):**
|
|
646
|
+
|
|
647
|
+
1. Open the **IBM Code Engine MCP** sidebar panel (cloud icon in the Activity Bar)
|
|
648
|
+
2. Paste your IBM Cloud API key and click **Save**
|
|
649
|
+
_(The key is stored in VS Code global settings — encrypted by the OS keychain, never in a plaintext file)_
|
|
650
|
+
3. Optionally change the region (default: `us-south`) in the same panel
|
|
651
|
+
4. Click **Configure MCP** — this writes the server entry to the global `mcp.json` and restarts VS Code's MCP server list
|
|
652
|
+
5. Click **Run Diagnostics** to confirm everything is wired up:
|
|
653
|
+
- ✅ Node.js found on PATH
|
|
654
|
+
- ✅ API key configured
|
|
655
|
+
- ✅ MCP server registered
|
|
656
|
+
- ✅ Tool list discovered
|
|
657
|
+
|
|
658
|
+
After step 4 you can open GitHub Copilot Chat and immediately ask:
|
|
659
|
+
> *"List all my Code Engine projects"*
|
|
660
|
+
|
|
661
|
+
> **Tip:** If Copilot can't see the tools after installing, run **Command Palette → Reload Window** once.
|
|
631
662
|
|
|
632
663
|
More detail: [vscode-extension/README.md](./vscode-extension/README.md).
|
|
633
664
|
|
|
634
665
|
---
|
|
635
666
|
|
|
636
|
-
###
|
|
667
|
+
### Path B — Pure MCP config (no extension)
|
|
668
|
+
|
|
669
|
+
Use this path with **any** MCP-capable client: GitHub Copilot without the extension, Cline, Claude Desktop, Cursor, etc.
|
|
670
|
+
|
|
671
|
+
#### Where to put the API key (choose one approach)
|
|
637
672
|
|
|
638
|
-
|
|
673
|
+
**Option 1 — Shell environment variable (most secure)**
|
|
674
|
+
|
|
675
|
+
Copy the provided template and fill in your key:
|
|
639
676
|
|
|
640
677
|
```bash
|
|
641
|
-
cp
|
|
678
|
+
cp .env.example .env # copy template (already in .gitignore)
|
|
679
|
+
# edit .env → set IBMCLOUD_API_KEY=your-key
|
|
680
|
+
source .env # load into current shell session
|
|
642
681
|
```
|
|
643
682
|
|
|
644
|
-
|
|
683
|
+
Or add the export permanently to your shell profile so every new terminal has it:
|
|
684
|
+
|
|
685
|
+
```bash
|
|
686
|
+
# ~/.zshrc or ~/.bash_profile
|
|
687
|
+
export IBMCLOUD_API_KEY="your-ibm-cloud-api-key-here"
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
See [.env.example](.env.example) for all available variables (`IBMCLOUD_REGION`, `CONTAINER_RUNTIME`, `DEBUG`).
|
|
691
|
+
|
|
692
|
+
Then reference the variable in the MCP config without embedding the value:
|
|
645
693
|
|
|
646
694
|
```json
|
|
647
695
|
{
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}
|
|
658
|
-
}
|
|
696
|
+
"servers": {
|
|
697
|
+
"code-engine": {
|
|
698
|
+
"type": "stdio",
|
|
699
|
+
"command": "npx",
|
|
700
|
+
"args": ["-y", "code-engine-mcp-server@latest"],
|
|
701
|
+
"env": {
|
|
702
|
+
"IBMCLOUD_API_KEY": "${env:IBMCLOUD_API_KEY}",
|
|
703
|
+
"IBMCLOUD_REGION": "us-south"
|
|
704
|
+
}
|
|
659
705
|
}
|
|
706
|
+
}
|
|
660
707
|
}
|
|
661
708
|
```
|
|
662
709
|
|
|
663
|
-
|
|
710
|
+
> `${env:VARIABLE}` is VS Code's input substitution syntax — it reads the value from your shell environment at startup so your API key is never stored in the file.
|
|
664
711
|
|
|
665
|
-
|
|
712
|
+
**Option 2 — VS Code input variable (prompted on connect)**
|
|
666
713
|
|
|
667
|
-
|
|
714
|
+
VS Code can prompt you for the API key when it starts the server — great for shared machines:
|
|
715
|
+
|
|
716
|
+
```json
|
|
717
|
+
{
|
|
718
|
+
"inputs": [
|
|
719
|
+
{
|
|
720
|
+
"id": "ibmcloud-api-key",
|
|
721
|
+
"type": "promptString",
|
|
722
|
+
"description": "IBM Cloud API key",
|
|
723
|
+
"password": true
|
|
724
|
+
}
|
|
725
|
+
],
|
|
726
|
+
"servers": {
|
|
727
|
+
"code-engine": {
|
|
728
|
+
"type": "stdio",
|
|
729
|
+
"command": "npx",
|
|
730
|
+
"args": ["-y", "code-engine-mcp-server@latest"],
|
|
731
|
+
"env": {
|
|
732
|
+
"IBMCLOUD_API_KEY": "${input:ibmcloud-api-key}",
|
|
733
|
+
"IBMCLOUD_REGION": "us-south"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
**Option 3 — Inline value (simplest, least secure)**
|
|
741
|
+
|
|
742
|
+
Paste the key directly. **Never commit this file to git.**
|
|
743
|
+
|
|
744
|
+
```json
|
|
745
|
+
{
|
|
746
|
+
"servers": {
|
|
747
|
+
"code-engine": {
|
|
748
|
+
"type": "stdio",
|
|
749
|
+
"command": "npx",
|
|
750
|
+
"args": ["-y", "code-engine-mcp-server@latest"],
|
|
751
|
+
"env": {
|
|
752
|
+
"IBMCLOUD_API_KEY": "your-ibm-cloud-api-key-here",
|
|
753
|
+
"IBMCLOUD_REGION": "us-south"
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
> **Security:** Add the config file to `.gitignore`. For workspace configs, use `${env:...}` or `${input:...}` instead of inline values.
|
|
668
761
|
|
|
669
762
|
---
|
|
670
763
|
|
|
671
|
-
|
|
764
|
+
#### 1) GitHub Copilot (VS Code) — workspace `mcp.json`
|
|
765
|
+
|
|
766
|
+
Create `.vscode/mcp.json` in your workspace root (or copy `mcp.example.json`):
|
|
767
|
+
|
|
768
|
+
```bash
|
|
769
|
+
cp mcp.example.json .vscode/mcp.json
|
|
770
|
+
echo '.vscode/mcp.json' >> .gitignore
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
Paste one of the API key options above. Then restart the server:
|
|
774
|
+
**Cmd+Shift+P** → **MCP: Restart Server** → `code-engine`.
|
|
775
|
+
|
|
776
|
+
Alternatively, use the **global** MCP config at `~/Library/Application Support/Code/User/mcp.json` (macOS) so the server is available in every workspace without a per-project file.
|
|
777
|
+
|
|
778
|
+
---
|
|
672
779
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
780
|
+
#### 2) Cline (VS Code Extension)
|
|
781
|
+
|
|
782
|
+
1. Open VS Code Settings (`Cmd+,`)
|
|
783
|
+
2. Search for **Cline: MCP Settings** → **Edit in settings.json**
|
|
784
|
+
3. Add:
|
|
677
785
|
|
|
678
786
|
```json
|
|
679
787
|
{
|
|
680
788
|
"cline.mcpServers": {
|
|
681
789
|
"code-engine": {
|
|
682
|
-
"command": "
|
|
683
|
-
"args": ["
|
|
790
|
+
"command": "npx",
|
|
791
|
+
"args": ["-y", "code-engine-mcp-server@latest"],
|
|
684
792
|
"env": {
|
|
685
|
-
"IBMCLOUD_API_KEY": "your-api-key-here"
|
|
793
|
+
"IBMCLOUD_API_KEY": "your-api-key-here",
|
|
794
|
+
"IBMCLOUD_REGION": "us-south"
|
|
686
795
|
}
|
|
687
796
|
}
|
|
688
797
|
}
|
|
689
798
|
}
|
|
690
799
|
```
|
|
691
800
|
|
|
692
|
-
|
|
801
|
+
> Prefer `${env:IBMCLOUD_API_KEY}` if your shell exports the key, so it never appears in `settings.json`.
|
|
802
|
+
|
|
803
|
+
---
|
|
804
|
+
|
|
805
|
+
#### 3) Claude Desktop
|
|
693
806
|
|
|
694
807
|
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
695
808
|
|
|
@@ -697,22 +810,29 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
697
810
|
{
|
|
698
811
|
"mcpServers": {
|
|
699
812
|
"code-engine": {
|
|
700
|
-
"command": "
|
|
701
|
-
"args": ["
|
|
813
|
+
"command": "npx",
|
|
814
|
+
"args": ["-y", "code-engine-mcp-server@latest"],
|
|
702
815
|
"env": {
|
|
703
|
-
"IBMCLOUD_API_KEY": "your-api-key-here"
|
|
816
|
+
"IBMCLOUD_API_KEY": "your-api-key-here",
|
|
817
|
+
"IBMCLOUD_REGION": "us-south"
|
|
704
818
|
}
|
|
705
819
|
}
|
|
706
820
|
}
|
|
707
821
|
}
|
|
708
822
|
```
|
|
709
823
|
|
|
710
|
-
|
|
824
|
+
> Restart Claude Desktop after saving. The server starts on demand when Claude needs a tool.
|
|
711
825
|
|
|
712
|
-
|
|
826
|
+
## Install & Registry Links
|
|
827
|
+
|
|
828
|
+
| Platform | Link |
|
|
829
|
+
|---|---|
|
|
830
|
+
| **npm** (MCP server package) | [code-engine-mcp-server](https://www.npmjs.com/package/code-engine-mcp-server) |
|
|
831
|
+
| **VS Code Marketplace** (extension) | [MarkusvanKempen.code-engine-mcp](https://marketplace.visualstudio.com/items?itemName=MarkusvanKempen.code-engine-mcp) |
|
|
832
|
+
| **Open VSX Registry** (Theia / Gitpod / Cursor) | [markusvankempen.code-engine-mcp](https://open-vsx.org/extension/markusvankempen/code-engine-mcp) |
|
|
833
|
+
| **MCP Registry** | [io.github.markusvankempen/code-engine-mcp-server](https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.markusvankempen%2Fcode-engine-mcp-server) |
|
|
713
834
|
|
|
714
|
-
|
|
715
|
-
- [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)
|
|
835
|
+
The **VS Code extension** is the easiest starting point — it handles server startup, API key storage, and MCP registration automatically. Use the **npm package** directly if you prefer a manual MCP config (Cline, Claude Desktop, Cursor, or any other client).
|
|
716
836
|
|
|
717
837
|
## 💬 Example Prompts
|
|
718
838
|
|
|
@@ -776,7 +896,7 @@ Tell me what CNAME value to set in DNS.
|
|
|
776
896
|
|
|
777
897
|
## 🛠️ Available Tools
|
|
778
898
|
|
|
779
|
-
|
|
899
|
+
63 tools total: 9 container tools + 4 ICR tools + 46 Code Engine tools + 1 IAM tool + 3 procedures.
|
|
780
900
|
|
|
781
901
|
> **Procedures** bundle multiple tools into a single call. Use them for common end-to-end workflows.
|
|
782
902
|
|
|
@@ -853,7 +973,7 @@ Tell me what CNAME value to set in DNS.
|
|
|
853
973
|
| `ce_create_job_run` | Submit a job run | `project_id`, `job_name` |
|
|
854
974
|
| `ce_delete_job_run` | Delete a job run | `project_id`, `job_run_name` |
|
|
855
975
|
|
|
856
|
-
### Code Engine: Secrets (
|
|
976
|
+
### Code Engine: Secrets (8)
|
|
857
977
|
|
|
858
978
|
| Tool | Description | Key Parameters |
|
|
859
979
|
|------|-------------|----------------|
|
|
@@ -862,6 +982,7 @@ Tell me what CNAME value to set in DNS.
|
|
|
862
982
|
| `ce_create_secret` | Create a secret | `project_id`, `name`, `format`, `data` |
|
|
863
983
|
| `ce_update_secret` | Update an existing secret in-place (PATCH) | `project_id`, `secret_name`, `data` |
|
|
864
984
|
| `ce_delete_secret` | Delete a secret | `project_id`, `secret_name` |
|
|
985
|
+
| `ce_refresh_icr_pull_secret` | Delete and recreate an ICR registry pull secret using the server's own API key — fixes stale-credential failures without needing the CLI | `project_id`, `secret_name` (default: `icr-pull-secret`), `icr_host` |
|
|
865
986
|
| `ce_create_tls_secret_from_pem` | Create a TLS secret from PEM files | `project_id`, `secret_name`, `cert_pem_path`, `key_pem_path` |
|
|
866
987
|
| `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` |
|
|
867
988
|
|