Skip to main content
Glama

k8s-mcp-server

一个基于 MCP(Model Context Protocol) 的 Kubernetes 运维助手。它将 K8s 集群的查询与诊断能力封装成标准化的 MCP 工具,让 LLM 客户端(如 ZCode、Claude Desktop、Cursor)能够通过自然语言查看和排查 Kubernetes 集群。

功能特性

  • 基于 MCP Python SDK,使用 stdio 传输

  • 支持多集群切换(本地 k3s / 阿里云 k3s)

  • 8 个工具:健康检查、资源查询、Pod 一键诊断

  • diagnose_pod 组合工具:一次调用聚合 Pod 状态、事件、日志,并通过规则引擎给出初步诊断建议

  • 完善的异常处理,错误信息对 LLM 友好

  • 输出经过精简格式化,避免返回冗余的 K8s 原始对象

  • 所有工具均为只读操作,不会修改集群状态

  • 28 个 pytest 单元测试,ruff 代码检查

  • Docker 多阶段构建,GitHub Actions CI/CD 自动推送镜像至阿里云 ACR

Related MCP server: Multi Cluster Kubernetes MCP Server

工具列表

工具

说明

ping

健康检查,返回 pong

list_namespaces

列出所有 namespace 及其状态

list_pods

列出指定 namespace 下的 Pod

describe_pod

查看 Pod 详情(状态、IP、节点、容器、重启次数、资源)

get_pod_logs

获取 Pod 日志(支持 tail_lines 限制行数)

list_nodes

列出集群节点及状态、OS、K8s 版本

list_events

列出所有 namespace 的最近事件(按时间倒序)

diagnose_pod

一键诊断:聚合基本信息、容器状态、Warning 事件、日志和规则引擎建议

diagnose_pod 规则引擎

diagnose_pod 不依赖 LLM 做确定性判断,而是用 Python 规则引擎检测常见问题:

检测项

判断依据

诊断建议

CrashLoopBackOff

state.waiting.reason == "CrashLoopBackOff"

检查日志中的异常堆栈、启动命令和配置

ImagePullBackOff

state.waiting.reason in ("ImagePullBackOff", "ErrImagePull")

检查镜像名、标签和仓库凭证

OOMKilled

last_state.terminated.reason == "OOMKilled"

增加 memory limit 或排查内存泄漏

频繁重启

restart_count > 3

查看日志和上次终止原因

调度失败

phase == "Pending" + 事件中的 FailedScheduling

检查节点资源、亲和性和污点容忍

规则引擎负责确定性模式匹配(零延迟、100% 一致),LLM 在此基础上做上下文关联和深度分析,将多次工具调用压缩为一次。

环境要求

  • Python 3.12+

  • uv 包管理器

  • 可访问的 Kubernetes 集群及对应的 kubeconfig

快速开始

安装

git clone git@github.com:AmazingYe-oss/k8s-mcp-server.git
cd k8s-mcp-server
uv sync

配置 kubeconfig

默认从以下路径加载 kubeconfig(在 src/k8s_mcp_server/k8s_client.py 中配置):

  • local~/.kube/config

  • cloud~/.kube/config-k3s-cloud

如需修改集群映射,编辑 KUBECONFIGS 字典即可。

运行

uv run k8s-mcp-server

服务器以 stdio 模式启动,等待 MCP 客户端连接。

MCP 客户端配置

ZCode / Claude Desktop(Windows 连接 WSL 中的 Server)

{
  "mcp": {
    "servers": {
      "k8s": {
        "type": "stdio",
        "command": "wsl",
        "args": [
          "bash",
          "-lc",
          "cd /home/<your-user>/k8s-mcp-server && uv run k8s-mcp-server"
        ]
      }
    }
  }
}

原生 Linux/macOS

{
  "mcp": {
    "servers": {
      "k8s": {
        "type": "stdio",
        "command": "uv",
        "args": ["--directory", "/path/to/k8s-mcp-server", "run", "k8s-mcp-server"]
      }
    }
  }
}

Docker

构建镜像

docker build -t k8s-mcp-server:latest .

运行(挂载 kubeconfig)

docker run --rm -v ~/.kube:/home/appuser/.kube:ro k8s-mcp-server:latest

项目结构

src/k8s_mcp_server/
├── __init__.py
├── server.py        # MCP Server 入口,注册 8 个工具
├── k8s_client.py    # K8s API 客户端封装与异常处理
├── formatters.py    # K8s 对象到精简文本的格式化
└── diagnose.py      # diagnose_pod 组合工具与规则引擎

tests/
├── conftest.py          # 共享 mock fixtures(5 种 Pod 场景)
├── test_formatters.py   # formatter 单元测试
└── test_diagnose.py     # 规则引擎与报告组装测试

开发

# 代码检查
uv run ruff check .
uv run ruff format --check .

# 运行测试
uv run pytest

# 代码格式化
uv run ruff format .

CI/CD

GitHub Actions 流水线(.github/workflows/docker-ci-cd.yml):

  1. PR / push 时:运行 ruff 检查和 pytest

  2. 合并到 main 后:构建 Docker 镜像并推送至阿里云 ACR

    • 标签:latest<git-sha>、语义化版本 tag

需要在 GitHub 仓库配置以下 Secrets:

Secret

说明

ALIYUN_ACR_REGISTRY

ACR 地址,如 registry.cn-hangzhou.aliyuncs.com

ALIYUN_ACR_USERNAME

ACR 用户名

ALIYUN_ACR_PASSWORD

ACR 密码

技术栈

Available Tools

8 tools
describe_podA

获取指定 pod 的详细信息,包括状态、IP、节点、容器状态、重启次数、镜像和资源配置。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
    namespace: 指定的 namespace,默认 "default"
    pod_name: 指定的 pod 名称
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal
pod_nameNo
namespaceNodefault

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavior. It describes the content of the output (status, IP, node, etc.) but does not explicitly state that the operation is non-mutating, mention permission requirements, or describe error behavior. The read-only nature is implied by the verb 'describe' but not made explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a one-sentence summary followed by a clearly labeled Args list. Every sentence provides useful information, and the format is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple describe tool with a supported output schema, the description covers the main elements: purpose, parameters, and the nature of the returned data. It does not address error scenarios or emphasize pod_name as required, but given the simplicity and available output schema, it is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description's Args section adds crucial meaning: it explains that cluster accepts 'local' or 'cloud' (with context), and provides defaults for namespace and cluster. However, it does not highlight that pod_name is logically required despite the schema listing an empty default, which is a minor gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: retrieving detailed information about a specific pod, listing fields like status, IP, node, container status, restart count, image, and resource configuration. This is a specific verb-resource combination that distinguishes it from sibling tools like list_pods and get_pod_logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for inspecting a single pod but does not explicitly state when to use this tool versus alternatives such as diagnose_pod or get_pod_logs. There are no explicit exclusions or alternative recommendations, leaving the agent to infer the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

diagnose_podA

诊断指定 Pod 的健康状态。

一次调用返回基本信息、容器状态、Warning 事件、日志和基于规则的初步诊断建议。

当用户需要排查 Pod 异常、崩溃、无法启动等问题时,优先使用此工具。

Args:
    namespace: Pod 所在的 namespace
    pod_name: Pod 名称
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal
pod_nameYes
namespaceYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that one call returns multiple data types and provides preliminary diagnostic advice, which is helpful. However, it does not mention permissions, side effects, or limitations, though the tool appears read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured. The purpose is stated in the first sentence, followed by a brief list of outputs, usage guidance, and an Args block. Every sentence earns its place with no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's purpose, usage context, and parameters, and notes the output includes diagnostic suggestions. An output schema is present, so return fields need not be enumerated. Minor gaps include no discussion of edge cases or interactions with sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has no parameter descriptions (0% coverage), but the description's Args section fully explains each parameter: namespace, pod_name, and cluster with allowed values (local/cloud) and a default. This adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '诊断指定 Pod 的健康状态' (diagnose the health status of a specified Pod). It lists the aggregated outputs (basic info, container status, warning events, logs, and rule-based suggestions), which distinguishes it from sibling tools like get_pod_logs or describe_pod.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use it: when users need to troubleshoot Pod anomalies, crashes, or startup failures, and says to prioritize this tool. However, it does not mention when not to use it or name explicit alternatives, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_pod_logsA

