MCP server for Kubernetes manifest and Helm chart validation
Project description
kube-lint-mcp
mcp-name: io.github.archy-rock3t-cloud/kube-lint-mcp
MCP server that validates Kubernetes manifests and Helm charts with kubectl dry-run before you commit — preventing deployment and GitOps reconciliation failures.
Works with Claude Code, Claude Desktop, and any MCP-compatible client.
How it works
You: "Validate the flux manifests in ./k8s/infrastructure/"
Claude: calls list_kube_contexts → presents list → you confirm "staging"
calls select_kube_context → flux_dryrun
FluxCD Dry-Run Validation
Context: staging
================================================
File: infrastructure/redis.yaml
Client dry-run: PASS
Server dry-run: PASS
File: infrastructure/postgres.yaml
Client dry-run: PASS
Server dry-run: FAIL
Error: namespace "db" not found
================================================
Summary: 1 passed, 1 failed
DO NOT COMMIT - Fix errors first!
No flags, no CLI args — the AI agent picks the right tool automatically.
Prerequisites
- Python 3.12+
- kubectl configured with cluster access
- helm (for Helm chart validation)
- flux (for Flux operations)
Installation
pip (requires CLI tools installed separately)
pip install kube-lint-mcp
Docker (batteries included)
The Docker image ships with kubectl, helm, flux, and kubeconform — no local installs needed.
docker pull sophotechlabs/kube-lint-mcp:latest
# or: docker pull ghcr.io/sophotechlabs/kube-lint-mcp:latest
Note: If your kubeconfig uses external auth plugins (e.g.
gke-gcloud-auth-plugin,aws-iam-authenticator), those binaries are not included in the image. Use the pip install method for those clusters, or embed tokens directly in your kubeconfig.
Configuration
Claude Code (pip)
Add to your project's .mcp.json:
{
"mcpServers": {
"kube-lint": {
"command": "python",
"args": ["-m", "kube_lint_mcp"]
}
}
}
Claude Code (Docker)
{
"mcpServers": {
"kube-lint": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "${HOME}:${HOME}:ro",
"-e", "KUBECONFIG=${HOME}/.kube/config",
"ghcr.io/sophotechlabs/kube-lint-mcp:latest"
]
}
}
}
The $HOME:$HOME:ro mount preserves absolute paths that MCP clients send to the server. The read-only flag ensures the container cannot modify your files.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows):
{
"mcpServers": {
"kube-lint": {
"command": "python",
"args": ["-m", "kube_lint_mcp"]
}
}
}
Tools
| Tool | Description |
|---|---|
select_kube_context |
Pick a cluster context (held in memory, no kubeconfig mutation). Call first. |
list_kube_contexts |
Show available kubectl contexts and which is selected |
flux_dryrun |
Validate FluxCD YAML with client + server dry-run |
kustomize_dryrun |
Build and dry-run a Kustomize overlay end-to-end |
helm_dryrun |
Lint, render, and dry-run a Helm chart end-to-end |
flux_check |
Verify Flux installation health |
flux_status |
Show Flux reconciliation status across namespaces |
kubeconform_validate |
Offline schema validation — no cluster needed |
Workflow
list_kube_contexts— see available clustersselect_kube_context— target a cluster (in-memory only, never mutates kubeconfig)flux_dryrun,kustomize_dryrun, orhelm_dryrun— validate before committing- Only commit when all checks pass
Safety
The server never mutates your kubeconfig. Context is held in memory and passed via --context flag on every subprocess call. This is a deliberate safety choice for agentic use — the AI cannot accidentally switch your global kubectl context.
Development
pip install -e ".[dev]"
make test # 100% coverage
make lint # flake8
Contributing
- Fork the repo
- Create a feature branch
- Make sure
make testandmake lintpass - Open a PR
License
If this tool saves you from a bad deploy, consider sponsoring.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kube_lint_mcp-0.4.3.tar.gz.
File metadata
- Download URL: kube_lint_mcp-0.4.3.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f024c84082314dd3b31b3653a05ce579df9c6a3f55548b85a7dcba96ebd9bc
|
|
| MD5 |
cc287893eb65bb890da619372b96a8e0
|
|
| BLAKE2b-256 |
5d439fd9be736af5c77a4870d84a3ba9c4261b4b2d58b1d28a8437461a3636e0
|
Provenance
The following attestation bundles were made for kube_lint_mcp-0.4.3.tar.gz:
Publisher:
release-on-merge.yml on sophotechlabs/kube-lint-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_lint_mcp-0.4.3.tar.gz -
Subject digest:
e1f024c84082314dd3b31b3653a05ce579df9c6a3f55548b85a7dcba96ebd9bc - Sigstore transparency entry: 926976332
- Sigstore integration time:
-
Permalink:
sophotechlabs/kube-lint-mcp@ff429a5286cfffff3c11e1b0a4179eebe2620010 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sophotechlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-merge.yml@ff429a5286cfffff3c11e1b0a4179eebe2620010 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file kube_lint_mcp-0.4.3-py3-none-any.whl.
File metadata
- Download URL: kube_lint_mcp-0.4.3-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84decb7848e7760ed61c0e1e6d02f2d9c3336c79639b08fab580a1f1245852f8
|
|
| MD5 |
2553583ce73309f607cac76bfc115b7b
|
|
| BLAKE2b-256 |
35182a449742772c3b5fee1d11dc4d764f364a7439a40078e18d802f3efe5627
|
Provenance
The following attestation bundles were made for kube_lint_mcp-0.4.3-py3-none-any.whl:
Publisher:
release-on-merge.yml on sophotechlabs/kube-lint-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kube_lint_mcp-0.4.3-py3-none-any.whl -
Subject digest:
84decb7848e7760ed61c0e1e6d02f2d9c3336c79639b08fab580a1f1245852f8 - Sigstore transparency entry: 926976362
- Sigstore integration time:
-
Permalink:
sophotechlabs/kube-lint-mcp@ff429a5286cfffff3c11e1b0a4179eebe2620010 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sophotechlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-on-merge.yml@ff429a5286cfffff3c11e1b0a4179eebe2620010 -
Trigger Event:
pull_request
-
Statement type: