
Kubesphere/KS-MCP-Server 是从 https://github.com/kubesphere/ks-mcp-server. 导入的 MCP 服务器候选
概览
Kubesphere/KS-MCP-Server 是从 https://github.com/kubesphere/ks-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
KubeSphere MCP 服务器是一款模型上下文协议(MCP)服务器,提供与 KubeSphere API 的集成,使得从 KubeSphere 获取资源成为可能。分为四个工具模块:Workspace Management、Cluster Management、User and Roles、Extensions Center。
先修条件
你必须拥有一个 KubeSphere 集群。包含:访问地址、用户名、密码。
安装
生成KSConfig
该格式类似于 kubeconfig。该配置包含 HTTP 连接器信息。KubeSphere 的默认上下文是 kubesphere,可以通过环境变量 KUBESPHERE_CONTEXT 进行修改。
:可选。通过HTTPS访问KubeSphere时,请以base64编码格式填写CA证书。
: 必填 必须是HTTPS地址。(如果使用HTTP,请在此输入任意HTTPS地址,然后通过参数--ks-apiserver http://xxx进行修改)
: 必需 KubeSphere集群的用户。
: 必需 KubeSphere集群用户的密码。
获取ks-mcp-server二进制
你可以运行命令 go build -o ks-mcp-server cmd/main.go 或从 (GitHub releases)[https://github.com/kubesphere/ks-mcp-server/releases] 下载。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
KubeSphere MCP Server
The KubeSphere MCP Server is a Model Context Protocol(MCP) server that provides integration with KubeSphere APIs, enabling to get resources from KubeSphere. Divided into four tools modules: Workspace Management, Cluster Management, User and Roles, Extensions Center.
Prerequisites
You must have a KubeSphere cluster. contains: Access Address, Username, Password.
Installation
Generate KSConfig
The format is similar to kubeconfig. This configuration contains HTTP connector information. The default context for KubeSphere is kubesphere, which can be modified via the environment variable KUBESPHERE_CONTEXT.
apiVersion: v1
clusters:
- cluster:
certificate-authority-data:
server:
name: kubesphere
contexts:
- context:
cluster: kubesphere
user: admin
name: kubesphere
current-context: kubesphere
kind: Config
preferences: {}
users:
- name: admin
user:
username:
password:
: **Optional**. Fill in the CA certificate in base64-encoded format when KubeSphere is accessed via HTTPS. : Required Must be an HTTPS address. (If using HTTP, enter any HTTPS address here, then modify via the parameter --ks-apiserver http://xxx)
: **Required** The user for the KubeSphere cluster. : Required The password for the KubeSphere cluster user.
Get ks-mcp-server binary
you can run command go build -o ks-mcp-server cmd/main.go or download from (github releases)[https://github.com/kubesphere/ks-mcp-server/releases]
and then move it to $PATH.
Configuration MCP Server in AI Agent
Claude Desktop
- According to Claude Desktop should change the MCP Configuration. like:
{
"mcpServers": {
"KubeSphere": {
"args": [
"stdio",
"--ksconfig", "",
"--ks-apiserver", ""
],
"command": "ks-mcp-server"
}
}
}
: **Required** The absolute path of the ksconfig file. : Optional (but required for HTTP access) The access address of the KubeSphere cluster, supporting either the ks-console or ks-apiserver service address (e.g., http://172.10.0.1:30880).
- chat with mcp server
Cursor
- According to Curosr should change the MCP Configuration. like:
{
"mcpServers": {
"KubeSphere": {
"args": [
"stdio",
"--ksconfig", "",
"--ks-apiserver", ""
],
"command": "ks-mcp-server"
}
}
}
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"KubeSphere": {
"args": [
"stdio",
"--ksconfig", "<ksconfig file absolute path>",
"--ks-apiserver", "<KubeSphere Address>"
],
"command": "ks-mcp-server"
}
}
}