Skip to content
Book demo

Kubernetes

Remote MCP·Local·STDIO

Golang-based MCP server for Kubernetes. List contexts and namespaces, get pods/logs/events, run commands in pods, create and modify resources, with custom CRD mappings.

Good for:Pod inspectionLog streamingResource managementCluster operations

Installation path

Open AugmentGo to ConfigurationSelect MCP RegistryClick "Add Server"

Upload your kubeconfig file as a file secret at app.augmentcode.com/app/secrets: Cosmos will show you the path it was saved to (e.g. ~/KUBECONFIG.yaml). Then choose Add Server, select Local MCP, use npx as the command, pass @strowk/mcp-k8s as the argument, and set KUBECONFIG to that path.

Setup steps

  1. 01

    Upload your kubeconfig to Cosmos Secrets

    Go to app.augmentcode.com/app/secrets and create a new secret. Choose the file type and upload your kubeconfig file (typically found at ~/.kube/config on your local machine). After saving, Cosmos will display the path where the file is stored in the VM (e.g. ~/KUBECONFIG.yaml). Copy that path: you'll use it as the KUBECONFIG env var value. For local CLI-only use, skip this step.

  2. 02

    Open Add Server

    Configuration → MCP Registry → Add Server in Cosmos.

  3. 03

    Pick the Local MCP tab

  4. 04

    Set the command

    Command

    npx
  5. 05

    Add the arguments

    Args

    @strowk/mcp-k8s
  6. 06

    Set environment variables

    Set KUBECONFIG to the file path shown by Cosmos Secrets. For local CLI-only use, either leave this unset (the server will use ~/.kube/config by default) or set it to the absolute local path of your kubeconfig.

    KUBECONFIG

    KUBECONFIG=~/KUBECONFIG.yaml
  7. 07

    Click Add, then enable

    Toggle on Cosmos Agent or CLI.

Local command

Suggested name: kubernetes

npx @strowk/mcp-k8s

Requires Node.js. The server reads the default kubeconfig at ~/.kube/config unless KUBECONFIG is set. For Cosmos cloud sessions, upload your kubeconfig as a file secret at app.augmentcode.com/app/secrets and set KUBECONFIG to the path Cosmos shows you. Supports --readonly and --allowed-contexts flags.

Authentication

kubeconfig file. For Cosmos cloud sessions, upload it as a file secret at app.augmentcode.com/app/secrets and set KUBECONFIG to the VM path Cosmos shows you after upload. For local CLI only, the server reads ~/.kube/config by default.

VariableExampleRequired
KUBECONFIG~/KUBECONFIG.yamlYes
Official documentation →