🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

code-engine-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-engine-mcp-server

MCP server for IBM Code Engine and Docker/Podman integration

Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
127
32.29%
Maintainers
1
Weekly downloads
 
Created
Source

Code Engine MCP Server

Code Engine MCP Logo

Model Context Protocol (MCP) server for IBM Code Engine and Docker/Podman integration. It enables AI assistants to build, run, push, and deploy containerized workloads with a single MCP server.

MCP IBM Cloud Node.js License: MIT

📚 Table of Contents

✨ What You Get

  • Container workflow tools for Docker or Podman
  • IBM Code Engine project and application management tools
  • MCP-ready setup for GitHub Copilot, Cline, and Claude Desktop
  • A simple local development and troubleshooting workflow

🚀 Quick Start

# 1) Install dependencies
npm install

# 2) Build the server
npm run build

# 3) Run once to verify
node build/index.js

Then configure your MCP client using one of the examples in the Configuration section below.

📖 Documentation

🗂️ Project Structure

code-engine-mcp-server/
├── api/
│   └── code-engine-openapi.yaml      # OpenAPI reference used for API coverage
├── build/                            # Compiled JavaScript output
├── docs/                             # API references and setup guides
├── internal/                         # Internal release/publishing notes
├── src/                              # Main TypeScript source code
├── CHANGELOG.md                      # Release history
├── CODE_OF_CONDUCT.md                # Community guidelines
├── CONTRIBUTING.md                   # Contribution workflow
├── LICENSE                           # Project license
├── MAINTAINERS.md                    # Maintainer list
├── README.md                         # Project overview and usage
├── mcp.example.json                  # Example MCP client configuration
├── package.json                      # npm package metadata and scripts
├── server.json                       # MCP Registry metadata
└── tsconfig.json                     # TypeScript configuration

🧩 Features

Container Runtime Tools (Docker/Podman)

  • ✅ Detect container runtime (Docker/Podman)
  • ✅ Build container images
  • ✅ Push images to registries
  • ✅ List local images
  • ✅ Test containers locally
  • ✅ Get container logs
  • ✅ Stop and remove containers
  • ✅ List all containers

IBM Code Engine Tools

  • ✅ List Code Engine projects
  • ✅ Create applications
  • ✅ List applications in a project
  • ✅ Get application details

⚙️ Configuration

Copy mcp.example.json to .vscode/mcp.json in your workspace root:

cp mcp.example.json ../.vscode/mcp.json

Then edit .vscode/mcp.json and replace the placeholder with your IBM Cloud API key:

{
    "servers": {
        "code-engine": {
            "type": "stdio",
            "command": "node",
            "args": [
                "${workspaceFolder}/code-engine-mcp-server/build/index.js"
            ],
            "env": {
                "IBMCLOUD_API_KEY": "your-ibm-cloud-api-key-here"
            }
        }
    }
}

Restart the server: Cmd+Shift+P -> "MCP: Restart Server" -> code-engine.

Security: Add .vscode/mcp.json to your .gitignore to avoid committing your API key.

Get your API key at IBM Cloud IAM → API keys.

2) Cline (VS Code Extension)

  • Open VSCode Settings (Cmd/Ctrl + ,)
  • Search for "Cline: MCP Settings"
  • Click "Edit in settings.json"
  • Add the configuration:
{
  "cline.mcpServers": {
    "code-engine": {
      "command": "node",
      "args": ["/absolute/path/to/code-engine-mcp-server/build/index.js"],
      "env": {
        "IBMCLOUD_API_KEY": "your-api-key-here"
      }
    }
  }
}

3) Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "code-engine": {
      "command": "node",
      "args": ["/absolute/path/to/code-engine-mcp-server/build/index.js"],
      "env": {
        "IBMCLOUD_API_KEY": "your-api-key-here"
      }
    }
  }
}

⚡ One-Click Install

Install this MCP server in Cursor with one click:

Package and registry links:

💬 Example Prompts

Detect Container Runtime

Ask your assistant:

Can you detect which container runtime I have installed?

Build a Container Image

Ask your assistant:

Build a container image from ./Dockerfile with the name myapp:latest

Test Container Locally

Ask your assistant:

Test the myapp:latest image locally on port 8080

Push to Registry

Ask your assistant:

Push myapp:latest to icr.io/my-namespace/myapp:latest

List Code Engine Projects

Ask your assistant:

List all my Code Engine projects

Complete Workflow

Ask your assistant:

I have a Node.js app in ./my-app with a Dockerfile. Can you:
1. Build it as myapp:v1.0.0
2. Test it locally on port 3000
3. Push it to icr.io/my-namespace/myapp:v1.0.0
4. Deploy it to my Code Engine project "production"
5. Show me the application URL

🛠️ Available Tools

43 tools total: 8 container tools + 35 Code Engine tools.

Container Tools (8)

