K8s MCP Server
MCP server for Kubernetes command execution, node inspection, and node-level diagnostics. Extension of k8s-mcp-server by alexei-led.
Features
- validated wrappers around
kubectl,helm,istioctl, andargocd - node-aware kubeconfig selection through
K8S_NODE_PREFIX_MAPPING run_checkup_on_nodeforkubectl node-shell ... checkup -nget_logs_on_nodefor collectingdmesg,journalctl,/var/log/*, and/var/crash- Kubernetes node inspection tools for status, labels, pods, and resources
Configuration
Set K8S_NODE_PREFIX_MAPPING to a JSON object that maps a node prefix to a kubeconfig file name:
{
"node-a": "cluster-a.config",
"edge": "edge-cluster.config"
}
The kubeconfig files are resolved relative to K8S_KUBECONFIG_DIR, which defaults to ~/.kube.
Example MCP Client Configuration
When installing from PyPI, you can use the package-matched command name k8s-mcp-extension.
The legacy k8s-mcp-server command remains available for backward compatibility.
{
"mcpServers": {
"k8s-server": {
"command": "k8s-mcp-extension",
"cwd": "/absolute/path/to/project",
"env": {
"K8S_KUBECONFIG_DIR": "/path/to/.kube",
"K8S_NODE_PREFIX_MAPPING": "{\"node-a\": \"cluster-a.config\", \"edge\": \"edge-cluster.config\"}",
"K8S_MCP_TIMEOUT": "600"
}
}
}
}
Development
Create the environment and run checks:
uv sync --extra dev
.venv/bin/python -m pytest
.venv/bin/python -m ruff check
Run the server locally:
.venv/bin/python -m k8s_mcp_server
After installing the package, either console script works:
k8s-mcp-extension
k8s-mcp-server
Metadata
Release files for k8s-mcp-extension 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| k8s_mcp_extension-0.1.1.tar.gz | 14.6 kB | With provenance | Details for k8s_mcp_extension-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| k8s_mcp_extension-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for k8s_mcp_extension-0.1.1-py3-none-any.whl |
Total release size: 33.5 kB
Release files / k8s_mcp_extension-0.1.1.tar.gz
| Download URL | k8s_mcp_extension-0.1.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09129c3be5d9f947ebed5282df6a155f2a7daef7c90f3a317c8abe8b888493fb
|
|
BLAKE2b-256 checksum How to use checksums |
4622c6ab2fc6d3e9fe0e469cb841f92fa397a935ba47c398f8f99c16a9947331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logRelease files / k8s_mcp_extension-0.1.1-py3-none-any.whl
| Download URL | k8s_mcp_extension-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16694a6f072f982e7b231559c8bfefa9eabafdab72537fdbf138dc2e7a2ce0b3
|
|
BLAKE2b-256 checksum How to use checksums |
449d72259f964fd64d77beaad9c4f949806ee53874979c999f47ca0e8bc974c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logSecurity for k8s-mcp-extension 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for k8s_mcp_extension-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.