Kubernetes Command Executor

Execute Kubernetes commands seamlessly from any MCP-compatible client, enabling you to manage clusters and resources efficiently. Retrieve and switch Kubernetes contexts, and run kubectl commands directly through a standardized protocol. Simplify Kubernetes operations by integrating them into your AI workflows securely in trusted environments.

Installation

Installing for Claude Desktop

Manual Configuration Required

This MCP server requires manual configuration. Run the command below to open your configuration file:

npx mcpbar@latest edit -c claude

This will open your configuration file where you can add the Kubernetes Command Executor MCP server manually.

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

  1. Configure Claude Desktop to use the MCP Kubernetes server by adding it to your claude_desktop_config.json:
{
  "mcpServers": {
    "kubernetes": {
      "command": "mcp-kubernetes"
    }
  }
}
  1. 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

Share:
Details:
  • Stars


    0
  • Forks


    0
  • Last commit


    2 months ago
  • Repository age


    3 months
  • License


    MIT
View Repository

Auto-fetched from GitHub .

MCP servers similar to Kubernetes Command Executor:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit