MCP K8S Go is a Golang-based Model Context Protocol (MCP) server that connects to Kubernetes, allowing AI models like Claude to interact with your Kubernetes clusters. It provides a convenient interface for accessing and managing Kubernetes resources through MCP-compatible clients.
The easiest way to install MCP K8S Go for Claude Desktop:
npx -y @smithery/cli install @strowk/mcp-k8s --client claude
Another method for automatic installation with Claude Desktop:
npx @michaellatman/mcp-get@latest install @strowk/mcp-k8s
If you have Node.js installed:
npm install -g @strowk/mcp-k8s
Then add this configuration to your claude_desktop_config.json
file:
{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s",
"args": []
}
}
}
Alternatively, you can use it with npx:
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}
mcp-k8s-go
binaryclaude_desktop_config.json
:{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s-go",
"args": []
}
}
}
If you have Golang installed:
go get github.com/strowk/mcp-k8s-go
go install github.com/strowk/mcp-k8s-go
Then add to claude_desktop_config.json
:
{
"mcpServers": {
"mcp_k8s_go": {
"command": "mcp-k8s-go",
"args": []
}
}
}
For Docker users:
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
in Git Bash.
Claude Desktop configuration:
{
"mcpServers": {
"mcp_k8s_go": {
"command": "docker",
"args": [
"run",
"-i",
"-v",
"~/.kube/config:/home/nonroot/.kube/config",
"--rm",
"mcpk8s/server:latest"
]
}
}
}
KUBECONFIG
: Path to your Kubernetes configuration file (defaults to ~/.kube/config)--allowed-contexts=<ctx1,ctx2,...>
: Limit access to specific Kubernetes contexts--readonly
: Disable write operations to the cluster--help
: Display help information--version
: Display version informationExample configuration with options:
{
"mcpServers": {
"mcp_k8s": {
"command": "mcp-k8s",
"args": [
"--allowed-contexts=dev,prod",
"--readonly"
]
}
}
}
MCP K8S Go provides the following capabilities:
To use the latest published version with Inspector:
npx @modelcontextprotocol/inspector npx @strowk/mcp-k8s
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp_k8s" '{"command":"npx","args":["@strowk/mcp-k8s"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect