BhagyaAmarasinghe
MCP Server
BhagyaAmarasinghe
public

mcp kubernetes

一个用于从 Claude Desktop 或其他 MCP 兼容客户端执行 Kubernetes 命令的工具。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Go
Language
MIT License
License

About This Server

一个用于从 Claude Desktop 或其他 MCP 兼容客户端执行 Kubernetes 命令的工具。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

# MCP Kubernetes

A Model Context Protocol (MCP) server for executing Kubernetes commands from Claude Desktop or any MCP-compatible client.

## Installation

You can install this tool directly using Go:

```bash
go install github.com/BhagyaAmarasinghe/mcp-kubernetes@latest
```

## Usage

### Starting the server

Run the MCP Kubernetes server:

```bash
mcp-kubernetes
```

By default, the server runs using stdio transport. You can specify a different port for HTTP transport with the `-port` flag:

```bash
mcp-kubernetes -port 8080
```

### Using with Claude Desktop

1. Configure Claude Desktop to use the MCP Kubernetes server by adding it to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "kubernetes": {
      "command": "mcp-kubernetes"
    }
  }
}
```

2. You can now use Claude to execute Kubernetes commands, such as:
   - "Show me the pods in the default namespace"
   - "List all services across all namespaces"
   - "Check the status of my deployment named my-app"

### Available Commands

The MCP Kubernetes server supports the following MCP requests:

#### execute

Executes a kubectl command:

```json
{
  "command": "get pods -n default"
}
```

#### get-contexts

Retrieves a list of available Kubernetes contexts:

```json
{}
```

#### current-context

Gets the current Kubernetes context:

```json
{}
```

#### set-context

Sets the current Kubernetes context:

```json
{
  "context": "minikube"
}
```

## Security

This MCP server executes kubectl commands directly on your machine, so it should only be used in trusted environments. It does not implement authentication or authorization controls by default.

## Requirements

- Go 1.23 or higher
- kubectl installed and in your PATH
- A valid kubeconfig file

## License

MIT

Quick Start

1

Clone the repository

git clone https://github.com/BhagyaAmarasinghe/mcp-kubernetes
2

Install dependencies

cd mcp-kubernetes
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

OwnerBhagyaAmarasinghe
Repomcp-kubernetes
Language
Go
LicenseMIT License
Last fetched8/8/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation