Server data from the Official MCP Registry
Dockerfile layer and waste analyzer: layer sizes biggest first, with deterministic waste flags.
About
Dockerfile layer and waste analyzer: layer sizes biggest first, with deterministic waste flags.
Security Report
layercheck is a pure local text analyzer for Dockerfiles with no network calls, no shell execution, no file I/O in the MCP tool path, no authentication requirement, and no hardcoded secrets. The code is clean, input is validated with zod and explicit checks, and the only dependencies are the official MCP SDK and zod. No security findings of concern were identified. Supply chain analysis found 3 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue.
8 files analyzed · 6 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-cloudcorprecords-layercheck": {
"args": [
"-y",
"@reneturcios/layercheck"
],
"command": "npx"
}
}
}Documentation
View on GitHubFrom the project's GitHub README.
layercheck
Every RUN, COPY, and ADD in a Dockerfile leaves a layer in the image, and layers are where image size and build-cache pain live. layercheck reads a Dockerfile as plain text — no docker daemon, no build — and reports what it finds:
- every instruction, parsed with
\continuations joined and blank lines and#comments skipped, each marked with whether it produces a layer - the layer count, and — when you supply per-layer sizes
(as
docker historyreports them) — the total size and the layers ranked biggest first, so the fattest layer is the first thing you see - deterministic waste flags, each with the line it fires on:
CONSECUTIVE_RUN— a RUN immediately after another RUN; the two could be one layerBROAD_COPY_EARLY— aCOPY . .(or./) placed before the dependency install step, busting its cache on every source changeAPT_LEFTOVER—apt-get installwithout removing/var/lib/apt/listsin the same RUNADD_LOCAL— ADD used for an ordinary local file, where COPY is the clearer instruction (remote URLs and archives are fine)
If the supplied sizes do not line up with the number of layer-producing instructions, layercheck says so and names both counts instead of silently misaligning them.
CLI
npx @reneturcios/layercheck analyze --dockerfile Dockerfile
npx @reneturcios/layercheck analyze --dockerfile Dockerfile --sizes sizes.json
npx @reneturcios/layercheck --version
sizes.json is a JSON array of numbers: the size in bytes
of each layer-producing instruction, in Dockerfile order.
The analysis is printed as one JSON object:
{layer_count, total_size_bytes, instructions, biggest_layers, waste_flags}.
Exit codes: 0 on success, 1 on a runtime error
(including an unreadable file or a sizes length mismatch),
2 on a usage error.
MCP server
npx -y @reneturcios/layercheck mcp
MCP client config:
{
"mcpServers": {
"layercheck": {
"command": "npx",
"args": ["-y", "@reneturcios/layercheck", "mcp"]
}
}
}
Tools
analyze_dockerfile_layers— Analyze a Dockerfile's layers and flag wasted ones.dockerfile(string, required) — the Dockerfile textlayer_sizes(array of numbers, optional) — size in bytes of each layer-producing instruction, in Dockerfile order; its length must equal the number of layer-producing instructions
Docker
docker run -i ghcr.io/cloudcorprecords/layercheck
docker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/layercheck analyze --dockerfile /w/Dockerfile
Development
npm install
npm run build # tsc -> dist/
npm test # tsx --test test/*.test.ts (pure local, no network)
npm run dev # run the CLI from source
License
MIT — Copyright (c) 2026 Rene Turcios
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Fetch
Freeby Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
Git
Freeby Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
