Skip to main content
Glama
yanmxa

Multi-Cluster MCP Server

by yanmxa
README.md

# Open Cluster Management MCP Server

The **OCM MCP Server** provides a robust gateway for Generative AI (GenAI) systems to interact with multiple Kubernetes clusters through the Model Context Protocol (MCP). It facilitates comprehensive operations on Kubernetes resources, streamlined multi-cluster management, and delivered interactive cluster observability.

## **🚀 Features**

### 🛠️ MCP Tools - Kubernetes Cluster Awareness
  
- ✅ Retrieve resources from the **hub cluster** (current context)  
- ✅ Retrieve resources from the **managed clusters**  
- ✅ Connect to a **managed cluster** using a specified `ClusterRole`
- ✅ Access resources across multiple Kubernetes clusters(via Open Cluster Management)
- 🔄 Retrieve and analyze **metrics, logs, and alerts** from integrated clusters  
- ❌ Interact with multi-cluster APIs, including Managed Clusters, Policies, Add-ons, and more

  ![alt text](images/tools.png)
  <details>
  <summary>Mutiple Kubernetes Clusters Operations</summary>

  [![Watch the demo](https://asciinema.org/a/706281.svg)](https://asciinema.org/a/706281)

  </details>

### 📦 Prompt Templates for Open Cluster Management *(Planning)*

- Provide reusable prompt templates tailored for OCM tasks, streamlining agent interaction and automation

### 📚 MCP Resources for Open Cluster Management *(Planning)*

- Reference official OCM documentation and related resources to support development and integration

### **📌 How to Use**

Configure the server using the following snippet:

```json
{
  "mcpServers": {
    "multicluster-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "multicluster-mcp-server@latest"
      ]
    }
  }
}
```

**Note:** Ensure `kubectl` is installed. By default, the tool uses the **`KUBECONFIG`** environment variable to access the cluster. In a multi-cluster setup, it treats the configured cluster as the **hub cluster**, accessing others through it.

## License

This project is licensed under the [MIT License](LICENSE).

TDQS

B3.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: clusters lists clusters, connect_cluster generates access credentials, kube_executor runs kubectl commands, and prometheus queries metrics. The descriptions clearly differentiate their functions, eliminating any ambiguity for an agent.

Naming Consistency3/5

The naming is mixed with no consistent pattern: clusters is a noun, connect_cluster uses verb_noun, kube_executor uses a compound noun, and prometheus is a proper noun. While readable, the lack of a uniform convention (e.g., all verb_noun or all nouns) reduces predictability.

Tool Count4/5

With 4 tools, the count is slightly low but reasonable for a multi-cluster Kubernetes management server. It covers core operations like listing clusters, accessing them, executing commands, and monitoring metrics, though it could benefit from additional tools for more comprehensive management.

Completeness3/5

The toolset covers key areas (discovery, access, execution, monitoring) but has notable gaps for a multi-cluster domain, such as creating/deleting clusters, managing resources across clusters, or handling configurations. Agents can work around this for basic tasks, but advanced operations may be limited.

Maintenance

ActivityInactive
ResponsivenessUnresponsive