Skip to main content
Glama
vivekbala

Kubernetes MCP Server

by vivekbala

Kubernetes MCP Server - Production Ready

A production-ready Model Context Protocol (MCP) server for Kubernetes observability and debugging.

πŸš€ What This Provides

  • MCP Server: Standardized interface for Kubernetes cluster access

  • Real-time Data: Live access to pods, services, nodes, and events

  • Debugging Tools: Built-in tools for cluster health and issue analysis

  • Production Ready: Clean, tested code ready for production use

Related MCP server: mcp-kubernetics

πŸ“‹ Prerequisites

  • Kubernetes cluster (local or remote)

  • kubectl configured and working

  • Python 3.11+

  • pip package manager

πŸ› οΈ Quick Setup

1. Clone the Repository

git clone https://github.com/vivekbala/mcp.git
cd mcp

2. Install Dependencies

python3.11 -m pip install -r requirements.txt

3. Verify Setup

python3.11 verify_setup.py

πŸ”§ MCP Server Features

Resources Available

  • k8s://pods - All pods with status and details

  • k8s://services - Services with endpoints and connectivity info

  • k8s://nodes - Node health and capacity info

  • k8s://events - Recent cluster events for troubleshooting

  • k8s://deployments - Deployment status and replica info

Tools Available

  • cluster_health_check - Comprehensive health analysis

  • check_pod_status - Pod status and issue identification

  • analyze_service_connectivity - Service endpoint analysis

  • get_pod_logs - Log retrieval and analysis

πŸ“± Usage Examples

Basic Demo

python3.11 demo_script.py

Debugging Demo

python3.11 debug_demo.py

Run MCP Server

python3.11 mcp_server.py

πŸ”— Integration Options

Claude Desktop

{
  "mcpServers": {
    "kubernetes-observability": {
      "command": "python3.11",
      "args": ["/path/to/mcp_server.py"],
      "env": {
        "KUBECONFIG": "/path/to/kubeconfig"
      }
    }
  }
}

Custom Clients

  • Use the MCP client libraries

  • Build custom debugging interfaces

  • Integrate with existing monitoring tools

πŸ“š Learning Resources

🀝 Contributing

Feel free to submit issues, feature requests, or pull requests to improve this MCP server.

πŸ“„ License

This project is open source and available under the MIT License.


Ready to debug Kubernetes like a pro? πŸš€

Clone this repo and start debugging your cluster issues today!

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides MCP multi-cluster Kubernetes management and operations, featuring a management interface, logging, and nearly 50 built-in tools covering common DevOps and development scenarios. Supports both standard and CRD resources.
    887
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered Kubernetes management using natural language, supporting kubectl, Helm, diagnostics, and port forwarding via MCP protocol.
    MIT