Kubernetes MCP Server
About
Inspect and debug Kubernetes clusters with read-only access to resources, CRDs, and pod logs.
Details
- Author
- k4mrul
- Categories
- Developer Tools, Other, Infrastructure
Jump to
Setup
Install Kubernetes MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/k4mrul/kubernetes-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Inspect and debug Kubernetes clusters with read-only access to resources, CRDs, and pod logs.
https://github.com/user-attachments/assets/89df70b0-65d1-461c-b4ab-84b2087136fa
A Model Context Protocol (MCP) server for Kubernetes debugging and inspection. This server provides read-only access to Kubernetes resources without the ability to create or modify them, making it safe for debugging and monitoring purposes.
- Read-only access: Safely inspect Kubernetes resources without modification capabilities
- CRD support: Works with any Custom Resource Definitions (CRDs) in your cluster
- Substring search: Discover resources by API group substring (e.g., "flux" for FluxCD, "argo" for ArgoCD)
- Built-in tools:
- list_resources: List and filter Kubernetes resources
- describe_resource: Get detailed information about specific resources
- get_pod_logs: Retrieve pod logs with advanced filtering
- rollout_restart: Perform a rolling restart of a Kubernetes deployment
- Access to a Kubernetes cluster (kubeconfig required)
If you have Go installed, this is the easiest way:
go install github.com/k4mrul/kubernetes-mcp@latest
The binary will be installed to$GOPATH/bin/kubernetes-mcp(or$HOME/go/bin/kubernetes-mcpifGOPATHis not set).
git clone https://github.com/k4mrul/kubernetes-mcp.git cd kubernetes-mcp go build -o kubernetes-mcp .
To use this MCP server, add it to your configuration file:
Basic setup (uses ~/.kube/config automatically):
{ "mcpServers": { "kubernetes": { "command": "/path/to/kubernetes-mcp" } } }
Replace/path/to/kubernetes-mcpwith the actual path to your binary.
{ "mcpServers": { "kubernetes": { "command": "/usr/local/bin/kubernetes-mcp", "env": { "KUBECONFIG": "/path/to/your/kubeconfig" } } } }
The server uses your default kubeconfig for cluster access. Ensure you have proper read permissions for the resources you want to inspect.
List Kubernetes resources with filtering capabilities.
- kind(required): Resource type (Pod, Deployment, Service, etc.) or "all" for discovery
- groupFilter(optional): Filter by API group substring to discover project-specific resources
- namespace(optional): Target namespace (defaults to all namespaces)
- labelSelector(optional): Filter by labels (e.g., "app=nginx")
- fieldSelector(optional): Filter by fields (e.g., "metadata.name=my-pod")
- limit(optional): Maximum number of resources to return
- timeoutSeconds(optional): Request timeout (default: 30s)
- showDetails(optional): Return full resource objects instead of summary
{ "kind": "Pod", "namespace": "default", "labelSelector": "app=nginx" }
{ "kind": "all", "groupFilter": "flux" }
Get detailed information about a specific resource.
- kind(required): Resource type
- name(required): Resource name
- namespace(optional): Target namespace
{ "kind": "Pod", "name": "nginx-pod", "namespace": "default" }
Retrieve pod logs with various filtering options.
- name(required): Pod name
- namespace(optional): Pod namespace (defaults to "default")
- container(optional): Specific container name
- tail(optional): Number of lines from the end (default: 100)
- since(optional): Duration like "5s", "2m", "3h"
- sinceTime(optional): RFC3339 timestamp
- timestamps(optional): Include timestamps
- previous(optional): Get logs from previous container instance
{ "name": "nginx-pod", "namespace": "default", "tail": 50, "since": "5m" }
The server automatically discovers and works with any Custom Resource Definitions in your cluster. Simply use the CRD's Kind name with thelist_resourcesordescribe_resourcetools.
Use thegroupFilterparameter to discover resources by API group substring:
- "flux"- Discover FluxCD resources (HelmReleases, Kustomizations, etc.)
- "argo"- Discover ArgoCD resources (Applications, AppProjects, etc.)
- "istio"- Discover Istio resources (VirtualServices, DestinationRules, etc.)
- "cert-manager"- Discover cert-manager resources (Certificates, Issuers, etc.)
This server is designed for debugging and inspection only:
- No resource creation, modification, or deletion capabilities
- Read-only access to cluster resources
- Safe to use in production environments for monitoring
This project is open source and welcomes contributions. Please ensure all changes maintain the read-only nature of the server.
This project is licensed under the MIT License - see theLICENSEfile for details.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Provides safe, read-only access to Kubernetes cluster resources for debugging and inspection.
Query and interact with kubernetes environments monitored by Metoro
A server for Kubernetes CLI tools like kubectl, istioctl, helm, and argocd, supporting multi-cluster management via dynamic kubeconfig.
An MCP server for kubectl, enabling AI assistants to interact with Kubernetes clusters through a standardized protocol.
A read-only MCP server for retrieving information and diagnosing issues in Kubernetes clusters.
Execute Kubernetes commands using kubectl from any MCP-compatible client. Requires a valid kubeconfig file.
A server for managing Kubernetes clusters using the Model Context Protocol.
Operate a k3s / Kubernetes cluster from your AI agent — health, logs, and guarded restart/scale/delete; safe by default with a read-only switch and namespace allowlist.
MCP access to cluster-wide L4 and L7 network traffic, packets, APIs, and complete payloads.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