获取指定 pod 的日志。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
    namespace: 指定的 namespace,默认 "default"
    pod_name: 指定的 pod 名称
    tail_lines: 返回最后多少行日志,默认 100
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal
pod_nameNo
namespaceNodefault
tail_linesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry behavioral disclosure. It explains that it fetches logs and documents cluster options (local vs cloud) and tail_lines, but does not mention read-only nature, error behavior, or permissions. For a simple read operation this is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a one-line purpose followed by a formatted argument list. Every sentence provides useful detail, with no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, no required fields, and an output schema, the description covers all necessary operational details. It does not discuss edge cases like multi-container pods or follow mode, but these are not clearly needed given the tool's simplicity and the presence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates by explaining every parameter: cluster (with specific values and defaults), namespace (default), pod_name, and tail_lines (meaning). This adds significant meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '获取指定 pod 的日志' (get logs of specified pod). It uses a specific verb and resource, and is distinct from sibling tools like list_pods, describe_pod, and diagnose_pod.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 such as describe_pod or diagnose_pod. It only explains parameters, not use cases or exclusions, so agents have no explicit context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_eventsA

列出集群中所有 namespace 下的最近事件,按时间倒序排列,最多显示 20 条。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the transparency burden. It adds useful behavior details like sorting order, max results, and cluster selection, but does not explicitly state that this is a read-only operation or disclose any potential side effects, permissions, or error behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with the main purpose in the first sentence and parameter details following. No wasted words; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers scope, ordering, result limit, and parameter semantics, which is adequate for a simple list tool. With an output schema present, return values are not needed in the description. Slight gap: no mention of potential error scenarios or use case context, but these are minor for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only provides type and default for 'cluster', with 0% description coverage. The tool description fully explains the parameter, including the allowed values ('local'/'cloud'), their meanings (local k3s vs Alibaba Cloud k3s), and the default value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists recent events across all namespaces, sorted by time descending, with a max of 20 entries. This is a specific verb+resource+scope and distinguishes it from sibling tools like list_pods or list_namespaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. It doesn't mention any exclusion criteria or preferred use cases beyond the basic list operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_namespacesA

列出集群中所有 namespace 及其状态。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool returns 'all namespaces and their status', implying a read-only behavior, but it does not mention potential side effects, permissions, or behavior on invalid cluster values. This is adequate but minimal for a list operation, hence a 3.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence for the main purpose, followed by a compact parameter explanation. There is no fluff or redundancy; every sentence adds value. This is an ideal concise structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one parameter, the description provides the essential purpose and fully explains the parameter. An output schema exists, so return value details are likely covered there. It does not address error handling or edge cases, but these are not critical for a simple read-only operation, so a 4 is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the schema for the single 'cluster' parameter: it specifies allowed values ('local' and 'cloud'), clarifies their meaning (local k3s vs Alibaba Cloud k3s), and states a default. Since schema description coverage is 0%, this fully compensates, earning a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: listing all namespaces and their status in the cluster. The verb 'list' is specific, the resource is 'namespaces', and it distinguishes from sibling tools like list_pods and list_nodes by targeting a different Kubernetes resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly conveys when to use this tool (when you need to see namespaces and their status) and gives context by naming the target cluster. It does not explicitly mention alternatives or exclusions, but the resource-specific purpose makes usage clear, earning a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_nodesA

列出集群中的所有节点及其状态、操作系统和 K8s 版本。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses the output fields and parameter options, adding behavioral context beyond the tool name. It does not explicitly state that the operation is read-only, but 'list' implies it, and no side effects are mentioned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences. The primary purpose is front-loaded, and the Args section is efficient without superfluous information. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one optional parameter and an available output schema. The description explains the return contents (status, OS, K8s version) and the cluster options, making it complete for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description fully compensates by defining the 'cluster' parameter with its allowed values ('local'/'cloud') and default, which is absent from the schema. This is essential for correct invocation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb '列出' (list) with a clear resource '集群中的所有节点' (all nodes in the cluster), and enumerates the returned fields (status, OS, K8s version). This clearly distinguishes it from sibling tools like list_pods or list_namespaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance on the cluster parameter, explicitly naming the two valid options (local and cloud) and the default. It does not explicitly mention alternative tools or when not to use, but the context for cluster selection is clear and practical.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_podsA

