Skip to content
MCP server

mcp-k8s-go

MCP server giving AI clients read and write access to Kubernetes clusters

Actively maintained

The repository was last updated 13 days ago and is published under MIT.

mcp-k8s-go is an open-source MCP server for cloud and infrastructure. It is available on CLI, Linux, macOS, Windows and Self-hosted.

Pricing
Open source
Platforms
CLI, Linux, macOS
GitHub stars
382
Last commit
Language
Go
License
MIT

Similar MCP servers

About mcp-k8s-go

Written in Go, this server lets an MCP-compatible assistant work with Kubernetes contexts, namespaces, nodes, pods, events and logs. It can also list, read, create and modify arbitrary cluster resources, with built-in mappings for common types such as pods, services and deployments.

Access can be narrowed with a comma-separated allowlist of kubeconfig contexts and a read-only switch that turns off any tool able to change the cluster. Secret values are masked in output by default, and that masking can be turned off when needed.

It suits platform engineers and developers who want an assistant to inspect cluster state, troubleshoot failing workloads or run commands inside pods without giving it unrestricted control. It can be installed through npm, npx, a prebuilt binary or Docker.

What it does

Cluster context browsing
Lists available Kubernetes contexts and namespaces so the assistant can target the right environment.
Generic resource management
Lists, gets, creates and modifies any Kubernetes resource, with tailored mappings for pods, services and deployments.
Pod logs and events
Retrieves pod logs and cluster events to help diagnose failing workloads.
Command execution in pods
Runs a command inside a running Kubernetes pod.
Context allowlist
Restricts which kubeconfig contexts the server can access using a command-line option.
Read-only mode
Disables every tool that can write changes to the cluster.
Secret masking
Masks secret values in output by default, with an option to disable masking.

Good for

  • Asking an assistant to scan kube-system pod logs for errors
  • Inspecting node and pod status across several clusters
  • Reviewing recent cluster events while troubleshooting a deployment
  • Running a diagnostic command inside a pod without opening a shell
  • Exploring cluster resources in a read-only session

Pricing

Open source

Free and open source under the MIT license.

Prices change. Check npmjs.com before you buy.

More servers for the same service

mcp-k8s-go FAQ

How is the server installed?

It can be installed with npm, run through npx, downloaded as a prebuilt binary from GitHub releases, built from source with Go, or run from the Docker image mcpk8s/server.

Can I stop the assistant from changing my cluster?

Yes. Starting the server with the --readonly flag disables any tool that can write changes to the cluster.

How do I limit which clusters mcp-k8s-go can reach?

Pass --allowed-contexts with a comma-separated list of kubeconfig contexts. If the option is omitted, all contexts are allowed.

Are secrets shown in plain text?

No. Secrets are masked in output by default, and you can disable masking with --mask-secrets=false.

Is mcp-k8s-go free?

Yes. mcp-k8s-go is open source, so you can use and self-host it for free.

What are the best alternatives to mcp-k8s-go?

The closest alternatives to mcp-k8s-go are K8s MCP Server (Go), k8s-mcp-server, mcp-k8s-eye, MCP Kubernetes and mcp-k8s.

Where this comes from

  • Description: written from the project's README.

How AIPoweredBot checks servers