Kubernetes MCP Server

Kubernetes MCP Server

k8s-mcp-server-briankscheong•bybriankscheong

A Model Context Protocol server that provides integration with Kubernetes APIs so AI tools can inspect and manage cluster resources.

License: MIT License•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Exposes tools to retrieve details and logs for pods, and to list pods filtered by label or field selectors.
  • •Provides tools for getting and listing deployments, services, and ConfigMaps, plus listing namespaces and nodes.
  • •Offers management tools to delete pods and scale deployments, disabled by default via read-only mode.
  • •Supports stdio and SSE transports, including in-cluster deployment via the SSE transport.

BEST FOR

  • •Developers or operators who want AI assistants to inspect and troubleshoot Kubernetes cluster resources.
  • •Teams that need AI-driven common kubectl operations such as retrieving pod logs or scaling deployments.
  • •Environments that need restricted access, using read-only mode and scoped RBAC permissions.

ABOUT K8S-MCP-SERVER-BRIANKSCHEONG

Kubernetes MCP Server is cataloged as an MCP server attributed to briankscheong. A Model Context Protocol server that provides integration with Kubernetes APIs so AI tools can inspect and manage cluster resources. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Kubernetes MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can mutating operations be disabled?

Yes, mutation tools are disabled by default and can be enabled by setting the read-only flag to false.

How does the server authenticate to a cluster?

It uses the permissions of the provided kubeconfig or service account credentials.

Can the server run inside a Kubernetes cluster?

Yes, the SSE transport with the in-cluster flag supports deploying the server inside a cluster.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 6cd53a33045d · 采集于 2026-11-13 10:42:46 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Kubernetes MCP Server 🚀

Go MCP License Kubernetes

The Kubernetes MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Kubernetes APIs, enabling advanced automation and interaction capabilities for developers, operators, and AI tools.

Table of Contents

Overview 📊

This MCP server enables AI tools to interact with Kubernetes clusters using natural language, providing capabilities to:

  • 🔍 Retrieve and analyze cluster resources
  • 📈 Monitor deployments, pods, and services
  • 🛠️ Execute common kubectl operations through AI interfaces
  • 🔧 Troubleshoot cluster issues with AI assistance

Prerequisites ✅

  1. A Kubernetes cluster with API access
  2. Valid kubeconfig file or service account credentials
  3. Appropriate RBAC permissions for desired operations

Installation 💻

Usage with Claude Desktop

Add the following to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "kubernetes": {
      "command": "path/to/k8smcp",
      "args": [
        "stdio",
        "--kubeconfig=/path/to/your/kubeconfig"
      ]
    }
  }
}

Usage with VS Code

Add the following to your VS Code User Settings (JSON) file or .vscode/mcp.json in your workspace:

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "kubeconfig_path",
        "description": "Path to kubeconfig file",
        "default": "${env:HOME}/.kube/config"
      }
    ],
    "servers": {
      "kubernetes": {
        "command": "path/to/k8smcp",
        "args": [
          "stdio",
          "--kubeconfig=/path/to/your/kubeconfig"
        ]
      }
    }
  }
}

Usage with Cline

Add the following to your Cline configuration file (path/to/cline_mcp_settings.json after selecting "Configure MCP Servers"):

{
  "mcpServers": {
    "kubernetes": {
      "disabled": false,
      "timeout": 60,
      "command": "path/to/k8smcp",
      "args": [
        "stdio",
        "--read-only=false"
        "--kubeconfig=/path/to/your/kubeconfig"
      ],
      "env": {
        "K8S_MCP_TOOLSETS": "all"
      },
      "transportType": "stdio"
    }
  }
}

Make sure to update the command value with the path to your k8smcp executable. You can set the server configurations either using args or env.

Build from source

Clone the repository and build the binary:

git clone https://github.com/briankscheong/k8s-mcp-server.git
cd k8s-mcp-server
make build

Or install directly with Go:

go install github.com/briankscheong/k8s-mcp-server/cmd/k8s-mcp-server@latest

Command Line Options ⌨️

A Kubernetes MCP Server that provides tools for interacting with Kubernetes clusters.

Environment Variables:
  K8S_MCP_KUBECONFIG            Path to kubeconfig file
  K8S_MCP_NAMESPACE             Default Kubernetes namespace
  K8S_MCP_IN_CLUSTER            Use in-cluster config (true/false)
  K8S_MCP_READ_ONLY             Restrict to read-only operations (true/false)
  K8S_MCP_RESOURCE_TYPES        Comma-separated list of resource types
  K8S_MCP_TOOLSETS              Comma-separated list of toolsets to enable
  K8S_MCP_EXPORT_TRANSLATIONS   Export translations (true/false)

