Kubernetes MCP Server
An experimental Model Context Protocol (MCP) server that exposes Kubernetes resources to AI chat interfaces.
wasilak
README
Kubernetes MCP Server
An experimental Model Context Protocol (MCP) server that exposes Kubernetes functionality to AI chat interfaces through kubectl. This project demonstrates how to integrate Kubernetes with AI assistants, allowing them to help analyze and manage your cluster resources using familiar kubectl commands.
Overview
This project is built on top of the amazing mcpr project by @conikeec, which provides a protocol for AI assistants to interact with external tools and services.
The server provides a single kubectl
tool that can execute any kubectl command, giving AI assistants full access to your Kubernetes cluster's capabilities.
Use Cases
- Resource Discovery: Ask your AI assistant to list and describe resources using kubectl commands
- Troubleshooting: Have the AI help analyze logs and resource states using kubectl
- Resource Management: Get AI assistance in creating or modifying resources
- Documentation: Ask the AI to explain what a particular resource does in your cluster
- Security Analysis: Have the AI help identify potential security issues in your cluster configuration
Example Interaction
User: Can you show me all pods in the default namespace?
AI: I'll check that for you...
[Uses the kubectl tool with command "get pods -n default"]
Here are the pods in the default namespace:
NAME READY STATUS RESTARTS AGE
nginx-7c658794b9-2j4k5 1/1 Running 0 2d
Future Possibilities
The current implementation provides a foundation for many powerful interactions:
- Complex troubleshooting scenarios using multiple kubectl commands
- Automated resource analysis and recommendations
- Interactive debugging sessions
- Security scanning and recommendations
- Performance optimization suggestions
Installation
- Clone the repository:
git clone https://github.com/yourusername/mcp-kubernetes.git
cd mcp-kubernetes
- Build the project:
cargo build --release
- Configure your AI assistant to use the server (instructions depend on your AI platform)
Requirements
- Rust 1.70 or later
- kubectl installed and configured
- Kubernetes cluster with appropriate permissions
- kubeconfig configured for your cluster
Configuration
The server uses your default kubeconfig and kubectl installation. Make sure you have the necessary permissions to execute the commands you want to run.
Security Considerations
Since this server allows execution of arbitrary kubectl commands, it's important to:
- Run it with appropriate RBAC permissions
- Consider implementing command validation or whitelisting
- Monitor and audit command execution
- Use it in a controlled environment
Acknowledgments
This project is built on top of the mcpr project by @conikeec. Many thanks to the author for creating this excellent protocol and implementation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.