Multi-Cluster MCP Server
多集群 MCP 服务器
多集群 MCP 服务器为生成式人工智能 (GenAI) 系统提供了一个强大的网关,使其能够通过模型上下文协议 (MCP) 与多个 Kubernetes 集群进行交互。它有助于全面操作 Kubernetes 资源,简化多集群管理,并提供交互式集群可观察性。
🚀 功能
🛠️ MCP 工具 - Kubernetes 集群感知
✅ 从hub 集群中检索资源(当前上下文)
✅ 从托管集群中检索资源
✅ 使用指定的
ClusterRole连接到托管集群✅ 跨多个 Kubernetes 集群访问资源(通过开放集群管理)
❌ 从集成集群中检索和分析指标、日志和警报
❌ 与多集群 API 交互,包括托管集群、策略、附加组件等

📦 开放集群管理的提示模板*(规划中)*
提供针对 OCM 任务定制的可重复使用提示模板,简化代理交互和自动化
📚 开放集群管理的 MCP 资源*(规划中)*
参考OCM官方文档及相关资源,支持开发集成
📌 如何使用
与 MCP Inspector 一起使用
mcp dev ./src/multicluster_mcp_server/__main__.py 使用以下代码片段配置服务器:
{
"mcpServers": {
"multicluster-mcp-server": {
"command": "uvx",
"args": [
"multicluster-mcp-server@latest"
]
}
}
}注意:请确保已安装kubectl 。默认情况下,该工具使用KUBECONFIG环境变量访问集群。在多集群设置中,它会将已配置的集群视为中心集群,并通过该集群访问其他集群。
Related MCP server: kube-mcp
执照
该项目已获得MIT 许可。
Available Tools
4 toolsclustersB
Retrieves a list of Kubernetes clusters (also known as managed clusters or spoke clusters).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'retrieves a list' which implies a read-only operation, but doesn't cover aspects like pagination, rate limits, authentication needs, or what happens if no clusters exist. This leaves significant gaps for an agent to understand how to interact with it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('retrieves a list of Kubernetes clusters') and adds clarifying context without redundancy. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains what the tool does but lacks behavioral details (e.g., response format, error handling) that would help an agent use it effectively, especially with no output schema to clarify returns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. Baseline is 4 for zero parameters, as the schema fully covers the absence of inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('retrieves') and resource ('list of Kubernetes clusters'), with additional clarifying synonyms ('managed clusters or spoke clusters'). It doesn't distinguish from sibling tools like 'connect_cluster' or 'kube_executor', but the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'connect_cluster' or 'kube_executor'. The description implies a read-only listing operation but doesn't specify prerequisites, contexts, or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
connect_clusterC
Generates the 'KUBECONFIG' for the managed cluster and binds it to the specified ClusterRole (default: cluster-admin).
| Name | Required | Description | Default |
|---|---|---|---|
| cluster | Yes | The target cluster where the ServiceAccount will be created for the KUBECONFIG. | |
| cluster_role | No | The ClusterRole defining permissions to access the cluster. | cluster-admin |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions generating and binding actions but lacks critical details: whether this creates resources (e.g., ServiceAccount), requires specific permissions, has side effects, or what the output entails. For a tool that likely involves cluster access configuration, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action. Every word contributes directly to explaining the tool's function without redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of cluster management tools, no annotations, and no output schema, the description is insufficient. It doesn't cover what the generated KUBECONFIG contains, how it's returned, security implications, or error conditions. For a tool with potential high-impact operations, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema: it implies the 'cluster_role' parameter defaults to 'cluster-admin', which is already in the schema's default field. No additional semantic context is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generates the KUBECONFIG for the managed cluster and binds it to the specified ClusterRole.' It specifies the verb (generates), resource (KUBECONFIG), and scope (managed cluster), though it doesn't explicitly differentiate from sibling tools like 'clusters' or 'kube_executor'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'clusters' or 'kube_executor'. It mentions a default ClusterRole but doesn't explain prerequisites, when-not-to-use scenarios, or how it relates to other tools in the context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
kube_executorB
Securely run a kubectl command or apply YAML. Provide either 'command' or 'yaml'.
| Name | Required | Description | Default |
|---|---|---|---|
| cluster | No | The cluster name in a multi-cluster environment. Defaults to the hub cluster. | default |
| command | No | The full kubectl command to execute. Must start with 'kubectl'. | |
| yaml | No | YAML configuration to apply, provided as a string. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Securely run,' which hints at safety but doesn't detail what that entails (e.g., authentication needs, rate limits, or potential destructive effects). For a tool that executes kubectl commands (which can be highly destructive), this lack of behavioral context is a significant gap, as it doesn't warn about risks like modifying or deleting resources.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded: two sentences that directly state the purpose and key usage rule. There is no wasted language, and every sentence earns its place by providing essential information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of executing kubectl commands (which can have significant side effects) and the lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral risks, response formats, or error handling. For a tool with no structured safety hints, this minimal description leaves critical gaps in understanding how to use it safely and effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters ('cluster', 'command', 'yaml') with details like defaults and constraints. The description adds minimal value beyond the schema by noting the exclusive choice between 'command' or 'yaml', but it doesn't provide additional semantics (e.g., examples or edge cases). This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Securely run a kubectl command or apply YAML.' It specifies the verb ('run'/'apply') and resource ('kubectl command'/'YAML'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'clusters' or 'connect_cluster', which likely serve different purposes in Kubernetes management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some usage guidance: 'Provide either 'command' or 'yaml',' indicating an exclusive choice between parameters. However, it doesn't explain when to use this tool versus alternatives like 'clusters' (which might list clusters) or 'prometheus' (which might handle monitoring). No explicit when-not-to-use or prerequisite information is given, leaving usage context implied rather than fully clarified.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prometheusB
Query Prometheus metrics from a specific cluster and format the results for Recharts visualization.
| Name | Required | Description | Default |
|---|---|---|---|
| cluster | No | The target cluster name. Defaults to the hub cluster. | |
| data_type | No | Type of query: 'snapshot' for instant or 'range' for time-series. | snapshot |
| end | No | (Only for data_type='range') End time in ISO 8601 format. Defaults to now if not provided. | |
| group_by | No | Label to group results by, such as 'pod' or 'namespace'. | pod |
| ql | Yes | The PromQL query string to run against the Prometheus server. | |
| start | No | (Only for data_type='range') Start time in ISO 8601 format, e.g., '2025-06-06T00:00:00Z'. | |
| step | No | (Only for data_type='range') Query resolution step (e.g., '30s', '5m', '1h'). | 5m |
| unit | No | The desired output unit: 'auto', 'bytes', 'MiB', 'GiB', 'cores', or 'millicores'. | auto |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions formatting for Recharts visualization, it doesn't describe authentication requirements, rate limits, error handling, or what happens when queries return no data. For a complex query tool with 8 parameters, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for the tool's complexity, though it could potentially benefit from slightly more detail given the lack of annotations and output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex query tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the formatted output looks like, how errors are handled, or provide any behavioral context beyond the basic purpose. The agent would need to guess about many important aspects of tool behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing comprehensive parameter documentation. The description adds minimal value beyond the schema, only implying that results are formatted for visualization. It doesn't explain parameter interactions or provide additional context beyond what's already in the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Query Prometheus metrics'), target ('from a specific cluster'), and purpose ('format the results for Recharts visualization'). It distinguishes itself from sibling tools like 'clusters' and 'connect_cluster' by focusing specifically on Prometheus metric querying rather than cluster management or connection operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through 'format the results for Recharts visualization,' suggesting this tool is for visualization preparation. However, it doesn't explicitly state when to use this tool versus alternatives or provide any exclusion criteria. The guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
clusters - First observed
connect_cluster - First observed
kube_executor - First observed
prometheus
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Multi-tenant MCP gateway for AI commerce. One connection, every store.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Kubernetes clusters through natural language, supporting core Kubernetes operations, monitoring, security, and diagnostics.131 npm962MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that lets AI assistants query multiple Kubernetes clusters simultaneously using natural language.3MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI-powered management of multi-cluster Kubernetes environments through natural language, supporting kubectl operations, function execution, and agent interactions with multiple AI providers.7Apache 2.0
- AlicenseAqualityDmaintenanceExposes a Kubernetes cluster to MCP-compatible AI clients, enabling read-only and optional write operations on cluster resources like pods, deployments, and namespaces through natural language.91MIT