Usage:
  k8smcp [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  sse         Start sse server
  stdio       Start stdio server

Flags:
      --export-translations      Save translations to a JSON file
  -h, --help                     help for k8smcp
      --in-cluster               Use in-cluster config instead of kubeconfig file
      --kubeconfig string        Path to the kubeconfig file (default "/Users/briancheong/.kube/config")
      --namespace string         Default Kubernetes namespace to target (default "default")
      --read-only                Restrict operations to read-only (no create, update, delete) (default true)
      --resource-types strings   Comma separated list of Kubernetes resource types to enable (pods,deployments,services,configmaps,namespaces,nodes) (default [all])
      --toolsets strings         Comma separated list of tools to enable (default [all])
  -v, --version                  version for k8smcp

Use "k8smcp [command] --help" for more information about a command.

Server Transport Options 🔄

stdio

The stdio transport is the default and recommended option for most users for local integration:

k8smcp stdio --kubeconfig=/path/to/your/kubeconfig

SSE

The sse transport provides support for HTTP-based JSON-RPC message transport. This can be helpful when deploying the server in a Kubernetes cluster that needs to expose a port for client connection.

k8smcp sse --in-cluster=true

[!NOTE] The --in-cluster=true flag needs to be set if the server is deployed in a Kubernetes cluster.

Access Control 🔒

By default, the server applies the permissions of the provided kubeconfig or service account. For enhanced security, you can:

  1. Create a dedicated service account with restricted RBAC permissions
  2. Set namespace limits to prevent cross-namespace operations
  3. Enable read-only mode to prevent mutations to cluster state

Tools 🧰

The Kubernetes MCP Server provides a comprehensive set of tools for interacting with your Kubernetes cluster.

Resource Operations 📦

  • get_pod - Get detailed information about a specific pod

    • namespace: Pod namespace (string, optional, defaults to current namespace)
    • name: Pod name (string, required)
  • list_pods - List pods in a namespace

    • namespace: Namespace to list pods from (string, optional, defaults to current namespace)
    • label_selector: Filter pods by label selector (string, optional)
    • field_selector: Filter pods by field selector (string, optional)
  • get_pod_logs - Get logs from a pod

    • namespace: Pod namespace (string, optional, defaults to current namespace)
    • name: Pod name (string, required)
    • container: Container name (string, optional, defaults to first container)
    • tail_lines: Number of lines to retrieve from the end (number, optional)
    • previous: Get logs from previous container instance (boolean, optional)
  • get_deployment - Get information about a specific deployment

    • namespace: Deployment namespace (string, optional, defaults to current namespace)
    • name: Deployment name (string, required)
  • list_deployments - List deployments in a namespace

    • namespace: Namespace to list deployments from (string, optional, defaults to current namespace)
    • label_selector: Filter deployments by label selector (string, optional)
  • get_service - Get information about a specific service

    • namespace: Service namespace (string, optional, defaults to current namespace)
    • name: Service name (string, required)
  • list_services - List services in a namespace

    • namespace: Namespace to list services from (string, optional, defaults to current namespace)
    • label_selector: Filter services by label selector (string, optional)
  • get_configmap - Get information about a specific ConfigMap

    • namespace: ConfigMap namespace (string, optional, defaults to current namespace)
    • name: ConfigMap name (string, required)
  • list_configmaps - List ConfigMaps in a namespace

    • namespace: Namespace to list ConfigMaps from (string, optional, defaults to current namespace)
    • label_selector: Filter ConfigMaps by label selector (string, optional)
  • list_namespaces - List all namespaces in the cluster

    • No parameters required
  • list_nodes - List all nodes in the cluster

    • No parameters required

Management Operations ⚙️

  • delete_pod - Delete a pod from a namespace

    • namespace: Pod namespace (string, optional, defaults to current namespace)
    • name: Pod name (string, required)
    • grace_period_seconds: Grace period before deletion (number, optional)
  • scale_deployment - Scale a deployment to a specific number of replicas

    • namespace: Deployment namespace (string, optional, defaults to current namespace)
    • name: Deployment name (string, required)
    • replicas: Number of replicas (number, required)

[!IMPORTANT] By default, tools that involve modification of resources in the cluster are disabled. To enable them, you have to set the --read-only=false flag or the K8S_MCP_READ_ONLY=false environment variable.

Future Enhancements 🔮

  • Enhanced RBAC integration for fine-grained access control
  • Support for more kubernetes resources
  • Support for custom resource definitions (CRDs)
  • Helm chart management capabilities for deployment
  • Cluster monitoring and alerting integration
  • Support for multiple concurrent cluster connections

Contributing 👥

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License ⚖️

This project is licensed under the MIT License - see the LICENSE file for details.


Kubernetes + AI

Built with ❤️ for the Kubernetes and AI communities.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Kubernetes MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/k8s-mcp-server-briankscheong)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related cloud devops MCP Servers

Alternative and complementary servers in the same category

View all in cloud devops →
Huawei MCP Server
mcp-server-huaweiclouddeveloper•huaweiclouddeveloper

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

Repository stats unavailable
Cloud & DevOps
Coolify MCP Server
coolify-mcp-server•wrediam

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

Repository stats unavailable
Cloud & DevOps

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.

Repository stats unavailable
Cloud & DevOps