
Containerization Assist
io.github.Azure由 GitHub 帳號 Azure 發布v1.5.0更新於 Oct 24, 2026
TypeScript MCP server for AI-powered containerization workflows with Docker and Kubernetes support
概覽
一個本機 MCP 伺服器,讓助理分析程式碼倉庫、產生 Dockerfile、建置、掃描、標記與推送映像,並產生及部署 Kubernetes 清單。
- 可以做什麼
- 分析倉庫結構,辨識語言、框架與 monorepo 模組,並產生或修正 Dockerfile,附帶策略驗證與知識庫建議。準備建置脈絡、建置映像、掃描漏洞、標記並推送到映像倉庫。產生 Kubernetes、Helm、Kustomize 或 ACA 清單,準備叢集並驗證部署。執行引導式工作流程,例如本機 Kind 迴圈、AKS 迴圈,或撰寫自訂 OPA Rego 策略。查詢伺服器狀態,並為長時間操作送出進度通知。
- 適用情境
- 適合在容器化應用程式時,讓助理依分析、產生 Dockerfile、建置與掃描映像、部署到 Kubernetes 的順序走完整個流程。最適合一位工程師一次容器化一個應用程式,也支援含多個服務的 monorepo。
- 執行需求
- 透過 npm 套件以 stdio 在本機執行,需要 Node.js 20 或更新版本。需要執行中的 Docker 守護程序與可存取的 socket;Kubernetes 部署功能需要 kubeconfig、叢集存取權限與相應的 RBAC 權限。漏洞掃描可選裝 Trivy。選用環境變數包括 DOCKER_SOCKET、DOCKER_HOST、KUBECONFIG、K8S_NAMESPACE、LOG_LEVEL 與 CUSTOM_POLICY_PATH。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Containerization Assist,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Containerization Assist MCP Server
[Test Pipeline] [Version] [MCP SDK] [Node] [TypeScript] [License] [Docs]
An AI-powered containerization assistant that helps you build, scan, and deploy Docker containers through VS Code and other MCP-compatible tools.
Install
[Install in VS Code] [Install in VS Code Insiders]
Features
Core Capabilities
- 🐳 Docker Integration: Build, scan, and deploy container images
- ☸️ Kubernetes Support: Generate manifests and deploy applications
- 🤖 AI-Powered: Intelligent Dockerfile generation and optimization
- 🧠 Knowledge Enhanced: AI-driven content improvement with security and performance best practices
- 🔄 Intelligent Tool Routing: Automatic dependency resolution and execution
- 📊 Progress Tracking: Real-time progress updates via MCP notifications
- 🔒 Security Scanning: Built-in vulnerability scanning with AI-powered suggestions
- ✨ Smart Analysis: Context-aware recommendations
- Policy-Driven System (v3.0)
- Pre-generation configuration
- Knowledge filtering and weighting
- Template injection
- Semantic validation
- Cross-tool consistency
Policy System (v3.0)
Full control over containerization through Rego policies:
- Configure Before Generation: Set defaults for resources, base images, build strategy
- Guide During Generation: Filter knowledge base, inject templates automatically
- Validate After Generation: Semantic checks, security scoring, cross-tool consistency
Example Policies Included:
- Environment-based strategy (dev/staging/prod)
- Cost control by team tier
- Security-first organization
- Multi-cloud registry governance
- Speed-optimized development
See Policy Authoring Guide for details.
System Requirements
- Node.js 20+
- Docker or Docker Desktop
- Optional: Trivy (for security scanning features)
- Optional: Kubernetes (for deployment features)
Manual Install
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.
SDK Usage (Without MCP)
For direct tool usage without MCP protocol (e.g., VS Code extensions, programmatic access):
See the SDK integration examples for full SDK documentation.
Windows Users
For Windows, use the Windows Docker pipe:
Quick Start
The easiest way to understand the containerization workflow is through an end-to-end example:
Single-App Containerization Journey
This MCP server guides you through a complete containerization workflow for a single application. The journey follows this sequence:
- Analyze Repository → Understand your application's language, framework, and dependencies
- Generate Dockerfile → Create an optimized, security-hardened container configuration
- Build Image → Compile your application into a Docker image
- Scan Image → Identify security vulnerabilities and get remediation guidance
- Tag Image → Apply appropriate version tags to your image
- Generate K8s Manifests → Create deployment configurations for Kubernetes
- Prepare Cluster → Set up namespace and prerequisites, then deploy with
kubectl apply - Verify → Confirm deployment health and readiness
Prerequisites
Before starting, ensure you have:
- Docker: Running Docker daemon with accessible socket (
docker psshould work)- Linux/Mac:
/var/run/docker.sockaccessible - Windows: Docker Desktop with
//./pipe/docker_engineaccessible
- Linux/Mac:
- Kubernetes (optional, for deployment features):
- Valid kubeconfig at
~/.kube/config - Cluster connectivity (
kubectl cluster-infoshould work) - Appropriate RBAC permissions for deployments, services, namespaces
- Valid kubeconfig at
- Node.js: Version 20 or higher
- MCP Client: VS Code with Copilot, Claude Desktop, or another MCP-compatible client
Example Workflow with Natural Language
Once configured in your MCP client (VS Code Copilot, Claude Desktop, etc.), use natural language:
Starting the Journey:
Building the Container:
Deploying to Kubernetes:
Single-Operator Model
This server is optimized for one engineer containerizing one application at a time. Key characteristics:
- Sequential execution: Each tool builds on the results of previous steps
- Fast-fail validation: Clear, actionable error messages if Docker/Kubernetes are unavailable
- Deterministic AI generation: Tools provide reproducible outputs through built-in prompt engineering
- Real-time progress: MCP notifications surface progress updates to clients during long-running operations
Multi-Module/Monorepo Support
The server detects and supports monorepo structures with multiple independently deployable services:
- Automatic Detection:
analyze-repoidentifies monorepo patterns (npm workspaces, services/, apps/ directories) - Automated Multi-Module Generation:
generate-dockerfileandgenerate-k8s-manifestssupport multi-module workflows - Conservative Safeguards: Excludes shared libraries and utility folders from containerization
Multi-Module Workflow Example:
Detection Criteria:
- Workspace configurations (npm, yarn, pnpm workspaces, lerna, nx, turborepo, cargo workspace)
- Separate package.json, pom.xml, go.mod, Cargo.toml per service
- Independent entry points and build configs
- EXCLUDES: shared/, common/, lib/, packages/utils directories
Available Tools
The server provides 11 MCP tools organized by functionality:
Analysis & Planning
Dockerfile Operations
Image Operations
Kubernetes Operations
Utilities
Workflow Tools
Interactive workflow tools that return step-by-step plans (output is collapsed by default in VS Code Copilot Chat):
Version Tracking
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:
Kubernetes Manifests (generate-k8s-manifests):
The tool output includes attributionLabels.annotations applied to all generated Kubernetes resource metadata:
Organizations can add custom labels via the policy system's orgStandards.requiredLabels configuration.
Supported Technologies
Languages & Frameworks
- Java: Spring Boot, Quarkus, Micronaut (Java 8-21)
- .NET: ASP.NET Core, Blazor (.NET 6.0+)
Build Systems
- Maven, Gradle (Java)
- dotnet CLI (.NET)
Configuration
Environment Variables
The following environment variables control server behavior:
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.
Tool Execution Logging
Enable detailed logging of all tool executions to JSON files for debugging and auditing:
Log File Format:
- Filename:
ca-tool-logs-${timestamp}.jsonl - Example:
ca-tool-logs-2025-10-13T14-30-15-123Z.jsonl
Log Contents:
The logging directory is validated at startup to ensure it's writable.
Policy System
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.
Policy Customization
The policy system supports four priority-ordered search paths for easy customization:
Priority Order (highest to lowest):
- Custom directory via
CUSTOM_POLICY_PATHenvironment variable (highest priority) - Project directory at
<git-root>/.containerization-assist/policy/(tracked in git) - Global directory at
~/.config/containerization-assist/policy/(XDG-compliant) - Built-in
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.
Quick Start
Or set a custom location in .vscode/mcp.json:
Pre-Built Example Policies
The policies.user.examples/ directory (included in the npm package) provides three ready-to-use examples:
See policies.user.examples/README.md for detailed usage.
Built-In Policies
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:
- 90-100: Security rules (highest priority)
- 70-89: Quality rules
- 50-69: Performance rules
- 30-49: Compliance rules
Using Policies:
Creating Custom Policies:
See Policy Customization Guide and existing policies in policies/ for examples.
Testing Policies:
MCP Inspector (Testing)
Troubleshooting
Docker Connection Issues
MCP Connection Issues
Kubernetes Connection Issues
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
License
MIT License - See LICENSE file for details.
Support
See SUPPORT.md for information on how to get help with this project.
Trademarks
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.
來源:README.md,提交 c724271
工具
0版本歷史
1- v1.5.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分