kubectl-mcp-server  by rohitg00

CLI tool for interacting with Kubernetes clusters using natural language

created 4 months ago
669 stars

Top 51.3% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server for Kubernetes, enabling AI assistants like Claude and Cursor to interact with clusters via natural language. It targets developers and DevOps engineers seeking to leverage AI for Kubernetes management, offering a more intuitive and efficient way to perform complex operations.

How It Works

The tool implements the Model Context Protocol (MCP) by acting as a server that translates natural language queries into Kubernetes API operations. It registers various Kubernetes actions (listing pods, managing deployments, Helm operations, etc.) as MCP tools. A transport layer (stdio, SSE, HTTP) facilitates communication with AI clients, which then send requests to the server. The server processes these requests, executes the corresponding kubectl or Helm commands, formats the output, and returns it to the AI assistant.

Quick Start & Requirements

  • Install via pip: pip install kubectl-mcp-tool
  • Prerequisites: Python 3.9+, kubectl CLI configured, access to a Kubernetes cluster.
  • Verify installation: kubectl-mcp --help
  • AI Assistant Configuration: Requires manual JSON configuration for Claude Desktop, Cursor AI, or Windsurf, specifying the command to run the MCP server. An install.sh script is provided for automated setup.
  • Documentation: Installation Guide, Integration Guide

Highlighted Details

  • Supports core Kubernetes operations including resource management, Helm v3, port forwarding, and command execution within containers.
  • Integrates natural language processing for context-aware commands and human-friendly explanations of Kubernetes concepts.
  • Includes features for monitoring, diagnostics, and security auditing within the cluster.
  • Offers advanced capabilities like custom resource definition support and batch operations.

Maintenance & Community

The project is actively maintained by rohitg00. Contributions are welcome via Pull Requests.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The project is currently experiencing JSON parsing issues affecting its functionality with Claude, Cursor, and Windsurf. The author is independently working on a resolution, which may take time. Users are encouraged to submit Pull Requests if they can help debug these issues.

Health Check
Last commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
4
Issues (30d)
2
Star History
262 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.