Skip to content

Add Helm(CLI) MCP Server Implementation #1607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jeff-nasseri
Copy link

@jeff-nasseri jeff-nasseri commented Apr 27, 2025

Helm(CLI) MCP Server

This PR adds a Helm MCP server that allows AI Assistants to interact with Helm, the Kubernetes package manager.

Overview

The Helm MCP server provides a bridge between AI assistants and the Helm CLI, enabling natural language execution of Helm commands for managing Kubernetes applications. This server supports all major Helm commands, allowing assistants to help users install, upgrade, and manage charts and releases.

Supported Commands

The server implements the following Helm commands:

Completion Commands

  • helm completion - Generate autocompletion scripts for bash, fish, powershell, and zsh

Chart Creation and Management

  • helm create - Create a new chart
  • helm lint - Verify chart formatting
  • helm package - Package a chart directory into a chart archive
  • helm template - Render chart templates locally

Dependency Management

  • helm dependency build - Build chart dependencies
  • helm dependency list - List chart dependencies
  • helm dependency update - Update chart dependencies

Environment

  • helm env - Show Helm environment information
  • helm version - Show Helm version

Release Management

  • helm install - Install a chart
  • helm uninstall - Uninstall a release
  • helm upgrade - Upgrade a release
  • helm rollback - Rollback a release to a previous revision
  • helm list - List releases
  • helm status - Show release status
  • helm history - Show release history
  • helm test - Run tests for a release

Release Information

  • helm get all - Get all information about a release
  • helm get hooks - Get hooks for a release
  • helm get manifest - Get manifest for a release
  • helm get metadata - Get metadata for a release
  • helm get notes - Get notes for a release
  • helm get values - Get values for a release

Repository Management

  • helm repo add - Add a chart repository
  • helm repo index - Generate an index file for a chart repository
  • helm repo list - List chart repositories
  • helm repo remove - Remove a chart repository
  • helm repo update - Update chart repositories
  • helm search repo - Search repositories for charts
  • helm search hub - Search Helm Hub for charts

Registry Management

  • helm registry login - Log in to a registry
  • helm registry logout - Log out from a registry
  • helm push - Push a chart to a registry
  • helm pull - Pull a chart from a repository

Chart Information

  • helm show all - Show all information for a chart
  • helm show chart - Show chart definition
  • helm show crds - Show Custom Resource Definitions
  • helm show readme - Show README
  • helm show values - Show values

Plugin Management

  • helm plugin install - Install a plugin
  • helm plugin list - List plugins
  • helm plugin uninstall - Uninstall a plugin
  • helm plugin update - Update a plugin

Verification

  • helm verify - Verify a chart

Example Usage

# List Helm repositories
client.call_tool("helm_repo_list", {})

# Install a chart
client.call_tool("helm_install", {
  "chart": "bitnami/nginx",
  "release_name": "my-nginx",
  "namespace": "default",
  "set_values": {
    "replicaCount": "3",
    "service.type": "ClusterIP"
  }
})

# Search for charts
client.call_tool("helm_search_repo", {"keyword": "prometheus"})

Test Plan

  • Manual testing with MCP Inspector
  • Verified all commands work with appropriate parameters
  • Tested with real Kubernetes clusters
  • Verified chart installation, upgrade, and uninstallation
  • Tested repository management workflows

Inspector

To run the mcp with inspector you can run the following command

npx @modelcontextprotocol/inspector uvx mcp-server-helm

Make sure you've already installed Helm on your system and it's connected to a cluster. You can try minikube

Claude Desktop

mcp-helm-claude-desktop.mp4

Inspector

mcp-helm-inspector.mp4

Related Issue: #1606

@jeff-nasseri jeff-nasseri force-pushed the feature/helm-chart branch from 908505f to d3f49b5 Compare May 5, 2025 14:11
@jeff-nasseri jeff-nasseri marked this pull request as ready for review May 5, 2025 14:11
This commit introduces a complete Hello World Helm chart that demonstrates basic Helm functionality. The chart deploys an Nginx container that serves a simple webpage with a customizable message. The implementation includes all necessary Helm chart components:

- Chart.yaml with metadata, version information and maintainer details
- Standard Kubernetes manifests (deployment.yml, service.yml)
- Helper templates for consistent naming and labeling
- Comprehensive values.yaml with configurable parameters
- Detailed README.md with installation instructions and configuration options
- Standard .helmignore file to exclude unnecessary files from the chart
@jeff-nasseri jeff-nasseri force-pushed the feature/helm-chart branch from 771fce1 to 153ec90 Compare May 5, 2025 14:13
@jeff-nasseri jeff-nasseri changed the title Add Helm MCP Server Implementation Add Helm(CLI) MCP Server Implementation May 5, 2025
@jeff-nasseri jeff-nasseri force-pushed the feature/helm-chart branch from 6b72aa3 to 4f915a7 Compare May 5, 2025 15:51
@jeff-nasseri
Copy link
Author

Here is the listed at MCP.so marketplace:
https://mcp.so/server/helm-cli/Jeff%20Nasseri

This commit introduces a new MCP server for Helm, the Kubernetes package manager, enabling AI assistants to interact with Helm through natural language. The integration provides comprehensive coverage of Helm's functionality including chart management, release operations, repository handling, and more.

The implementation includes:
- A complete Python MCP server with support for all major Helm commands
- Docker configuration for containerized deployment
- Comprehensive documentation with usage examples for each command
- Project configuration with proper packaging and versioning
- MIT license for open-source distribution

This server allows AI assistants to perform complex Helm operations like installing charts, managing repositories, checking release status, and templating charts through a standardized interface, making Kubernetes management more accessible through natural language interactions.
@jeff-nasseri jeff-nasseri force-pushed the feature/helm-chart branch from cc8398c to 2769729 Compare May 5, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants