# Kubernetes MCP Server

> Kubernetes MCP Server is an open-source MCP server for developer tools. Native Go MCP server that manages Kubernetes and OpenShift clusters through the API server. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/containers/kubernetes-mcp-server
- **GitHub stars:** 2,295
- **License:** Apache-2.0
- **MCP Registry name:** io.github.containers/kubernetes-mcp-server
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-01

## About

This server is written in Go and talks directly to the Kubernetes API server instead of shelling out to kubectl or helm, so it needs no external tools, Node or Python when run as a native binary. It ships as a single binary for Linux, macOS and Windows, plus npm and PyPI packages and a container image, and can work with several clusters at once from your kubeconfig files.

Coverage goes beyond generic create, get, list and delete on any resource. Pod operations include listing, logs, resource usage, exec into a pod and running an image. It also handles namespaces, events and OpenShift projects, Helm install, list and uninstall, and Tekton pipelines, tasks and their runs, including restarting, cancelling and troubleshooting. Optional OpenTelemetry tracing and metrics are available, with a /stats endpoint.

It detects kubeconfig changes automatically and supports command-line arguments, TOML files and environment variables for configuration. Because it can delete and exec, the README points to a setup guide for a dedicated ServiceAccount with read-only access for production. Getting-started guides cover Claude Code, Claude Desktop, VS Code, Cursor and Goose.

## Features

- **Direct API access:** Talks to the Kubernetes API server without kubectl or helm installed.
- **Any-resource CRUD:** Create, get, list and delete any Kubernetes or OpenShift resource.
- **Pod operations:** List, read logs, check usage, exec into and run containers.
- **Helm support:** Install, list and uninstall Helm releases.
- **Tekton pipelines:** Start, restart, cancel and troubleshoot pipeline and task runs.
- **Multi-cluster:** Use several clusters defined in your kubeconfig files.
- **Observability:** Optional OpenTelemetry traces and metrics.

## Good for

- Diagnose a failing deployment from a chat
- Read pod logs and events without typing kubectl
- Deploy a Helm chart to a namespace
- Troubleshoot a Tekton PipelineRun
- Work across several clusters in one session

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add kubernetes-mcp-server -- npx -y kubernetes-mcp-server
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "kubernetes-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add kubernetes-mcp-server -- npx -y kubernetes-mcp-server
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.kubernetes-mcp-server]
command = "npx"
args = ["-y", "kubernetes-mcp-server"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user kubernetes-mcp-server npx -- -y kubernetes-mcp-server

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "kubernetes-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

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

## FAQ

### Does Kubernetes MCP Server need kubectl?

No. It is a native Go implementation that calls the Kubernetes API directly.

### Which platforms are supported?

Kubernetes and OpenShift, with binaries for Linux, macOS and Windows plus npm, PyPI and container packages.

### Can Kubernetes MCP Server modify the cluster?

Yes, including deleting and exec. For production the README recommends a dedicated ServiceAccount with read-only access.

### Does Kubernetes MCP Server support more than one cluster?

Yes, multiple clusters from your kubeconfig files.

### Is Kubernetes MCP Server free?

Yes. Kubernetes MCP Server is open source, so you can use and self-host it for free.

### How do I add Kubernetes MCP Server to Claude Code?

Run this command in your terminal: claude mcp add kubernetes-mcp-server -- npx -y kubernetes-mcp-server

### What are the best alternatives to Kubernetes MCP Server?

The closest alternatives to Kubernetes MCP Server are REA, Codebase Memory, Serena MCP: the IDE for your agent, XERJ and Context7.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/kubernetes-mcp-server
