IBM Code Engine MCP Server

v1.4.2
io.github.markusvankempen/code-engine-mcp-server Checked 12 hours ago Published 5 months ago

Deploy to IBM Code Engine from Cursor, Copilot, Claude & Cline.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

detect_container_runtime

Detect available container runtime (Docker or Podman)

build_container_image

Build a container image using Docker or Podman

ParameterTypeDescription
context_path *stringBuild context path
dockerfile_path *stringPath to Dockerfile
image_name *stringImage name with tag
runtimestringContainer runtime

push_container_image

Push container image to registry

ParameterTypeDescription
image_name *stringFull image name with registry
runtimestring

list_local_images

List all local container images

ParameterTypeDescription
runtimestring

test_container_locally

Run container locally for testing

ParameterTypeDescription
image_name *string
env_varsobjectEnvironment variables
port_mappingstringPort mapping (e.g., 8080:8080)
runtimestring

icr_list_namespaces

List IBM Container Registry (ICR) namespaces in your account

ParameterTypeDescription
regionstringICR region host (default: us.icr.io)

icr_list_images

List images in IBM Container Registry (ICR)

ParameterTypeDescription
namespacestringFilter by namespace (optional)
regionstringICR region host (default: us.icr.io)

icr_delete_image

Delete an image from IBM Container Registry (ICR) by tag or digest

ParameterTypeDescription
image *stringFull image reference to delete, e.g. us.icr.io/mynamespace/myapp:v1.0.0
regionstringICR region host (default: us.icr.io)

tag_container_image

Tag a local container image with a new name/tag — useful to retag before pushing to ICR

ParameterTypeDescription
source_image *stringExisting image name/tag (e.g. myapp:latest)
target_image *stringNew image name/tag (e.g. us.icr.io/mynamespace/myapp:v1.0.0)
runtimestringContainer runtime (default: auto-detected)

remove_local_image

Remove a local container image to free disk space

ParameterTypeDescription
image_name *stringImage name/tag to remove (e.g. us.icr.io/mynamespace/myapp:v1.0.0)
forcebooleanForce removal even if the image is used by a stopped container (default: false)
runtimestring

login_to_registry

Log in to a container registry (e.g. IBM Container Registry) so images can be pushed/pulled. Uses IBM Cloud IAM token for ICR or username/password for other registries.

ParameterTypeDescription
registry *stringRegistry hostname (default: us.icr.io for ICR)
passwordstringPassword or API key. For ICR leave blank to use IBMCLOUD_API_KEY env var.
runtimestring
usernamestringUsername — use "iamapikey" for ICR with an IBM Cloud API key

inspect_container_image

Inspect a local container image — shows architecture, labels, environment variables, entrypoint, exposed ports, and layer count

ParameterTypeDescription
image_name *stringImage name/tag to inspect
runtimestring

prune_images

Remove unused/dangling container images to reclaim disk space. By default removes only dangling images; use all=true to remove all unused images.

ParameterTypeDescription
allbooleanRemove all unused images, not just dangling ones (default: false)
runtimestring

write_or_modify_file

Write or update a text file in the workspace. Returns bytes written and content hash. When PROVENANCE_ENABLED=true, emits a signed provenance receipt after completion (fail-open).

ParameterTypeDescription
content *stringFull file content (UTF-8 text)
path *stringRelative or absolute file path to write
operationstringcreate | update | auto (default auto — detect from existing file)

ce_list_projects

List all Code Engine projects across all or a specific region

ParameterTypeDescription
regionstringIBM Cloud region (omit to search all regions)

ce_get_project

Get details of a specific Code Engine project

ParameterTypeDescription
project_id *stringProject ID (UUID)

ce_create_project

Create a new Code Engine project

ParameterTypeDescription
name *stringProject name
region *stringIBM Cloud region (e.g. us-south, ca-tor)
resource_group_idstringResource group ID (optional)

ce_delete_project

Delete a Code Engine project

ParameterTypeDescription
project_id *string

ce_list_applications

List applications in a Code Engine project

ParameterTypeDescription
project_id *string

ce_get_application

Get details of a Code Engine application

ParameterTypeDescription
app_name *string
project_id *string

ce_create_application

Create a Code Engine application from a container image

ParameterTypeDescription
image *stringContainer image reference
name *string
project_id *string
env_varsobjectKey/value environment variables
image_secretstringRegistry secret name for pulling the image (e.g. icr-pull-secret)
portnumberContainer port (default 8080)
run_argsarrayArguments passed to the container entrypoint (run_arguments). Required for supergateway: ["--stdio", "npx -y <mcp-server>", "--outputTransport", "sse"]
run_commandsarrayOverride the container entrypoint (run_commands). Rarely needed — use run_args for passing flags.
scale_cpu_limitstringCPU limit (e.g. 1, 0.5)
scale_max_instancesnumberMax instances (default 10)
scale_memory_limitstringMemory limit (e.g. 4G, 2G)
scale_min_instancesnumberMin instances (default 0)

ce_update_application

Update an existing Code Engine application (image, scaling, etc.)

ParameterTypeDescription
app_name *string
project_id *string
imagestringNew container image reference
image_secretstringRegistry secret name for pulling the image
run_argsarrayArguments passed to the container entrypoint (run_arguments)
run_commandsarrayOverride the container entrypoint (run_commands)
scale_cpu_limitstring
scale_max_instancesnumber
scale_memory_limitstring
scale_min_instancesnumber

ce_delete_application

Delete a Code Engine application

ParameterTypeDescription
app_name *string
project_id *string

ce_list_app_instances

List all running instances (pods) of a Code Engine application

ParameterTypeDescription
app_name *string
project_id *string

ce_get_app_instance

Get status details for a specific running instance of a Code Engine application

ParameterTypeDescription
app_name *string
instance_name *stringInstance name (from ce_list_app_instances)
project_id *string

ce_get_app_logs

Get logs for a Code Engine application. Retrieves logs from all running pods (or a specific instance) via the Code Engine Kubernetes API proxy.

ParameterTypeDescription
app_name *stringApplication name
project_id *stringProject ID or name
instance_namestringOptional: specific pod/instance name to filter to (e.g. my-app-00001-deployment-abcde). If omitted, logs from all pods are returned.
tail_linesnumberNumber of log lines to return per pod (default: 100)

ce_list_jobs

List job definitions in a Code Engine project

ParameterTypeDescription
project_id *string

ce_create_job

Create a job definition in Code Engine

ParameterTypeDescription
image *stringContainer image reference
name *string
project_id *string
env_varsobject
scale_array_specstringArray indices (e.g. 0-9 for 10 instances)
scale_cpu_limitstring
scale_memory_limitstring

ce_create_job_run

Submit a job run from an existing job definition

ParameterTypeDescription
job_name *stringJob definition name to run
project_id *string
namestringOptional name for this job run

ce_get_job

Get details of a specific Code Engine job definition

ParameterTypeDescription
job_name *string
project_id *string

ce_delete_job

Delete a Code Engine job definition

ParameterTypeDescription
job_name *string
project_id *string

ce_list_job_runs

List job runs in a Code Engine project

ParameterTypeDescription
project_id *string
job_namestringFilter by job definition name (optional)
limitnumberMaximum results to return
startstringPagination token

ce_get_job_run

Get status and details of a job run

ParameterTypeDescription
job_run_name *string
project_id *string

ce_list_secrets

List secrets in a Code Engine project

ParameterTypeDescription
project_id *string

ce_create_secret

Create a secret in a Code Engine project (generic, registry, ssh_auth, etc.)

ParameterTypeDescription
data *objectKey/value pairs (values must be base64 encoded for binary formats)
format *stringSecret type
name *string
project_id *string

ce_get_secret

Get metadata for a specific secret (keys only, no values)

ParameterTypeDescription
project_id *string
secret_name *string

ce_delete_secret

Delete a secret from a Code Engine project

ParameterTypeDescription
project_id *string
secret_name *string

ce_list_config_maps

List configmaps in a Code Engine project

ParameterTypeDescription
project_id *string

ce_create_config_map

Create a configmap in a Code Engine project

ParameterTypeDescription
data *objectKey/value configuration data
name *string
project_id *string

ce_get_config_map

Get details of a specific configmap in a Code Engine project

ParameterTypeDescription
config_map_name *string
project_id *string

ce_delete_config_map

Delete a configmap from a Code Engine project

