Using KSail with Claude, Cursor, and Windsurf
KSailâs MCP (Model Context Protocol) server exposes all cluster and workload commands as structured tools that AI assistants can invoke. This guide shows how to connect Claude Desktop, Cursor, and Windsurf to KSail so you can manage Kubernetes clusters using natural language.
Prerequisites
Section titled âPrerequisitesâ- KSail installed and available in
PATH - Docker running (required for local cluster operations)
- An MCP-compatible AI client (see setup steps below)
Verify KSail is reachable from your shell:
ksail mcp --helpClient Setup
Section titled âClient SetupâAdd KSail to your Claude Desktop MCP server configuration.
Configuration file location:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Edit (or create) the config file and add the ksail entry to mcpServers:
{ "mcpServers": { "ksail": { "command": "ksail", "args": ["mcp"] } }}After saving, restart Claude Desktop. The KSail tools will appear in Claudeâs tool picker.
{ "mcpServers": { "ksail": { "command": "/opt/homebrew/bin/ksail", "args": ["mcp"] } }}Add KSail to Cursorâs MCP configuration. Cursor supports both project-level and global MCP servers.
Project-level (shared with team, checked into version control):
Create or edit .cursor/mcp.json in your project root:
{ "mcpServers": { "ksail": { "command": "ksail", "args": ["mcp"] } }}Global (available in all Cursor projects):
Edit ~/.cursor/mcp.json:
{ "mcpServers": { "ksail": { "command": "ksail", "args": ["mcp"] } }}After saving, restart Cursor or reload the MCP configuration from the Cursor settings panel (Cursor Settings â MCP). The KSail tools will be listed as available servers.
Add KSail to Windsurfâs MCP configuration.
Open Windsurf Settings (Cmd+, on macOS / Ctrl+, on Windows/Linux) and navigate to MCP â Add MCP Server, or edit your Windsurf MCP config file directly:
{ "mcpServers": { "ksail": { "command": "ksail", "args": ["mcp"] } }}After saving, restart the Cascade AI session or reload MCP servers from the Windsurf settings. The KSail tools will be listed as available.
The KSail VSCode extension handles MCP registration automatically â no manual configuration needed.
- Install the KSail extension from the VS Code Marketplace.
- Open a workspace with a
ksail.yamlfile (or run KSail: Init Cluster from the Command Palette to create one). - Switch GitHub Copilot to agent mode â Copilot can now invoke KSail commands directly.
For manual configuration or if you prefer not to use the extension, add KSail to VS Codeâs settings.json:
{ "mcp": { "servers": { "ksail": { "command": "ksail", "args": ["mcp"] } } }}Example Prompts
Section titled âExample PromptsâOnce connected, you can manage Kubernetes clusters with natural language. Here are some prompts to get started:
Cluster management
Section titled âCluster managementâ| Prompt | Tool invoked |
|---|---|
| âCreate a Vanilla Kubernetes cluster with Flux and Ciliumâ | cluster_write (init â create) |
| âList all my KSail clustersâ | cluster_read (list) |
| âShow me the status of the dev clusterâ | cluster_read (info) |
| âUpdate the staging cluster to match the latest configâ | cluster_write (update) |
| âDelete the dev clusterâ | cluster_write (delete) |
Workload operations
Section titled âWorkload operationsâ| Prompt | Tool invoked |
|---|---|
| âGet all pods in the default namespaceâ | workload_read (get) |
| âShow logs for the api-server podâ | workload_read (logs) |
| âApply all manifests in the k8s/ directoryâ | workload_write (apply) |
| âValidate my Kubernetes manifestsâ | workload_read (validate) |
| âScale the api deployment to 3 replicasâ | workload_write (scale) |
| âGenerate a Deployment manifest for my-appâ | workload_read (gen_deployment) |
Secret management
Section titled âSecret managementâ| Prompt | Tool invoked |
|---|---|
| âEncrypt the secrets.yaml file with SOPSâ | cipher_write (encrypt) |
| âImport my SOPS age key from the key fileâ | cipher_write (import) |
- Available tools: KSail exposes 5 MCP tools grouped by permission level. For the complete tool catalog with subcommands and flags, see the MCP Server reference.
- Multiple environments: Combine with the
--configflag in your prompts â for example, âApply manifests using the staging configâ will work if you reference the config file path in your prompt and KSail finds it. - Cluster creation takes time: Inform your AI assistant that cluster creation can take 2â5 minutes. Most MCP clients have configurable tool timeouts.
- Security: The MCP server runs with the full permissions of the
ksailprocess. Only connect trusted AI clients. See the MCP Server security note for details.