# ks-mcp-server **Repository Path**: ksphere/ks-mcp-server ## Basic Information - **Project Name**: ks-mcp-server - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-27 - **Last Updated**: 2025-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # KSphere MCP Server The KSphere MCP Server is a [Model Context Protocol(MCP)](https://modelcontextprotocol.io/introduction) server that provides integration with KSphere APIs, enabling to get resources from KSphere. Divided into four tools modules: `Workspace Management`, `Cluster Management`, `User and Roles`, `Extensions Center`. ## Prerequisites You must have a KSphere 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 KSphere is `ksphere`, which can be modified via the environment variable `KSPHERE_CONTEXT`. ```yaml apiVersion: v1 clusters: - cluster: certificate-authority-data: server: name: ksphere contexts: - context: cluster: ksphere user: admin name: ksphere current-context: ksphere kind: Config preferences: {} users: - name: admin user: username: password: ``` ``: **Optional**. Fill in the CA certificate in base64-encoded format when KSphere 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 KSphere cluster. ``: **Required** The password for the KSphere 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/ksphere/ks-mcp-server/releases] and then move it to `$PATH`. ### Configuration MCP Server in AI Agent #### Claude Desktop 1. According to [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) should change the MCP Configuration. like: ```json { "mcpServers": { "KSphere": { "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 KSphere cluster, supporting either the `ks-console` or `ks-apiserver` service address (e.g., `http://172.10.0.1:30880`). 2. chat with mcp server ![claude desktop result](statics/claude-desktop.png) #### Cursor 1. According to [Curosr](https://docs.cursor.com/context/model-context-protocol) should change the MCP Configuration. like: ```json { "mcpServers": { "KSphere": { "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 KSphere cluster, supporting either the `ks-console` or `ks-apiserver` service address (e.g., `http://172.10.0.1:30880`). 2. chat with mcp server ![cursor result](statics/cursor.png)