Multi Cluster Kubernetes MCP Server

Multi Cluster Kubernetes MCP Server

k8s-multicluster-mcp•byrazvanmacovei

An MCP server for managing multiple Kubernetes clusters simultaneously, providing 60+ tools for cluster operations, resource management, monitoring, RBAC, storage, and networking accessible through AI assistants.

License: Apache 2.0•Runtime: Awaiting documentation review•Category: cloud devops

WHAT IT DOES

  • •Discovers contexts across all kubeconfig files in a configured directory and aggregates them for multi-cluster management.
  • •Compares resources, health, and configurations across clusters from a single interface.
  • •Provides rollout management tools for checking status, viewing history, undoing revisions, restarting, pausing, and resuming rollouts.
  • •Offers RBAC inspection tools for listing Roles, ClusterRoles, RoleBindings, ClusterRoleBindings, and ServiceAccounts.

BEST FOR

  • •AI assistant users who need a health overview of a production Kubernetes cluster.
  • •Comparing pod counts for a namespace between production and staging contexts across clusters.
  • •Inspecting RBAC role bindings to understand who has access to what in a namespace.

ABOUT K8S-MULTICLUSTER-MCP

Multi Cluster Kubernetes MCP Server is cataloged as an MCP server attributed to razvanmacovei. An MCP server for managing multiple Kubernetes clusters simultaneously, providing 60+ tools for cluster operations, resource management, monitoring, RBAC, storage, and networking accessible through AI assistants. 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: Apache 2.0. 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 Multi Cluster 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

Do I need to specify full cluster context names?

No. The server supports partial name matching, so shorter names can be used instead of full context identifiers.

Are secret values shown by default when listing secrets?

No. Secret values are hidden by default when listing secrets.

Does the server require metrics-server in my clusters?

Metrics-server is required for the metrics and cluster info tools.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 2f742dde977e · 采集于 2026-11-13 10:04:45 UTC

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

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

Multi Cluster Kubernetes MCP Server

smithery badge Python 3.11+ License: Apache 2.0

An MCP (Model Context Protocol) server for managing multiple Kubernetes clusters simultaneously. Provides 60+ tools covering cluster operations, resource management, monitoring, RBAC, storage, networking, and more -- all accessible through AI assistants like Claude Desktop.

Quick Start

Installing via Smithery

npx -y @smithery/cli install @razvanmacovei/k8s-multicluster-mcp --client claude

Manual Installation

git clone https://github.com/razvanmacovei/k8s-multicluster-mcp.git
cd k8s-multicluster-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python3 app.py

Docker

docker build -t k8s-mcp .
docker run -v ~/.kube:/root/.kube k8s-mcp

Configuration

Claude Desktop / MCP Client

Add to your MCP client configuration:

{
  "mcpServers": {
    "kubernetes": {
      "command": "python3",
      "args": ["/path/to/k8s-multicluster-mcp/app.py"],
      "env": {
        "KUBECONFIG_DIR": "/path/to/your/kubeconfigs"
      }
    }
  }
}

Environment Variables

VariableDefaultDescription
KUBECONFIG_DIR~/.kubeDirectory containing kubeconfig files. Each file can contain one or more contexts.

Place your kubeconfig files in the configured directory. The server discovers all contexts across all files automatically.

Prerequisites

  • Python 3.11 or higher
  • One or more kubeconfig files with valid cluster credentials
  • metrics-server installed in clusters for k8s_top_* and k8s_cluster_info tools

Multi-Cluster Management

This server is purpose-built for managing multiple Kubernetes clusters:

  • Automatic Discovery: Scans all kubeconfig files in KUBECONFIG_DIR and aggregates contexts
  • Partial Name Matching: Use prod instead of arn:aws:eks:us-east-1:123456:cluster/prod-cluster
  • Cross-Cluster Operations: Compare resources, health, and configurations across clusters
  • Context Caching: Efficient 30-second TTL cache avoids re-reading kubeconfig files on every call
  • Centralized Management: Manage dev, staging, and production from a single interface

Tools Reference (60+ tools)

Cluster & Context Management (6 tools)

