# kubernetes-mcp-server

> MCP Server

This repository provides a Kubernetes Model Context Protocol (MCP) server implementation, enabling users to manage Kubernetes and OpenShift resources through CRUD operations, pod management, and configuration updates. This repository provides

## Overview

- **Category:** System Tools
- **Language:** Go
- **Stars:** 1963
- **Forks:** 12
- **Owner:** manusa
- **GitHub:** https://github.com/manusa/kubernetes-mcp-server
- **Created:** 2025-02-11T02:57:36+00:00
- **Updated:** 2025-03-28T20:54:33+00:00
- **Source:** https://model-context-protocol.com/servers/kubernetes-openshift-mcp-resource-management

## Setup

## Setup

### Requirements

- Access to a Kubernetes cluster.

### Claude Desktop

#### Using npx

If you have npm installed, this is the fastest way to get started with `kubernetes-mcp-server` on Claude Desktop.

Open your `claude_desktop_config.json` and add the mcp server to the list of `mcpServers`:
``` json
{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server@latest"
      ]
    }
  }
}
```

### VS Code / VS Code Insiders

Install the Kubernetes MCP server extension in VS Code Insiders by pressing the following link:

[<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522kubernetes%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522kubernetes-mcp-server%2540latest%2522%255D%257D)

Alternatively, you can install the extension manually by running the following command:

```shell
# For VS Code
code --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'
```

### Goose CLI

[Goose CLI](https://blog.marcnuri.com/goose-on-machine-ai-agent-cli-introduction) is the easiest (and cheapest) way to get rolling with artificial intelligence (AI) agents.

#### Using npm

If you have npm installed, this is the fastest way to get started with `kubernetes-mcp-server`.

Open your goose `config.yaml` and add the mcp server to the list of `mcpServers`:
```yaml
extensions:
  kubernetes:
    command: npx
    args:
      - -y
      - kubernetes-mcp-server@latest

```

## Tools

## Available Tools

1.  **Configuration**: Automatically detect changes in the Kubernetes configuration and update the MCP server, allowing you to view and manage the current Kubernetes `.kube/config` or in-cluster configuration.
2.  **Generic Kubernetes Resources**: Perform any CRUD operation (Create or Update, Get, List, Delete) on any Kubernetes or OpenShift resource.
3.  **Pods**: Perform Pod-specific operations, including listing pods, getting a pod by name, deleting a pod, showing logs, executing into a pod, and running a container image in a pod.
4.  **Namespaces**: List Kubernetes Namespaces.
5.  **Events**: View Kubernetes events in all namespaces or in a specific namespace.
6.  **Projects**: List OpenShift Projects.
