Skip to main content

Helm MCP server

The Helm MCP Server is a Model Context Protocol server that gives AI agents schema-validated control over Kubernetes Helm chart lifecycles. It exposes 18 tools, read-only cluster resources, and guided operational prompts so agents can search chart repositories, validate values.yaml overrides against JSON Schemas, run server-side dry-runs, monitor rollouts, and execute rollbacks safely.

Core capabilities​

Capability DomainWhat the Server Provides
Chart Discovery & MetadataSearch charts across Bitnami, ArtifactHub, and private registries; inspect versions, READMEs, and values.schema.json definitions.
Pre-Deployment ValidationValidate custom values.yaml payloads against chart schemas, render manifests via helm template, and check cluster prerequisites before installation.
Release LifecycleInstall, upgrade, rollback, and uninstall Helm releases with built-in dry_run=True preview modes and revision history tracking.
Rollout MonitoringWatch pod readiness, release status, and Kubernetes warning events immediately after an install or upgrade.
Multi-Cluster ContextsEnumerate and switch Kubernetes contexts defined in KUBECONFIG with strict namespace isolation.

Architecture​

Quickstart​

1
Verify prerequisites

Ensure you have Docker (or Python 3.12+ with helm v3 and kubectl installed) and a valid ~/.kube/config pointing to your target cluster.

2
Start the Helm MCP Server container

Mount your kubeconfig read-only and expose port 8765:

docker run --rm -it \
-p 8765:8765 \
-v ~/.kube/config:/app/.kube/config:ro \
talkopsai/helm-mcp-server:latest

The server listens on http://localhost:8765/mcp.

3
Register the server in your MCP client

Add the endpoint to your MCP client configuration (.cursor/mcp.json, claude_desktop_config.json, or OpsCode config.toml):

mcp.json
{
"mcpServers": {
"helm-mcp-server": {
"url": "http://localhost:8765/mcp",
"description": "Helm MCP Server for managing Kubernetes workloads via Helm"
}
}
}

Security and write protection​

  • Read-only mode: Set MCP_ALLOW_WRITE=false when you want agents to search charts, validate values, and run dry-run plans without permitting live cluster mutations.
  • Secret management: Never pass plaintext passwords or API keys in inline values payloads—reference existing Kubernetes Secret objects or External Secrets Operator resources.
  • Namespace isolation: Scope service accounts and RBAC roles to specific target namespaces.

Project structure​

helm-mcp-server/
├── helm_mcp_server/ # Main package
│ ├── tools/ # 18 MCP tools
│ │ ├── discovery/ # Chart search and metadata inspection
│ │ ├── installation/ # Install, upgrade, rollback, uninstall
│ │ ├── validation/ # Values schema and manifest validation
│ │ ├── kubernetes/ # Context and namespace operations
│ │ └── monitoring/ # Release rollout health monitoring
│ ├── resources/ # MCP resources (helm://, k8s://)
│ ├── prompts/ # Operational runbook prompts
│ ├── services/ # Helm CLI & Kubernetes API services
│ ├── server/ # FastMCP server initialization
│ └── config.py # Environment configuration
├── tests/ # Automated test suite
└── pyproject.toml # Package metadata