trackmcp
Back to directory
BhagyaAmarasinghe

mcp-kubernetes

View on GitHub

MCP Kubernetes

0 stars GoOthers Updated Apr 18, 2025

Documentation

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:

bash
go install github.com/BhagyaAmarasinghe/mcp-kubernetes@latest

Usage

Starting the server

Run the MCP Kubernetes server:

bash
mcp-kubernetes

By default, the server runs using stdio transport. You can specify a different port for HTTP transport with the `-port` flag:

bash
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`:

json
{
  "mcpServers": {
    "kubernetes": {
      "command": "mcp-kubernetes"
    }
  }
}

2. You can now use Claude to execute Kubernetes commands, such as:

    Available Commands

    The MCP Kubernetes server supports the following MCP requests:

    execute

    Executes a kubectl command:

    json
    {
      "command": "get pods -n default"
    }

    get-contexts

    Retrieves a list of available Kubernetes contexts:

    json
    {}

    current-context

    Gets the current Kubernetes context:

    json
    {}

    set-context

    Sets the current Kubernetes context:

    json
    {
      "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

    Frequently asked questions

    What is mcp-kubernetes?

    mcp-kubernetes is MCP Kubernetes

    How do I install mcp-kubernetes?

    Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

    Is mcp-kubernetes open source?

    Yes — it is hosted on GitHub at https://github.com/BhagyaAmarasinghe/mcp-kubernetes.

    Related MCP tools

    Run your own MCP server? See who uses it and what to fix.

    Measure it with TrackMCP