K8s MCP 334a77c7

MCP运维云端

提供方 pratik-mahalle

运维云端 未标注 无需鉴权 社区 / 第三方 Claude DesktopClaude

一个生产就绪的Model Context Protocol (MCP)服务器,用于通过Claude和其他AI助手管理Kubernetes集群,提供20种全面的Kubernetes操作工具。

一句话选型结论

按资料字段整理

K8s MCP 334a77c7 属于运维云端类 MCP 服务器,传输方式未标注,无需鉴权,可直接接入 Claude Desktop、Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权无需鉴权 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 20 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量20暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

Kubernetes管理TypeScript本地部署AI助手集成集群操作生产就绪多上下文支持

安装与配置

未标注 无需鉴权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 20 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 20 个工具,覆盖面较广,能满足多种调用。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
K8s MCP 334a77c7当前 20 未标注 未标注 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方pratik-mahalle上游标注的维护方 pratik-mahalle
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

11.2 KB
来自项目仓库与上游目录的原文,未做删改

Kubernetes MCP Server

A production-ready Model Context Protocol (MCP) server for managing Kubernetes clusters through Claude and other AI assistants.

Overview

This MCP server provides 20 comprehensive tools for Kubernetes cluster management, enabling AI assistants to perform operations like:

  • Managing contexts and clusters
  • Listing and inspecting resources (pods, deployments, services, nodes)
  • Scaling deployments
  • Viewing logs
  • Monitoring events
  • And much more!

Features

  • 20 Kubernetes Tools - Comprehensive coverage of common K8s operations
  • Multi-Context Support - Easily switch between multiple clusters
  • Dual Output Formats - JSON for parsing, Markdown for readability
  • Error Handling - Actionable error messages with suggestions
  • Type Safety - Full TypeScript with Zod validation
  • Production Ready - RBAC-aware with proper error handling

Quick Start

See QUICKSTART.md for a 5-minute setup guide.

Installation```bash

npm install
npm run build


### Test with MCP Inspector```bash
npm run inspector

Try running: k8s_list_contexts

Integration with Claude Desktop

Edit your claude_desktop_config.json:```json
{
"mcpServers": {
"kubernetes": {
"command": "node",
"args": ["/absolute/path/to/k8s-mcp/dist/index.js"]
}
}
}


Restart Claude Desktop and start managing your Kubernetes clusters!

## Available Tools

### Cluster & Context Management (3 tools)

#### k8s_list_contexts
List all available Kubernetes contexts from kubeconfig.

**Parameters:**
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
List my Kubernetes contexts

k8s_set_context

Switch to a different Kubernetes context.

Parameters:
- contextName (required): Name of the context to switch to

Example:```
Switch to the production context


#### k8s_get_cluster_info
Get information about the current cluster.

**Parameters:**
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
Show me cluster information

Namespace Management (2 tools)

k8s_list_namespaces

List all namespaces in the cluster.

Parameters:
- format (optional): Output format - json or markdown (default: markdown)

Example:```
List all namespaces


#### k8s_create_namespace
Create a new namespace.

**Parameters:**
- `name` (required): Name of the namespace to create

**Example:**```
Create a namespace called staging

Pod Management (4 tools)

k8s_list_pods

List pods in a namespace.

Parameters:
- namespace (optional): Namespace to list from (default: default)
- labelSelector (optional): Filter by labels (e.g., app=nginx)
- fieldSelector (optional): Filter by fields (e.g., status.phase=Running)
- format (optional): Output format - json or markdown (default: markdown)

Examples:```
List all pods in the default namespace
Show me failing pods in production
List pods with label app=nginx


#### k8s_get_pod
Get detailed information about a specific pod.

**Parameters:**
- `name` (required): Name of the pod
- `namespace` (optional): Namespace of the pod (default: `default`)
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
Show me details of pod my-app-12345

k8s_get_pod_logs

Get logs from a pod.

Parameters:
- name (required): Name of the pod
- namespace (optional): Namespace of the pod (default: default)
- container (optional): Container name for multi-container pods
- tailLines (optional): Number of lines to tail
- timestamps (optional): Include timestamps (default: false)
- follow (optional): Stream logs (limited support in MCP)

Examples:```
Get logs from pod my-app-12345
Show me the last 100 lines of logs from pod my-app-12345


#### k8s_delete_pod
Delete a pod from the cluster.

**Parameters:**
- `name` (required): Name of the pod to delete
- `namespace` (optional): Namespace of the pod (default: `default`)
- `gracePeriodSeconds` (optional): Grace period before force deletion

**Example:**```
Delete pod my-app-12345

Deployment Management (5 tools)

k8s_list_deployments

List deployments in a namespace.

Parameters:
- namespace (optional): Namespace to list from (default: default)
- labelSelector (optional): Filter by labels
- format (optional): Output format - json or markdown (default: markdown)

Example:```
List all deployments in production


#### k8s_get_deployment
Get detailed information about a deployment.

**Parameters:**
- `name` (required): Name of the deployment
- `namespace` (optional): Namespace of the deployment (default: `default`)
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
Show me details of deployment my-app

k8s_scale_deployment

Scale a deployment to a specific number of replicas.

Parameters:
- name (required): Name of the deployment
- namespace (optional): Namespace of the deployment (default: default)
- replicas (required): Desired number of replicas

Example:```
Scale my-app deployment to 5 replicas


#### k8s_restart_deployment
Restart a deployment (triggers rolling restart).

**Parameters:**
- `name` (required): Name of the deployment
- `namespace` (optional): Namespace of the deployment (default: `default`)

**Example:**```
Restart the my-app deployment