ToolDescription
k8s_get_contextsList all available contexts across all kubeconfig files
k8s_get_namespacesList all namespaces in a cluster
k8s_create_nsCreate a new namespace with optional labels/annotations
k8s_delete_nsDelete a namespace (protects system namespaces)
k8s_get_nodesList all nodes with status, roles, capacity, and version
k8s_cluster_infoComprehensive cluster health summary (nodes, pods, deployments, warnings)

Resource Discovery & Inspection (7 tools)

ToolDescription
k8s_get_resourcesList resources of any kind (pods, deployments, services, ingress, etc.)
k8s_get_resourceGet the complete definition of a single resource
k8s_get_pod_logsGet pod logs with duration filtering and container selection
k8s_get_eventsList cluster events in a namespace, sorted by most recent
k8s_describeDetailed resource description similar to kubectl describe
k8s_apisList all available API groups and resources in the cluster
k8s_crdsList all Custom Resource Definitions with versions and scope

Metrics & Monitoring (3 tools)

ToolDescription
k8s_top_nodesDisplay node CPU/memory usage alongside capacity
k8s_top_podsDisplay pod/container CPU/memory usage
k8s_diagnose_applicationComprehensive app diagnostics with issue detection and recommendations

Rollout Management (6 tools)

ToolDescription
k8s_rollout_statusGet rollout status for deployment/statefulset/daemonset
k8s_rollout_historyGet revision history
k8s_rollout_undoRoll back to a previous revision
k8s_rollout_restartTrigger a rolling restart
k8s_rollout_pausePause an in-progress rollout
k8s_rollout_resumeResume a paused rollout

Scaling (3 tools)

ToolDescription
k8s_scale_resourceScale deployment/statefulset/replicaset to N replicas
k8s_autoscale_resourceConfigure Horizontal Pod Autoscaler (HPA)
k8s_update_resourcesUpdate CPU/memory requests and limits for a container

Resource CRUD (6 tools)

ToolDescription
k8s_create_resourceCreate a resource from YAML/JSON content
k8s_apply_resourceApply configuration (create or update, like kubectl apply)
k8s_delete_resourceDelete any resource type with optional force/grace period
k8s_patch_resourceUpdate specific fields with strategic merge patch
k8s_label_resourceAdd or update labels on a resource
k8s_annotate_resourceAdd or update annotations on a resource

Workload Management (3 tools)

ToolDescription
k8s_expose_resourceExpose a deployment/pod as a new Service
k8s_run_podCreate and run a pod with a specified image
k8s_set_resources_for_containerSet resource limits/requests for containers

Node Management (5 tools)

ToolDescription
k8s_cordon_nodeMark a node as unschedulable
k8s_uncordon_nodeMark a node as schedulable
k8s_drain_nodeDrain a node by evicting pods (for maintenance)
k8s_taint_nodeAdd taints to a node
k8s_untaint_nodeRemove taints from a node

Pod Operations (1 tool)

ToolDescription
k8s_pod_execExecute a command in a container (supports quoted arguments)

Secrets & ConfigMaps (6 tools)

ToolDescription
k8s_list_secretList secrets with metadata (values hidden for security)
k8s_get_secret_detailGet a secret; optionally decode values
k8s_create_secret_resourceCreate a new secret (auto base64-encodes values)
k8s_list_configmapList ConfigMaps with their key names
k8s_get_configmap_detailGet a ConfigMap with full data contents
k8s_create_configmap_resourceCreate a new ConfigMap

RBAC (5 tools)

ToolDescription
k8s_get_rolesList RBAC Roles with permission rules
k8s_get_clusterrolesList RBAC ClusterRoles
k8s_get_rolebindingsList RoleBindings (who has what role)
k8s_get_clusterrolebindingsList ClusterRoleBindings
k8s_get_service_accountsList ServiceAccounts

Storage (3 tools)

ToolDescription
k8s_get_pvcsList PersistentVolumeClaims with status, capacity, and storage class
k8s_get_pvsList PersistentVolumes with capacity and bound claims
k8s_get_storage_classesList StorageClasses with provisioner and default status

Networking (1 tool)

ToolDescription
k8s_get_network_policiesList NetworkPolicies with pod selectors and rule counts

Job Management (2 tools)

ToolDescription
k8s_get_jobsList Jobs with completion status and timing
k8s_get_cronjobsList CronJobs with schedule, suspend status, and last run

Usage Examples

Cluster Health Check

Give me a health overview of my production cluster.

Multi-Cluster Comparison

Compare the number of pods running in the 'backend' namespace between my 'prod' and 'staging' contexts.

Diagnose Application Issues

My deployment 'my-app' in the 'production' namespace is having issues. Can you diagnose what's wrong?

Scale Resources

Scale the 'backend' deployment in the 'default' namespace to 5 replicas.

Resource Management

Delete the failed job 'data-migration-v1' in the 'batch' namespace.
Create a new namespace called 'staging' with the label environment=staging.

Secret Management

List all secrets in the 'production' namespace and show me the keys in the 'api-credentials' secret.

RBAC Inspection

Show me all role bindings in the 'default' namespace -- who has access to what?

Storage Overview

List all PVCs in the cluster and show which ones are Pending.

Node Maintenance

Cordon node 'worker-3', drain it ignoring DaemonSets, then uncordon when maintenance is complete.

Rollback Deployment

Roll back the 'api-gateway' deployment in the 'services' namespace to the previous version.

Execute in Pod

Run 'ls -la /app/config' inside the 'app' container of pod 'web-app-xyz' in the 'default' namespace.

Create Resources

Create a new deployment with this YAML:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: default
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.27
        ports:
        - containerPort: 80

Architecture

k8s-multicluster-mcp/
├── app.py                          # MCP server entry point & tool registration
├── src/
│   ├── utils/
│   │   ├── k8s_client.py           # Multi-cluster client with context caching
│   │   └── pluralize.py            # Kubernetes resource kind pluralization
│   └── tools/
│       ├── contexts.py             # Context listing
│       ├── namespaces.py           # Namespace listing
│       ├── namespace_management.py # Namespace create/delete
│       ├── nodes.py                # Node listing
│       ├── pods.py                 # Resource listing & pod logs
│       ├── resources.py            # Single resource retrieval
│       ├── events.py               # Event listing
│       ├── describe.py             # kubectl describe equivalent
│       ├── api_discovery.py        # API & CRD discovery
│       ├── metrics.py              # Node/pod metrics (top)
│       ├── diagnosis.py            # Application diagnostics
│       ├── cluster_health.py       # Cluster health summary
│       ├── rollouts.py             # Rollout management
│       ├── scaling.py              # Scale & autoscale & resource updates
│       ├── resource_management.py  # Create, apply, patch, label, annotate
│       ├── delete_resource.py      # Resource deletion
│       ├── workload_management.py  # Expose, run pod, set resources
│       ├── node_management.py      # Cordon, drain, taint
│       ├── pod_operations.py       # Exec into pods
│       ├── secret_configmap.py     # Secret & ConfigMap management
│       ├── rbac.py                 # Roles, bindings, service accounts
│       ├── storage_network.py      # PVC, PV, StorageClass, NetworkPolicy
│       └── job_management.py       # Jobs & CronJobs
├── requirements.txt
├── pyproject.toml
├── Dockerfile
└── smithery.yaml

What's New in v2.0.0

  • 20+ new tools: Resource deletion, namespace management, secrets & configmaps, RBAC inspection, storage & network visibility, job management, cluster health summary, pod creation
  • Bug fixes: Fixed resource pluralization (e.g., Ingress -> ingresses not ingresss), fixed pod exec command splitting to handle quoted arguments, fixed timeout parameter handling
  • Performance: Context discovery now uses a 30-second TTL cache with direct context-to-file mapping, eliminating redundant file scanning
  • Improved tool descriptions: All 60+ tools have detailed descriptions for better AI assistant integration
  • Dependency cleanup: Removed unused fastapi and uvicorn dependencies
  • Security: Namespace deletion protects system namespaces; secret values hidden by default

Contributing

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

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 Multi Cluster 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-multicluster-mcp)

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