dive-mcp

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: MIT

README

dive-mcp

CI Dive compatibility Go Release Go Reference MCP dive

MCP server for dive — inspect container image layers, find wasted space, and run CI-style efficiency checks from AI coding assistants.

dive compatibility: dive v0.10.0 – v0.13.x (CI-tested). Uses your installed dive binary — not bundled. Details →

Quick start

1. Install prerequisites

# dive — https://github.com/wagoodman/dive
brew install dive          # macOS
# or: https://github.com/wagoodman/dive#installation

# Docker or Podman must be running for image analysis
docker info >/dev/null

2. Install dive-mcp

go install github.com/codenio/dive-mcp/cmd/dive-mcp@latest
dive-mcp --version

3. Add to your MCP client

Cursor.cursor/mcp.json:

{
  "mcpServers": {
    "dive-mcp": {
      "command": "dive-mcp",
      "args": []
    }
  }
}

Claude Code:

claude mcp add dive-mcp -- dive-mcp

Codex~/.codex/config.toml:

[mcp_servers.dive-mcp]
command = "dive-mcp"
args = []

Claude Desktop and env vars: docs/configuration.md · examples/

4. Analyze an image

Restart your MCP client, then ask your assistant:

Analyze alpine:latest with dive-mcp and tell me the efficiency score and top wasted files.

The assistant can call analyze_image, list_layers, get_wasted_space, and ci_check. See docs/tools.md for the full tool reference.

Tools

  • 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

See docs/tools.md for parameters and output fields.

Build from source: git clonemake build — see docs/development.md.

Documentation

Doc Contents
configuration.md Client setup and environment variables
tools.md MCP tool reference
development.md Build, test, pre-commit hooks
architecture.md How dive-mcp invokes and parses dive
dive-compatibility.md Supported dive versions
releasing.md Maintainer release workflow

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.

Directories

Path Synopsis
cmd
dive-mcp command
Command dive-mcp is an MCP (Model Context Protocol) stdio server that wraps the dive CLI (github.com/wagoodman/dive) so AI tools can analyze container image layers and wasted space.
Command dive-mcp is an MCP (Model Context Protocol) stdio server that wraps the dive CLI (github.com/wagoodman/dive) so AI tools can analyze container image layers and wasted space.
internal
dive
Package dive wraps invocations of the wagoodman/dive CLI and parses its JSON analysis output.
Package dive wraps invocations of the wagoodman/dive CLI and parses its JSON analysis output.
server
Package server registers dive-mcp's MCP tools on an mcp.Server.
Package server registers dive-mcp's MCP tools on an mcp.Server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL