Installation
Detailed installation instructions for Kyverno MCP
Installation Methods
Kyverno MCP can be installed using several methods depending on your operating system and preferences.
Prerequisites
- Go 1.24 or higher (only for building from source)
- Access to a Kubernetes cluster with a valid kubeconfig
- Kyverno installed in your cluster (for policy operations)
Option 1: Homebrew (Recommended for macOS/Linux)
The easiest way to install Kyverno MCP on macOS or Linux:
# Add the Nirmata tap
brew tap nirmata/tap
# Install Kyverno MCP
brew install kyverno-mcp
# Verify installation
kyverno-mcp --version
Option 2: Pre-built Binaries
Download pre-built binaries for your platform:
-
Visit the Nirmata downloads page
-
Download the appropriate binary for your platform:
kyverno-mcp-darwin-amd64
for macOS (Intel)kyverno-mcp-darwin-arm64
for macOS (Apple Silicon)kyverno-mcp-linux-amd64
for Linux (x86_64)kyverno-mcp-windows-amd64.exe
for Windows
-
Make the binary executable (macOS/Linux):
chmod +x kyverno-mcp-*
- Move to a directory in your PATH:
sudo mv kyverno-mcp-* /usr/local/bin/kyverno-mcp
Option 3: Build from Source
If you prefer to build from source:
# Clone the repository
git clone https://github.com/nirmata/kyverno-mcp.git
cd kyverno-mcp
# Build the binary
go build -o kyverno-mcp ./cmd/kyverno-mcp
# Install to PATH
sudo mv kyverno-mcp /usr/local/bin/
Option 4: Docker
Run Kyverno MCP using Docker:
# Build the Docker image
docker build -t kyverno-mcp:latest .
# Run with mounted kubeconfig
docker run --rm -i \
-v $HOME/.kube/config:/kube/config:ro \
kyverno-mcp:latest -- \
--kubeconfig /kube/config
For Docker Compose:
version: '3.8'
services:
kyverno-mcp:
image: kyverno-mcp:latest
volumes:
- ${HOME}/.kube/config:/kube/config:ro
environment:
- KUBECONFIG=/kube/config
stdin_open: true
tty: true
Verifying Installation
After installation, verify that Kyverno MCP is working correctly:
# Check version
kyverno-mcp --version
# Test with default kubeconfig
kyverno-mcp
# Test with specific kubeconfig
kyverno-mcp --kubeconfig=/path/to/kubeconfig
Platform-Specific Notes
macOS
- If using Homebrew, updates are handled via
brew upgrade kyverno-mcp
- For Apple Silicon Macs, ensure you download the
arm64
binary
Linux
- Add the binary location to your
$PATH
in~/.bashrc
or~/.zshrc
- Consider creating a systemd service for HTTP mode
Windows
- Add the executable location to your system PATH
- Use PowerShell or Command Prompt to run the tool
- Consider using Windows Subsystem for Linux (WSL) for better compatibility
Troubleshooting Installation
Permission Denied
If you get a “permission denied” error:
chmod +x kyverno-mcp
Command Not Found
If the command is not found after installation:
- Check if the binary is in your PATH:
echo $PATH
- Add the directory to PATH:
export PATH=$PATH:/path/to/directory
Kubeconfig Issues
If you encounter kubeconfig errors:
- Verify your kubeconfig exists:
ls ~/.kube/config
- Test kubectl access:
kubectl cluster-info
- Specify kubeconfig explicitly:
kyverno-mcp --kubeconfig=/path/to/config
Next Steps
- Continue with the Getting Started guide
- Learn about Configuration Options
- Explore Available Tools