k8s_rollback_deployment

Rollback a deployment to a previous revision.

Parameters:
- name (required): Name of the deployment
- namespace (optional): Namespace of the deployment (default: default)
- toRevision (optional): Specific revision to rollback to

Example:```
Rollback my-app deployment


### Service Management (2 tools)

#### k8s_list_services
List services in a namespace.

**Parameters:**
- `namespace` (optional): Namespace to list from (default: `default`)
- `labelSelector` (optional): Filter by labels
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
List all services in the default namespace

k8s_get_service

Get detailed information about a service.

Parameters:
- name (required): Name of the service
- namespace (optional): Namespace of the service (default: default)
- format (optional): Output format - json or markdown (default: markdown)

Example:```
Show me details of service my-service


### Node Management (2 tools)

#### k8s_list_nodes
List all nodes in the cluster.

**Parameters:**
- `labelSelector` (optional): Filter by labels
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
List all nodes
Show me nodes that are not ready

k8s_get_node

Get detailed information about a node.

Parameters:
- name (required): Name of the node
- format (optional): Output format - json or markdown (default: markdown)

Example:```
Show me details of node worker-1


### Events & Monitoring (2 tools)

#### k8s_get_events
Get cluster events for debugging.

**Parameters:**
- `namespace` (optional): Namespace to get events from (omit for all)
- `fieldSelector` (optional): Filter by fields
- `limit` (optional): Maximum number of events
- `format` (optional): Output format - `json` or `markdown` (default: `markdown`)

**Example:**```
Show me recent events in the production namespace
Get the last 50 cluster events

k8s_get_resource_status

Get the status of a specific resource.

Parameters:
- resourceType (required): Type - pod, deployment, service, or node
- name (required): Name of the resource
- namespace (optional): Namespace (not for nodes)
- format (optional): Output format - json or markdown (default: markdown)

Example:```
What's the status of deployment my-app?
Check the status of pod my-pod-12345


## Configuration

The server respects standard Kubernetes configuration:

- **KUBECONFIG**: Path to kubeconfig file (default: `~/.kube/config`)
- Supports all contexts defined in your kubeconfig
- Respects RBAC permissions

Optional environment variables (create a `.env` file):```bash
# Default context
K8S_CONTEXT=minikube

# Default namespace
K8S_NAMESPACE=default

# Output format
OUTPUT_FORMAT=markdown

# Log level
LOG_LEVEL=info

Example Conversations with Claude

Once integrated with Claude Desktop, you can have natural conversations:```
You: "What Kubernetes contexts do I have?"
Claude: [Lists all contexts with current one highlighted]

You: "Switch to production and show me all failing pods"
Claude: [Switches context and shows pods with issues]

You: "Get logs from pod xyz"
Claude: [Shows recent logs from the pod]

You: "Scale the api deployment to 10 replicas"
Claude: [Scales the deployment and confirms]

You: "Show me cluster events from the last hour"
Claude: [Displays recent events]


## Architecture```
k8s-mcp/
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── types.ts              # TypeScript types and Zod schemas
│   ├── k8s-client.ts         # Kubernetes client wrapper
│   └── tools/
│       ├── formatters.ts     # Output formatting utilities
│       ├── context-tools.ts  # Context management tools
│       ├── namespace-tools.ts # Namespace tools
│       ├── pod-tools.ts      # Pod management tools
│       ├── deployment-tools.ts # Deployment tools
│       ├── service-tools.ts  # Service tools
│       ├── node-tools.ts     # Node tools
│       └── event-tools.ts    # Events and monitoring tools
├── dist/                     # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md

Development

Build```bash

npm run build


### Watch Mode```bash
npm run watch

Testing with Inspector```bash

npm run inspector
```

This opens an interactive interface to test all tools.

Troubleshooting

"Failed to load kubeconfig"

  • Ensure kubectl is installed and configured
  • Check that ~/.kube/config exists
  • Verify you can run kubectl get pods

"Permission denied" errors

  • Check your RBAC permissions in the cluster
  • Ensure your service account has necessary permissions
  • Contact your cluster administrator

"Context not found"

  • List available contexts with k8s_list_contexts
  • Ensure the context exists in your kubeconfig
  • Try kubectl config get-contexts to verify

"Resource not found"

  • Verify the resource name and namespace
  • Check you're using the correct context
  • Ensure the resource exists with kubectl

Security Considerations

  • The server respects RBAC permissions from your kubeconfig
  • No credentials are stored by the MCP server
  • All authentication uses your existing Kubernetes credentials
  • Operations are logged for audit purposes

Requirements

  • Node.js >= 18.0.0
  • kubectl configured with valid credentials
  • Access to a Kubernetes cluster

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

MIT

Related Documentation

  • QUICKSTART.md - Quick setup guide
  • IMPLEMENTATION_SUMMARY.md - Technical implementation details
  • PROJECT_OVERVIEW.md - High-level overview

Support

For issues, questions, or contributions, please open an issue on GitHub.

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
K8s MCP 334a77c7 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

K8s MCP 334a77c7 怎么在 Claude Desktop、Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

K8s MCP 334a77c7 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

K8s MCP 334a77c7 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

K8s MCP 334a77c7 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

K8s MCP 334a77c7 能提供哪些能力?

资料显示约 20 个工具;能力标签包括 Kubernetes管理、TypeScript、Claude、生产就绪。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。