Back to MCP Catalog

Multi-Cluster Kubernetes Gateway MCP Server

Cloud PlatformsPython
Gateway for GenAI systems to interact with multiple Kubernetes clusters
Available Tools

get_hub_cluster_resources

Retrieves resources from the hub cluster (current context)

resource_typenamespacelabel_selector

get_managed_cluster_resources

Retrieves resources from managed clusters

cluster_nameresource_typenamespacelabel_selector

connect_to_managed_cluster

Connects to a managed cluster using a specified ClusterRole

cluster_namecluster_role

access_multi_cluster_resources

Accesses resources across multiple Kubernetes clusters via Open Cluster Management

resource_typenamespacelabel_selector

The Multi-Cluster Kubernetes Gateway provides a robust interface for Generative AI systems to interact with and manage multiple Kubernetes clusters through the Model Context Protocol. It enables comprehensive operations on Kubernetes resources across clusters, streamlines multi-cluster management workflows, and delivers interactive cluster observability capabilities. This gateway serves as a bridge between AI systems and Kubernetes infrastructure, allowing for seamless resource retrieval from both hub and managed clusters, cluster connection using specified roles, and cross-cluster resource access via Open Cluster Management. The tool is designed to enhance AI-driven Kubernetes operations by providing a unified interface for multi-cluster environments.

Installation

To use the Multi-Cluster Kubernetes Gateway, you need to have Python and the necessary dependencies installed.

Prerequisites

  1. Ensure you have Python 3.8+ installed
  2. Install kubectl on your system
  3. Configure your Kubernetes environment with proper access credentials
  4. Set up your KUBECONFIG environment variable to point to your Kubernetes configuration

Installation Options

Using uvx (Recommended)

The simplest way to install and use the Multi-Cluster Kubernetes Gateway is with uvx:

# Install uvx if you don't have it
pip install uvx

# Run the server
uvx multicluster-mcp-server@latest

Manual Installation

You can also install the package manually using Poetry:

# Clone the repository
git clone https://github.com/yanmxa/multicluster-mcp-server.git
cd multicluster-mcp-server

# Install dependencies with Poetry
poetry install

# Run the server
poetry run python -m multicluster_mcp_server

Configuration

To configure the Multi-Cluster Kubernetes Gateway in your MCP client (such as Claude, Anthropic Console, or other MCP-compatible tools), add the following configuration:

{
  "mcpServers": {
    "multicluster-mcp-server": {
      "command": "uvx",
      "args": [
        "multicluster-mcp-server@latest"
      ]
    }
  }
}

For development purposes, you can use the MCP Inspector:

mcp dev ./src/multicluster_mcp_server/__main__.py

Usage

The Multi-Cluster Kubernetes Gateway uses your Kubernetes configuration to access clusters. By default, it uses the KUBECONFIG environment variable to determine which cluster to connect to.

In a multi-cluster setup:

  • The configured cluster is treated as the hub cluster
  • Other clusters are accessed through the hub cluster using Open Cluster Management

Working with Multiple Clusters

The gateway provides tools to:

  1. Retrieve resources from the hub cluster (current context)
  2. Retrieve resources from managed clusters
  3. Connect to managed clusters using specified ClusterRoles
  4. Access resources across multiple Kubernetes clusters

Future Capabilities

The project roadmap includes plans to add:

  • Metrics, logs, and alerts retrieval and analysis
  • Enhanced interaction with multi-cluster APIs
  • Prompt templates for Open Cluster Management
  • Additional MCP resources for Open Cluster Management

Troubleshooting

If you encounter issues:

  1. Verify your Kubernetes configuration is correct
  2. Ensure you have proper permissions to access the clusters
  3. Check that kubectl is properly installed and configured
  4. Examine the server logs for any error messages

For more detailed information, refer to the GitHub repository.

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.