---
title: "Installation"
description: "Detailed installation instructions for Kyverno MCP"
diataxis: how-to
applies_to:
  product: "kyverno"
audience: ["platform-engineer","devsecops"]
last_updated: 2026-03-25
url: https://docs.nirmata.io/docs/controllers/n4k/kyverno-mcp/installation/
---


## 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:

```bash
# 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:

1. Visit the [Nirmata downloads page](https://downloads.nirmata.io/kyverno-mcp/downloads/)
2. 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

3. Make the binary executable (macOS/Linux):
```bash
chmod +x kyverno-mcp-*
```

4. Move to a directory in your PATH:
```bash
sudo mv kyverno-mcp-* /usr/local/bin/kyverno-mcp
```

### Option 3: Build from Source

If you prefer to build from source:

```bash
# 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:

```bash
# 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:

```yaml
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:

```bash
# 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:
```bash
chmod +x kyverno-mcp
```

### Command Not Found
If the command is not found after installation:
1. Check if the binary is in your PATH: `echo $PATH`
2. Add the directory to PATH: `export PATH=$PATH:/path/to/directory`

### Kubeconfig Issues
If you encounter kubeconfig errors:
1. Verify your kubeconfig exists: `ls ~/.kube/config`
2. Test kubectl access: `kubectl cluster-info`
3. Specify kubeconfig explicitly: `kyverno-mcp --kubeconfig=/path/to/config`

## Next Steps

- Continue with the [Getting Started](getting-started.md) guide
- Learn about [Configuration Options](configuration.md)
- Explore [Available Tools](available-tools.md) 