列出指定 namespace 下的所有 pod 及其状态。

Args:
    cluster: 目标集群,可选 "local"(本地 k3s)或 "cloud"(阿里云 k3s),默认 "local"
    namespace: 指定的 namespace,默认 "default"
ParametersJSON Schema
NameRequiredDescriptionDefault
clusterNolocal
namespaceNodefault

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It states the tool lists pods and their status, implying a read-only operation, but does not explicitly mention side effects, error behavior, or limitations. The cluster parameter is explained, and the read-only nature is obvious, but deeper behavioral traits (e.g., what happens if namespace is invalid) are absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and well-structured: a one-sentence purpose followed by an Args block with each parameter explained. No redundant information or fluff. It is front-loaded with the primary function, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with only two parameters and an output schema present, the description covers the purpose and all parameter semantics. It does not mention error conditions or what happens when resources are missing, but given the tool's simplicity and the output schema's existence, the description is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides thorough semantic meaning for both parameters. For cluster, it explicitly lists allowed values ('local' and 'cloud') and their meanings, plus the default. For namespace, it clarifies the purpose and default. This fully compensates for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '列出指定 namespace 下的所有 pod 及其状态' (list all pods in the specified namespace and their status), which is a specific verb-resource-scope combination. It distinguishes from sibling tools like get_pod_logs and describe_pod by focusing on listing all pods rather than inspecting individual ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use this tool versus alternatives like describe_pod or get_pod_logs. It only states what it does and gives parameter defaults, but no contextual advice or exclusions. Without explicit alternative references, the usage guidance is minimal.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pingA

健康检查工具,返回 pong 表示服务器正常运行。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the exact response ('pong') and its meaning. It could be more explicit about error behavior, but for a simple ping tool this is largely sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that conveys the purpose and behavior with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, has no parameters, and likely has an output schema covering the return value. The description sufficiently explains its role and expected result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. No parameter information is needed beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as a health check that returns 'pong' to indicate normal server operation. It is specific and distinguishes itself from sibling tools that manage Kubernetes resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage context is implied by the phrase 'health check tool'—use it to verify server liveness. However, no explicit when-to-use or alternatives are provided, nor any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct resource or action: health check, namespaces, pods, logs, pod details, nodes, events, and a comprehensive diagnostic. The diagnose_pod tool is clearly positioned as a higher-level troubleshooting action, so there is no ambiguity.

Naming Consistency5/5

Tool names consistently follow the verb_noun pattern (list_*, get_*, describe_*, diagnose_*), with only 'ping' as a standard health-check verb. All names use lowercase with underscores, providing a predictable naming scheme.

Tool Count5/5

Eight tools is well within the ideal range for a focused Kubernetes inspection server. Each tool covers a distinct aspect of cluster and pod monitoring, and there is no redundancy or unnecessary bloat.

Completeness4/5

The tool set provides solid coverage for cluster health, namespace listing, pod logs, pod details, node information, events, and a diagnostic workflow. However, it lacks tools for other common Kubernetes resources like deployments, services, and configmaps, which would be expected from a general-purpose k8s server.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A read-only MCP server for Kubernetes that allows querying cluster information and diagnosing issues through natural language interfaces like Claude.
    8
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables interaction with multiple Kubernetes clusters simultaneously, providing comprehensive tools for cluster management, resource operations, and diagnostics across different environments.
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI assistants to interact with Kubernetes clusters by translating natural language into kubectl and Helm operations. It allows users to query, manage, and diagnose Kubernetes resources and cluster states through a seamless integration.
    20
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A lightweight MCP server that enables natural language interaction with Kubernetes clusters, allowing management of pods, deployments, namespaces, and cluster resources through conversational queries or API endpoints.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmazingYe-oss/k8s-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server