Kubernetes
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.
Installation path
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
- 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.
- 02
Open Add Server
Configuration → MCP Registry → Add Server in Cosmos.
- 03
Pick the Local MCP tab
- 04
Set the command
Command
npx - 05
Add the arguments
Args
@strowk/mcp-k8s - 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 - 07
Click Add, then enable
Toggle on Cosmos Agent or CLI.
Local command
Suggested name: kubernetes
npx @strowk/mcp-k8sRequires 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.
| Variable | Example | Required |
|---|---|---|
| KUBECONFIG | ~/KUBECONFIG.yaml | Yes |