ParameterTypeDescription
config_map_name *string
project_id *string

ce_list_domain_mappings

List all custom domain mappings in a Code Engine project

ParameterTypeDescription
project_id *string

ce_get_domain_mapping

Get details of a specific custom domain mapping

ParameterTypeDescription
domain_name *stringThe custom domain name (e.g. starwars.cranfordpub.ca)
project_id *string

ce_create_domain_mapping

Map a custom domain to a Code Engine application. Requires a TLS secret created with ce_create_tls_secret_from_pem. The domain CNAME must point to custom.<subdomain>.us-south.codeengine.appdomain.cloud (returned by this call).

ParameterTypeDescription
app_name *stringCode Engine application to route traffic to
domain_name *stringCustom domain (e.g. starwars.cranfordpub.ca)
project_id *string
tls_secret *stringName of the TLS secret containing the certificate and key

ce_create_tls_secret_from_pem

Create a TLS secret in Code Engine by reading certificate and key PEM files from disk. Use this after obtaining a cert with certbot. The cert and key are read from the given file paths and stored as a Code Engine secret of format "tls".

ParameterTypeDescription
cert_pem_path *stringAbsolute path to the certificate PEM file (e.g. ~/certbot/config/live/<domain>/fullchain.pem)
key_pem_path *stringAbsolute path to the private key PEM file (e.g. ~/certbot/config/live/<domain>/privkey.pem)
project_id *string
secret_name *stringName for the TLS secret (e.g. my-domain-tls)

ce_delete_domain_mapping

Delete a custom domain mapping from a Code Engine project

ParameterTypeDescription
domain_name *stringThe custom domain name to remove
project_id *string

ce_update_secret

Update an existing Code Engine secret in-place (PATCH). Use ce_renew_tls_secret_from_pem for TLS cert renewal. For generic secrets supply a data object with the new key/value pairs.

ParameterTypeDescription
data *objectNew key/value data to replace the secret contents
project_id *string
secret_name *stringName of the secret to update
formatstringSecret format if changing: generic, registry, tls, ssh_auth, basic_auth

ce_refresh_icr_pull_secret

Refresh a Code Engine registry pull secret for IBM Container Registry (ICR) using the server's own IBM Cloud API key. Automatically deletes the existing secret and recreates it with fresh credentials. Use this when deployments fail with "no_revision_ready" or "unknown" status — a common cause is a stale or expired ICR pull secret. No API key input required — the server uses its own IBMCLOUD_API_KEY.

ParameterTypeDescription
project_id *string
icr_hoststringICR registry hostname (default: us.icr.io)
secret_namestringName of the registry secret to refresh (default: icr-pull-secret)

ce_renew_tls_secret_from_pem

Renew an existing TLS secret in Code Engine by reading updated PEM files from disk. Use this when a Let's Encrypt cert has been renewed (every 90 days). Updates the secret in-place — no need to delete and recreate or update domain mappings.

ParameterTypeDescription
cert_pem_path *stringPath to the renewed fullchain.pem (~ supported)
key_pem_path *stringPath to the renewed privkey.pem (~ supported)
project_id *string
secret_name *stringName of the existing TLS secret to renew

ce_wait_for_app_ready

Poll a Code Engine application until its status becomes "ready" or a timeout is reached. Returns immediately when ready. Useful after ce_create_application or ce_update_application to confirm the new revision is live.

ParameterTypeDescription
app_name *string
project_id *string
timeout_secondsnumberMax seconds to wait (default 120)

iam_get_token_info

Get information about the current IBM Cloud IAM token — account ID, subject, expiry time, and remaining validity. Useful for diagnosing authentication failures without exposing the token itself.

icr_create_namespace

Create a new namespace in IBM Container Registry. Required before pushing images for the first time. Uses the ICR REST API with your IBM Cloud API key.

ParameterTypeDescription
namespace *stringNamespace name to create (lowercase, alphanumeric and hyphens)
regionstringICR host (default: us.icr.io)

proc_build_push_deploy

PROCEDURE: Full container pipeline in one step — auto-detects Podman or Docker, builds for linux/amd64, pushes to IBM Container Registry (ICR), creates or updates a Code Engine application, waits for ready, and returns the public URL. Accepts a project name or ID. Builds the full ICR image path from namespace + app name + tag so you do not need to know ICR URLs. When PROVENANCE_ENABLED=true, emits signed receipts for Dockerfile validation and deploy completion (fail-open).

