MCP Directory

How to add MCP K8S Go to Cursor

Golang-based MCP server connecting to Kubernetes — list, get, create and modify resources, read logs, run commands. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 382 · stdio · no auth

Cursor config for MCP K8S Go

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

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the MCP K8S Go config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of MCP K8S Go's tools to confirm it's connected.

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)

What MCP K8S Go can do in Cursor

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.

Security

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the MCP K8S Go config there under the "mcpServers" key and restart the client.

Is MCP K8S Go safe to use with Cursor?

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.

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.

View repo Full MCP K8S Go page