Server data from the Official MCP Registry
MCP server for Dockerfile linting, layer-cache rules, and analysis.
About
MCP server for Dockerfile linting, layer-cache rules, and analysis.
Security Report
LayerLint is a read-only Dockerfile linter exposing scan and lint tools over MCP stdio, with no authentication required and no evident malicious behavior, exfiltration, shell execution, or hardcoded secrets in the provided code. Its file-read permissions match its purpose of scanning Dockerfiles, and the MCP tools are annotated read-only. Minor observations include the lack of path restriction on scan_path and the unauthenticated nature of the local stdio server, which are reasonable for a local developer tool. Supply chain analysis found 8 known vulnerabilities in dependencies (0 critical, 3 high severity).
9 files analyzed · 11 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
Install command not verified. See the repository for install instructions.
View repositoryDocumentation
View on GitHubFrom the project's GitHub README.
LayerLint
Dockerfile linter that finds layer-cache anti-patterns before they slow your CI builds.

Quickstart
go install github.com/vviveksharma/layerLint/cmd/layerlint@latest
layerlint scan .
Sample output:
HIGH Dockerfile:4
Dependency install runs after broad source copy
This dependency step runs after a broad COPY/ADD, so source changes can invalidate the dependency cache.
Suggestion:
Copy dependency manifests first, install dependencies, then copy the rest of the source.
Other install options:
# Checksum-verified install script (Linux/macOS)
curl -sSL https://raw.githubusercontent.com/vviveksharma/layerLint/main/install.sh | sh
# From a release archive (asset name: layerlint_<version>_<Os>_<Arch>.tar.gz|zip)
# Both layerlint_* and legacy layerLint_* names work; the installer resolves the
# exact name from the release's checksums.txt.
# Example: layerLint_2.0.0_Linux_x86_64.tar.gz or layerlint_2.1.0_Linux_x86_64.tar.gz
Website: https://layerlint.in
What it checks
- Copying everything before
npm install/go mod download(cache bust) - Using
FROM node:latest(non-reproducible) - Running as root
- Missing
.dockerignore - And more — see docs/rules.md or
layerlint rules list
Usage
layerlint scan . # recursive discovery
layerlint scan Dockerfile app.dockerfile # multiple files
layerlint scan --dockerfile Dockerfile # backwards-compatible flag
layerlint scan . --format json --output report.json
layerlint scan . --format sarif --output results.sarif
layerlint scan . --format html --output report.html
layerlint scan . --fail-on-severity high
layerlint rules list
layerlint rules explain broad-copy-before-deps
layerlint version
Exit codes
| Code | Meaning |
|---|---|
| 0 | No findings at or above --fail-on-severity |
| 1 | Findings at or above the threshold |
| 2 | Usage, parse, or runtime error |
JSON schema: docs/schema/report.schema.json
MCP
LayerLint ships a read-only Model Context Protocol server over stdio. It exposes
scan_path, lint_dockerfile, list_rules, and explain_rule to AI coding
agents. See mcp_tools.md for every command with real server
responses.
Claude Desktop / Cursor:
{"mcpServers":{"layerlint":{"command":"layerlint","args":["mcp"]}}}
Claude Code:
claude mcp add layerlint -- layerlint mcp
Codex (~/.codex/config.toml):
[mcp_servers.layerlint]
command = "layerlint"
args = ["mcp"]
LayerLint vs Hadolint vs Dive
| Tool | What it does | When to use it |
|---|---|---|
| LayerLint | Static Dockerfile lint focused on layer-cache anti-patterns (and related reproducibility/security checks). Offline CLI + CI/Action. | You want fast CI gates for cache-busting Dockerfile patterns. |
| Hadolint | General Dockerfile linter (best-practice rules) that also uses ShellCheck for shell inside RUN. | Broad Dockerfile style/best-practice linting, including shell in RUN. Source: hadolint/hadolint. |
| Dive | Explores a built image’s layers, file changes, and estimated wasted space. | After build, inspect image contents/efficiency. Source: wagoodman/dive. |
Overlap: LayerLint and Hadolint both lint Dockerfiles statically; they emphasize different rule sets. Dive analyzes images, not Dockerfiles. Many teams use a Dockerfile linter in CI and Dive when investigating image size.
CI / GitHub Action
- uses: vviveksharma/layerLint@main
with:
dockerfile: ./Dockerfile
fail-on-severity: high
More examples: docs/ci-cd-integration.md and .github/workflows/examples/.
Pre-commit
# .pre-commit-config.yaml
repos:
- repo: https://github.com/vviveksharma/layerLint
rev: v1.0.1 # pin a release tag
hooks:
- id: layerlint
Platform-specific install notes
tar -xzf layer[Ll]int_*.tar.gz
chmod +x layerlint
sudo mv layerlint /usr/local/bin/
Extract layerlint.exe and add its folder to PATH.
Testing
go test ./...
go build -o layerlint ./cmd/layerlint
./layerlint scan --dockerfile testFiles/broad-copy-before-deps-failure
Fixtures in testFiles/ are intentionally bad Dockerfiles (passed via --dockerfile).
Run LayerLint MCP using Docker
LayerLint can also run as a containerized MCP server.
Pull the image:
docker pull ghcr.io/vviveksharma/layerlint:3.0.1
Start the MCP server:
docker run -i --rm \
-v "$PWD":/work:ro \
-w /work \
ghcr.io/vviveksharma/layerlint:3.0.1 \
mcp
The project directory is mounted read-only at /work.
Configure your MCP client:
{
"mcpServers": {
"layerlint": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/absolute/path/to/project:/work:ro",
"-w",
"/work",
"ghcr.io/vviveksharma/layerlint:3.0.1",
"mcp"
]
}
}
}
Available MCP tools:
scan_pathlint_dockerfilelist_rulesexplain_rule
See MCP Tool Documentation for tool schemas and examples.
Contributing
See CONTRIBUTING.md and AGENTS.md.
- Add a rule file under
internal/rules/ - Implement
ID()+Check() - Add metadata in
internal/rules/meta.go - Register in
internal/scanner/scanner.go - Add tests + a
testFiles/*-failurefixture
Links
MIT License — Copyright (c) 2026 Vivek Sharma
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.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
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.
