Token导航 LogoToken导航TokenDH.com
Kubernetes Read Only logo
运维云端stdio官方级别未说明来源级核验

Kubernetes Read Only

MCP Server

一个基于Python的只读MCP服务器,用于通过FastMCP和Python Kubernetes客户端检查Kubernetes集群。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
集群管理容器编排PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

sandeshghanta

提供方

sandeshghanta

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python -m mcp_server_k8s.server

详细介绍

MCP服务器Kubernetes(Python)

使用FastMCP和Python Kubernetes客户端进行Kubernetes集群检查的只读MCP服务器。

~~复制~~深受启发 Flux159/mcp服务器kubernetes

安装

uv pip install -e .

用法

uv run python -m mcp_server_k8s.server

示例用法

获取Pod

# Via Claude Code or Claude Desktop
"Show me all pods in default namespace"
"List pods with label app=nginx in production namespace"

描述资源

"Describe the deployment called my-app"
"Show details of pod my-pod-123 in namespace staging"

查看日志

"Show logs from pod my-pod"
"Get the last 50 lines of logs from deployment nginx"
"Show logs from the app container in pod multi-container-pod"

故障排除

"Diagnose issues with pods matching 'api'"
"/k8s-diagnose keyword=backend namespace=production"

健康检查

"Ping the Kubernetes cluster"
"Check if cluster is accessible"

工具参考

工具说明关键参数
kubectl_get获取/列出资源资源类型、名称、命名空间、标签选择器
kubectl_get_paginated分页列表资源类型、命名空间、限制、继续
kubectl_describe详细资源信息resourceType、名称、命名空间
kubectl_logs容器日志资源类型、名称、命名空间、容器、尾部
ping健康检查

故障排除

“无法连接到群集”

检查:

  1. ~/.kube/config 存在且有效
  2. 当前上下文已设置: kubectl config current-context
  3. 您可以通过网络访问群集

“找不到资源”

验证:

  1. 资源名称正确
  2. 命名空间正确(默认值:“default”)
  3. 您有RBAC权限查看资源

“多容器吊舱需要容器规格”

对于具有多个容器的Pod,请指定哪个容器:

"Show logs from container nginx in pod my-pod"

Claude桌面配置

{
  "mcpServers": {
    "kubernetes": {
      "command": "uv",
      "args": ["run", "python", "-m", "mcp_server_k8s.server"]
    }
  }
}

特性

  • kubectl_get-获取/列出资源
  • kubectl_get_paginated-分页资源列表
  • kubectl_describe-详细的资源描述
  • kubectl_logs-Pod/部署日志
  • ping-健康检查
  • k8s诊断提示-故障排除流程

发展

# Install dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

目录标签

目录标签

集群管理容器编排PythonClaudeKubernetes本地部署运维工具只读访问

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP