Exposes API endpoints for health checks, service discovery, natural language command processing, and direct command execution through a REST interface
Converts natural language requests into valid kubectl commands for Kubernetes cluster management, supporting operations like viewing pods, services, and other resources across namespaces with built-in security validation
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kube Core MCPshow me all running pods in the production namespace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kube Core MCP
A Kubernetes command processing service that converts natural language requests into valid kubectl commands.
Features
Natural language to kubectl command conversion
Command validation and security checks
Support for common kubectl operations
AWS Bedrock integration for LLM processing
Related MCP server: GitHub MCP Server
Prerequisites
Python 3.8+
AWS credentials configured
kubectl installed and configured
Node.js and npm (for frontend)
Setup
Clone the repository:
git clone <repository-url>
cd kube-core-mcpCreate and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtConfigure AWS credentials:
export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_REGION=your_regionStart the FastAPI server:
python src/server.pyAPI Documentation
Health Check
curl http://localhost:3000/healthServices
curl http://localhost:3000/api/servicesNatural Language Commands
curl -X POST http://localhost:3000/api/nl \
-H "Content-Type: application/json" \
-d '{"message": "show me the pods in default namespace"}'Direct Commands
curl -X POST http://localhost:3000/api/command \
-H "Content-Type: application/json" \
-d '{"command": "kubectl get pods -n default"}'Security
The service operates in two security modes:
STRICT (default):
Only allows predefined command patterns
Validates all commands against allowed patterns
Prevents dangerous operations
PERMISSIVE:
Allows more flexible command patterns
Still maintains basic security checks
Useful for development and testing
Development
Running Tests
pytest tests/Code Style
black src/ tests/
flake8 src/ tests/Contributing
Fork the repository
Create a feature branch
Make your changes
Run tests
Submit a pull request
License
[Add License Information]