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
Weather MCP Server
Provides weather information using the free and open-source Open-Meteo API. No API key required.
Mapbox
An MCP server for interacting with the Mapbox API, providing access to maps, navigation, and other location-based services.
StreamNative MCP Server
Integrate AI agents with StreamNative Cloud resources and Apache Kafka/Pulsar messaging systems.
Zuora Product Rate Plans
A remote MCP server for accessing Zuora product rate plans, deployable on Cloudflare Workers.
Coin MCP Server
Provides access to real-time cryptocurrency data from CoinMarketCap.
Kontent.ai
Create, manage, and explore your content and content model using natural language in any MCP-compatible AI tool.
Confluent Cloud
Interact with Confluent Cloud REST APIs to manage Kafka clusters, topics, and data.
Mengram
Human-like memory layer for AI agents with semantic, episodic, and procedural memory types, cognitive profiling, knowledge graph, and 12 MCP tools.
Umbrix MCP Server
An MCP server for the Umbrix CTI platform, providing AI-powered threat intelligence.
CryptoTwitter.Space x402 MCP Server
Provides pay-per-use access to premium CryptoTwitter.Space reports with automated revenue distribution.