dive-mcp¶
MCP server for dive — inspect container image layers, find wasted space, and run CI-style efficiency checks from AI coding assistants.
-
Layer analysis
Inspect image layers, digests, sizes, and build commands without leaving your editor.
-
Efficiency scoring
Get wasted-byte totals, efficiency scores, and CI-style pass/fail thresholds.
-
Works in your assistant
Drop-in configs for Cursor, Claude Code, Codex, and Claude Desktop.
Quick start¶
Prerequisites
Install dive and ensure Docker or Podman is
running. dive-mcp shells out to your local dive binary — it is not bundled.
Restart your MCP client, then ask:
Analyze
alpine:latestwith dive-mcp and tell me the efficiency score and top wasted files.
See Configuration for environment variables and example configs.
Tools¶
| Tool | Description |
|---|---|
analyze_image |
Image size, efficiency score, wasted bytes, layer count |
list_layers |
Per-layer digest, size, and build command |
get_wasted_space |
Top duplicated files across layers |
ci_check |
Pass/fail against efficiency and waste thresholds |
Documentation¶
| Doc | Contents |
|---|---|
| Configuration | Client setup and environment variables |
| MCP tools | MCP tool reference |
| Development guide | Build, test, pre-commit hooks |
| Architecture | How dive-mcp invokes and parses dive |
| Dive compatibility | Supported dive versions |
| Releasing | Maintainer release workflow |