Skip to content
MCP server
Registry

LayerLint MCP Server

MCP server for Dockerfile linting, layer-cache rules, and analysis.

LayerLint scores 63 (Good), licensed MIT and written in Go. It installs as a local process. It does not declare tools yet. Filed under Developer tools. GitHub shows 0 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by vviveksharmaMITGo0 stars
Trust score
63Good
Trust score 63 of 100, Good

Good trust

63 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 63 comes from

22 + 20 + 0 + 10 + 4 + 7 = 63. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "vviveksharma-layerlint": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "ghcr.io/vviveksharma/layerlint:3.0.1"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

LayerLint

Release License: MIT Go Report Card CI

Dockerfile linter that finds layer-cache anti-patterns before they slow your CI builds.

alt text

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

CodeMeaning
0No findings at or above --fail-on-severity
1Findings at or above the threshold
2Usage, 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

ToolWhat it doesWhen to use it
LayerLintStatic 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.
HadolintGeneral 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.
DiveExplores 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_path
  • lint_dockerfile
  • list_rules
  • explain_rule

See MCP Tool Documentation for tool schemas and examples.

Contributing

See CONTRIBUTING.md and AGENTS.md.

  1. Add a rule file under internal/rules/
  2. Implement ID() + Check()
  3. Add metadata in internal/rules/meta.go
  4. Register in internal/scanner/scanner.go
  5. Add tests + a testFiles/*-failure fixture

Links

MIT License — Copyright (c) 2026 Vivek Sharma

Frequently asked questions

What is LayerLint MCP Server?

MCP server for Dockerfile linting, layer-cache rules, and analysis.

How do I install LayerLint MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. LayerLint MCP Server runs locally from the Docker image ghcr.io/vviveksharma/layerlint:3.0.1 with the command docker run -i --rm ghcr.io/vviveksharma/layerlint:3.0.1.

Is LayerLint MCP Server free and open source?

Yes. LayerLint MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does LayerLint MCP Server support remote (HTTP) connections?

No remote endpoint is listed for LayerLint MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is LayerLint MCP Server's trust score calculated?

LayerLint MCP Server scores 63 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server