TypeScript MCP server for AI-powered containerization workflows with Docker and Kubernetes support
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
An AI-powered containerization assistant that helps you build, scan, and deploy Docker containers through VS Code and other MCP-compatible tools.
Full control over containerization through Rego policies:
Example Policies Included:
See Policy Authoring Guide for details.
Add the following to your VS Code settings or create .vscode/mcp.json in your project:
Restart VS Code to enable the MCP server in GitHub Copilot.
For direct tool usage without MCP protocol (e.g., VS Code extensions, programmatic access):
See the SDK integration examples for full SDK documentation.
For Windows, use the Windows Docker pipe:
The easiest way to understand the containerization workflow is through an end-to-end example:
This MCP server guides you through a complete containerization workflow for a single application. The journey follows this sequence:
kubectl applyBefore starting, ensure you have:
docker ps should work)
/var/run/docker.sock accessible//./pipe/docker_engine accessible~/.kube/configkubectl cluster-info should work)Once configured in your MCP client (VS Code Copilot, Claude Desktop, etc.), use natural language:
Starting the Journey:
Building the Container:
Deploying to Kubernetes:
This server is optimized for one engineer containerizing one application at a time. Key characteristics:
The server detects and supports monorepo structures with multiple independently deployable services:
analyze-repo identifies monorepo patterns (npm workspaces, services/, apps/ directories)generate-dockerfile and generate-k8s-manifests support multi-module workflowsMulti-Module Workflow Example:
Detection Criteria:
The server provides 11 MCP tools organized by functionality:
| Tool | Description |
|---|---|
analyze-repo | Analyze repository structure and detect technologies by parsing config files |
| Tool | Description |
|---|---|
generate-dockerfile | Gather insights from knowledge base and return requirements for Dockerfile creation |
fix-dockerfile | Analyze Dockerfile for issues including organizational policy validation and return knowledge-based fix recommendations |
| Tool | Description |
|---|---|
build-image-context | Prepare Docker build context with security analysis and return build commands |
scan-image | Scan Docker images for security vulnerabilities with remediation guidance (uses Trivy CLI) |
tag-image | Tag Docker images with version and registry information |
push-image | Push Docker images to a registry |
| Tool | Description |
|---|---|
generate-k8s-manifests | Gather insights and return requirements for Kubernetes/Helm/ACA/Kustomize manifest creation |
prepare-cluster | Prepare Kubernetes cluster for deployment |
verify-deploy | Verify Kubernetes deployment status |
| Tool | Description |
|---|---|
ops | Operational utilities for ping and server status |
Interactive workflow tools that return step-by-step plans (output is collapsed by default in VS Code Copilot Chat):
| Tool | Description | Inputs |
|---|---|---|
create-containerization-policy | Step-by-step guidance for authoring a custom OPA Rego policy | None |
kind-loop | Local dev loop: analyze → build → scan → deploy to Kind | namespace (optional), imageName (optional) |
aks-loop | Remote dev loop: analyze → build → push → deploy to AKS | registry, resourceGroup, clusterName (required); namespace, imageName (optional) |
All generated artifacts include version metadata so you can track which version of containerization-assist produced them.
Dockerfiles (generate-dockerfile):
The tool output includes attributionLabels.labels with a version label, included as a LABEL instruction in the generated Dockerfile:
| Label | Value | Purpose |
|---|---|---|
com.azure.containerizationassist.version | Package version (e.g., 1.4.0) | Version of containerization-assist used |
Kubernetes Manifests (generate-k8s-manifests):
The tool output includes attributionLabels.annotations applied to all generated Kubernetes resource metadata:
| Type | Key | Value | Purpose |
|---|---|---|---|
| Annotation | com.azure.containerizationassist/version | Package version (e.g., 1.4.0) | Version of containerization-assist used |
Organizations can add custom labels via the policy system's orgStandards.requiredLabels configuration.
The following environment variables control server behavior:
| Variable | Description | Default | Required |
|---|---|---|---|
DOCKER_SOCKET | Docker socket path | /var/run/docker.sock (Linux/Mac)//./pipe/docker_engine (Windows) | No |
DOCKER_HOST | Docker host URI (unix://, tcp://, http://, https://, npipe://) | Auto-detected | No |
DOCKER_TIMEOUT | Docker operation timeout in milliseconds | 60000 (60s) | No |
KUBECONFIG | Path to Kubernetes config file | ~/.kube/config | No |
K8S_NAMESPACE | Default Kubernetes namespace | default | No |
LOG_LEVEL | Logging level | info | No |
WORKSPACE_DIR | Working directory for operations | Current directory | No |
MCP_MODE | Enable MCP protocol mode (logs to stderr) | false | No |
MCP_QUIET | Suppress non-essential output in MCP mode | false | No |
CONTAINERIZATION_ASSIST_TOOL_LOGS_DIR_PATH | Directory path for tool execution logs (JSON format) | Disabled | No |
CUSTOM_POLICY_PATH | Directory path for custom policies (highest priority) | Not set | No |
Progress Notifications: Long-running operations (build, deploy, scan-image) emit real-time progress updates via MCP notifications. MCP clients can subscribe to these notifications to display progress to users.
Enable detailed logging of all tool executions to JSON files for debugging and auditing:
Log File Format:
ca-tool-logs-${timestamp}.jsonlca-tool-logs-2025-10-13T14-30-15-123Z.jsonlLog Contents:
The logging directory is validated at startup to ensure it's writable.
The policy system uses OPA Rego for security, quality, and compliance enforcement. Rego is the industry-standard policy language from Open Policy Agent, providing expressive rules with rich built-in functions.
Default Behavior (No Configuration Needed):
By default, all policies in the policies/ directory are automatically discovered and merged:
policies/security-baseline.rego - Essential security rules (root user prevention, secrets detection, privileged containers)policies/base-images.rego - Base image governance (Microsoft Azure Linux recommendation, no :latest tag, deprecated versions)policies/container-best-practices.rego - Docker best practices (HEALTHCHECK, multi-stage builds, layer optimization)This provides comprehensive out-of-the-box security and quality enforcement.
The policy system supports four priority-ordered search paths for easy customization:
Priority Order (highest to lowest):
CUSTOM_POLICY_PATH environment variable (highest priority)<git-root>/.containerization-assist/policy/ (tracked in git)~/.config/containerization-assist/policy/ (XDG-compliant)policies/ (shipped with package, lowest priority)Migration Note: The
policies.user/directory is deprecated. For project-specific policies, use.containerization-assist/policy/at your git root. For user-wide policies, use~/.config/containerization-assist/policy/. The old directory still works but will log a deprecation warning.
Or set a custom location in .vscode/mcp.json:
The policies.user.examples/ directory (included in the npm package) provides three ready-to-use examples:
| Example | Purpose | Use Case |
|---|---|---|
allow-all-registries.rego | Override MCR preference | Docker Hub, GCR, ECR, private registries |
warn-only-mode.rego | Advisory-only enforcement | Testing, gradual adoption, dev environments |
custom-organization-template.rego | Organization template | Custom labels, registries, compliance |
See policies.user.examples/README.md for detailed usage.
Three production-ready Rego policies are included by default:
policies/security-baseline.rego - Essential security rules (root user prevention, secrets detection, privileged containers)policies/base-images.rego - Base image governance (Microsoft Azure Linux recommendation, no :latest tag, deprecated versions)policies/container-best-practices.rego - Docker best practices (HEALTHCHECK, multi-stage builds, layer optimization)User policies override built-in policies by package namespace.
Policy File Format (Rego):
Priority Levels:
Using Policies:
Creating Custom Policies:
See Policy Customization Guide and existing policies in policies/ for examples.
Testing Policies:
The server performs fast-fail validation when Kubernetes tools are used. If you encounter Kubernetes errors:
Kubeconfig Not Found
Connection Timeout or Refused
Authentication or Authorization Errors
Invalid or Missing Context
MIT License - See LICENSE file for details.
See SUPPORT.md for information on how to get help with this project.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/containerization-assist)<a href="https://allmcps.com/mcp/containerization-assist"><img src="https://allmcps.com/api/badge/containerization-assist?style=directory" alt="Containerization Assist on AllMCPs" /></a>