KDebug Kubernetes
STDIOKubernetes debugging tool that allows interaction with clusters through Claude AI.
Kubernetes debugging tool that allows interaction with clusters through Claude AI.
KDebug is a Kubernetes debugging tool that allows you to interact with your Kubernetes clusters through Claude AI. It uses the Model Control Protocol (MCP) to enable Claude to execute Kubernetes commands on your behalf.
This tool allows you to:
~/.kube/config
)https://github.com/soub4i/kdebug-mcp/releases
Download the latest release for your platform (macOS, Linux, Windows)
Make the binary executable:
chmod +x kdebug-mcp
mv kdebug-mcp /usr/local/bin/kdebug-mcp # or mv kdebug-mcp ~/bin/kdebug-mcp # If you have ~/bin in your PATH
git clone https://github.com/soub4i/kdebug-mcp.git cd kdebug-mcp
go build -o bin/server ./cmd/server/main.go
Create or edit the Claude MCP configuration file located at:
~/Library/Application Support/com.anthropic.claude/config.json
~/.config/com.anthropic.claude/config.json
%APPDATA%\com.anthropic.claude\config.json
Add the following configuration:
{ "mcpServers": { "kdebug": { "command": "/path/to/kdebug-mcp/bin/server" } } }
Replace /path/to/kdebug-mcp/bin/server
with the actual path to your KDebug binary.
KDebug uses your current Kubernetes context from ~/.kube/config
. Make sure your Kubernetes configuration is properly set up.
To switch contexts, you can use:
kubectl config use-context <context-name>
Example prompts:
KDebug provides access to the following Kubernetes resources:
nodes
: List all nodes in the clusterpods
: List pods in a namespace or get a specific podpodLogs
: Get logs from a specific podservices
: List services in a namespace or get a specific servicedeployments
: List deployments in a namespace or get a specific deploymentstatefulsets
: List stateful sets in a namespace or get a specific stateful setreplicasets
: List replica sets in a namespace or get a specific replica setdaemonsets
: List daemon sets in a namespace or get a specific daemon setevents
: List events in a namespace or related to a specific resourceClaude can't connect to KDebug
Permission errors
~/.kube/config
) has the necessary permissionskubectl get pods
to verify your Kubernetes accessContext switching
KDebug executes Kubernetes commands with the permissions of your current user. Be mindful that Claude will have the same access to your Kubernetes cluster as you do through your configured kubectl context.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.