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
Waldur MCP server
Integrates Waldur instances with Claude Desktop using the Model Context Protocol (MCP).
Spotify MCP Server
Interact with the Spotify API to manage playlists and control music playback.
tilt-mcp
Tilt MCP is a Model Context Protocol server that integrates with Tilt to provide programmatic access to Tilt resources, logs, and management operations for Kubernetes development environments
Sitequest Hosting
A remote Model Context Protocol (MCP) server for managing VPS servers and domains on Sitequest. Lets AI assistants provision, monitor, and configure infrastructure through natural language.
Paytm MCP Server
A server for managing Paytm payment links and transactions.
Knowi
Query databases, build dashboards, and analyze documents in natural language from Claude or any MCP client. 28+ tools, 70+ data sources.
Uptime Agent
Connects your Uptime Agent monitoring system to AI assistants.
Earthdata MCP Server
Interact with NASA Earth Data for efficient dataset discovery and retrieval for geospatial analysis.
Twelve Data
Interact with Twelve Data APIs to access real-time and historical financial market data for your AI agents.
MCP Kubernetes Server
Control Kubernetes clusters through interactions with Large Language Models (LLMs).