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.
Documentation
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.
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 and then move it to $PATH.
Configuration MCP Server in AI Agent## Claude Desktop
According to Claude Desktop should change the MCP Configuration. like:
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:
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).