Back to MCP Directory
K8s Go
Model Context Protocol moderate risk

K8s Go

MCP server for Kubernetes, built in Go, enabling resource browsing, management, and interaction with tools like Claude via command-line or Docker.

Connections & Capabilities

Connects To

GitHubDockerKubernetes

Capabilities

readwriteexecadmin

Quickstart

Install

npx @modelcontextprotocol/inspector

Config

{
  "mcpServers": {
    "mcp_k8s": {
      "command": "mcp-k8s",
      "args": []
    }
  }
}

Exposed MCP Tools (8)

safe
List Kubernetes contexts

Lists available Kubernetes contexts.

Read-only operation, no side effects.

safe
List Kubernetes namespaces

Lists available Kubernetes namespaces.

Read-only operation, no side effects.

high
List, get, create and modify any Kubernetes resources

Lists, retrieves, creates, and modifies Kubernetes resources.

Can modify cluster state, potentially causing disruption.

safe
List Kubernetes nodes

Lists available Kubernetes nodes.

Read-only operation, no side effects.

safe
List Kubernetes pods

Lists available Kubernetes pods.

Read-only operation, no side effects.

safe
Get Kubernetes events

Retrieves Kubernetes events.

Read-only operation, no side effects.

safe
Get Kubernetes pod logs

Retrieves logs from Kubernetes pods.

Read-only operation, no side effects.

critical
Run command in Kubernetes pod

Executes a command inside a Kubernetes pod.

Can execute arbitrary commands with the pod's privileges.

Safety Assessment

This MCP server offers configurable safety through read-only mode and context restrictions. However, improper configuration or running in write mode without proper RBAC controls can pose security risks. Exercise caution when granting access to modify resources or execute commands.

  • Supports read-only mode to prevent accidental modifications.
  • Allows specifying allowed Kubernetes contexts to limit access.
  • Secrets masking is enabled by default.
  • Can be run in a Docker container for isolation.
  • Can perform write operations on Kubernetes resources if not in read-only mode.
  • Requires access to the Kubernetes configuration file.
  • If not configured correctly, could expose Kubernetes resources to unauthorized access.
  • Execution of commands inside pods can be risky if not properly controlled.