# MCP K8s Ro

> MCP K8s Ro is a free MCP server for developer tools. Read-only Kubernetes access for Claude: resources, logs, events and metrics. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, Self-hosted, macOS, Linux
- **Repository:** https://github.com/your-ko/mcp-k8s-ro
- **MCP Registry name:** io.github.your-ko/mcp-k8s-ro
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-23

## About

mcp-k8s-ro is a Go server that talks to a cluster through the active kubeconfig context and exposes only get, describe, logs and top style operations. The README stresses that nothing can be created, updated or deleted; when a change is needed, the server prints the equivalent kubectl command for the user to run. Secret values are masked before they reach the model, along with large certificate blobs and managedFields that would waste tokens.

Responses are trimmed to relevant fields such as name, status and restarts, and each one states the active context and cluster name. The server pins to the context active at startup, so switching contexts in another terminal does nothing to a running instance, and it offers no tool to change clusters. For several clusters, the README suggests registering one server instance per cluster, which limits the damage from a prompt injection in one cluster's resources.

It runs over stdio as a local binary or a Docker container, with KUBECONFIG pointing to the config file. The README warns that the macOS binary is not code-signed and needs the quarantine flag removed. The top tools need metrics-server in the cluster.

## Features

- **Read-only by design:** Only get, describe, logs and top operations; mutations are printed as kubectl commands.
- **Secret masking:** Secret data and large certificate blobs are removed before reaching the model.
- **Token-lean output:** Responses include only relevant fields instead of raw API objects.
- **Pinned context:** The server locks to the kubeconfig context active at startup.
- **Cluster named in replies:** Every response states the context and cluster queried.

## Good for

- Investigate a crashing pod by reading its previous logs
- Review recent cluster events while on call
- Check CPU and memory use per pod or node
- List custom resources and their status in a namespace

## Install

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

```sh
claude mcp add mcp-k8s-ro -- docker run -i --rm ghcr.io/your-ko/mcp-k8s-ro:1.2.2
```

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": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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 mcp-k8s-ro -- docker run -i --rm ghcr.io/your-ko/mcp-k8s-ro:1.2.2
```

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

```toml
[mcp_servers.mcp-k8s-ro]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"]
```

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mcp-k8s-ro docker -- run -i --rm ghcr.io/your-ko/mcp-k8s-ro:1.2.2

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

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": {
    "mcp-k8s-ro": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/your-ko/mcp-k8s-ro:1.2.2"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 5 of 7 tools read data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `k8s_list_resources` (name suggests: reads): Lists any resource type, with optional namespace filter, returning status, readiness, restarts, node and IP depending on kind.
- `k8s_describe_resource` (name suggests: reads): Returns the full YAML of one resource with secret data masked.
- `k8s_list_resource_types` (name suggests: reads): Lists resource types via the discovery API, with an optional API group filter.
- `k8s_get_logs` (name suggests: reads): Fetches pod logs with container selector, tail lines and previous-container support.
- `k8s_get_events` (name suggests: reads): Lists events for a namespace or the whole cluster, most recent first.
- `k8s_top_pods`: Shows CPU and memory per pod with per-container breakdown; needs metrics-server.
- `k8s_top_nodes`: Shows CPU and memory per node as a share of allocatable capacity; needs metrics-server.

## FAQ

### Can MCP K8s Ro change my cluster?

No. It never creates, updates or deletes; it prints the kubectl command instead.

### Are secrets exposed to the model?

Secret data and stringData are masked before being sent.

### Can MCP K8s Ro work with several clusters?

Register one server instance per cluster; a single instance has no tool for switching.

### How do I run MCP K8s Ro?

As a Docker container or a downloaded binary over stdio, with KUBECONFIG set if the file is not at ~/.kube/config.

### Do the top tools always work?

They require metrics-server in the cluster.

### Is MCP K8s Ro free?

Yes. MCP K8s Ro is free to use.

### How do I add MCP K8s Ro to Claude Code?

Run this command in your terminal: claude mcp add mcp-k8s-ro -- docker run -i --rm ghcr.io/your-ko/mcp-k8s-ro:1.2.2

### What are the best alternatives to MCP K8s Ro?

The closest alternatives to MCP K8s Ro are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## 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.
- [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.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [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.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers 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.

---
Source: https://ai-powered.com/mcp/mcp-k8s-ro
