MCP K8S Go
Golang-based MCP server that enables AI-driven interactions with Kubernetes clusters.
Key Features
Use Cases
README
Features
MCP π¬ prompt ποΈ resource π€ tool
- ποΈπ€ List Kubernetes contexts
- π¬π€ List Kubernetes namespaces
- π€ List, get, create and modify any Kubernetes resources
- includes custom mappings for resources like pods, services, deployments
- π€ List Kubernetes nodes
- π¬ List Kubernetes pods
- π€ Get Kubernetes events
- π€ Get Kubernetes pod logs
- π€ Run command in Kubernetes pod
Browse With Inspector
To use latest published version with Inspector you can run this:
npx @modelcontextprotocol/inspector npx @strowk/mcp-k8s
Use With Claude
Following chat with Claude Desktop demonstrates how it looks when selected particular context as a resource and then asked to check pod logs for errors in kube-system namespace:
To use this MCP server with Claude Desktop (or any other client) you might need to choose which way of installation to use.
You have multiple options:
| Smithery | mcp-get | Pre-built NPM | Pre-built in Github | From sources | Using Docker | |
|---|---|---|---|---|---|---|
| Claude Setup | Auto | Auto | Manual | Manual | Manual | Manual |
| Prerequisite | Node.js | Node.js | Node.js | None | Golang | Docker |
Using Smithery
To install MCP K8S Go for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @strowk/mcp-k8s --client claude
Using mcp-get
To install MCP K8S Go for Claude Desktop automatically via mcp-get:
npx @michaellatman/mcp-get@latest install @strowk/mcp-k8s
Manually with prebuilt binaries
Prebuilt from npm
Use this if you have npm installed and want to use pre-built binaries:
npm install -g @strowk/mcp-k8s
Then check version by running mcp-k8s --version and if this printed installed version, you can proceed to add configuration to claude_desktop_config.json file:
{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s",
"args": []
}
}
}
, or using npx with any client:
npx @strowk/mcp-k8s
For example for Claude:
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}
From GitHub releases
Head to GitHub releases and download the latest release for your platform.
Unpack the archive, which would contain binary named mcp-k8s-go, put that binary somewhere in your PATH and then add the following configuration to the claude_desktop_config.json file:
{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s-go",
"args": []
}
}
}
Building from source
You would need Golang installed to build this project:
go get github.com/strowk/mcp-k8s-go
go install github.com/strowk/mcp-k8s-go
, and then add the following configuration to the claude_desktop_config.json file:
{
"mcpServers": {
"mcp_k8s_go": {
"command": "mcp-k8s-go",
"args": []
}
}
}
Using Docker
This server is built and published to Docker Hub since 0.3.1-beta.2 release with multi-arch images available for linux/amd64 and linux/arm64 architectures.
You can use latest tag f.e like this:
docker run -i -v ~/.kube/config:/home/nonroot/.kube/config --rm mcpk8s/server:latest
Windows users might need to replace ~/.kube/config with //c/Users/<username>/.kube/config at least in Git Bash.
For Claude:
{
"mcpServers": {
"mcp_k8s_go": {
"command": "docker",
"args": [
"run",
"-i",
"-v",
"~/.kube/config:/home/nonroot/.kube/config",
"--rm",
"mcpk8s/server:latest"
]
}
}
}
Environment Variables and Command-line Options
The following environment variables are used by the MCP server:
KUBECONFIG: Path to your Kubernetes configuration file (optional, defaults to ~/.kube/config)
The following command-line options are supported:
--allowed-contexts=<ctx1,ctx2,...>: Comma-separated list of allowed Kubernetes contexts that users can access. If not specified, all contexts are allowed.--readonly: Disables any tool which can write changes to the cluster--help: Display help information--version: Display version information--mask-secrets: Mask secrets in the output (default: true). Use--mask-secrets=falseto disable masking
For example if you are configuring Claude Desktop, you can add the following configuration to claude_desktop_config.json file:
{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s",
"args": [
"--allowed-contexts=dev,prod",
"--readonly"
]
}
}
}
, which would allow only dev and prod contexts to be used and would disable any tool which can write changes to the cluster.
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
mcp-k8s-eye
Kubernetes management and diagnostics tool with MCP protocol support.
mcp-k8s-eye enables users to manage and analyze Kubernetes clusters using standardized Model Context Protocol (MCP) interfaces. It offers comprehensive resource operations, diagnostics, and resource usage monitoring through both stdio and SSE transports. Supporting generic and custom resource management along with advanced diagnostic tooling, it is geared for integration with AI clients and other MCP consumers.
- β 26
- MCP
- wenhuwang/mcp-k8s-eye
Kanboard MCP Server
MCP server for seamless AI integration with Kanboard project management.
Kanboard MCP Server is a Go-based server implementing the Model Context Protocol (MCP) for integrating AI assistants with the Kanboard project management system. It enables users to manage projects, tasks, users, and workflows in Kanboard directly via natural language commands through compatible AI tools. With built-in support for secure authentication and high performance, it facilitates streamlined project operations between Kanboard and AI-powered clients like Cursor or Claude Desktop. The server is configurable and designed for compatibility with MCP standards.
- β 15
- MCP
- bivex/kanboard-mcp
Inspektor Gadget MCP Server
AI-powered Kubernetes troubleshooting via Model Context Protocol.
Inspektor Gadget MCP Server provides an AI-powered debugging and inspection interface for Kubernetes clusters. Leveraging the Model Context Protocol, it enables intelligent output summarization, one-click deployment of Inspektor Gadget, and automated discovery of debugging tools from Artifact Hub. The server integrates seamlessly with VS Code for interactive AI commands, simplifying Kubernetes troubleshooting and monitoring workflows.
- β 16
- MCP
- inspektor-gadget/ig-mcp-server
metoro-mcp-server
Bridge Kubernetes observability data to LLMs via the Model Context Protocol.
Metoro MCP Server is an implementation of the Model Context Protocol (MCP) that enables seamless integration between Kubernetes observability data and large language models. It connects Metoroβs eBPF-based telemetry APIs to LLM applications such as the Claude Desktop App, allowing AI systems to query and analyze Kubernetes clusters. This solution supports both authenticated and demo modes for accessing real-time cluster insights.
- β 45
- MCP
- metoro-io/metoro-mcp-server
K8M
AI-driven lightweight Kubernetes dashboard with integrated MCP and multi-cluster management.
K8M is an AI-enabled mini Kubernetes dashboard built with a focus on simplifying cluster management and enhancing user experience. Utilizing the Model Context Protocol (MCP), K8M offers visual management for MCP, allowing AI models to interact with Kubernetes resources and tools easily, supporting over 49 built-in MCP tools. It enables powerful multi-cluster management, integrates advanced AI capabilities such as chat-driven resource explanation and diagnostics, and supports custom large model integration including private deployments and models like Ollama.
- β 702
- MCP
- weibaohui/k8m
mcp-confluent
MCP server for managing Confluent Cloud resources via natural language.
mcp-confluent is a Model Context Protocol (MCP) server implementation designed to enable natural language interaction with Confluent Cloud REST APIs. It integrates with AI tools such as Claude Desktop and Goose CLI, allowing users to manage Kafka topics, connectors, and Flink SQL statements conversationally. The project offers flexible configuration, CLI usage, and supports various transports for secure and customizable operations.
- β 115
- MCP
- confluentinc/mcp-confluent
Didn't find tool you were looking for?