MCP Directory

MCP K8S Go

Golang-based MCP server connecting to Kubernetes — list, get, create and modify resources, read logs, run commands.

Unverified
stdio (local)
No auth
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npm install -g @strowk/mcp-k8s

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-k8s-go": {
      "command": "npx",
      "args": [
        "@strowk/mcp-k8s"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Access to a Kubernetes cluster with a kubeconfig (KUBECONFIG, defaults to ~/.kube/config)
  • One of: Node.js (for Smithery / mcp-get / npm / npx), Golang (to build from source), or Docker (to run the published image)

About MCP K8S Go

A Golang MCP server that bridges MCP clients to Kubernetes. It provides tools, prompts and resources for working with clusters: listing contexts, namespaces, nodes and pods; listing, getting, creating and modifying any Kubernetes resource (with custom mappings for pods, services and deployments); getting events; getting pod logs; and running commands in pods. Cluster access is driven by kubeconfig, with options for read-only mode, context allowlisting and secret masking.

Tools & capabilities (8)

List Kubernetes contexts

List the Kubernetes contexts available (also exposed as a resource).

List Kubernetes namespaces

List namespaces in the cluster (also exposed as a prompt).

List, get, create and modify Kubernetes resources

List, get, create and modify any Kubernetes resources, including custom mappings for resources like pods, services and deployments.

List Kubernetes nodes

List the nodes in the cluster.

List Kubernetes pods

List pods (exposed as a prompt).

Get Kubernetes events

Retrieve Kubernetes events.

Get Kubernetes pod logs

Get logs from a Kubernetes pod.

Run command in Kubernetes pod

Execute a command inside a Kubernetes pod.

What this server can do

MCP K8S Go provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Let Claude inspect pod logs to find errors in a namespace (e.g. checking kube-system)
  • Browse and query cluster resources (pods, services, deployments, nodes, events) conversationally
  • Create or modify Kubernetes resources from an MCP client
  • Run diagnostic commands inside pods
  • Safely expose a cluster in read-only mode and restrict access to specific contexts

Security notes

Connects to clusters using your local kubeconfig (KUBECONFIG, defaults to ~/.kube/config), so it inherits whatever permissions that credential grants. Use --readonly to disable any tool that can write changes to the cluster, --allowed-contexts=<ctx1,ctx2,...> to restrict which contexts can be accessed, and --mask-secrets (on by default) to mask secret values in output.

MCP K8S Go FAQ

How do I try it without installing anything?

Run it through the MCP Inspector with: npx @modelcontextprotocol/inspector npx @strowk/mcp-k8s

How do I prevent it from making changes to my cluster?

Pass the --readonly command-line option, which disables any tool that can write changes to the cluster.

Can I limit which clusters/contexts it can touch?

Yes. Use --allowed-contexts=<ctx1,ctx2,...> to allow only specific contexts; if not specified, all contexts are allowed.

Where does it get cluster credentials?

From your kubeconfig. Set KUBECONFIG to point at a config file; it defaults to ~/.kube/config.

Is there a Docker image?

Yes. Multi-arch images (linux/amd64 and linux/arm64) are published to Docker Hub as mcpk8s/server since the 0.3.1-beta.2 release. Mount your kubeconfig into the container, e.g. docker run -i -v ~/.kube/config:/home/nonroot/.kube/config --rm mcpk8s/server:latest.

Alternatives to MCP K8S Go

Compare all alternatives →

GitHub's official server for repos, issues, PRs, and Actions — local Docker or hosted remote.

Featured
Verified
stdio (local)
API key
Go
7 tools
Updated 7 days agoRepo

Official AWS Labs server that lets agents call any AWS API via the AWS CLI surface.

Verified
stdio (local)
API key
Python
3 tools
Updated 9 days agoRepo

Bulk Kubernetes port forwarding with an MCP server that lets AI assistants forward services, inspect pods, and monitor traffic.

Unverified
stdio (local)
No auth
Go
28 tools
Updated 1 day agoRepo