MCP Kubernetes Ro logo

MCP Kubernetes Ro

by @patrickdappollonio

Inspect Kubernetes clusters through read-only MCP tools for resources, logs, API discovery, metrics, and selected debugging tasks.

Install MCP Kubernetes Ro

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "patrickdappollonio-mcp-kubernetes-ro": {
      "command": "npx",
      "args": [
        "-y",
        "@patrickdappollonio/mcp-kubernetes-ro"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @patrickdappollonio/mcp-kubernetes-ro

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 6d ago.

Overview

@patrickdappollonio/mcp-kubernetes-ro connects AI assistants to Kubernetes clusters through a read-only MCP interface backed by local kubeconfig credentials. It lists and inspects resources, retrieves pod logs, discovers API resources, reports node and pod metrics, and provides base64 utilities without requiring the kubectl binary. Use it for cluster inspection and troubleshooting when agents should not perform destructive operations.

Use cases

  • Inspect Kubernetes resources without granting write access
  • Retrieve and filter pod logs during troubleshooting
  • Discover cluster API resources and available contexts
  • Check node and pod metrics when Metrics Server is installed
  • Forward ports to pods for debugging

Key features

  • Read-only Kubernetes resource inspection
  • Pod log retrieval with filtering
  • API resource and context discovery
  • Node and pod metrics access
  • Configurable resource and tool restrictions
  • stdio, SSE, and Streamable HTTP transports

Tools16

What MCP Kubernetes Ro lets your agent do. Expand a tool for its parameters.

Self-reported~64 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · @patrickdappollonio/mcp-kubernetes-ro (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars24Stargazers on the source repository.
npm downloads467Package downloads in the last 30 days.
Last commit27d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed16Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Kubernetes Ro works

What @patrickdappollonio/mcp-kubernetes-ro does

The @patrickdappollonio/mcp-kubernetes-ro MCP server gives an AI assistant read-only access to Kubernetes cluster data. It uses the Kubernetes configuration available on the local machine, typically from ~/.kube/config, and does not need the kubectl executable installed.

As a 💻 Developer Tools option, it fits workflows where an agent needs to inspect workloads, investigate failures, or understand cluster capabilities without being allowed to change resources. The server blocks destructive operations and can further restrict access to resource types such as Secrets and ConfigMaps.

How it works

The server exposes MCP tools over stdio, Server-Sent Events, or stateless Streamable HTTP. It can use a selected namespace, operate on cluster-wide resources, and accept a Kubernetes context for individual commands. A startup check validates connectivity and basic permissions unless that behavior is disabled.

Resource queries support label selectors, field selectors, pagination, and newest-first sorting. Managed fields are excluded from resource output by default and can be requested when needed. Secret values are not included in ordinary tool responses. Depending on the transport and configuration, a requested secret can be written to a file or returned through encrypted access intended for the local machine.

Setup and configuration

Install a release binary, the Homebrew package, the npm package with npx, or the published container image. Configure an MCP client to launch the binary, invoke npx -y @patrickdappollonio/mcp-kubernetes-ro, or run the Docker image. Container use requires mounting the kubeconfig and passing its path through KUBECONFIG or --kubeconfig.

The KUBECONFIG environment variable selects the configuration file. Command-line options can set the kubeconfig, namespace, transport, port, disabled tools, disabled resources, and startup behavior. The same restrictions can be configured with MCP_KUBERNETES_RO_DISABLED_TOOLS, DISABLED_TOOLS, and MCP_KUBERNETES_RO_DISABLED_RESOURCES. Docker environment variables must be supplied to the container with -e.

Tools and capabilities

The @patrickdappollonio/mcp-kubernetes-ro MCP server includes tools for:

  • Listing resources with namespace and selector filters.
  • Reading individual resource details while hiding Secret values.
  • Retrieving pod logs, including previous logs, time filters, and grep patterns.
  • Finding containers within pods for targeted log requests.
  • Discovering available Kubernetes API resources and capabilities.
  • Listing Kubernetes contexts.
  • Encoding and decoding base64 data.
  • Reading node and pod metrics when Metrics Server is installed.
  • Accessing secret values through the transport-appropriate protected method.

Optional port forwarding can create tunneled connections to pod ports and supports multiple ports per session. The feature must be enabled before its additional tools become available.

Limitations and notes

The cluster identity and permissions come from the supplied Kubernetes configuration and credentials, so the account still needs appropriate RBAC permissions for read operations. Metrics tools require Metrics Server in the target cluster. Access to sensitive resource types and individual tools can be disabled, and insecure secret access can remove the secret-reading tool. Docker cannot write files to the host through the container, so encrypted secret access is enabled by default there.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Kubernetes Ro

@patrickdappollonio/mcp-kubernetes-ro is an MCP server that connects AI assistants to Kubernetes clusters through local kubeconfig credentials. Its main tools list and inspect resources, retrieve pod logs, discover API resources and contexts, read metrics, and encode or decode base64 data while preventing destructive operations.

Install it from a release binary, Homebrew, npm with `npx`, or the published Docker image. Homebrew uses `brew install patrickdappollonio/tap/mcp-kubernetes-ro`; npm can run `npx -y @patrickdappollonio/mcp-kubernetes-ro`. Docker users must mount a kubeconfig and pass its path to the container.

No, it does not require the kubectl binary. The server reads the local Kubernetes configuration and uses the credentials and cluster access defined there. A valid kubeconfig and suitable read permissions are still required.

Disable resource access with `MCP_KUBERNETES_RO_DISABLED_RESOURCES`, such as `secrets,configmaps`, or use the corresponding `--disabled-resources` option. Individual tools can also be disabled with `MCP_KUBERNETES_RO_DISABLED_TOOLS` or `--disabled-tools`.

Metrics tools require Metrics Server to be installed in the Kubernetes cluster. If Metrics Server is unavailable, `get_node_metrics` and `get_pod_metrics` return an error message.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Kubernetes Ro AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/patrickdappollonio-mcp-kubernetes-ro?style=directory)](https://allmcps.com/mcp/patrickdappollonio-mcp-kubernetes-ro)
HTML Embed
<a href="https://allmcps.com/mcp/patrickdappollonio-mcp-kubernetes-ro"><img src="https://allmcps.com/api/badge/patrickdappollonio-mcp-kubernetes-ro?style=directory" alt="MCP Kubernetes Ro on AllMCPs" /></a>