ParameterTypeDescription
app_name *stringName for the application in Code Engine (e.g. my-app)
context_path *stringPath to the directory containing the Dockerfile (e.g. examples/starwars-splash or ./my-app)
icr_namespace *stringYour IBM Container Registry namespace (e.g. my-namespace). Use icr_list_namespaces to find it.
image_secret *stringName of the registry pull secret in Code Engine (e.g. icr-pull-secret). Created with ce_create_secret format=registry.
project_id_or_name *stringCode Engine project name (e.g. "my-project") or project ID (UUID). Use ce_list_projects if unsure.
env_varsobjectKey/value environment variables to set on the app
icr_hoststringICR host (default: us.icr.io — leave blank unless using a different region)
image_tagstringImage version tag (e.g. v1.0.0 or latest). Defaults to "latest".
portnumberContainer port the app listens on (default 8080)
scale_max_instancesnumberMaximum running instances (default 10)
scale_min_instancesnumberMinimum running instances (default 0 = scale to zero)
timeout_secondsnumberMax seconds to wait for app ready (default 180)

proc_setup_custom_domain

PROCEDURE: Custom domain setup in one step — reads TLS certificate PEM files from disk (e.g. from certbot/Let's Encrypt), creates a TLS secret in Code Engine, then creates the domain mapping. Returns the CNAME target value to add in your DNS provider.

ParameterTypeDescription
app_name *stringThe Code Engine app to map the custom domain to
cert_pem_path *stringPath to the certificate chain PEM file — typically ~/certbot/config/live/<domain>/fullchain.pem
domain_name *stringYour custom domain (e.g. myapp.example.com)
key_pem_path *stringPath to the private key PEM file — typically ~/certbot/config/live/<domain>/privkey.pem
project_id_or_name *stringCode Engine project name or ID
tls_secret_name *stringName to give the TLS secret in Code Engine (e.g. myapp-tls). Must be unique in the project.

ce_list_app_revisions

List all revisions (deployed versions) of a Code Engine application

ParameterTypeDescription
app_name *string
project_id *string

ce_get_app_revision

Get details of a specific revision of a Code Engine application

ParameterTypeDescription
app_name *string
project_id *string
revision_name *string

ce_update_job

Update an existing Code Engine job definition (PATCH)

ParameterTypeDescription
job_name *string
project_id *string
env_varsobjectKey/value environment variables
imagestringNew container image reference
image_secretstring
scale_array_specstringArray indices to run (e.g. "0-9")
scale_cpu_limitstring
scale_memory_limitstring

ce_update_config_map

Update an existing Code Engine configmap (PATCH)

ParameterTypeDescription
config_map_name *string
data *objectNew key/value data to replace configmap contents
project_id *string

ce_update_domain_mapping

Update an existing Code Engine custom domain mapping (PATCH) — e.g. change the target app

ParameterTypeDescription
domain_name *string
project_id *string
app_namestringNew application to route traffic to
tls_secretstringNew TLS secret name (optional)

ce_list_bindings

List all service bindings in a Code Engine project (bindings connect IBM Cloud services to apps/jobs)

ParameterTypeDescription
project_id *string

ce_create_binding

Create a service binding to connect an IBM Cloud service instance to a Code Engine component

ParameterTypeDescription
component_name *stringName of the CE app or job to bind the service to
component_resource_type *stringResource type of the component
project_id *string
secret_name *stringName of the operator secret referencing the IBM Cloud service instance
prefixstringPrefix for environment variable names injected into the component (optional)

ce_get_binding

Get details of a specific service binding in a Code Engine project

ParameterTypeDescription
binding_id *stringThe binding ID (use ce_list_bindings to find it)
project_id *string

ce_delete_binding

Delete a service binding from a Code Engine project

ParameterTypeDescription
binding_id *string
project_id *string

ce_get_project_status

Get the status details of a Code Engine project (readiness, enabled components, etc.)

ParameterTypeDescription
project_id *string

ce_list_egress_ips

List the public egress IP addresses used by a Code Engine project (useful for allowlisting in firewalls)

ParameterTypeDescription
project_id *string