Skip to content

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.

  • 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:

Terminal window
ksail mcp --help

Add KSail to your Claude Desktop MCP server configuration.

Configuration file location:

PlatformPath
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"]
}
}
}

Once connected, you can manage Kubernetes clusters with natural language. Here are some prompts to get started:

PromptTool 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)
PromptTool 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)
PromptTool 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 --config flag 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 ksail process. Only connect trusted AI clients. See the MCP Server security note for details.