MCP Kubernetes
Execute Kubernetes commands using kubectl from any MCP-compatible client. Requires a valid kubeconfig file.
MCP Kubernetes
A Model Context Protocol (MCP) server for executing Kubernetes commands from Claude Desktop or any MCP-compatible client.
Installation
You can install this tool directly using Go:
go install github.com/BhagyaAmarasinghe/mcp-kubernetes@latest
Usage
Starting the server
Run the MCP Kubernetes server:
mcp-kubernetes
By default, the server runs using stdio transport. You can specify a different port for HTTP transport with the -port flag:
mcp-kubernetes -port 8080
Using with Claude Desktop
- Configure Claude Desktop to use the MCP Kubernetes server by adding it to your
claude_desktop_config.json:
{
"mcpServers": {
"kubernetes": {
"command": "mcp-kubernetes"
}
}
}
- You can now use Claude to execute Kubernetes commands, such as:
- "Show me the pods in the default namespace"
- "List all services across all namespaces"
- "Check the status of my deployment named my-app"
Available Commands
The MCP Kubernetes server supports the following MCP requests:
execute
Executes a kubectl command:
{
"command": "get pods -n default"
}
get-contexts
Retrieves a list of available Kubernetes contexts:
{}
current-context
Gets the current Kubernetes context:
{}
set-context
Sets the current Kubernetes context:
{
"context": "minikube"
}
Security
This MCP server executes kubectl commands directly on your machine, so it should only be used in trusted environments. It does not implement authentication or authorization controls by default.
Requirements
- Go 1.23 or higher
- kubectl installed and in your PATH
- A valid kubeconfig file
License
MIT
Related Servers
IPGeolocation.io MCP Server
Official MCP server for IP geolocation, IP security, abuse contacts, ASN, timezone, astronomy, and user-agent parsing.
Twelve Data
Interact with Twelve Data APIs to access real-time and historical financial market data for your AI agents.
Kubernetes MCP Server
A versatile MCP server for Kubernetes and OpenShift, distributed as a native binary, npm/Python package, or Docker image.
LlamaIndex MCP demos
Expose LlamaCloud services as MCP tools for building and managing LLM applications.
Hetzner Cloud MCP Server
MCP server for the Hetzner Cloud API — manage servers, networks, volumes, firewalls, load balancers, and more. 104 tools across 13 resource domains.
k8s Pilot
A lightweight, centralized control plane for managing multiple Kubernetes clusters using kubeconfig or in-cluster configuration.
Color Me Shop
Manage products, orders, and customers on Color Me Shop
Lemon Squeezy Server
Integrates with Lemon Squeezy to manage subscriptions, checkouts, and products.
Transloadit MCP Server
Official MCP server for Transloadit. Process video, images, documents, and audio through 80+ media processing Robots via natural language.
APOGEOAPI
Geographic data, live exchange rates, and IP geolocation for Claude Desktop, Cursor, and any MCP-compatible AI assistant.