home / mcp / kdebug - kubernetes debugging mcp server

KDebug - Kubernetes Debugging MCP Server

A Kubernetes debugging MCP server that lets Claude execute kubectl commands against your cluster via conversational prompts.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "soub4i-kdebug-mcp": {
      "command": "/path/to/kdebug-mcp/bin/server",
      "args": []
    }
  }
}

KDebug MCP Server enables Claude to interact with your Kubernetes clusters by issuing commands through the Model Control Protocol. It streamlines cluster inspection, resource management, and log/event checks via natural language prompts, letting you perform Kubernetes operations without switching contexts manually.

How to use

Start Claude and ensure it is connected to your KDebug MCP server. In conversation, ask for Kubernetes data or actions just as you would with a regular chat. You can query cluster state, list resources, view pod logs, and retrieve events by describing what you want in plain language.

How to install

Prerequisites you need to have before installing KDebug MCP Server.

# Prerequisites
- Go 1.18+
- Access to a Kubernetes cluster (configured via ~/.kube/config)
- Claude client with MCP support

# Option 1: Download pre-built binary
# 1) Download the latest release for your platform
# 2) Make it executable
chmod +x kdebug-mcp

# 3) Move it to a directory in your PATH
mv kdebug-mcp /usr/local/bin/kdebug-mcp
# or use your preferred PATH location
mv kdebug-mcp ~/bin/kdebug-mcp

# Option 2: Build from source
# 1) Clone the repository
# 2) Build the binary

Additional sections

Configuration, security, and troubleshooting details are provided here to help you set up and maintain your MCP server. Follow the steps to connect Claude to KDebug, manage Kubernetes context, and handle common issues.

Configuration

Configure Claude to use your KDebug MCP server by adding a server entry to your MCP configuration. This example shows how to reference the local server binary.

{
  "mcpServers": {
    "kdebug": {
      "command": "/path/to/kdebug-mcp/bin/server"
    }
  }
}

Kubernetes Context

KDebug reads your current Kubernetes context from ~/.kube/config. To switch contexts, use the standard Kubernetes context switch command.

kubectl config use-context <context-name>

Security considerations

KDebug executes Kubernetes commands with the permissions of your current user. Claude will operate within the same access rights defined by your kubectl context.

Troubleshooting

If Claude cannot connect to KDebug or you encounter permission issues, verify the MCP configuration path is correct and that the KDebug binary is executable. Ensure your ~/.kube/config provides the necessary permissions for the requested operations.

Available tools

nodes

List all nodes in the cluster, showing their statuses and roles.

pods

List pods in a namespace or retrieve details about a specific pod.

podLogs

Fetch logs from a specified pod to diagnose issues.

services

List services in a namespace or fetch details about a specific service.

deployments

List deployments in a namespace or describe a specific deployment.

statefulsets

List stateful sets in a namespace or inspect a specific one.

replicasets

List replica sets in a namespace or view a specific one.

daemonsets

List daemon sets in a namespace or examine a particular daemon set.

events

List events in a namespace or related to a specific resource.