ToolDescriptionKey Parameters
detect_container_runtimeDetect Docker or Podman
list_local_imagesList local container imagesruntime
list_local_containersList local containersruntime, all
build_container_imageBuild a container imagedockerfile_path, image_name, context_path
push_container_imagePush image to registryimage_name, runtime
test_container_locallyRun container for local testingimage_name, port_mapping, env_vars
get_container_logsGet logs from a running containercontainer_id, runtime
stop_local_containerStop and remove a containercontainer_id, runtime

Code Engine: Projects (4)

ToolDescriptionKey Parameters
ce_list_projectsList all projects in a region
ce_get_projectGet project detailsproject_id
ce_create_projectCreate a new projectname, resource_group_id
ce_delete_projectDelete a projectproject_id

Code Engine: Applications (7)

ToolDescriptionKey Parameters
ce_list_applicationsList applications in a projectproject_id
ce_get_applicationGet application detailsproject_id, app_name
ce_create_applicationDeploy a new applicationproject_id, name, image, port, env_vars
ce_update_applicationUpdate image, scaling, envproject_id, app_name, image, scale_*
ce_delete_applicationDelete an applicationproject_id, app_name
ce_list_app_instancesList running instances (pods)project_id, app_name
ce_get_app_logsGet logs for an app instanceproject_id, app_name, instance_name

Code Engine: Builds (7)

ToolDescriptionKey Parameters
ce_list_buildsList build configurationsproject_id
ce_get_buildGet build configuration detailsproject_id, build_name
ce_create_buildCreate a build configurationproject_id, name, output_image, output_secret
ce_delete_buildDelete a build configurationproject_id, build_name
ce_list_build_runsList build runsproject_id
ce_get_build_runGet build run statusproject_id, build_run_name
ce_create_build_runStart a build runproject_id, build_name
ce_delete_build_runDelete a build runproject_id, build_run_name

Code Engine: Jobs (8)

ToolDescriptionKey Parameters
ce_list_jobsList job definitionsproject_id
ce_get_jobGet job definition detailsproject_id, job_name
ce_create_jobCreate a job definitionproject_id, name, image
ce_delete_jobDelete a job definitionproject_id, job_name
ce_list_job_runsList job runsproject_id, job_name (optional)
ce_get_job_runGet job run statusproject_id, job_run_name
ce_create_job_runSubmit a job runproject_id, job_name
ce_delete_job_runDelete a job runproject_id, job_run_name

Code Engine: Secrets (4)

ToolDescriptionKey Parameters
ce_list_secretsList secrets (names + keys only)project_id
ce_get_secretGet secret metadata (no values)project_id, secret_name
ce_create_secretCreate a secretproject_id, name, format, data
ce_delete_secretDelete a secretproject_id, secret_name

Code Engine: ConfigMaps (4)

ToolDescriptionKey Parameters
ce_list_config_mapsList configmapsproject_id
ce_get_config_mapGet configmap detailsproject_id, config_map_name
ce_create_config_mapCreate a configmapproject_id, name, data
ce_delete_config_mapDelete a configmapproject_id, config_map_name

🔐 Environment Variables

  • IBMCLOUD_API_KEY: IBM Cloud API key (required for Code Engine operations)
  • IBMCLOUD_REGION: Default IBM Cloud region (optional, defaults to us-south)
  • CONTAINER_RUNTIME: Force specific runtime (docker or podman)
  • DEBUG: Enable debug logging

📋 Prerequisites

  • Node.js v18 or higher
  • Docker or Podman installed
  • IBM Cloud CLI with Code Engine plugin (for Code Engine operations)
  • IBM Cloud API key (for Code Engine operations)

👩‍💻 Development

# Run in development mode
npm run dev

# Build
npm run build

# Test manually
node build/index.js

🧪 Troubleshooting

Server Not Connecting

  • Verify the path in configuration is absolute
  • Check Node.js is in PATH: node --version
  • Verify build output exists: ls build/index.js
  • Test manually: node build/index.js

Docker/Podman Commands Failing

  • Verify installation: docker --version or podman --version
  • Check Docker daemon is running
  • Verify permissions (add user to docker group if needed)

Code Engine Commands Failing

  • Verify IBM Cloud CLI: ibmcloud --version
  • Check Code Engine plugin: ibmcloud plugin list
  • Verify API key is set in environment
  • Test manually: ibmcloud ce project list

🛡️ Security

  • Never commit API keys to version control
  • Use environment variables for sensitive data
  • Consider using IBM Cloud IAM for authentication
  • Restrict MCP server permissions as needed

📄 License

MIT (see LICENSE)

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

👤 Author

Markus van Kempen
Email: markus.van.kempen@gmail.com | mvankempen@ca.ibm.com
Website: markusvankempen.github.io
Research | Floor 7 1/2

🙋 Support

For issues and questions:

Keywords

mcp

FAQs

Package last updated on 08 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts