Kubernetes MCP Server
Provides comprehensive Kubernetes cluster management capabilities including listing and monitoring resources (pods, services, deployments, namespaces), viewing logs, describing pod details, getting cluster events, port-forwarding services, scaling deployments, and executing kubectl commands through natural language.
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., "@Kubernetes MCP Servershow me the logs for the nginx pod in the default 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.
Kubernetes MCP Server
A powerful MCP (Model Context Protocol) server for Kubernetes operations that allows you to manage your Kubernetes clusters using natural language through AI assistants.
🌟 Features
� Resource Listing
List pods, services, deployments, and namespaces
Get detailed resource information
🔍 Monitoring & Debugging
View pod logs with customizable line counts
Describe pod details for troubleshooting
Get cluster events for debugging
⚡ Operations
Port-forward services to local ports
Scale deployments up or down
Execute kubectl commands through natural language
🎯 Developer Focused
Designed for common Kubernetes developer workflows
Easy to extend with additional tools
Comprehensive error handling
Related MCP server: Kube MCP
� Available Tools
Tool | Description | Parameters |
| List pods in a namespace |
|
| List services in a namespace |
|
| List deployments in a namespace |
|
| List all namespaces | None |
| Get detailed pod information |
|
| Get pod logs |
|
| Port forward a service |
|
| Scale a deployment |
|
| Get cluster events |
|
📋 Requirements
Node.js v18+
kubectl installed and configured to access your cluster
@modelcontextprotocol/cli (optional, for testing)
# Verify kubectl works
kubectl get pods
# Install MCP CLI (optional)
npm install -g @modelcontextprotocol/cli🔧 Installation
# Clone or download this repository
cd kube-mcp
# Install dependencies
npm install
# Run tests to verify setup
node test.js🏃 Running the Server
# Start the MCP server
npm start
# Or run directly
node server.jsThe server runs on stdio transport and will output: Kubernetes MCP server running on stdio
🔌 Connecting to MCP Clients
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kubernetes": {
"command": "node",
"args": ["/absolute/path/to/kube-mcp/server.js"]
}
}
}Other MCP Clients
For clients that support MCP, configure them to connect to this server using:
Command:
nodeArgs:
["/path/to/server.js"]Transport: stdio
💡 Example Usage
Once connected to an MCP-compatible client, you can use natural language like:
"List all pods in the default namespace"
"Show me the logs for the nginx pod"
"Port forward the web service on port 8080 to my local port 3000"
"Scale the api deployment to 3 replicas"
"What events happened recently in the kube-system namespace?"
🧪 Testing
Run the test script to verify everything is working:
node test.jsThis will check:
✅ kubectl availability
✅ Server syntax validation
✅ Server startup capability
✅ Cluster connectivity
🛠️ Development
To add new tools:
Add the tool definition to the
toolsarray inserver.jsAdd a corresponding case in the
CallToolRequestSchemahandlerImplement the kubectl command and response formatting
Test with
node test.js
⚠️ Security Notes
This server executes kubectl commands on your system
Ensure your kubectl context is set to the correct cluster
Be cautious when scaling deployments or port-forwarding in production
Review all operations before execution
📜 License
MIT License - feel free to modify and distribute
🤝 Contributing
Contributions are welcome! Please feel free to submit issues and enhancement requests.
Restart your MCP-enabled client (Cursor AI, Claude Desktop, VS Code MCP extension, etc.)
Now you can issue natural commands like:
“Show me all pods in namespace payments”
“Port forward postgres service to local 5432”
“Get logs from api-pod”
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables advanced management of Kubernetes clusters through natural language interactions. Supports querying, managing, and monitoring pods, deployments, nodes, and logs across multiple contexts and namespaces.10MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with and manage Kubernetes clusters, supporting operations on pods, deployments, services, configmaps, secrets, namespaces, metrics, and events with built-in safety features for destructive actions.9141MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Kubernetes clusters through 50 specialized tools for comprehensive cluster management. Supports both local kubectl and remote SSH-based execution for managing pods, deployments, services, and other Kubernetes resources.49MIT
- AlicenseBqualityBmaintenanceEnables AI assistants to manage Docker containers and Kubernetes resources through natural language, supporting operations like container management, image building, and pod/deployment/service management.9MIT
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Create and manage AI agents that collaborate and solve problems through natural language interacti…
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/thekaranpargaie/kube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server