About K8s Diagnostics MCP Server
K8s Diagnostics MCP Server is an MCP server published by himanshusharma89 in the Developer Tools category: a Model Context Protocol (MCP) server specifically designed for intelligent Kubernetes troubleshooting and diagnostics. Built to complement existing K8s management tools with advanced debugging capabilities. It has been installed 0 times through Conduid.
The repository has 2 stars and 2 forks, with the last commit 10 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx k8s-diagnostics-mcp-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about K8s Diagnostics MCP Server
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
Kubernetes Diagnostics MCP Server
A Model Context Protocol (MCP) server specifically designed for intelligent Kubernetes troubleshooting and diagnostics. Built to complement existing K8s management tools with advanced debugging capabilities.
🚀 Features
Advanced Diagnostics
- Pod Health Analysis: Deep inspection of pod issues with intelligent suggestions
- Cluster Health Overview: Comprehensive cluster health assessment
- Log Analysis: Automated error pattern detection in pod logs
- Workload Recommendations: Best practice suggestions for deployments and services
Intelligent Troubleshooting
- Identifies common issues: CrashLoopBackOff, ImagePullBackOff, resource constraints
- Provides contextual suggestions based on error patterns
- Analyzes restart counts, resource usage, and configuration issues
- Correlates events with pod problems
Built for Production
- Works with any Kubernetes cluster (in-cluster or external)
- Supports both kubeconfig and in-cluster authentication
- Comprehensive error handling and logging
- Follows Kubernetes client-go best practices
🛠 Installation
Prerequisites
- Go 1.21+
- Access to a Kubernetes cluster
- kubectl configured or running inside a K8s cluster
Build from Source
git clone <this-repo>
cd k8s-diagnostics-mcp
go mod tidy
go build -o k8s-diagnostics-mcp
Configuration
The server automatically detects your Kubernetes configuration:
- In-cluster: Uses service account when running inside K8s
- Local: Uses
~/.kube/configor$KUBECONFIGenvironment variable
🔧 Available Tools
diagnose_pod
Diagnose issues with a specific Kubernetes pod.
Parameters:
pod_name(required): Name of the pod to diagnosenamespace(optional): Kubernetes namespace (default: "default")
Returns:
- Pod status and phase information
- Container restart counts and ready status
- Identified issues and intelligent suggestions
- Recent events related to the pod
- Resource configuration analysis
analyze_cluster_health
Analyze overall Kubernetes cluster health and identify issues.
Returns:
- Node count and health status
- Namespace count
- List of problematic pods with diagnostics
- Resource usage overview
- Cluster-wide recommendations
get_workload_recommendations
Get recommendations for improving workload configurations.
Parameters:
namespace(optional): Kubernetes namespace to analyze (default: "default")
Returns:
- Best practice recommendations for deployments
- Resource limit suggestions
- High availability recommendations
analyze_pod_logs
Get and analyze pod logs for common error patterns.
Parameters:
pod_name(required): Name of the podnamespace(optional): Kubernetes namespace (default: "default")container(optional): Specific container namelines(optional): Number of log lines to retrieve (default: 100)
Returns:
- Raw log output
- Detected error patterns
- Contextual suggestions based on errors
- Log analysis summary
📚 Resources
k8s://troubleshooting/common-issues
Provides a comprehensive troubleshooting guide for common Kubernetes issues including:
- CrashLoopBackOff debugging
- ImagePullBackOff resolution
- Pending pod issues
- Performance troubleshooting
- Networking problem diagnosis
🎯 Use Cases
For DevOps Engineers
- Quick pod issue diagnosis during incidents
- Cluster health monitoring and alerting
- Automated troubleshooting workflows
- Best practice compliance checking
For Platform Teams
- Standardized troubleshooting procedures
- Knowledge sharing through AI-assisted debugging
- Proactive issue identification
- Developer self-service debugging
For AI-Assisted Operations
- Integration with ChatGPT, Claude, or other LLMs
- Natural language troubleshooting queries
- Automated incident response
- Intelligent alert correlation
🌟 What Makes This Unique
Unlike existing Kubernetes MCP servers that focus on basic cluster management, this server specializes in:
- Intelligent Issue Detection: Goes beyond simple status checks to identify root causes
- Contextual Suggestions: Provides actionable recommendations based on specific error patterns
- Log Analysis: Automatically parses and analyzes logs for common issues
- Production-Ready: Built with enterprise Kubernetes environments in mind
- CNCF Ecosystem Integration: Designed to work with other CNCF tools and best practices
🤝 Contributing
We welcome contributions! This project aligns with our commitment to the CNCF ecosystem and open-source community.
Development
# Run locally
go run main.go
# Run tests
go test ./...
# Build for production
go build -ldflags="-s -w" -o k8s-diagnostics-mcp
📞 Support
- Project Blog: Check our technical blog for K8s best practices
- GitHub Issues: Report bugs and feature requests
- CNCF Community: Engage with the broader Kubernetes community
🏷 License
[TODO]
Built with ❤️ for the CNCF community
README mirrored from the source repository 3 months ago. The original is authoritative.