mcp-server-kubernetes

  • Virtualization
JavaScript
MIT
9
A
security – no known vulnerabilities (report Issue)
A
license - permissive license (MIT)
A
quality - confirmed to work

TypeScript implementation of Kubernetes cluster operations for pods, deployments, services.

  1. Tools
  2. Prompts
  3. Resources
  4. Server Configuration
  5. README.md

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Kubernetes PodsList of pods in the default namespace
Kubernetes DeploymentsList of deployments in the default namespace
Kubernetes ServicesList of services in the default namespace
Kubernetes NamespacesList of all namespaces

Tools

Functions exposed to the LLM to take actions

NameDescription
list_podsList pods in a namespace
list_deploymentsList deployments in a namespace
list_servicesList services in a namespace
list_namespacesList all namespaces
create_podCreate a new Kubernetes pod
create_deploymentCreate a new Kubernetes deployment
delete_podDelete a Kubernetes pod
cleanupCleanup all managed resources

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

README.md

mcp-server-kubernetes

MCP Server that can connect to a Kubernetes cluster and manage it.

https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed

<a href="https://glama.ai/mcp/servers/w71ieamqrt"><img width="380" height="200" src="https://glama.ai/mcp/servers/w71ieamqrt/badge" /></a>

Usage with Claude Desktop

{ "mcpServers": { "kubernetes": { "command": "npx", "args": ["mcp-server-kubernetes"] } } }

The server will automatically connect to your current kubectl context. Make sure you have:

  1. kubectl installed and in your PATH
  2. A valid kubeconfig file with contexts configured
  3. Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)

You can verify your connection by asking Claude to list your pods or create a test deployment.

If you have errors, open up a standard terminal and run kubectl get pods to see if you can connect to your cluster without credentials issues.

Features

  • Connect to a Kubernetes cluster
  • List all pods
  • List all services
  • List all deployments
  • Create a pod
  • Delete a pod
  • List all namespaces
  • [] Port forward to a pod
  • [] Get logs from a pod for debugging
  • [] Choose namespace for next commands (memory)
  • [] Support Helm for installing charts

Development & Testing

git clone https://github.com/Flux159/mcp-server-kubernetes.git cd mcp-server-kubernetes bun install bun run test

Not planned

Authentication / adding clusters to kubectx.

GitHub Badge

Glama performs regular codebase and documentation scans to:

  • Confirm that the MCP server is working as expected.
  • Confirm that there are no obvious security issues with dependencies of the server.
  • Extract server characteristics such as tools, resources, prompts, and required parameters.

Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Copy the following code to your README.md file:

Alternative MCP servers

  • A
    security
    F
    license
    A
    quality
    A MCP server that can run [Kubernetes](https://kubernetes.io/) commands with a given kubeconfig path and provide interpretation of the commands.
    • Apple
  • A
    security
    A
    license
    A
    quality
    A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.
    MIT
    • Apple